// ------------------------------------------------------------------------- //
//                XOOPS - PHP Content Management System                      //
//                       <http://www.xoops.org/>                             //
// ------------------------------------------------------------------------- //
// Based on:								     //
// myPHPNUKE Web Portal System - http://myphpnuke.com/	  		     //
// PHP-NUKE Web Portal System - http://phpnuke.org/	  		     //
// Thatware - http://thatware.org/					     //
// ------------------------------------------------------------------------- //
//  This program is free software; you can redistribute it and/or modify     //
//  it under the terms of the GNU General Public License as published by     //
//  the Free Software Foundation; either version 2 of the License, or        //
//  (at your option) any later version.                                      //
//                                                                           //
//  This program is distributed in the hope that it will be useful,          //
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
// ------------------------------------------------------------------------- //

This "Newbb with Polls" hack was made by Xtrem.dj (xtrem.dj@clubxtrem.net , http://www.clubxtrem.net)

Be careful to save your files between testing this hack.
i'm not responsible for any damage this hack may cause to your xoops powered Site.

Only Works With RC3 !

For any bug reports ( xtrem.dj@clubxtrem.net )


INSTALL :

Add this tables to your databases after having change the prefix :

CREATE TABLE `xoops_bbpoll_desc` (
  `poll_id` mediumint(8) unsigned NOT NULL auto_increment,
  `question` varchar(255) NOT NULL default '',
  `description` tinytext NOT NULL,
  `user_id` int(5) unsigned NOT NULL default '0',
  `start_time` int(10) unsigned NOT NULL default '0',
  `end_time` int(10) unsigned NOT NULL default '0',
  `votes` smallint(5) unsigned NOT NULL default '0',
  `voters` smallint(5) unsigned NOT NULL default '0',
  `multiple` tinyint(1) unsigned NOT NULL default '0',
  `display` tinyint(1) unsigned NOT NULL default '0',
  `weight` smallint(5) unsigned NOT NULL default '0',
  `mail_status` tinyint(1) unsigned NOT NULL default '0',
  `topic_id` int(11) unsigned NOT NULL default '0',
  PRIMARY KEY  (`poll_id`),
  KEY `end_time` (`end_time`),
  KEY `display` (`display`)
) TYPE=MyISAM;
 

CREATE TABLE `xoops_bbpoll_log` (
  `log_id` int(10) unsigned NOT NULL auto_increment,
  `poll_id` mediumint(8) unsigned NOT NULL default '0',
  `option_id` int(10) unsigned NOT NULL default '0',
  `ip` char(15) NOT NULL default '',
  `user_id` int(5) unsigned NOT NULL default '0',
  `time` int(10) unsigned NOT NULL default '0',
  PRIMARY KEY  (`log_id`),
  KEY `poll_id_user_id` (`poll_id`,`user_id`),
  KEY `poll_id_ip` (`poll_id`,`ip`)
) TYPE=MyISAM;
 
 
 
 
 
CREATE TABLE `xoops_bbpoll_option` (
  `option_id` int(10) unsigned NOT NULL auto_increment,
  `poll_id` mediumint(8) unsigned NOT NULL default '0',
  `option_text` varchar(255) NOT NULL default '',
  `option_count` smallint(5) unsigned NOT NULL default '0',
  `option_color` varchar(25) NOT NULL default '',
  PRIMARY KEY  (`option_id`),
  KEY `poll_id` (`poll_id`)
) TYPE=MyISAM;


After that, just put this files in the newbb directory and replace the old one.


Thanks

Kenny,
Xtremdj (xtrem.dj@clubxtrem.net)
webmaster of http://www.clubxtrem.net
