Previous Thread
Next Thread
Print Thread
Rate Thread
#215608 04/27/2002 8:01 AM
Joined: Mar 2002
Posts: 14
Newbie
Newbie
Offline
Joined: Mar 2002
Posts: 14
// TablePrefix Addon (C) 27.4.2002 C. Gogoll
// This hack is for running more than one forum under one domain and one
// database. Please read the license information from your original ubbthreads.
// Only for testing other hacks without the risk of destroying tables!!!
// I´m not responisble for any use of this hack, e.g lost databases etc !!!!!!!
// It´s allways a good idea to backup your database before you modify any script !!!
// For right use do the following steps ONLY in this order:
//
// 1. make sure ubbthreads runs in its orginal configuration.
// Lets say it is installed in /home/httpd/forum/
// 2. Make a new directory like /home/httpd/forum-test/
// 3. Copy your complete install version to the dir created in step 2
// 4. run the install script: /home/httpd/forum-test/install.php
// DON´T klick on the link to thee createtable script !!!!
// 5. make the following changes manualy to the createtable script:
// check for the following line in the script: "// Let's see if this has already been run"
// after this line add these 2 lines without the // at the beginnig:
// $CheckTable = "w3t_Posts";
// if (isset($config['TblNme_w3t_Posts'])) {$CheckTable = $config['TblNme_w3t_Posts']};
// 6. replace the "do_query" function in the mysql.inc.php script with these one:
// // #######################################################################
// // Do the query
// // #######################################################################
// function do_query($query) {
// global $querycount;
// $querycount++;
//
// global $config;
// if (isset($config['TblNme_w3t_AdressBook'])) {$query = str_replace("w3t_AdressBook", $config['TblNme_w3t_AdressBook'],$query);}
// if (isset($config['TblNme_w3t_Banned'])) {$query = str_replace("w3t_Banned", $config['TblNme_w3t_Banned'] ,$query);}
// if (isset($config['TblNme_w3t_Boards'])) {$query = str_replace("w3t_Boards", $config['TblNme_w3t_Boards'] ,$query);}
// if (isset($config['TblNme_w3t_Category'])) {$query = str_replace("w3t_Category", $config['TblNme_w3t_Category'] ,$query);}
// if (isset($config['TblNme_w3t_Favorites'])) {$query = str_replace("w3t_Favorites", $config['TblNme_w3t_Favorites'] ,$query);}
// if (isset($config['TblNme_w3t_Groups'])) {$query = str_replace("w3t_Groups", $config['TblNme_w3t_Groups'] ,$query);}
// if (isset($config['TblNme_w3t_Last'])) {$query = str_replace("w3t_Last", $config['TblNme_w3t_Last'] ,$query);}
// if (isset($config['TblNme_w3t_Messages'])) {$query = str_replace("w3t_Messages", $config['TblNme_w3t_Messages'] ,$query);}
// if (isset($config['TblNme_w3t_ModNotify'])) {$query = str_replace("w3t_ModNotify", $config['TblNme_w3t_ModNotify'] ,$query);}
// if (isset($config['TblNme_w3t_Moderators'])) {$query = str_replace("w3t_Moderators", $config['TblNme_w3t_Moderators'],$query);}
// if (isset($config['TblNme_w3t_Online'])) {$query = str_replace("w3t_Online", $config['TblNme_w3t_Online'] ,$query);}
// if (isset($config['TblNme_w3t_PollData'])) {$query = str_replace("w3t_PollData", $config['TblNme_w3t_PollData'] ,$query);}
// if (isset($config['TblNme_w3t_Polls'])) {$query = str_replace("w3t_Polls", $config['TblNme_w3t_Polls'] ,$query);}
// if (isset($config['TblNme_w3t_Posts'])) {$query = str_replace("w3t_Posts", $config['TblNme_w3t_Posts'] ,$query);}
// if (isset($config['TblNme_w3t_Subscribe'])) {$query = str_replace("w3t_Subscribe", $config['TblNme_w3t_Subscribe'] ,$query);}
// if (isset($config['TblNme_w3t_Users'])) {$query = str_replace("w3t_Users", $config['TblNme_w3t_Users'] ,$query);}
//
// $this->sth = mysql_query($query,$this->dbh);
// if (!$this->sth) {
// $this->not_right("Unable to do_query: $query");
// }
// return $this->sth;
// }
// 7. add the following lines to config.inc.php at the end:
// $config['TblNme_w3t_AdressBook'] = "w3t_AdressBook";
// $config['TblNme_w3t_Banned'] = "w3t_Banned";
// $config['TblNme_w3t_Boards'] = "w3t_Boards";
// $config['TblNme_w3t_Category'] = "w3t_Category";
// $config['TblNme_w3t_Favorites'] = "w3t_Favorites";
// $config['TblNme_w3t_Groups'] = "w3t_Groups";
// $config['TblNme_w3t_Last'] = "w3t_Last";
// $config['TblNme_w3t_Messages'] = "w3t_Messages";
// $config['TblNme_w3t_ModNotify'] = "w3t_ModNotify";
// $config['TblNme_w3t_Moderators'] = "w3t_Moderators";
// $config['TblNme_w3t_Online'] = "w3t_Online";
// $config['TblNme_w3t_PollData'] = "w3t_PollData";
// $config['TblNme_w3t_Polls'] = "w3t_Polls";
// $config['TblNme_w3t_Posts'] = "w3t_Posts";
// $config['TblNme_w3t_Subscribe'] = "w3t_Subscribe";
// $config['TblNme_w3t_Users'] = "w3t_Users";
// 8. change any table name to the table name you want.
// 9. depending on what you wanna do there are 2 way:
// 1.) install a new forum with no data in it: run createtable.php and enjoy []/forum/images/icons/wink.gif[/]
// 2.) if you wanna get a copy of one or more database tables in the new install,you have to create
// the new table manualy (select dump in PHPmyAdmin (only structure) and send the generated
// output back as a command to PHPmyAdmin where you edit the table name. Then make
// a table copy like 'INSERT INTO YYY_AddressBook SELECT * FROM w3t_AddressBook;' in PhpMyAdmin
// for ALL tables and the run the needed update script which are descriped in update.html
//


so long

Cola

Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I believe soemthing like this is standard in 6.1 now


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)