paulius wrote: Hello,
I'm interested in knowing hwat is the best way to use phpBB to host multiple forums. For now, I have found one script that can host multiple forums froma single phpBB installation.
However, the script is not released under the GPL and is quite expensive.
Are there any other methods for multiple hosting or any free scirpts to do this?
Thanks.
flogger12 wrote:paulius wrote:Hello,
I'm interested in knowing hwat is the best way to use phpBB to host multiple forums. For now, I have found one script that can host multiple forums froma single phpBB installation.
However, the script is not released under the GPL and is quite expensive.
Are there any other methods for multiple hosting or any free scirpts to do this?
Thanks.
nobody I can find will give up the secrets at least not for free.![]()
robert
Code: Select all
<?php
if ($_SERVER["HTTP_HOST"] == "www.myhost.com")
{
$dbms = 'mysql';
$dbhost = 'mysql.myhost.com';
$dbname = 'phpbb_sites';
$dbuser = 'mylogin';
$dbpasswd = 'mypassword';
$table_prefix = 'myhost_';
}
if ($_SERVER["HTTP_HOST"] == "cars.myhost.com")
{
$dbms = 'mysql';
$dbhost = 'mysql.myhost.com';
$dbname = 'phpbb_sites';
$dbuser = 'mylogin';
$dbpasswd = 'mypassword';
$table_prefix = 'cars_';
}
if ($_SERVER["HTTP_HOST"] == "cycle.myhost.com")
{
$dbms = 'mysql';
$dbhost = 'mysql.myhost.com';
$dbname = 'phpbb_sites';
$dbuser = 'mylogin';
$dbpasswd = 'mypassword';
$table_prefix = 'cycle_';
}
define('PHPBB_INSTALLED', true);
?>
Code: Select all
// Table names
define('CONFIRM_TABLE', $table_prefix.'confirm');
define('AUTH_ACCESS_TABLE', $table_prefix.'auth_access');
define('CATEGORIES_TABLE', $table_prefix.'categories');
define('CONFIG_TABLE', $table_prefix.'config');
define('FORUMS_TABLE', $table_prefix.'forums');
define('POSTS_TABLE', $table_prefix.'posts');
define('POSTS_TEXT_TABLE', $table_prefix.'posts_text');
define('PRIVMSGS_IGNORE_TABLE', $table_prefix.'privmsgs_ignore');
define('PRUNE_TABLE', $table_prefix.'forum_prune');
define('SEARCH_TABLE', $table_prefix.'search_results');
define('SEARCH_WORD_TABLE', $table_prefix.'search_wordlist');
define('SEARCH_MATCH_TABLE', $table_prefix.'search_wordmatch');
define('TOPICS_TABLE', $table_prefix.'topics');
define('TOPICS_WATCH_TABLE', $table_prefix.'topics_watch');
define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
// Tables that will be shared
define('BANLIST_TABLE', 'phpbb_banlist');
define('DISALLOW_TABLE', 'phpbb_disallow');
define('GROUPS_TABLE', 'phpbb_groups');
define('PRIVMSGS_TABLE', 'phpbb_privmsgs');
define('PRIVMSGS_TEXT_TABLE', 'phpbb_privmsgs_text');
define('RANKS_TABLE', 'phpbb_ranks');
define('SESSIONS_TABLE', 'phpbb_sessions');
define('SMILIES_TABLE', 'phpbb_smilies');
define('THEMES_TABLE', 'phpbb_themes');
define('THEMES_NAME_TABLE', 'phpbb_themes_name');
define('USER_GROUP_TABLE', 'phpbb_user_group');
define('USERS_TABLE', 'phpbb_users');
define('WORDS_TABLE', 'phpbb_words');
Wouldn't it be easier to have one table prefix but different database?