MAXdev

Other Support - Several sites using the same user DB. Possible? If so how?

Shorty - Feb 05, 2006 - 12:25 PM
Post subject: Several sites using the same user DB. Possible? If so how?
I have ordered a proper host for my site and my plan it so have subdomains in categories gamer-family-cars-nightlife

I`m gonna set up a complete mdpro site for each but i wanna have it so that they use the same user database. which means if you register at one you register all. However, i want a complete new site for each. new template, new menues, block etc etc. a completely different site.

How will i set it up so that it uses the same DB? I looked at the mutisite module but if i got it right i cant use that one. Or?

Shorty
Seb - Feb 05, 2006 - 12:50 PM
Post subject:
Ok, not my area of expertise, but did you have a look at MDChannels to see if it would meet your requirements?
http://www.uiarch.org/
Shorty - Feb 05, 2006 - 02:09 PM
Post subject:
thats a complete system right and not just a module? i wanna stick to the basic mdpro as it`s easier to get support that way.
If i could jsut make the userdb joined i`b be happy.

The different categories are gonna be subdomains so i`ll just link them on the frontpage of the standard site and they work independent of eachother exept the user db. So you can login on eny of them and register one then you are registered at all.

Is this really hard doing?

Shorty
Seb - Feb 05, 2006 - 02:36 PM
Post subject:
It is a complete system, but MDChannels is based on MDPro so support is more or less the same (Pete, tell me if I'm wrong here)

I don't know if it handle subdomains, but it seems the easiest way of doing things. The idea of MDChannels is that all "channels" share the same DB, but content and appearance is targeted and can be customized for each channel.

If you hack MDPro so users can share the same DB accross different sites, I'm not sure you will get support anyway as it would mean that you have a customized version and as such we won't be able to reproduce potential bugs that your hack may create.
Shorty - Feb 08, 2006 - 07:42 AM
Post subject:
ok i`ve read about the mdchannel and have understood that the channels are base on user groups instead of what i`m looking for.

Still looking for a way to have completely different and independent sites with the same user DB. Any other ideas please...

Shorty
Shorty - Feb 08, 2006 - 08:06 AM
Post subject:
i found out i can use miltisites maby afterall. Xan someone help me setting this up? I read the tutorial and that won`t work for me as stated in requirements. Can someone help me setting this up on a non virtual host without apache server access?

I can just install the newest mdpro completely first right? The mutisite can be doen after the initial install...

Shorty
Shorty - Feb 09, 2006 - 09:48 AM
Post subject:
ok, i`ve been working with the multisite module for w while now and doesn`t think that is what i wanna do.

I made 3 subdomains and with my standard one it looks like this:
root on my ftp

alesundportalen.net
familie.alesundportalen.net
gamer.alesundportalen.net
bilogmotor.alesundportalen.net

Now, if i do the complete install of mdpro on all of them with their own table prefix on the same database like this
original first:

md_
md_fm_
md_gm_
md_bm_

Now how can i make them read from the same user table? can i just drop the user table in the subdomains prefix and it automatically reads from the md_ prefix?

Please help me on this.....

Shorty
Shorty - Feb 09, 2006 - 08:11 PM
Post subject:
from what i`ve figured out these (bolow) are the user tables right?
Code:
$user_data = $prefix . '_user_data';
$pntable['user_data'] = $user_data;
$pntable['user_data_column'] = array ('uda_id'       => $user_data . '.pn_uda_id',
                                       'uda_propid'  => $user_data . '.pn_uda_propid',
                                       'uda_uid'     => $user_data . '.pn_uda_uid',
                                       'uda_value'   => $user_data . '.pn_uda_value');

$user_perms = $prefix . '_user_perms';
$pntable['user_perms'] = $user_perms;
$pntable['user_perms_column'] = array ('pid'       => $user_perms . '.pn_pid',
                                       'uid'       => $user_perms . '.pn_uid',
                                       'sequence'  => $user_perms . '.pn_sequence',
                                       'realm'     => $user_perms . '.pn_realm',
                                       'component' => $user_perms . '.pn_component',
                                       'instance'  => $user_perms . '.pn_instance',
                                       'level'     => $user_perms . '.pn_level',
                                       'bond'      => $user_perms . '.pn_bond');


So if i use them in the subdomains i`ll be ok i think.

Anyone, and i mean anyone at all have any thoughts on that?

Shorty
ifteba - Feb 09, 2006 - 08:32 PM
Post subject:
I never worked with multisites before. I know MDPro has multisite modules [ I think]. But anyways, I would install MDPro to subdomain editing the md-config file manually and that make themes to fit whatever I want to show all of those subdomain sites. As you know with autotheme you can create unlimited blocks.

For example,

for main site I would use blocks from 1-11 than I would create extra blocks using autotheme commands and use them for other subdomains sites.

By doing this I guess site might load lil bit slow but it should work. As while site loading it will check all the db tables.

I am not sure if I described well enough to understand.
NateM - Feb 09, 2006 - 11:22 PM
Post subject:
Well, could you do something like this? If you were to create multiple user tables for the different sites like so:
md_
md_fm_

Then, you go back and change the user table prefix in the first install from _user_data to _fm_user_data, or something like that? As long as the prefixes follow one another, they should be able to use the same user table as long as you change the individual prefixes for each installs to match each other. I've never done anything like this, so I'm not really sure, but it might be worth trying.
whazoo - Feb 09, 2006 - 11:47 PM
Post subject:
wouldnt a user_table =
option in the config.php be great?
Shorty - Feb 10, 2006 - 04:41 AM
Post subject:
whazoo wrote:
wouldnt a user_table =
option in the config.php be great?


please continue. Very Happy i might make a personal_config.php as the config calls on that before going to md-config but i don`t know how to do this.
I just installed the mdpro on a subdomain without any problems under prefix md_gm (gamer). i wonder what would happen if i just changed the prefix to the same as the other one means md. they would just crash maby.

Anyway, i need to redirect some tables in the md_gm to the standard one. Anyone know how to do this.

I found the tables i think as i posted abowe, the user tables i mean. Those i need to be read from md_gm..... does anyone know how to make a personal_config.php?
Shorty - Feb 11, 2006 - 12:16 AM
Post subject:
ok heres my next little thing i ca`t figure out.

This is my md-config.php in the subdomain which i made the array:
Code:
$pnconfig['prefix'] = array(
    'default' => 'md_gm.',
    '_faqanswer' => 'md.',
    '_group_membership' => 'md.',
    '_group_perms' => 'md.',
    '_groups' => 'md.',
    '_message' => 'md.',
    '_priv_msgs' => 'md.',
   '_priv_msgs_outbox' => 'md.',
   '_stats_date' => 'md.',
   '_stats_hour' => 'md.',
   '_stats_month' => 'md.',
   '_stats_week' => 'md.',
   '_user_data' => 'md.',
   '_user_perms' => 'md.',
   '_user_property' => 'md.',
   '_users' => 'md.',
   '_users_delrequest' => 'md.',
   '_admin_lite_group' => 'md.',
   '_admin_lite_group_members' => 'md.',
   '_users_modrequest' => 'md.',
);
$pnconfig['encoded'] = '1';

i now get this:
Code:
Session initialization failed



i cannot figure out whats wrong with that? is there anyone that can see the error?

Shorty
PeteBest - Feb 11, 2006 - 01:28 AM
Post subject:
Why are you trying to put the prefix as an array? That won't work, as the prefix isn't expected to be an array. So throughout the code you'll just get array_table, not the actual prefix, as you haven't selected something in the array.

You really need to read the MultiSite Tutorial to get a basic understanding of the functionality and practical use of multisites, as hacking and trying to put the prefix as an array isn't how it works!
Shorty - Feb 11, 2006 - 01:43 AM
Post subject:
that tutorial has been updated since i last read trough it! Now it looks great and this looks like exactly what i need. Very Happy

I tried to do a personl_config.php defining the prefixes but that tutorial does the trick. Maby i`ll finally get it right.
whazoo - Feb 11, 2006 - 05:04 AM
Post subject:
shorty,
I was just commenting that
it would be nice to have a user table option
in the config file...
Not that it would be pratical in this instance...

Sorry for leading you on,
that wasnt my intention.
Shorty - Feb 12, 2006 - 10:36 AM
Post subject:
Code:
**Note - This is an example. If you are actually sharing the users tables, then you need to edit all of the associated users tables. It also might be wise to change the _group_membership prefix so users are assigned to the proper group throughout your multisites.


Can someone explain a bit more why it`s so hard to make the sites use the same DB.What needs to be changed? The main reason for having a multisite is so that members can log in at one and stay logged in at them all. There must be a way for sites using the same DB from a fresh install without having to install xaampand using parked domains etc. I read a tutorial for postnuke which doesn`t work for mdpro. I was hoping though. http://docs.postnuke.com/index.php?name ... amp;sid=24

sorry for posting outside links but to explain and to let you know what i`m talking about. That one seems so straight forward. All sites pointing at the same tables shared as you wish, cookie settings changed to make surfing on all sites possible. Why doesn`t this work with mdpro.

I don`t wan`t to make the multisite module cause i wan`t to have an own admin section on all sites with a totally of its own build. This might sound stupid but i just wanna manage them separate instead under the same admin section as i understand the mutisite module does.
When phpbb and other modules can use the same db with no problems, then i guess there must be a clever way to just share usertables in several sites too. I`m rambling on now i know. I`m trying to figure out the process that runs and what`s needed to be done to makt this work.

I tried to do somethings to the prefix and forcing it to read from the original prefix and that was somewhat successful.It used the right user DB i think but where in the usertable is makes the theme change? That is set in the admin settings and shouldn`t change on the usertable, right? Well, it did. The theme and other blocks modules was called up through that usertable. Maby just strip that quite a bit and drop a few other tables as they`re not needed maby..

Shorty
PeteBest - Feb 12, 2006 - 11:14 AM
Post subject:
That should work just fine, but wherever it says config.php, you'll have to use \config\md-config.php

The reason why multisites are so hard is because it's a very advanced topic that requires a lot of input from the user. Due to the very flexible nature of the system I can't think of anyway to automate the process for every server. You just need to know what you're doing and be able to follow instructions
Shorty - Feb 12, 2006 - 12:08 PM
Post subject:
is there any tables that needs to be taken out? I tried this but ended up having a problem as follows. The theme was set to the maindomains theme and some block, modules where being called from the main domain. I don`t see why though being that the userDB doesn`t contain any of those configurations. Or maby i`m wrong, i`ll try again.

Funny, i`ve uploaded mdpro in various domains/subdomains about 20 times now and almost everytime the smartftp uploads, there are missing files, folders or incomplete files. I haveto upload folder by folder. ish, takes time sitting monitering.

Shorty
Shorty - Feb 12, 2006 - 02:31 PM
Post subject:
I installed, changed to proper cookie settings changed so it calls up md_user like this:
Code:
$users = $md . '_users';
$pntable['users'] = md_users;


I can enter both sites, i can log in at main, i can`t however log in as admin at gamer.alesundportalen.net. I get this error:
Code:
Fatal error: Call to a member function on a non-object in /hsphere/local/home/alesundp/gamer.alesundportalen.net/includes/pnUser.php on line 71


Code:
70        list($uid, $realpass) = $result->fields;
71        $result->Close();
72       // Confirm that passwords match
73        if (!comparePasswords($pass, $realpass, $uname, substr($realpass, 0, 2))) {
74            return false;


What exactly happens there?

Will it be crucial to share the _session_info or am i wrong there?


Shorty
PeteBest - Feb 12, 2006 - 09:47 PM
Post subject:
$users = $md . '_users';

What is the value of $md, why have you used a variable there? If you're attempting to follow that guide at PN it should be

$users = md . '_users';

Where md is the prefix for your main site with all the user information. In the main file it's $prefix . '_users'; as the $prefix variable holds the prefix, unless you've defined $md it'll have no value
Shorty - Feb 12, 2006 - 10:10 PM
Post subject:
ah, forgot to define $md in the beginning. Just took away the value and it`s working now.Smile I`ll have to test a bit on which tables to share and not so there`s no conflicts and such but it seems to work so far. This guide was actually pretty darn good and straight forward, even if i managed to screw it up;)
Shorty - Feb 13, 2006 - 05:19 AM
Post subject:
just to let you fellas know about how this turned out, i now have 5 sites operational sharing the DB. This is without the multi-site module.
In the tutorial linked above, there`s a small error that might work with PN but will not work with mdpro. It reads:
Code:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbtabletype'] = 'myisam';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'yournick';
$pnconfig['dbpass'] = 'yourpassword';
$pnconfig['dbname'] = 'yourdatabase';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'nuke';
$pnconfig['encoded'] = '0';


This will not work. It has to be:
Code:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbtabletype'] = 'myisam';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'yournick';
$pnconfig['dbpass'] = 'yourpassword';
$pnconfig['dbname'] = 'yourdatabase';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'nuke';
$pnconfig['encoded'] = '1';


$pnconfig['encoded'] = '1';
This will have to be done to all portal md-configs.
Now the finetuning begins. Very Happy Just hope it`s stable.

Shorty
PeteBest - Feb 13, 2006 - 05:42 AM
Post subject:
$pnconfig['encoded'] = '0'; is perfectly valid in MDPro. Your problem with it will be that you had the username and password md5 hashed. If you have them in plain text in your md-config.php you'd set $pnconfig['encoded'] = '0'; if they are md5 hashed you've got to set $pnconfig['encoded'] = '1';
Seb - Feb 13, 2006 - 08:34 AM
Post subject:
Shorty,

You're probably busy now with all this setup, but when you get the chance/time, it would be great if you could share your experience and write a tutorial. I'm sure some users would be grateful for this Wink

Cheers

Seb
Shorty - Feb 14, 2006 - 01:56 AM
Post subject:
I`ve already wrote it. I`m rewriting as changes are made.Still there are one issue. When i go to the main domain and log in as admin, it says there`s one member online and one guest.I can`t get to the admin section. It also says that i am anonymous. So the admin is logged in but i`m not recognised as admin trhough the cookie. Correct? Now, i thought this was resolved with the pnsession cookie domainchange.
Code:
We have
1 guest and
1 member online

You are anonymous user. You can log in or register here.


This is on all of the portals. So did i miss something with the cookie settings in pnsession.php?
From my pnsession.php:
Code:
// Cookie path
        ini_set('session.cookie_path', $path);
        // Cookie domain
        // only needed for multi-server multisites - adapt as needed
        $domain = preg_replace('/^[^.]+/','',$host);
        ini_set('session.cookie_domain', $domain);


Here lies the key i think. Anyone see any changes that can be made to fix this problem?

Shorty
Shorty - Feb 14, 2006 - 02:46 AM
Post subject:
ok i found the problem. i`ll rewrite my tutorial a bit and continue testing for a little while before i post it.

Thx for tips so far guys:)

Shorty
Shorty - Feb 14, 2006 - 10:50 PM
Post subject:
I`ve completed the tutorial it might need a rewrite on domain/sub/ etc names as i was not sure how to explain it properly i think. Typos and explanations etc too as i don`t speak english originally.

There`s a couple of issues that i need to test before it can be published. I don`t think you can have enabled the "Allow members to change theme" because if that is stored in user_data and is read by all sites. The $pnconfig['encoded'] = ? will not work on default. It needs to be set to 1. Why? I don`t know. Maby i did something wrong somewhere or i had 0 on some and 1 on others but i got a admin database error when on 0.

I now have 5 sites (1 main and 4 subdomains) running on the same userdatabase and share the same MDForum database. Had no other issues. It will be insanely mcuh work to maintain 4 sites but i guess i can`t complain:)
PeteBest - Feb 15, 2006 - 01:00 AM
Post subject:
OK, I'll try and explain the whole encoded thing again. If you follow the mdpro install procedure it takes your database username and password and uses a base64 hash to attempt to secure the data a bit more. So, lets say my database username is root and my password is password, my md-config.php details can look like:

Code:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'cm9vdA==';
$pnconfig['dbpass'] = 'cGFzc3dvcmQ=';
$pnconfig['dbname'] = 'md107';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'md';
$pnconfig['encoded'] = '1';


Or, if I want the user/pass to be just plain text I can use:

Code:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'root';
$pnconfig['dbpass'] = 'password';
$pnconfig['dbname'] = 'md107';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'md';
$pnconfig['encoded'] = '0';

Shorty - Feb 18, 2006 - 06:15 AM
Post subject:
hi. i made the tutorial including the share of the MDforum tables. not much really but it works so far. if you guys want to check it out and let me know if it`s incomplete or any other feedback on it, i attached it in this post. hope it`s ok. if not, then i`ll haveto do it again

Shorty

EDIT. it seems i can`t attach .txt files. that is kind of strange isn`t it?
Here is the complete text:
Code:
This is a tutorial on how to make several MDPro sites can use the same user database without using the Multisites module included with MDPro. As some might want to have independent sites sharing the same database here is how you do it.

Tutorial to create MultiSites:

Introduction:
This is tested with MDPro version 1.0.75. It works with subdomains and domains sharing the same database. Some changes must be done if it`s on different databases, but that`s another story. The test setup was performed on one domain and 4 subdomains.
Examples:
http://www.yourdomain.com (main domain)
http://subdomain.yourdomain.com (subdomain)
http://www.yourotherdomain.com (other domain)

In this system you will use one database (databases for each portal will be in such database) and as many MDPro installations as you would like(tested with 1 domain and 4 subdomain).

1.Installation:
We begin installing MDPro normally on the server and creating a database with it's tables, for this first intallation we use the default prefix, meaning, "md" (it's an important detail, because each extra portal we install will has to have a new prefix).

2.Once we've got our main portal installed and working we access the server's control panel to create as many subdomains as needed.

3.Inside each of those folders we install a different MD-Pro.Use same database settings as main but install the portals with its own table prefix.
Example(you can name the other prefixes as you please, this is just examples):

Table prefix: md  (main)
Table prefix: md2  (subdomain)
Table prefix: md3  (subdomain)
Table prefix: md4  (other domain)

4.Setting up the config/md-config.php file in all of the subdomains and other domains is crucial to make this work.

The main domain md-config.php file has to be set up like this:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbtabletype'] = 'myisam';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'yournick';
$pnconfig['dbpass'] = 'yourpassword';
$pnconfig['dbname'] = 'yourdatabase';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'md';
$pnconfig['encoded'] = '0';

The other md-config.php files from the subdomains and other domains will be like this:
$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbtabletype'] = 'myisam';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'yournick';
$pnconfig['dbpass'] = 'yourpassword';
$pnconfig['dbname'] = 'your database';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'md2';
$pnconfig['encoded'] = '0';

$pnconfig['dbtype'] = 'mysql';
$pnconfig['dbtabletype'] = 'myisam';
$pnconfig['dbhost'] = 'localhost';
$pnconfig['dbuname'] = 'yournick';
$pnconfig['dbpass'] = 'yourpassword';
$pnconfig['dbname'] = 'your database';
$pnconfig['system'] = '0';
$pnconfig['prefix'] = 'md3';
$pnconfig['encoded'] = '0';

and so on until you complete each one of the files inside each MDPro installations you may have. As you can see, we will have only changed the prefix (md2, md3, ..., md2 and md3 are just my examples, name them as you please). Remember that each portal has to have a different prefix.

Now, we have the Multisite portals installed and the subdomains working, but as of now they are totally independant.

6.Setting up the pntables.php file

In order to have a Multisite operational and working we have to share some tables (you could really share as many tables as you want), like: Users and PM's (Private Messages), because we want that once our users have logged in or registered to one of the portals, they become registered or logged on to all the portals, so they can access their private messages from anywhere in the Multisite.

So then, lets see how we have to modify the tables and what tables are recomendable to modify:

The pntables.php file (which is in the root folder) from the main portal doesn't need to be modified, but the ones inside the portal folders do.

Find the next string in each file:
$users = $prefix . '_users';
$pntable['users'] = $users;

and change it to:
$users = md . '_users';
$pntable['users'] = $users;

As you can see, we have substituted prefix for md so the other portals share the same tables as the main portal (which in our example has the prefix md).

The same has to be done to each table you want to share, in my case i have shared the next tables:

$group_membership
$group_perms
$groups
$user_data
$user_perms
$user_property
$priv_msgs
$users
$sessions_infos

logically in some portals you could be interested in sharing less tables or some other types of tables, but we leave that to your own choice, the one which suits your needs better.

We almost have our multisite portal ready, but we still need to do a small but important tweak, because since MDPro works with cookies, we have to configure them in order to get our Multisite working.

7.Setting up the pnSession.php file

The pnSession.php file is located inside the includes folder.
This file has to be modified in all installations, main and secondary, like this.

1.- Find this(Line 34):

$path = pnGetBaseURI();
if (empty($path)) {
$path = '/';
}

and change it to this:

$path = '/';

2.- You will find this 2 lines like commented out like this(Line 81):

// $domain = preg_replace('/^[^.]+/','',$host);
// ini_set('session.cookie_domain', $domain);

remove the // in order to make them operational. They should look now like this:

$domain = preg_replace('/^[^.]+/','',$host);
ini_set('session.cookie_domain', $domain);

TIP:
In order to make it definetively operational, most of all if the main portal was already active and it had its own cookies, session info, etc. you will have to empty the prefix_sessions_infos tables and eliminate the cookies. From now on you have a new Multisite ready and completely operational.

Enjoy.

----------------------------------------------------------------------------------------------------------------------
Installing MDForum 2.0.1 shared with the multisites we just installed.

If you don`t want to install MDForum, ignore these steps.

Installing MDForum while sharing the database with multisites (this is not for the multisite module)

1.First we need to upload the complete module to all our sites to /modules. This will haveto be done to both main domain and all subdomains an other domains.

2.Then go to your main domains Administration >Settings >Modules. Press "Regenerate" and your list of modules will appear. Find MDForum module currently "Uninitialized". Press initialize, then activate when the page reloads.
The MDForum is now activ and you can find it here(change to your actual domain): http://yourdomain.com/modules.php?op=modload&name=MDForum&file=index

3.Now we need to change and delete some files to integrate this module for the other sites. As the MDForum has been installed and the proper tables inserted to our database, we do not want another set of tables.

First the delete(this will be done to all subdomains and other domains. NOT the main domain!):
In all subdomains/other domains, delete the entire MDForum install folder and all its files. /modules/MDForum/install/. Also delete pninit.php found in /modules/MDForum/.

4.Then the file change((this will be done to all subdomains and other domains. NOT the main domain!):
Find the file common.php in /modules/MDForum/ and do the following change:

Find on line 191

// Begin MDForum Multi-Site Support
$table_prefix = pnConfigGetVar('prefix') . '_phpbb_';
// End MDForum Multi-Site Support

Change to:

// Begin MDForum Multi-Site Support
$table_prefix = md. '_phpbb_';
// End MDForum Multi-Site Support

As you can see we now have changed what prefix the MDForum should query from. As the tables have been installed on our main prefix, we set that as the prefix for the forum.
Do this to all subdomains and other domains.

After these changes we can enter the Administration >Settings >Modules to initialize and aktivate MDForum for all our subdomains and other domains.

Now we should have a multisite sharing user database and a shared forum.
 
Tip. You might want to empty the _phpbb_session_info table in your database before using.

Enjoy.

vgamenews - Feb 24, 2006 - 08:34 AM
Post subject: How did this work out??
Hey Shorty -

How did this work out - I want to use Maxdev becuase its got everything I need and looks sharp - but I have to have the subdomains - please let me know
eLGie - Feb 24, 2006 - 08:04 PM
Post subject:
Did you get it figured yet Shorty? Should I flip the switch on for you? You might want to try /includes/pnSession.php and find some interesting code in that file that needs to be edited pertaining to your domain name. If you have trouble email linuxbag@linuxguru.ca but I highly doubt you will. Superb job.
Shorty - Feb 24, 2006 - 11:01 PM
Post subject:
my last post i added the tutorial on how to do this including the mdforum database share. i didn`t test the tutorial myself bocause i know what to do so it would be nice if someone else did and let me know if it`s ok and is easy to follow...
eLGie - Feb 25, 2006 - 06:46 PM
Post subject:
Session initialization failed - Been there Done that lots... Just recently too.

I'm serious I can replicate this error time and time again repetedly over and over for hours on end and find no apparent solution until I change the lines in the /includes/pnSession.php starting at line 79 to do with Cookie domain only needed for multi-server multisites. (Pause think of that. The original creators know what can be accomplished why else would it say multi-server multisites) - adapt as needed.

Typically my code at 82 would look like:

Code:

ini_set('session.cookie_domain','workwanted.ca');


This vital yet so very unimportant piece of information is not listed in the tutorial and some users would never find the switch to fully turn on multi-sites functionality. Also your encoded should be changed to '0'.

I've never contemplated making a personal config like you are but it has made me think for a minute. How is it going?
eLGie - Feb 25, 2006 - 06:54 PM
Post subject:
Sorry about the double post I had no idea this thread had more than one page, lol. Good read. What are your site names?
eLGie - Feb 25, 2006 - 07:59 PM
Post subject:
Got those visited and just about signed up. Whenever I have a module or a block that doesn't behave with tables on the main site I go to the code for the module and remove any $prefix in the sql statements and hard code them to md_table etc...

Take for instance with five sites you don't want to have to end up reinstantiating some modules on all five sites it just makes no sense. Some more famous examples are of course the Mailbag module and pnTresMailer. Some blocks would be from a situation like a personals module only using the main md prefix and having the rest of the sites draw the information from there. Sure as shit when you flip the block you will be hemmoraging because the block will be calling from a prefix.

I've never worked if from the windows side but I would suggest you invest in your own private connection to the internet and run your own server appliance from home if you start investing a lot of time in this. I would use Linux as well both for the router and the server. There are far too many nasties out there that can whip your drives up thrashing in no time if you let them and I wouldn't trust a server host to handle this very important aspect of what traffic is actually on the server at any given time. Please see server logs on front page of of my linuxguru do ca site for what your server logs should look like.

I'll post a copy of a typical pnTables.php that I have very seldom changed but like you often thought about adding or modifying to. Oh yes, been there too. I found trying to alter things in that file best left alone or to the install.php people here, I'm sure they know who they are cause once you've been there every new release or disribution modifying and maintaing upgrade paths for database queries your not so very inclined to return to newtables.php.

I say strip the install and recode the admin panel or rather NS-MySql tools to provide prefix reiterations. This only requires the addition of one master table holding all your prefix names. From there a normal bare bones install would occurr. What this does is enable building of the multi-sites from one interface.

Say you have 300 sites. Your not going to every site to set up a new poll are you? Not a chance. Your going to either hand code the one huge database dump and run it against the database like mysql yourdatabase < nomistakes.sql or your going to take what usually amounts to the pninit.php out of each folder and stand up and code it into your new multisite admin interface. That way you can test immediatly for success. Shit I don't even put or drop damn dead and die statements in. I run the queries every time and know they either worked or didn't by doing a simple select all from the last field I was trying to update. Here I think I can show you one of my more tried and true pntables.php now. This is from my web root. Remember you do have options for individual pntables.php to exist in parameters folder by code as well as other files. My parameters folders only contain the config.php folder though Smile
pntables.php
[code:1:6e6755cad4]
<?php
// ----------------------------------------------------------------------
// eNvolution Content Management System
// Copyright (C) 2002 by the eNvolution Development Team.
// http://www.envolution.com/
// ----------------------------------------------------------------------
// Based on:
// Postnuke Content Management System - www.postnuke.com
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// 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.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
//
// ----------------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------------


$prefix = $pnconfig['prefix'];

$pntable = array();

$autolinks = 'envo_autolinks';
$pntable['autolinks'] = $autolinks;
$pntable['autolinks_column'] = array ('lid' => $autolinks . '.pn_lid',
'keyword' => $autolinks . '.pn_keyword',
'title' => $autolinks . 'pn_title',
'url' => $autolinks . 'pn_url',
'comment' => $autolinks . 'pn_comment');

$autonews = $prefix . '_autonews';
$pntable['autonews'] = $autonews;
$pntable['autonews_column'] = array ('anid' => $autonews . '.pn_anid',
'catid' => $autonews . '.pn_catid',
'aid' => $autonews . '.pn_aid',
'title' => $autonews . '.pn_title',
'time' => $autonews . '.pn_time',
'hometext' => $autonews . '.pn_hometext',
'bodytext' => $autonews . '.pn_bodytext',
'topic' => $autonews . '.pn_topic',
'informant' => $autonews . '.pn_informant',
'notes' => $autonews . '.pn_notes',
'ihome' => $autonews . '.pn_ihome',
'alanguage' => $autonews . '.pn_language',
'language' => $autonews . '.pn_language',
'withcomm' => $autonews . '.pn_withcomm');

$banner = 'envo_banner';
$pntable['banner'] = $banner;
$pntable['banner_column'] = array ('bid' => $banner . '.pn_bid',
'cid' => $banner . '.pn_cid',
'type' => $banner . '.pn_type',
'imptotal' => $banner . '.pn_imptotal',
'impmade' => $banner . '.pn_impmade',
'clicks' => $banner . '.pn_clicks',
'imageurl' => $banner . '.pn_imageurl',
'clickurl' => $banner . '.pn_clickurl',
'date' => $banner . '.pn_date');

$bannerclient = 'envo_bannerclient';
$pntable['bannerclient'] = $bannerclient;
$pntable['bannerclient_column'] = array ('cid' => $bannerclient . '.pn_cid',
'name' => $bannerclient . '.pn_name',
'contact' => $bannerclient . '.pn_contact',
'email' => $bannerclient . '.pn_email',
'login' => $bannerclient . '.pn_login',
'passwd' => $bannerclient . '.pn_passwd',
'extrainfo' => $bannerclient . '.pn_extrainfo');

$bannerfinish = 'envo_bannerfinish';
$pntable['bannerfinish'] = $bannerfinish;
$pntable['bannerfinish_column'] = array ('bid' => $bannerfinish . '.pn_bid',
'cid' => $bannerfinish . '.pn_cid',
'impressions' => $bannerfinish . '.pn_impressions',
'clicks' => $bannerfinish . '.pn_clicks',
'datestart' => $bannerfinish . '.pn_datestart',
'dateend' => $bannerfinish . '.pn_dateend');

$blocks = 'envo_blocks';
$pntable['blocks'] = $blocks;
$pntable['blocks_column'] = array ('bid' => $blocks . '.pn_bid',
'bkey' => $blocks . '.pn_bkey',
'title' => $blocks . '.pn_title',
'content' => $blocks . '.pn_content',
'url' => $blocks . '.pn_url',
'mid' => $blocks . '.pn_mid',
'position' => $blocks . '.pn_position',
'weight' => $blocks . '.pn_weight',
'active' => $blocks . '.pn_active',
'refresh' => $blocks . '.pn_refresh',
'last_update' => $blocks . '.pn_last_update',
'blanguage' => $blocks . '.pn_language',
'language' => $blocks . '.pn_language');

$blocks_buttons = 'envo_blocks_buttons';
$pntable['blocks_buttons'] = $blocks_buttons;
$pntable['blocks_buttons_column'] = array ('id' => $blocks_buttons . '.pn_id',
'bid' => $blocks_buttons . '.pn_bid',
'title' => $blocks_buttons . '.pn_title',
'url' => $blocks_buttons . '.pn_url',
'images' => $blocks_buttons . '.pn_images');

$comments = $prefix . '_comments';
$pntable['comments'] = $comments;
$pntable['comments_column'] = array ('tid' => $comments . '.pn_tid',
'pid' => $comments . '.pn_pid',
'sid' => $comments . '.pn_sid',
'date' => $comments . '.pn_date',
'name' => $comments . '.pn_name',
'email' => $comments . '.pn_email',
'url' => $comments . '.pn_url',
'host_name' => $comments . '.pn_host_name',
'subject' => $comments . '.pn_subject',
'comment' => $comments . '.pn_comment',
'score' => $comments . '.pn_score',
'reason' => $comments . '.pn_reason');

$counter = $prefix . '_counter';
$pntable['counter'] = $counter;
$pntable['counter_column'] = array ('type' => $counter . '.pn_type',
'var' => $counter . '.pn_var',
'count' => $counter . '.pn_count');

$downloads_categories = 'envo_downloads_categories';
$pntable['downloads_categories'] = $downloads_categories;
$pntable['downloads_categories_column'] = array ('cid' => $downloads_categories . '.pn_cid',
'title' => $downloads_categories . '.pn_title',
'cdescription' => $downloads_categories . '.pn_description');

$downloads_downloads = 'envo_downloads_downloads';
$pntable['downloads_downloads'] = $downloads_downloads;
$pntable['downloads_downloads_column'] = array ('lid' => $downloads_downloads . '.pn_lid',
'cid' => $downloads_downloads . '.pn_cid',
'sid' => $downloads_downloads . '.pn_sid',
'title' => $downloads_downloads . '.pn_title',
'url' => $downloads_downloads . '.pn_url',
'image' => $downloads_downloads . '.pn_image',
'description' => $downloads_downloads . '.pn_description',
'date' => $downloads_downloads . '.pn_date',
'name' => $downloads_downloads . '.pn_name',
'email' => $downloads_downloads . '.pn_email',
'hits' => $downloads_downloads . '.pn_hits',
'submitter' => $downloads_downloads . '.pn_submitter',
'downloadratingsummary' => $downloads_downloads . '.pn_ratingsummary',
'totalvotes' => $downloads_downloads . '.pn_totalvotes',
'totalcomments' => $downloads_downloads . '.pn_totalcomments',
'filesize' => $downloads_downloads . '.pn_filesize',
'version' => $downloads_downloads . '.pn_version',
'homepage' => $downloads_downloads . '.pn_homepage');

$downloads_editorials = 'envo_downloads_editorials';
$pntable['downloads_editorials'] = $downloads_editorials;
$pntable['downloads_editorials_column'] = array ('downloadid' => $downloads_editorials . '.pn_id',
'adminid' => $downloads_editorials . '.pn_adminid',
'editorialtimestamp' => $downloads_editorials . '.pn_timestamp',
'editorialtext' => $downloads_editorials . '.pn_text',
'editorialtitle' => $downloads_editorials . '.pn_title');

$downloads_modrequest = 'envo_downloads_modrequest';
$pntable['downloads_modrequest'] = $downloads_modrequest;
$pntable['downloads_modrequest_column'] = array ('requestid' => $downloads_modrequest . '.pn_requestid',
'lid' => $downloads_modrequest . '.pn_lid',
'cid' => $downloads_modrequest . '.pn_cid',
'sid' => $downloads_modrequest . '.pn_sid',
'title' => $downloads_modrequest . '.pn_title',
'url' => $downloads_modrequest . '.pn_url',
'image' => $downloads_modrequest . '.pn_image',
'description' => $downloads_modrequest . '.pn_description',
'modifysubmitter' => $downloads_modrequest . '.pn_modifysubmitter',
'brokendownload' => $downloads_modrequest . '.pn_brokendownload',
'name' => $downloads_modrequest . '.pn_name',
'email' => $downloads_modrequest . '.pn_email',
'filesize' => $downloads_modrequest . '.pn_filesize',
'version' => $downloads_modrequest . '.pn_version',
'homepage' => $downloads_modrequest . '.pn_homepage');

$downloads_newdownload = 'envo_downloads_newdownload';
$pntable['downloads_newdownload'] = $downloads_newdownload;
$pntable['downloads_newdownload_column'] = array ('lid' => $downloads_newdownload . '.pn_lid',
'cid' => $downloads_newdownload . '.pn_cid',
'sid' => $downloads_newdownload . '.pn_sid',
'title' => $downloads_newdownload . '.pn_title',
'url' => $downloads_newdownload . '.pn_url',
'image' => $downloads_newdownload . '.pn_image',
'description' => $downloads_newdownload . '.pn_description',
'name' => $downloads_newdownload . '.pn_name',
'email' => $downloads_newdownload . '.pn_email',
'submitter' => $downloads_newdownload . '.pn_submitter',
'filesize' => $downloads_newdownload . '.pn_filesize',
'version' => $downloads_newdownload . '.pn_version',
'homepage' => $downloads_newdownload . '.pn_homepage');

$downloads_subcategories = 'envo_downloads_subcategories';
$pntable['downloads_subcategories'] = $downloads_subcategories;
$pntable['downloads_subcategories_column'] = array ('sid' => $downloads_subcategories . '.pn_sid',
'cid' => $downloads_subcategories . '.pn_cid',
'title' => $downloads_subcategories . '.pn_title');

$downloads_votedata = 'envo_downloads_votedata';
$pntable['downloads_votedata'] = $downloads_votedata;
$pntable['downloads_votedata_column'] = array ('ratingdbid' => $downloads_votedata . '.pn_id',
'ratinglid' => $downloads_votedata . '.pn_lid',
'ratinguser' => $downloads_votedata . '.pn_user',
'rating' => $downloads_votedata . '.pn_rating',
'ratinghostname' => $downloads_votedata . '.pn_hostname',
'ratingcomments' => $downloads_votedata . '.pn_comments',
'ratingtimestamp' => $downloads_votedata . '.pn_timestamp');

$ephem = 'envo_ephem';
$pntable['ephem'] = $ephem;
$pntable['ephem_column'] = array ('eid' => $ephem . '.pn_eid',
'did' => $ephem . '.pn_did',
'mid' => $ephem . '.pn_mid',
'yid' => $ephem . '.pn_yid',
'content' => $ephem . '.pn_content',
'elanguage' => $ephem . '.pn_language',
'language' => $ephem . '.pn_language');

$faqanswer = 'envo_faqanswer';
$pntable['faqanswer'] = $faqanswer;
$pntable['faqanswer_column'] = array ('id' => $faqanswer . '.pn_id',
'id_cat' => $faqanswer . '.pn_id_cat',
'question' => $faqanswer . '.pn_question',
'answer' => $faqanswer . '.pn_answer',
'submittedby' => $faqanswer . '.pn_submittedby');

$faqcategories = 'envo_faqcategories';
$pntable['faqcategories'] = $faqcategories;
$pntable['faqcategories_column'] = array ('id_cat' => $faqcategories . '.pn_id_cat',
'categories' => $faqcategories . '.pn_categories',
'flanguage' => $faqcategories . '.pn_language',
'language' => $faqcategories . '.pn_language',
'parent_id' => $faqcategories . '.pn_parent_id');

$group_membership = 'envo_group_membership';
$pntable['group_membership'] = $group_membership;
$pntable['group_membership_column'] = array ('gid' => $group_membership . '.pn_gid',
'uid' => $group_membership . '.pn_uid');

$group_perms = 'envo_group_perms';
$pntable['group_perms'] = $group_perms;
$pntable['group_perms_column'] = array ('pid' => $group_perms . '.pn_pid',
'gid' => $group_perms . '.pn_gid',
'sequence' => $group_perms . '.pn_sequence',
'realm' => $group_perms . '.pn_realm',
'component' => $group_perms . '.pn_component',
'instance' => $group_perms . '.pn_instance',
'level' => $group_perms . '.pn_level',
'bond' => $group_perms . '.pn_bond');

$groups = 'envo_groups';
$pntable['groups'] = $groups;
$pntable['groups_column'] = array ('gid' => $groups . '.pn_gid',
'name' => $groups . '.pn_name');

$headlines = $prefix . '_headlines';
$pntable['headlines'] = $headlines;
$pntable['headlines_column'] = array ('id' => $headlines . '.pn_id',
'sitename' => $headlines . '.pn_sitename',
'rssuser' => $headlines . '.pn_rssuser',
'rsspasswd' => $headlines . '.pn_rsspasswd',
'use_proxy' => $headlines . '.pn_use_proxy',
'rssurl' => $headlines . '.pn_rssurl',
'maxrows' => $headlines . '.pn_maxrows',
'siteurl' => $headlines . '.pn_siteurl',
'options' => $headlines . '.pn_options');

$hooks = 'envo_hooks';
$pntable['hooks'] = $hooks;
$pntable['hooks_column'] = array ('id' => $hooks . '.pn_id',
'object' => $hooks . '.pn_object',
'action' => $hooks . '.pn_action',
'smodule' => $hooks . '.pn_smodule',
'stype' => $hooks . '.pn_stype',
'tarea' => $hooks . '.pn_tarea',
'tmodule' => $hooks . '.pn_tmodule',
'ttype' => $hooks . '.pn_ttype',
'tfunc' => $hooks . '.pn_tfunc');

$languages_constant = $prefix.'_languages_constant';
$pntable['languages_constant'] = $languages_constant;
$pntable['languages_constant_column'] = array ('constant' => $languages_constant . '.pn_constant',
'file' => $languages_constant . '.pn_file');

$languages_file = $prefix.'_languages_file';
$pntable['languages_file'] = $languages_file;
$pntable['languages_file_column'] = array ('target' => $languages_file . '.pn_target',
'source' => $languages_file . '.pn_source');

$languages_translation = 'envo_languages_translation';
$pntable['languages_translation'] = $languages_translation;
$pntable['languages_translation_column'] = array ('language' => $languages_translation . '.pn_language',
'constant' => $languages_translation . '.pn_constant',
'translation' => $languages_translation . '.pn_translation',
'level' => $languages_translation . '.pn_level');

$links_categories = 'envo_links_categories';
$pntable['links_categories'] = $links_categories;
$pntable['links_categories_column'] = array ('cat_id' => $links_categories . '.pn_cat_id',
'parent_id' => $links_categories . '.pn_parent_id',
'title' => $links_categories . '.pn_title',
'cdescription' => $links_categories . '.pn_description');

$links_editorials = 'envo_links_editorials';
$pntable['links_editorials'] = $links_editorials;
$pntable['links_editorials_column'] = array ('linkid' => $links_editorials . '.pn_linkid',
'adminid' => $links_editorials . '.pn_adminid',
'editorialtimestamp' => $links_editorials . '.pn_timestamp',
'editorialtext' => $links_editorials . '.pn_text',
'editorialtitle' => $links_editorials . '.pn_title');

$links_links = 'envo_links_links';
$pntable['links_links'] = $links_links;
$pntable['links_links_column'] = array ('lid' => $links_links . '.pn_lid',
'cat_id' => $links_links . '.pn_cat_id',
'title' => $links_links . '.pn_title',
'url' => $links_links . '.pn_url',
'image' => $links_links . '.pn_image',
'description' => $links_links . '.pn_description',
'date' => $links_links . '.pn_date',
'name' => $links_links . '.pn_name',
'email' => $links_links . '.pn_email',
'hits' => $links_links . '.pn_hits',
'submitter' => $links_links . '.pn_submitter',
'linkratingsummary' => $links_links . '.pn_ratingsummary',
'totalvotes' => $links_links . '.pn_totalvotes',
'totalcomments' => $links_links . '.pn_totalcomments');

$links_modrequest = 'envo_links_modrequest';
$pntable['links_modrequest'] = $links_modrequest;
$pntable['links_modrequest_column'] = array ('requestid' => $links_modrequest . '.pn_requestid',
'lid' => $links_modrequest . '.pn_lid',
'cat_id' => $links_modrequest . '.pn_cat_id',
'sid' => $links_modrequest . '.pn_sid',
'title' => $links_modrequest . '.pn_title',
'url' => $links_modrequest . '.pn_url',
'image' => $links_modrequest . '.pn_image',
'description' => $links_modrequest . '.pn_description',
'modifysubmitter' => $links_modrequest . '.pn_modifysubmitter',
'brokenlink' => $links_modrequest . '.pn_brokenlink');

$links_newlink = 'envo_links_newlink';
$pntable['links_newlink'] = $links_newlink;
$pntable['links_newlink_column'] = array ('lid' => $links_newlink . '.pn_lid',
'cat_id' => $links_newlink . '.pn_cat_id',
'title' => $links_newlink . '.pn_title',
'url' => $links_newlink . '.pn_url',
'image' => $links_newlink . '.pn_image',
'description' => $links_newlink . '.pn_description',
'name' => $links_newlink . '.pn_name',
'email' => $links_newlink . '.pn_email',
'submitter' => $links_newlink . '.pn_submitter');

$links_votedata = 'envo_links_votedata';
$pntable['links_votedata'] = $links_votedata;
$pntable['links_votedata_column'] = array ('ratingdbid' => $links_votedata . '.pn_id',
'ratinglid' => $links_votedata . '.pn_lid',
'ratinguser' => $links_votedata . '.pn_user',
'rating' => $links_votedata . '.pn_rating',
'ratinghostname' => $links_votedata . '.pn_hostname',
'ratingcomments' => $links_votedata . '.pn_comments',
'ratingtimestamp' => $links_votedata . '.pn_timestamp');

$message = 'envo_message';
$pntable['message'] = $message;
$pntable['message_column'] = array ('mid' => $message . '.pn_mid',
'title' => $message . '.pn_title',
'content' => $message . '.pn_content',
'date' => $message . '.pn_date',
'expire' => $message . '.pn_expire',
'active' => $message . '.pn_active',
'view' => $message . '.pn_view',
'mlanguage' => $message . '.pn_language',
'language' => $message . '.pn_language');

$module_vars = $prefix . '_module_vars';
$pntable['module_vars'] = $module_vars;
$pntable['module_vars_column'] = array ('id' => $module_vars . '.pn_id',
'modname' => $module_vars . '.pn_modname',
'name' => $module_vars . '.pn_name',
'value' => $module_vars . '.pn_value');

$modules = $prefix . '_modules';
$pntable['modules'] = $modules;
$pntable['modules_column'] = array ('id' => $modules . '.pn_id',
'name' => $modules . '.pn_name',
'type' => $modules . '.pn_type',
'displayname' => $modules . '.pn_displayname',
'description' => $modules . '.pn_description',
'regid' => $modules . '.pn_regid',
'directory' => $modules . '.pn_directory',
'version' => $modules . '.pn_version',
'admin_capable' => $modules . '.pn_admin_capable',
'user_capable' => $modules . '.pn_user_capable',
'state' => $modules . '.pn_state');

$nomoreblocks = 'envo_nomoreblocks';
$pntable['nomoreblocks'] = $nomoreblocks;
$pntable['nomoreblocks_column'] = array ('modulo' => $nomoreblocks . '.pn_modulo',
'blocco' => $nomoreblocks . '.pn_blocco',
'identi' => $nomoreblocks . '.pn_identi',
'posizione' => $nomoreblocks . '.pn_pos',
'peso' => $nomoreblocks . '.pn_peso',
'blocktemplate' => $nomoreblocks . '.pn_template');



$poll_check = 'envo_poll_check';
$pntable['poll_check'] = $poll_check;
$pntable['poll_check_column'] = array ('ip' => $poll_check . '.pn_ip',
'time' => $poll_check . '.pn_time');

$poll_data = 'envo_poll_data';
$pntable['poll_data'] = $poll_data;
$pntable['poll_data_column'] = array ('pollid' => $poll_data . '.pn_pollid',
'optiontext' => $poll_data . '.pn_optiontext',
'optioncount' => $poll_data . '.pn_optioncount',
'voteid' => $poll_data . '.pn_voteid',
'optioncolor' => $poll_data . '.pn_optioncolor');

$poll_desc = 'envo_poll_desc';
$pntable['poll_desc'] = $poll_desc;
$pntable['poll_desc'] = $poll_desc;
$pntable['poll_desc_column'] = array ('pollid' => $poll_desc . '.pn_pollid',
'polltitle' => $poll_desc . '.pn_title',
'timestamp' => $poll_desc . '.pn_timestamp',
'voters' => $poll_desc . '.pn_voters',
'planguage' => $poll_desc . '.pn_language',
'language' => $poll_desc . '.pn_language',
'votesystem' => $poll_desc . '.pn_votesystem',
'postfull' => $poll_desc . '.pn_postfull',
'votetracking' => $poll_desc .'.pn_votetracking');

$poll_voters = 'envo_poll_voters';
$pntable['poll_voters'] = $poll_voters;
$pntable['poll_voters_column'] = array ('pollid' => $poll_voters . '.pn_pollid ',
'voteid' => $poll_voters . '.pn_voteid ',
'uid' => $poll_voters . '.pn_uid',
'timestamp' => $poll_voters . '.pn_timestamp');

$pollcomments = 'envo_pollcomments';
$pntable['pollcomments'] = $pollcomments;
$pntable['pollcomments_column'] = array ('tid' => $pollcomments . '.pn_tid',
'pid' => $pollcomments . '.pn_pid',
'pollid' => $pollcomments . '.pn_pollid',
'date' => $pollcomments . '.pn_date',
'name' => $pollcomments . '.pn_name',
'email' => $pollcomments . '.pn_email',
'url' => $pollcomments . '.pn_url',
'host_name' => $pollcomments . '.pn_host_name',
'subject' => $pollcomments . '.pn_subject',
'comment' => $pollcomments . '.pn_comment',
'score' => $pollcomments . '.pn_score',
'reason' => $pollcomments . '.pn_reason');

$priv_msgs = 'envo_priv_msgs';
$pntable['priv_msgs'] = $priv_msgs;
$pntable['priv_msgs_column'] = array ('msg_id' => $priv_msgs . '.pn_msg_id',
'msg_image' => $priv_msgs . '.pn_msg_image',
'subject' => $priv_msgs . '.pn_subject',
'from_userid' => $priv_msgs . '.pn_from_userid',
'to_userid' => $priv_msgs . '.pn_to_userid',
'msg_time' => $priv_msgs . '.pn_msg_time',
'msg_text' => $priv_msgs . '.pn_msg_text',
'read_msg' => $priv_msgs . '.pn_read_msg');

$priv_msgs_out = 'envo_priv_msgs_outbox';
$pntable['priv_msgs_outbox'] = $priv_msgs_out;
$pntable['priv_msgs_outbox_column'] = array ('msg_id' => $priv_msgs_out . '.pn_msg_id',
'msg_image' => $priv_msgs_out . '.pn_msg_image',
'subject' => $priv_msgs_out . '.pn_subject',
'from_userid' => $priv_msgs_out . '.pn_from_userid',
'to_userid' => $priv_msgs_out . '.pn_to_userid',
'msg_time' => $priv_msgs_out . '.pn_msg_time',
'msg_text' => $priv_msgs_out . '.pn_msg_text',
'read_msg' => $priv_msgs_out . '.pn_read_msg');

$queue = 'envo_queue';
$pntable['queue'] = $queue;
$pntable['queue_column'] = array ('qid' => $queue . '.pn_qid',
'uid' => $queue . '.pn_uid',
'arcd' => $queue . '.pn_arcd',
'uname' => $queue . '.pn_uname',
'subject' => $queue . '.pn_subject',
'story' => $queue . '.pn_story',
'timestamp' => $queue . '.pn_timestamp',
'topic' => $queue . '.pn_topic',
'alanguage' => $queue . '.pn_language',
'language' => $queue . '.pn_language',
'bodytext' => $queue . '.pn_bodytext');

$realms = 'envo_realms';
$pntable['realms'] = $realms;
$pntable['realms_column'] = array ('rid' => $realms . '.pn_rid',
'name' => $realms . '.pn_name');

$referer = 'envo_referer';
$pntable['referer'] = $referer;
$pntable['referer_column'] = array ('rid' => $referer . '.pn_rid',
'url' => $referer . '.pn_url',
'frequency' => $referer . '.pn_frequency');

$related = 'envo_related';
$pntable['related'] = $related;
$pntable['related_column'] = array ('rid' => $related . '.pn_rid',
'tid' => $related . '.pn_tid',
'name' => $related . '.pn_name',
'url' => $related . '.pn_url');

$reviews = 'envo_reviews';
$pntable['reviews'] = $reviews;
$pntable['reviews_column'] = array ('id' => $reviews . '.pn_id',
'date' => $reviews . '.pn_date',
'title' => $reviews . '.pn_title',
'text' => $reviews . '.pn_text',
'reviewer' => $reviews . '.pn_reviewer',
'email' => $reviews . '.pn_email',
'score' => $reviews . '.pn_score',
'cover' => $reviews . '.pn_cover',
'url' => $reviews . '.pn_url',
'url_title' => $reviews . '.pn_url_title',
'hits' => $reviews . '.pn_hits',
'rlanguage' => $reviews . '.pn_language',
'language' => $reviews . '.pn_language');

$reviews_add = 'envo_reviews_add';
$pntable['reviews_add'] = $reviews_add;
$pntable['reviews_add_column'] = array ('id' => $reviews_add . '.pn_id',
'date' => $reviews_add . '.pn_date',
'title' => $reviews_add . '.pn_title',
'text' => $reviews_add . '.pn_text',
'reviewer' => $reviews_add . '.pn_reviewer',
'email' => $reviews_add . '.pn_email',
'score' => $reviews_add . '.pn_score',
'url' => $reviews_add . '.pn_url',
'url_title' => $reviews_add . '.pn_url_title',
'rlanguage' => $reviews_add . '.pn_language',
'language' => $reviews_add . '.pn_language');

$reviews_comments = 'envo_reviews_comments';
$pntable['reviews_comments'] = $reviews_comments;
$pntable['reviews_comments_column'] = array ('cid' => $reviews_comments . '.pn_cid',
'rid' => $reviews_comments . '.pn_rid',
'userid' => $reviews_comments . '.pn_userid',
'date' => $reviews_comments . '.pn_date',
'comments' => $reviews_comments . '.pn_comments',
'score' => $reviews_comments . '.pn_score');

$reviews_main = 'envo_reviews_main';
$pntable['reviews_main'] = $reviews_main;
$pntable['reviews_main_column'] = array ('title' => $reviews_main . '.pn_title',
'description' => $reviews_main . '.pn_description');

$seccont = 'envo_seccont';
$pntable['seccont'] = $seccont;
$pntable['seccont_column'] = array ('artid' => $seccont . '.pn_artid',
'secid' => $seccont . '.pn_secid',
'title' => $seccont . '.pn_title',
'content' => $seccont . '.pn_content',
'counter' => $seccont . '.pn_counter',
'slanguage' => $seccont . '.pn_language',
'language' => $seccont . '.pn_language');

//ak_comment added new column language
$sections = 'envo_sections';
$pntable['sections'] = $sections;
$pntable['sections_column'] = array ('secid' => $sections . '.pn_secid',
'secname' => $sections . '.pn_secname',
'language' => $sections . '.pn_language',
'image' => $sections . '.pn_image');

$session_info = 'envo_session_info';
$pntable['session_info'] = $session_info;
$pntable['session_info_column'] = array ('sessid' => $session_info . '.pn_sessid',
'ipaddr' => $session_info . '.pn_ipaddr',
'firstused' => $session_info . '.pn_firstused',
'lastused' => $session_info . '.pn_lastused',
'uid' => $session_info . '.pn_uid',
'vars' => $session_info . '.pn_vars');

$stats_date = $prefix . '_stats_date';
$pntable['stats_date'] = $stats_date;
$pntable['stats_date_column'] = array ('date' => $stats_date . '.pn_date',
'hits' => $stats_date . '.pn_hits');

$stats_hour = $prefix . '_stats_hour';
$pntable['stats_hour'] = $stats_hour;
$pntable['stats_hour_column'] = array ('hour' => $stats_hour . '.pn_hour',
'hits' => $stats_hour . '.pn_hits');

$stats_month = $prefix . '_stats_month';
$pntable['stats_month'] = $stats_month;
$pntable['stats_month_column'] = array ('month' => $stats_month . '.pn_month',
'hits' => $stats_month . '.pn_hits');

$stats_week = $prefix . '_stats_week';
$pntable['stats_week'] = $stats_week;
$pntable['stats_week_column'] = array ('weekday' => $stats_week . '.pn_weekday',
'hits' => $stats_week . '.pn_hits');

$stories = $prefix . '_stories';
//$stories = 'envo_stories';
$pntable['stories'] = $stories;
$pntable['stories_column'] = array ('sid' => $stories . '.pn_sid',
'cid' => $stories . '.pn_catid',
'catid' => $stories . '.pn_catid', // for back compat
'aid' => $stories . '.pn_aid',
'title' => $stories . '.pn_title',
'time' => $stories . '.pn_time',
'hometext' => $stories . '.pn_hometext',
'bodytext' => $stories . '.pn_bodytext',
'comments' => $stories . '.pn_comments',
'counter' => $stories . '.pn_counter',
'topic' => $stories . '.pn_topic',
'informant' => $stories . '.pn_informant',
'notes' => $stories . '.pn_notes',
'ihome' => $stories . '.pn_ihome',
'themeoverride' => $stories . '.pn_themeoverride',
'alanguage' => $stories . '.pn_language',
'language' => $stories . '.pn_language',
'withcomm' => $stories . '.pn_withcomm',
'format_type' => $stories . '.pn_format_type',
'skins' => $stories . '.pn_skins');

$stories_cat = 'envo_stories_cat';
$pntable['stories_cat'] = $stories_cat;
$pntable['stories_cat_column'] = array ('catid' => $stories_cat . '.pn_catid',
'title' => $stories_cat . '.pn_title',
'counter' => $stories_cat . '.pn_counter',
'themeoverride' => $stories_cat . '.pn_themeoverride');

// General config table and columns
// mh7: Added 'skin_id' to permit Skin specific configs
$pntable['theme_config'] = 'envo_theme_config';
$pntable['theme_config_column'] = array(
'name' => "$pntable[theme_config].name",
'skin_id' => "$pntable[theme_config].skin_id",
'description' => "$pntable[theme_config].description",
'setting' => "$pntable[theme_config].setting",
'data' => "$pntable[theme_config].data");

// Template to zone table and columns
$pntable['theme_layout'] = 'envo_theme_layout';
$pntable['theme_layout_column'] = array(
'skin_id' => "$pntable[theme_layout].skin_id",
'zone_label' => "$pntable[theme_layout].zone_label",
'tpl_file' => "$pntable[theme_layout].tpl_file");

// Skins and color table and columns
$pntable['theme_skins'] = 'envo_theme_skins';
$pntable['theme_skins_column'] = array(
'skin_id' => "$pntable[theme_skins].skin_id",
'name' => "$pntable[theme_skins].name",
'is_active' => "$pntable[theme_skins].is_active",
'is_multicolor' => "$pntable[theme_skins].is_multicolor",
'bgcolor1' => "$pntable[theme_skins].bgcolor1",
'bgcolor2' => "$pntable[theme_skins].bgcolor2",
'bgcolor3' => "$pntable[theme_skins].bgcolor3",
'bgcolor4' => "$pntable[theme_skins].bgcolor4",
'bgcolor5' => "$pntable[theme_skins].bgcolor5",
'bgcolor6' => "$pntable[theme_skins].bgcolor6",
'sepcolor' => "$pntable[theme_skins].sepcolor",
'textcolor1' => "$pntable[theme_skins].textcolor1",
'textcolor2' => "$pntable[theme_skins].textcolor2");

// Zones table and columns
// mh7: Added 'skin_id' to permit Skin specific layouts
$pntable['theme_zones'] = 'envo_theme_zones';
$pntable['theme_zones_column'] = array(
'zone_id' => "$pntable[theme_zones].zone_id",
'skin_id' => "$pntable[theme_zones].skin_id",
'name' => "$pntable[theme_zones].name",
'label' => "$pntable[theme_zones].label",
'type' => "$pntable[theme_zones].type",
'is_active' => "$pntable[theme_zones].is_active");


//ak_comment added new column language
$topics = 'envo_topics';
$pntable['topics'] = $topics;
$pntable['topics_column'] = array ('tid' => $topics . '.pn_topicid',
'topicid' => $topics . '.pn_topicid', // for back compat
'topicname' => $topics . '.pn_topicname',
'language' => $topics . '.pn_language',
'topicimage' => $topics . '.pn_topicimage',
'topictext' => $topics . '.pn_topictext',
'counter' => $topics . '.pn_counter');

$user_data = 'envo_user_data';
$pntable['user_data'] = $user_data;
$pntable['user_data_column'] = array ('uda_id' => $user_data . '.pn_uda_id',
'uda_propid' => $user_data . '.pn_uda_propid',
'uda_uid' => $user_data . '.pn_uda_uid',
'uda_value' => $user_data . '.pn_uda_value');

$user_perms = 'envo_user_perms';
$pntable['user_perms'] = $user_perms;
$pntable['user_perms_column'] = array ('pid' => $user_perms . '.pn_pid',
'uid' => $user_perms . '.pn_uid',
'sequence' => $user_perms . '.pn_sequence',
'realm' => $user_perms . '.pn_realm',
'component' => $user_perms . '.pn_component',
'instance' => $user_perms . '.pn_instance',
'level' => $user_perms . '.pn_level',
'bond' => $user_perms . '.pn_bond');

$user_property = 'envo_user_property';
$pntable['user_property'] = $user_property;
$pntable['user_property_column'] = array ('prop_id' => $user_property . '.pn_prop_id',
'prop_label' => $user_property . '.pn_prop_label',
'prop_dtype' => $user_property . '.pn_prop_dtype',
'prop_length' => $user_property . '.pn_prop_length',
'prop_weight' => $user_property . '.pn_prop_weight',
'prop_validation' => $user_property . '.pn_prop_validation'
);

$userblocks = $prefix . '_userblocks';
$pntable['userblocks'] = $userblocks;
$pntable['userblocks_column'] = array ('uid' => $userblocks . '.pn_uid',
'bid' => $userblocks . '.pn_bid',
'active' => $userblocks . '.pn_active',
'lastupdate' => $userblocks . '.pn_lastupdate');

$users = 'envo_users';
$pntable['users'] = $users;
$pntable['users_column'] = array ('uid' => $users . '.pn_uid',
'name' => $users . '.pn_name',
'uname' => $users . '.pn_uname',
'email' => $users . '.pn_email',
'femail' => $users . '.pn_femail',
'url' => $users . '.pn_url',
'user_avatar' => $users . '.pn_user_avatar',
'user_regdate' => $users . '.pn_user_regdate',
'user_icq' => $users . '.pn_user_icq',
'user_occ' => $users . '.pn_user_occ',
'user_from' => $users . '.pn_user_from',
'user_intrest' => $users . '.pn_user_intrest',
'user_sig' => $users . '.pn_user_sig',
'user_viewemail' => $users . '.pn_user_viewemail',
'user_theme' => $users . '.pn_user_theme',
'user_aim' => $users . '.pn_user_aim',
'user_yim' => $users . '.pn_user_yim',
'user_msnm' => $users . '.pn_user_msnm',
'pass' => $users . '.pn_pass',
'storynum' => $users . '.pn_storynum',
'umode' => $users . '.pn_umode',
'uorder' => $users . '.pn_uorder',
'thold' => $users . '.pn_thold',
'noscore' => $users . '.pn_noscore',
'bio' => $users . '.pn_bio',
'ublockon' => $users . '.pn_ublockon',
'ublock' => $users . '.pn_ublock',
'theme' => $users . '.pn_theme',
'commentmax' => $users . '.pn_commentmax',
'counter' => $users . '.pn_counter',
'timezone_offset' => $users . '.pn_timezone_offset');


$users_delrequest = 'envo_users_delrequest';
$pntable['users_delrequest'] = $users_delrequest;
$pntable['users_delrequest_column'] = array ('uid' => $users_delrequest . '.pn_uid',
'name' => $users_delrequest . '.pn_name',
'uname' => $users_delrequest . '.pn_uname',
'email' => $users_delrequest . '.pn_email',
'pass' => $users_delrequest . '.pn_pass');



$rtemulti = 'envo_rtemulti';
$pntable['rtemulti'] = $rtemulti;
$pntable['rtemulti_column'] = array('rid' => $rtemulti . '.pn_rid',
'editortype'=> $rtemulti . '.pn_editortype',
'modname' => $rtemulti . '.pn_modname',
'varname' => $rtemulti . '.pn_varname',
'keystring' => $rtemulti . '.pn_keystring',
'newstring' => $rtemulti . '.pn_newstring',
'comment' => $rtemulti . '.pn_comment');

$departments = 'envo_admin_lite_group';
$pntable['group_table'] = $departments;
$pntable['group'] = array('id' => $departments . '.groupID',
'name' => $departments . '.groupName',
'lock' => $departments . '.groupLock',
'all' => $departments . '.groupShowAllModules',
'default' => $departments . '.groupDefault',
'order' => $departments . '.sortOrder');

$departments_members = 'envo_admin_lite_group_members';
$pntable['member_table'] = $departments_members;
$pntable['members'] = array('gid' => $departments_members . '.groupID',
'order' => $departments_members . '.sortOrder',
'mid' => $departments_members . '.moduleID');

//TiMax envo 1.2.5
$stories_ratings = $prefix . '_stories_ratings';
$pntable['stories_ratings'] = $stories_ratings;
$pntable['stories_ratings_column'] = array ('sid' => $stories_ratings . '.pn_sid',
'rating' => $stories_ratings . '.pn_rating');

//eLGie SPCat
$spchat_access = 'envo_spchat_access';
$pntable['spchat_access'] = $spchat_access;
$pntable['spchat_access_column'] =
array('aid' => $spchat_access . '.aid',
'gid' => $spchat_access . '.gid',
'profile' => $spchat_access . '.profile',
'can_log' => $spchat_access . '.can_log',
'can_up' => $spchat_access . '.can_up',
'can_kick' => $spchat_access . '.can_kick',
'can_bann' => $spchat_access . '.can_bann',
'can_addsmile' => $spchat_access . '.can_addsmile',
'can_addsnd' => $spchat_access . '.can_addsnd',
'can_addroom' => $spchat_access . '.can_addroom');

$spchat_colors = 'envo_spchat_colors';
$pntable['spchat_colors'] = $spchat_colors;
$pntable['spchat_colors_column'] =
array('bgcolor1' => $spchat_colors . '.bgcolor1',
'bgcolor2' => $spchat_colors . '.bgcolor2',
'bgcolor3' => $spchat_colors . '.bgcolor3',
'bgcolor4' => $spchat_colors . '.bgcolor4',
'bgcolor5' => $spchat_colors . '.bgcolor5',
'txtcolor1' => $spchat_colors . '.txtcolor1',
'txtcolor2' => $spchat_colors . '.txtcolor2');


// nukeurl: obsoleted since version 0.6.913, but we still need it here
// to be backwards compatible.
// Todo: For setup area we need a smarter initialisation of db config vars.
// We could delete the obsoleted table fields then.
$spchat_config = 'envo_spchat_config';
$pntable['spchat_config'] = $spchat_config;
$pntable['spchat_config_column'] =
array('sid' => $spchat_config . '.sid',
'allowcreate' => $spchat_config . '.allowcreate',
'onlyreg' => $spchat_config . '.onlyreg',
'msg_refresh' => $spchat_config . '.msg_refresh',
'usertime' => $spchat_config . '.usertime',
'showsmiles' => $spchat_config . '.showsmiles',
'smilesdir' => $spchat_config . '.smilesdir',
'usesounds' => $spchat_config . '.usesounds',
'showsounds' => $spchat_config . '.showsounds',
'soundsdir' => $spchat_config . '.soundsdir',
'showusers' => $spchat_config . '.showusers',
'keeponline' => $spchat_config . '.keeponline',
'tz' => $spchat_config . '.tz',
'tf' => $spchat_config . '.tf',
'tsformat' => $spchat_config . '.tsformat',
'nukeurl' => $spchat_config . '.nukeurl',
'title' => $spchat_config . '.title',
'displaytitletable' => $spchat_config . '.displaytitletable',
'titletext' => $spchat_config . '.titletext',
'makelog' => $spchat_config . '.makelog',
'nr_lastmsgs2keep' => $spchat_config . '.nr_lastmsgs2keep',
'admin_entriesperpage' => $spchat_config . '.admin_entriesperpage',
'chatwindow_width' => $spchat_config . '.chatwindow_width',
'chatwindow_height' => $spchat_config . '.chatwindow_height',
'chatwindow_input_height' => $spchat_config . '.chatwindow_input_height',
'chatwindow_users_width' => $spchat_config . '.chatwindow_users_width',
'chatwindow_receive_height' => $spchat_config . '.chatwindow_receive_height',
'chatwindow_ticker_width' => $spchat_config . '.chatwindow_ticker_width',
'showticker' => $spchat_config . '.showticker',
'ticker_news' => $spchat_config . '.ticker_news',
'pversion' => $spchat_config . '.pversion',

eLGie - Feb 25, 2006 - 08:10 PM
Post subject:
Here is how I easily maintain 1776 websites using the armageddon core module I've developed enough for my expert use.

Code:

<?php
// ----------------------------------------------------------------------
// eNvolution Content Management System
// Copyright (C) 2002 by the eNvolution Development Team.
// http://www.envolution.com/
// ----------------------------------------------------------------------
// Based on:
// Postnuke Content Management System - www.postnuke.com
// PHP-NUKE Web Portal System - http://phpnuke.org/
// Thatware - http://thatware.org/
// ----------------------------------------------------------------------
// LICENSE
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License (GPL)
// 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.
//
// To read the license please visit http://www.gnu.org/copyleft/gpl.html
//
//************************************************************************
//* Envolution: Web Portal System                                        *
//* ===========================                                          *
//*                                                                      *
//* MySQL_Tools                                                          *
//*                                                                      *
//* Copyright (c) 2002 by:                                               *
//*                                                                      *
//* Michaelius (michaelius@nukeland.de)                                  *
//* http://www.nukeland.de                                               *
//* in memory of my friend Michaelius                                    *
//* hacked by TiMax  timax@envolution.com -                              *

modules_get_language();
modules_get_manual();

function mysql_tools_admin_main() {
if (!(pnSecAuthAction(0, 'MySQL_Tools::', '::', ACCESS_ADMIN)))
   {

      include 'header.php';
      OpenTable();
      echo _BADAUTHKEY;
      CloseTable();
      include 'footer.php';
   } else {

include 'header.php';
 OpenTable();
 GraphicAdmin();
    echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"center\">
    <tr align=\"center\"><form action=\"admin.php?module=NS-MySQL_Tools&type=admin&op=updatedb\"