How to add SQL - NBS






 

 

How to add SQL - NBS

View Full Version : How to add SQL


Markwow
14-Oct-2006, 11:32 PM
I am adding SQL to the new_forum_sql.php file. I have this SQL Stuff:
#
#-----[ SQL ]------------------------------------------
#
# If you don't know how to execute sql queries, then copy
# sql_install.php into your phpbb directory and run it.
# (assuming you use mysql or mssql)
#
# If you don't use mysql or mssql, you'll have to edit these queries accordingly
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable',0);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_display_after_posts',1);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_post_message','You earned %s for that post');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable_spam_num',10);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable_spam_time',24);
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_disable_spam_message','You have exceeded the alloted amount of posts and will not earn anything for your post');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_installed','yes');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_version','2.2.3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_adminbig','0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('cash_adminnavbar','1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('points_name','Points');

#
#-----[ SQL ]------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
CREATE TABLE phpbb_cash (
cash_id smallint(6) NOT NULL auto_increment,
cash_order smallint(6) NOT NULL default '0',
cash_settings smallint(4) NOT NULL default '3313',
cash_dbfield varchar(64) NOT NULL default '',
cash_name varchar(64) NOT NULL default 'GP',
cash_default int(11) NOT NULL default '0',
cash_decimals tinyint(2) NOT NULL default '0',
cash_imageurl varchar(255) NOT NULL default '',
cash_exchange int(11) NOT NULL default '1',
cash_perpost int(11) NOT NULL default '25',
cash_postbonus int(11) NOT NULL default '2',
cash_perreply int(11) NOT NULL default '25',
cash_maxearn int(11) NOT NULL default '75',
cash_perpm int(11) NOT NULL default '0',
cash_perchar int(11) NOT NULL default '20',
cash_allowance tinyint(1) NOT NULL default '0',
cash_allowanceamount int(11) NOT NULL default '0',
cash_allowancetime tinyint(2) NOT NULL default '2',
cash_allowancenext int(11) NOT NULL default '0',
cash_forumlist varchar(255) NOT NULL default '',
PRIMARY KEY (cash_id)
);

#
#-----[ SQL ]------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
CREATE TABLE phpbb_cash_events (
event_name varchar(32) NOT NULL default '',
event_data varchar(255) NOT NULL default '',
PRIMARY KEY (event_name)
);

#
#-----[ SQL ]------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
CREATE TABLE phpbb_cash_exchange (
ex_cash_id1 int(11) NOT NULL default '0',
ex_cash_id2 int(11) NOT NULL default '0',
ex_cash_enabled int(1) NOT NULL default '0',
PRIMARY KEY (ex_cash_id1,ex_cash_id2)
);

#
#-----[ SQL ]------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
CREATE TABLE phpbb_cash_groups (
group_id mediumint(6) NOT NULL default '0',
group_type tinyint(2) NOT NULL default '0',
cash_id smallint(6) NOT NULL default '0',
cash_perpost int(11) NOT NULL default '0',
cash_postbonus int(11) NOT NULL default '0',
cash_perreply int(11) NOT NULL default '0',
cash_perchar int(11) NOT NULL default '0',
cash_maxearn int(11) NOT NULL default '0',
cash_perpm int(11) NOT NULL default '0',
cash_allowance tinyint(1) NOT NULL default '0',
cash_allowanceamount int(11) NOT NULL default '0',
cash_allowancetime tinyint(2) NOT NULL default '2',
cash_allowancenext int(11) NOT NULL default '0',
PRIMARY KEY (group_id,group_type,cash_id)
);

#
#-----[ SQL ]------------------------------------------
#
# If you have a different table prefix then change this command accordingly.
# I have used the default table prefix!
#
CREATE TABLE phpbb_cash_log (
log_id int(11) NOT NULL auto_increment,
log_time int(11) NOT NULL default '0',
log_type smallint(6) NOT NULL default '0',
log_action varchar(255) NOT NULL default '',
log_text varchar(255) NOT NULL default '',
PRIMARY KEY (log_id)
);

Can someone add it to the file?

The file is attached.

Derek
15-Oct-2006, 12:07 AM
This should work. Copy the contents of your new_forum_sql.php file (everything) with the code below...


<?php
/*
+================================================= =======================+
|| NBSdesignz Multi-Forums phpBB - Version 1.0.0 Beta 7
|| -----------------------------------------------------------------------
|| By NBSdesignz (http://www.nbsdesignz.com)
|| Copyright © 2006 NBSdesignz
|| This file may not be redistributed in whole or significant part.
|| --------------------- THIS SCRIPT IS FREEWARE. ------------------------
|| All copyright notices in this script must stay intact unless
|| copyright removal has been purchased!
|| -----------------------------------------------------------------------
|| Although this script has been tested by us, we are not responsible for
|| any damage it may cause!
|| -----------------------------------------------------------------------
|| $Id: new_forum_sql.php,v 1.19 2006/08/09 03:25:32 derek Exp $
|| Downloaded: Saturday, October 14, 2006 21:41:47
+================================================= =======================+
*/
if (!defined('IN_NBS'))
{
die('Hacking attempt!');
}
$sql[] = "
CREATE TABLE " . $accessname . "_auth_access (
group_id mediumint(8) DEFAULT '0' NOT NULL,
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
auth_view tinyint(1) DEFAULT '0' NOT NULL,
auth_read tinyint(1) DEFAULT '0' NOT NULL,
auth_post tinyint(1) DEFAULT '0' NOT NULL,
auth_reply tinyint(1) DEFAULT '0' NOT NULL,
auth_edit tinyint(1) DEFAULT '0' NOT NULL,
auth_delete tinyint(1) DEFAULT '0' NOT NULL,
auth_sticky tinyint(1) DEFAULT '0' NOT NULL,
auth_announce tinyint(1) DEFAULT '0' NOT NULL,
auth_vote tinyint(1) DEFAULT '0' NOT NULL,
auth_pollcreate tinyint(1) DEFAULT '0' NOT NULL,
auth_attachments tinyint(1) DEFAULT '0' NOT NULL,
auth_mod tinyint(1) DEFAULT '0' NOT NULL,
KEY group_id (group_id),
KEY forum_id (forum_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_user_group (
group_id mediumint(8) DEFAULT '0' NOT NULL,
user_id mediumint(8) DEFAULT '0' NOT NULL,
user_pending tinyint(1),
KEY group_id (group_id),
KEY user_id (user_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_groups (
group_id mediumint(8) NOT NULL auto_increment,
group_type tinyint(4) DEFAULT '1' NOT NULL,
group_name varchar(40) NOT NULL,
group_description varchar(255) NOT NULL,
group_moderator mediumint(8) DEFAULT '0' NOT NULL,
group_single_user tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (group_id),
KEY group_single_user (group_single_user)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_banlist (
ban_id mediumint(8) UNSIGNED NOT NULL auto_increment,
ban_userid mediumint(8) NOT NULL,
ban_ip char(8) NOT NULL,
ban_email varchar(255),
PRIMARY KEY (ban_id),
KEY ban_ip_user_id (ban_ip, ban_userid)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_categories (
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
cat_title varchar(100),
cat_order mediumint(8) UNSIGNED NOT NULL,
PRIMARY KEY (cat_id),
KEY cat_order (cat_order)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_config (
config_name varchar(255) NOT NULL,
config_value varchar(255) NOT NULL,
PRIMARY KEY (config_name)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_confirm (
confirm_id char(32) DEFAULT '' NOT NULL,
session_id char(32) DEFAULT '' NOT NULL,
code char(6) DEFAULT '' NOT NULL,
PRIMARY KEY (session_id,confirm_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_disallow (
disallow_id mediumint(8) UNSIGNED NOT NULL auto_increment,
disallow_username varchar(25) DEFAULT '' NOT NULL,
PRIMARY KEY (disallow_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_forum_prune (
prune_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id smallint(5) UNSIGNED NOT NULL,
prune_days smallint(5) UNSIGNED NOT NULL,
prune_freq smallint(5) UNSIGNED NOT NULL,
PRIMARY KEY(prune_id),
KEY forum_id (forum_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_forums (
forum_id smallint(5) UNSIGNED NOT NULL,
cat_id mediumint(8) UNSIGNED NOT NULL,
forum_name varchar(150),
forum_desc text,
forum_status tinyint(4) DEFAULT '0' NOT NULL,
forum_order mediumint(8) UNSIGNED DEFAULT '1' NOT NULL,
forum_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_topics mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
prune_next int(11),
prune_enable tinyint(1) DEFAULT '0' NOT NULL,
auth_view tinyint(2) DEFAULT '0' NOT NULL,
auth_read tinyint(2) DEFAULT '0' NOT NULL,
auth_post tinyint(2) DEFAULT '0' NOT NULL,
auth_reply tinyint(2) DEFAULT '0' NOT NULL,
auth_edit tinyint(2) DEFAULT '0' NOT NULL,
auth_delete tinyint(2) DEFAULT '0' NOT NULL,
auth_sticky tinyint(2) DEFAULT '0' NOT NULL,
auth_announce tinyint(2) DEFAULT '0' NOT NULL,
auth_vote tinyint(2) DEFAULT '0' NOT NULL,
auth_pollcreate tinyint(2) DEFAULT '0' NOT NULL,
auth_attachments tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (forum_id),
KEY forums_order (forum_order),
KEY cat_id (cat_id),
KEY forum_last_post_id (forum_last_post_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_posts (
post_id mediumint(8) UNSIGNED NOT NULL auto_increment,
topic_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
forum_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
poster_id mediumint(8) DEFAULT '0' NOT NULL,
post_time int(11) DEFAULT '0' NOT NULL,
poster_ip char(8) NOT NULL,
post_username varchar(25),
enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
enable_html tinyint(1) DEFAULT '0' NOT NULL,
enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
enable_sig tinyint(1) DEFAULT '1' NOT NULL,
post_edit_time int(11),
post_edit_count smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (post_id),
KEY forum_id (forum_id),
KEY topic_id (topic_id),
KEY poster_id (poster_id),
KEY post_time (post_time)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_posts_text (
post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
bbcode_uid char(10) DEFAULT '' NOT NULL,
post_subject char(60),
post_text text,
PRIMARY KEY (post_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_privmsgs (
privmsgs_id mediumint(8) UNSIGNED NOT NULL auto_increment,
privmsgs_type tinyint(4) DEFAULT '0' NOT NULL,
privmsgs_subject varchar(255) DEFAULT '0' NOT NULL,
privmsgs_from_userid mediumint(8) DEFAULT '0' NOT NULL,
privmsgs_to_userid mediumint(8) DEFAULT '0' NOT NULL,
privmsgs_date int(11) DEFAULT '0' NOT NULL,
privmsgs_ip char(8) NOT NULL,
privmsgs_enable_bbcode tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_enable_html tinyint(1) DEFAULT '0' NOT NULL,
privmsgs_enable_smilies tinyint(1) DEFAULT '1' NOT NULL,
privmsgs_attach_sig tinyint(1) DEFAULT '1' NOT NULL,
PRIMARY KEY (privmsgs_id),
KEY privmsgs_from_userid (privmsgs_from_userid),
KEY privmsgs_to_userid (privmsgs_to_userid)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_privmsgs_text (
privmsgs_text_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
privmsgs_bbcode_uid char(10) DEFAULT '0' NOT NULL,
privmsgs_text text,
PRIMARY KEY (privmsgs_text_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_ranks (
rank_id smallint(5) UNSIGNED NOT NULL auto_increment,
rank_title varchar(50) NOT NULL,
rank_min mediumint(8) DEFAULT '0' NOT NULL,
rank_special tinyint(1) DEFAULT '0',
rank_image varchar(255),
PRIMARY KEY (rank_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_search_results (
search_id int(11) UNSIGNED NOT NULL default '0',
session_id char(32) NOT NULL default '',
search_time int(11) DEFAULT '0' NOT NULL,
search_array text NOT NULL,
PRIMARY KEY (search_id),
KEY session_id (session_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_search_wordlist (
word_text varchar(50) binary NOT NULL default '',
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word_common tinyint(1) unsigned NOT NULL default '0',
PRIMARY KEY (word_text),
KEY word_id (word_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_search_wordmatch (
post_id mediumint(8) UNSIGNED NOT NULL default '0',
word_id mediumint(8) UNSIGNED NOT NULL default '0',
title_match tinyint(1) NOT NULL default '0',
KEY post_id (post_id),
KEY word_id (word_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_sessions (
session_id char(32) DEFAULT '' NOT NULL,
session_user_id mediumint(8) DEFAULT '0' NOT NULL,
session_start int(11) DEFAULT '0' NOT NULL,
session_time int(11) DEFAULT '0' NOT NULL,
session_ip char(8) DEFAULT '0' NOT NULL,
session_page int(11) DEFAULT '0' NOT NULL,
session_logged_in tinyint(1) DEFAULT '0' NOT NULL,
session_admin tinyint(2) DEFAULT '0' NOT NULL,
PRIMARY KEY (session_id),
KEY session_user_id (session_user_id),
KEY session_id_ip_user_id (session_id, session_ip, session_user_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_sessions_keys (
key_id varchar(32) DEFAULT '0' NOT NULL,
user_id mediumint(8) DEFAULT '0' NOT NULL,
last_ip varchar(8) DEFAULT '0' NOT NULL,
last_login int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (key_id, user_id),
KEY last_login (last_login)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_smilies (
smilies_id smallint(5) UNSIGNED NOT NULL auto_increment,
code varchar(50),
smile_url varchar(100),
emoticon varchar(75),
PRIMARY KEY (smilies_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_themes (
themes_id mediumint(8) UNSIGNED NOT NULL auto_increment,
template_name varchar(30) NOT NULL default '',
style_name varchar(30) NOT NULL default '',
head_stylesheet varchar(100) default NULL,
body_background varchar(100) default NULL,
body_bgcolor varchar(6) default NULL,
body_text varchar(6) default NULL,
body_link varchar(6) default NULL,
body_vlink varchar(6) default NULL,
body_alink varchar(6) default NULL,
body_hlink varchar(6) default NULL,
tr_color1 varchar(6) default NULL,
tr_color2 varchar(6) default NULL,
tr_color3 varchar(6) default NULL,
tr_class1 varchar(25) default NULL,
tr_class2 varchar(25) default NULL,
tr_class3 varchar(25) default NULL,
th_color1 varchar(6) default NULL,
th_color2 varchar(6) default NULL,
th_color3 varchar(6) default NULL,
th_class1 varchar(25) default NULL,
th_class2 varchar(25) default NULL,
th_class3 varchar(25) default NULL,
td_color1 varchar(6) default NULL,
td_color2 varchar(6) default NULL,
td_color3 varchar(6) default NULL,
td_class1 varchar(25) default NULL,
td_class2 varchar(25) default NULL,
td_class3 varchar(25) default NULL,
fontface1 varchar(50) default NULL,
fontface2 varchar(50) default NULL,
fontface3 varchar(50) default NULL,
fontsize1 tinyint(4) default NULL,
fontsize2 tinyint(4) default NULL,
fontsize3 tinyint(4) default NULL,
fontcolor1 varchar(6) default NULL,
fontcolor2 varchar(6) default NULL,
fontcolor3 varchar(6) default NULL,
span_class1 varchar(25) default NULL,
span_class2 varchar(25) default NULL,
span_class3 varchar(25) default NULL,
img_size_poll smallint(5) UNSIGNED,
img_size_privmsg smallint(5) UNSIGNED,
PRIMARY KEY (themes_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_themes_name (
themes_id smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
tr_color1_name char(50),
tr_color2_name char(50),
tr_color3_name char(50),
tr_class1_name char(50),
tr_class2_name char(50),
tr_class3_name char(50),
th_color1_name char(50),
th_color2_name char(50),
th_color3_name char(50),
th_class1_name char(50),
th_class2_name char(50),
th_class3_name char(50),
td_color1_name char(50),
td_color2_name char(50),
td_color3_name char(50),
td_class1_name char(50),
td_class2_name char(50),
td_class3_name char(50),
fontface1_name char(50),
fontface2_name char(50),
fontface3_name char(50),
fontsize1_name char(50),
fontsize2_name char(50),
fontsize3_name char(50),
fontcolor1_name char(50),
fontcolor2_name char(50),
fontcolor3_name char(50),
span_class1_name char(50),
span_class2_name char(50),
span_class3_name char(50),
PRIMARY KEY (themes_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_topics (
topic_id mediumint(8) UNSIGNED NOT NULL auto_increment,
forum_id smallint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_title char(60) NOT NULL,
topic_poster mediumint(8) DEFAULT '0' NOT NULL,
topic_time int(11) DEFAULT '0' NOT NULL,
topic_views mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_replies mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_status tinyint(3) DEFAULT '0' NOT NULL,
topic_vote tinyint(1) DEFAULT '0' NOT NULL,
topic_type tinyint(3) DEFAULT '0' NOT NULL,
topic_first_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_last_post_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
topic_moved_id mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
PRIMARY KEY (topic_id),
KEY forum_id (forum_id),
KEY topic_moved_id (topic_moved_id),
KEY topic_status (topic_status),
KEY topic_type (topic_type)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_topics_watch (
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
user_id mediumint(8) NOT NULL DEFAULT '0',
notify_status tinyint(1) NOT NULL default '0',
KEY topic_id (topic_id),
KEY user_id (user_id),
KEY notify_status (notify_status)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_users (
user_id mediumint(8) NOT NULL,
user_active tinyint(1) DEFAULT '1',
username varchar(25) NOT NULL,
user_password varchar(32) NOT NULL,
user_session_time int(11) DEFAULT '0' NOT NULL,
user_session_page smallint(5) DEFAULT '0' NOT NULL,
user_lastvisit int(11) DEFAULT '0' NOT NULL,
user_regdate int(11) DEFAULT '0' NOT NULL,
user_level tinyint(4) DEFAULT '0',
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
user_timezone decimal(5,2) DEFAULT '0' NOT NULL,
user_style tinyint(4),
user_lang varchar(255),
user_dateformat varchar(14) DEFAULT 'd M Y H:i' NOT NULL,
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
user_login_tries smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
user_last_login_try int(11) DEFAULT '0' NOT NULL,
user_emailtime int(11),
user_viewemail tinyint(1),
user_attachsig tinyint(1),
user_allowhtml tinyint(1) DEFAULT '1',
user_allowbbcode tinyint(1) DEFAULT '1',
user_allowsmile tinyint(1) DEFAULT '1',
user_allowavatar tinyint(1) DEFAULT '1' NOT NULL,
user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
user_notify tinyint(1) DEFAULT '1' NOT NULL,
user_notify_pm tinyint(1) DEFAULT '0' NOT NULL,
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
user_rank int(11) DEFAULT '0',
user_avatar varchar(100),
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
user_email varchar(255),
user_icq varchar(15),
user_website varchar(100),
user_from varchar(100),
user_sig text,
user_sig_bbcode_uid char(10),
user_aim varchar(255),
user_yim varchar(255),
user_msnm varchar(255),
user_occ varchar(100),
user_interests varchar(255),
user_actkey varchar(32),
user_newpasswd varchar(32),
PRIMARY KEY (user_id),
KEY user_session_time (user_session_time)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_vote_desc (
vote_id mediumint(8) UNSIGNED NOT NULL auto_increment,
topic_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
vote_text text NOT NULL,
vote_start int(11) NOT NULL DEFAULT '0',
vote_length int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (vote_id),
KEY topic_id (topic_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_vote_results (
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
vote_option_id tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
vote_option_text varchar(255) NOT NULL,
vote_result int(11) NOT NULL DEFAULT '0',
KEY vote_option_id (vote_option_id),
KEY vote_id (vote_id)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_vote_voters (
vote_id mediumint(8) UNSIGNED NOT NULL DEFAULT '0',
vote_user_id mediumint(8) NOT NULL DEFAULT '0',
vote_user_ip char(8) NOT NULL,
KEY vote_id (vote_id),
KEY vote_user_id (vote_user_id),
KEY vote_user_ip (vote_user_ip)
);";

$sql[] = "
CREATE TABLE " . $accessname . "_words (
word_id mediumint(8) UNSIGNED NOT NULL auto_increment,
word char(100) NOT NULL,
replacement char(100) NOT NULL,
PRIMARY KEY (word_id)
);";

$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('config_id','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('board_disable','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('sitename','" . $_POST['forumname'] . "');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('site_desc','" . $_POST['forumdescription'] . "');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cookie_name','phpbb2mysql');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cookie_path','" . $nbs->setting['path'].$accessname . "/');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cookie_domain','');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cookie_secure','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('session_length','3600');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_html','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_html_tags','b,i,u,pre');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_bbcode','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_smilies','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_sig','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_namechange','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_theme_create','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_avatar_local','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_avatar_remote','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_avatar_upload','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('enable_confirm', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('allow_autologin','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_autologin_time','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('override_user_style','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('posts_per_page','15');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('topics_per_page','50');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('hot_threshold','25');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_poll_options','10');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_sig_chars','255');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_inbox_privmsgs','50');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_sentbox_privmsgs','25');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_savebox_privmsgs','50');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('board_email_sig','Thanks, The Management');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('board_email','" . $_POST['adminemail'] . "');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('smtp_delivery','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('smtp_host','');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('smtp_username','');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('smtp_password','');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('sendmail_fix','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('require_activation','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('flood_interval','15');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('max_login_attempts', '5');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('login_reset_time', '30');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('board_email_form','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('avatar_filesize','6144');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('avatar_max_width','80');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('avatar_max_height','80');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('avatar_path','images/" . $accessname . "/avatars');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('avatar_gallery_path','images/" . $accessname . "/avatars/gallery');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('smilies_path','images/" . $accessname . "/smiles');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('default_style','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('default_dateformat','D M d, Y g:i a');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('board_timezone','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('prune_enable','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('privmsg_disable','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('gzip_compress','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('coppa_fax', '');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('coppa_mail', '');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('record_online_users', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('record_online_date', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('server_name', '" . $nbs->setting['domain'] . "');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('server_port', '80');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('script_path', '" . $nbs->setting['path'].$accessname . "/');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('version', '.0.21');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('board_startdate', '" . time() . "');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('default_lang', 'english');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('search_flood_interval', '15');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('rand_seed', '0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('search_min_chars','3');";
$sql[] = "INSERT INTO " . $accessname . "_categories (cat_id, cat_title, cat_order) VALUES (1, 'Test category 1', 10);";
$sql[] = "INSERT INTO " . $accessname . "_forums (forum_id, forum_name, forum_desc, cat_id, forum_order, forum_posts, forum_topics, forum_last_post_id, auth_view, auth_read, auth_post, auth_reply, auth_edit, auth_delete, auth_announce, auth_sticky, auth_pollcreate, auth_vote, auth_attachments) VALUES (1, 'Test Forum 1', 'This is just a test forum.', 1, 10, 1, 1, 1, 0, 0, 0, 0, 1, 1, 3, 3, 1, 1, 3);";
$sql[] = "INSERT INTO " . $accessname . "_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( -1, 'Anonymous', 0, 0, '', '', '', '', '', '', '', '', 0, NULL, '', '', '', 0, 0, 1, 1, 1, 0, 1, 1, NULL, '', '', 0, '', '', '', 0, 0);";
$sql[] = "INSERT INTO " . $accessname . "_users (user_id, username, user_level, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_viewemail, user_style, user_aim, user_yim, user_msnm, user_posts, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_pm, user_notify_pm, user_popup_pm, user_allow_viewonline, user_rank, user_avatar, user_lang, user_timezone, user_dateformat, user_actkey, user_newpasswd, user_notify, user_active) VALUES ( 2, '" . $_POST['adminuser'] . "', 1, '" . time() . "', '" . md5($_POST['adminpass']) . "', '" . $_POST['adminemail'] . "', '', '', '', '', '', '', 1, 1, '', '', '', 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, '', 'english', 0, 'd M Y h:i a', '', '', 0, 1);";
$sql[] = "INSERT INTO " . $accessname . "_ranks (rank_id, rank_title, rank_min, rank_special, rank_image) VALUES ( 1, 'Site Admin', -1, 1, NULL);";
$sql[] = "INSERT INTO " . $accessname . "_groups (group_id, group_name, group_description, group_single_user) VALUES (1, 'Anonymous', 'Personal User', 1);";
$sql[] = "INSERT INTO " . $accessname . "_groups (group_id, group_name, group_description, group_single_user) VALUES (2, 'Admin', 'Personal User', 1);";
$sql[] = "INSERT INTO " . $accessname . "_user_group (group_id, user_id, user_pending) VALUES (1, -1, 0);";
$sql[] = "INSERT INTO " . $accessname . "_user_group (group_id, user_id, user_pending) VALUES (2, 2, 0);";
$sql[] = "INSERT INTO " . $accessname . "_topics (topic_id, topic_title, topic_poster, topic_time, topic_views, topic_replies, forum_id, topic_status, topic_type, topic_vote, topic_first_post_id, topic_last_post_id) VALUES (1, 'Welcome to phpBB 2', 2, '972086460', 0, 0, 1, 0, 0, 0, 1, 1);";
$sql[] = "INSERT INTO " . $accessname . "_posts (post_id, topic_id, forum_id, poster_id, post_time, post_username, poster_ip) VALUES (1, 1, 1, 2, '" . time() . "', NULL, '7F000001');";
$sql[] = "INSERT INTO " . $accessname . "_posts_text (post_id, post_subject, post_text) VALUES (1, NULL, 'This is an example post in your phpBB 2 installation. You may delete this post, this topic and even this forum if you like since everything seems to be working!');";
$sql[] = "INSERT INTO " . $accessname . "_themes (themes_id, template_name, style_name, head_stylesheet, body_background, body_bgcolor, body_text, body_link, body_vlink, body_alink, body_hlink, tr_color1, tr_color2, tr_color3, tr_class1, tr_class2, tr_class3, th_color1, th_color2, th_color3, th_class1, th_class2, th_class3, td_color1, td_color2, td_color3, td_class1, td_class2, td_class3, fontface1, fontface2, fontface3, fontsize1, fontsize2, fontsize3, fontcolor1, fontcolor2, fontcolor3, span_class1, span_class2, span_class3) VALUES (1, 'subSilver', 'subSilver', 'subSilver.css', '', 'E5E5E5', '000000', '006699', '5493B4', '', 'DD6900', 'EFEFEF', 'DEE3E7', 'D1D7DC', '', '', '', '98AAB1', '006699', 'FFFFFF', 'cellpic1.gif', 'cellpic3.gif', 'cellpic2.jpg', 'FAFAFA', 'FFFFFF', '', 'row1', 'row2', '', 'Verdana, Arial, Helvetica, sans-serif', 'Trebuchet MS', 'Courier, \'Courier New\', sans-serif', 10, 11, 12, '444444', '006600', 'FFA34F', '', '', '');";
$sql[] = "INSERT INTO " . $accessname . "_themes_name (themes_id, tr_color1_name, tr_color2_name, tr_color3_name, tr_class1_name, tr_class2_name, tr_class3_name, th_color1_name, th_color2_name, th_color3_name, th_class1_name, th_class2_name, th_class3_name, td_color1_name, td_color2_name, td_color3_name, td_class1_name, td_class2_name, td_class3_name, fontface1_name, fontface2_name, fontface3_name, fontsize1_name, fontsize2_name, fontsize3_name, fontcolor1_name, fontcolor2_name, fontcolor3_name, span_class1_name, span_class2_name, span_class3_name) VALUES (1, 'The lightest row colour', 'The medium row color', 'The darkest row colour', '', '', '', 'Border round the whole page', 'Outer table border', 'Inner table border', 'Silver gradient picture', 'Blue gradient picture', 'Fade-out gradient on index', 'Background for quote boxes', 'All white areas', '', 'Background for topic posts', '2nd background for topic posts', '', 'Main fonts', 'Additional topic title font', 'Form fonts', 'Smallest font size', 'Medium font size', 'Normal font size (post body etc)', 'Quote & copyright text', 'Code text colour', 'Main table header text colour', '', '', '');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 1, ':D', 'icon_biggrin.gif', 'Very Happy');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 2, ':-D', 'icon_biggrin.gif', 'Very Happy');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 3, ':grin:', 'icon_biggrin.gif', 'Very Happy');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 4, ':)', 'icon_smile.gif', 'Smile');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 5, ':-)', 'icon_smile.gif', 'Smile');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 6, ':smile:', 'icon_smile.gif', 'Smile');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 7, ':(', 'icon_sad.gif', 'Sad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 8, ':-(', 'icon_sad.gif', 'Sad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 9, ':sad:', 'icon_sad.gif', 'Sad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 10, ':o', 'icon_surprised.gif', 'Surprised');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 11, ':-o', 'icon_surprised.gif', 'Surprised');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 12, ':eek:', 'icon_surprised.gif', 'Surprised');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 13, ':shock:', 'icon_eek.gif', 'Shocked');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 14, ':?', 'icon_confused.gif', 'Confused');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 15, ':-?', 'icon_confused.gif', 'Confused');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 16, ':???:', 'icon_confused.gif', 'Confused');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 17, '8)', 'icon_cool.gif', 'Cool');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 18, '8-)', 'icon_cool.gif', 'Cool');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 19, ':cool:', 'icon_cool.gif', 'Cool');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 20, ':lol:', 'icon_lol.gif', 'Laughing');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 21, ':x', 'icon_mad.gif', 'Mad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 22, ':-x', 'icon_mad.gif', 'Mad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 23, ':mad:', 'icon_mad.gif', 'Mad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 24, ':P', 'icon_razz.gif', 'Razz');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 25, ':-P', 'icon_razz.gif', 'Razz');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 26, ':razz:', 'icon_razz.gif', 'Razz');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 27, ':oops:', 'icon_redface.gif', 'Embarassed');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 28, ':cry:', 'icon_cry.gif', 'Crying or Very sad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 29, ':evil:', 'icon_evil.gif', 'Evil or Very Mad');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 30, ':twisted:', 'icon_twisted.gif', 'Twisted Evil');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 31, ':roll:', 'icon_rolleyes.gif', 'Rolling Eyes');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 32, ':wink:', 'icon_wink.gif', 'Wink');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 33, ';)', 'icon_wink.gif', 'Wink');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 34, ';-)', 'icon_wink.gif', 'Wink');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 35, ':!:', 'icon_exclaim.gif', 'Exclamation');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 36, ':?:', 'icon_question.gif', 'Question');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 37, ':idea:', 'icon_idea.gif', 'Idea');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 38, ':arrow:', 'icon_arrow.gif', 'Arrow');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 39, ':|', 'icon_neutral.gif', 'Neutral');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 40, ':-|', 'icon_neutral.gif', 'Neutral');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 41, ':neutral:', 'icon_neutral.gif', 'Neutral');";
$sql[] = "INSERT INTO " . $accessname . "_smilies (smilies_id, code, smile_url, emoticon) VALUES ( 42, ':mrgreen:', 'icon_mrgreen.gif', 'Mr. Green');";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 1, 'example', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 2, 'post', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 3, 'phpbb', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 4, 'installation', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 5, 'delete', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 6, 'topic', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 7, 'forum', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 8, 'since', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 9, 'everything', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 10, 'seems', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 11, 'working', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordlist (word_id, word_text, word_common) VALUES ( 12, 'welcome', 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 1, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 2, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 4, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 5, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 6, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 7, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 8, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 9, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 10, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 11, 1, 0 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 12, 1, 1 );";
$sql[] = "INSERT INTO " . $accessname . "_search_wordmatch (word_id, post_id, title_match) VALUES ( 3, 1, 1 );";

if ($nbs->setting['verify_email_address'] == 1)
{
$sql[] = "INSERT INTO " . TABLE_PREFIX . "users (accessname, password, email, joindate, ipaddress, act_key, header_ads, footer_ads, cid) VALUES ('" . $accessname . "', '" . md5($_POST['adminpass']) . "', '" . $_POST['adminemail'] . "', '" . time() . "', '" . $_SERVER['REMOTE_ADDR'] . "', '" . $act_key . "', '1', '1', '" . $_POST['category'] . "');";
}
else
{
$sql[] = "INSERT INTO " . TABLE_PREFIX . "users (accessname, password, email, joindate, ipaddress, status, act_key, header_ads, footer_ads, cid) VALUES ('" . $accessname . "', '" . md5($_POST['adminpass']) . "', '" . $_POST['adminemail'] . "', '" . time() . "', '" . $_SERVER['REMOTE_ADDR'] . "', 'Active', '" . $act_key . "', '1', '1', '" . $_POST['category'] . "');";

$sql[] = "UPDATE " . TABLE_PREFIX . "categories SET total_forums=total_forums+1 WHERE id='" . $db->escape_string($_POST['category']) . "'";
}
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_disable',0);";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_display_after_posts',1);";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_post_message','You earned %s for that post');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_disable_spam_num',10);";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_disable_spam_time',24);";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_disable_spam_message','You have exceeded the alloted amount of posts and will not earn anything for your post');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_installed','yes');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_version','2.2.3');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_adminbig','0');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('cash_adminnavbar','1');";
$sql[] = "INSERT INTO " . $accessname . "_config (config_name, config_value) VALUES ('points_name','Points');";

$sql[] = "CREATE TABLE " . $accessname . "_cash (
cash_id smallint(6) NOT NULL auto_increment,
cash_order smallint(6) NOT NULL default '0',
cash_settings smallint(4) NOT NULL default '3313',
cash_dbfield varchar(64) NOT NULL default '',
cash_name varchar(64) NOT NULL default 'GP',
cash_default int(11) NOT NULL default '0',
cash_decimals tinyint(2) NOT NULL default '0',
cash_imageurl varchar(255) NOT NULL default '',
cash_exchange int(11) NOT NULL default '1',
cash_perpost int(11) NOT NULL default '25',
cash_postbonus int(11) NOT NULL default '2',
cash_perreply int(11) NOT NULL default '25',
cash_maxearn int(11) NOT NULL default '75',
cash_perpm int(11) NOT NULL default '0',
cash_perchar int(11) NOT NULL default '20',
cash_allowance tinyint(1) NOT NULL default '0',
cash_allowanceamount int(11) NOT NULL default '0',
cash_allowancetime tinyint(2) NOT NULL default '2',
cash_allowancenext int(11) NOT NULL default '0',
cash_forumlist varchar(255) NOT NULL default '',
PRIMARY KEY (cash_id)
);";

$sql[] = "CREATE TABLE " . $accessname . "_cash_events (
event_name varchar(32) NOT NULL default '',
event_data varchar(255) NOT NULL default '',
PRIMARY KEY (event_name)
);";

$sql[] = "CREATE TABLE " . $accessname . "_cash_exchange (
ex_cash_id1 int(11) NOT NULL default '0',
ex_cash_id2 int(11) NOT NULL default '0',
ex_cash_enabled int(1) NOT NULL default '0',
PRIMARY KEY (ex_cash_id1,ex_cash_id2)
);";

$sql[] = "CREATE TABLE " . $accessname . "_cash_groups (
group_id mediumint(6) NOT NULL default '0',
group_type tinyint(2) NOT NULL default '0',
cash_id smallint(6) NOT NULL default '0',
cash_perpost int(11) NOT NULL default '0',
cash_postbonus int(11) NOT NULL default '0',
cash_perreply int(11) NOT NULL default '0',
cash_perchar int(11) NOT NULL default '0',
cash_maxearn int(11) NOT NULL default '0',
cash_perpm int(11) NOT NULL default '0',
cash_allowance tinyint(1) NOT NULL default '0',
cash_allowanceamount int(11) NOT NULL default '0',
cash_allowancetime tinyint(2) NOT NULL default '2',
cash_allowancenext int(11) NOT NULL default '0',
PRIMARY KEY (group_id,group_type,cash_id)
);";
$sql[] = "CREATE TABLE " . $accessname . "_cash_log (
log_id int(11) NOT NULL auto_increment,
log_time int(11) NOT NULL default '0',
log_type smallint(6) NOT NULL default '0',
log_action varchar(255) NOT NULL default '',
log_text varchar(255) NOT NULL default '',
PRIMARY KEY (log_id)
);";
?>


Derek

Markwow
16-Oct-2006, 03:08 AM
Thanks for the Quick Reply. I added the code. I will test it out very soon.