Page 1 of 1

Different PN Indexes sharing same database

Posted: Fri Mar 26, 2004 12:04 am
by xfwayne
Hi,

I was wondering if you know how I can have different indexes (different domain, sub-domains and or sub-directories) share the same database. What I want is to have different PostNuke indexes and settings on those different sites but all sharing the same database.

For example, we have different communities in our website. The Student Community will have their own index with links to the student picture galleries, student forum topics, student web-links, etc. Of course, it will have its own student theme as well. The Business Community has their index designed and is configured for the business aspects of our database. So they all have their own indexes and index settings but all sharing in the same database.

Please help. We've tried to figure it out but haven't been able to. Your assistance is greatly appreciated.

Partners in Ministry,


XF. Wayne Yang

Posted: Fri Mar 26, 2004 12:45 am
by PrObLeM
Yes you can

several ways todo it
1st look up multisites
2nd install postnuke in difffent dirs on server
MAke sure the dbs have diffent prefixes

to share the dbs dedit the pntables.php for each db you want to share... like so...

lets say you want to share the poll check db well change it form

Code: Select all

$poll_check = $prefix . '_poll_check';
$pntable['poll_check'] = $poll_check;
$pntable['poll_check_column'] = array ('ip'   => $poll_check . '.pn_ip',
                                       'time' => $poll_check . '.pn_time');
to this...make sure you have a "main" db that you want to share (i use nuke_ as the sared db prefixes)...and ONLY change the prefixes for the dbs you want to share...the ones you dont want to share leave them alone!

Code: Select all

//so change the $prefix from a var to nuke_
$poll_check = 'nuke_poll_check';
$pntable['poll_check'] = $poll_check;
$pntable['poll_check_column'] = array ('ip'   => $poll_check . '.pn_ip',
                                       'time' => $poll_check . '.pn_time');
the only files you have to edit is the files in the different directories NOT the main directory!

Posted: Fri Mar 26, 2004 8:18 am
by xfwayne
Thanks PrObLeM,

You guys are good. I've been trying to get some answers all day yesterday. Thank you!

Wow. This is very helpful.