Plain Vanilla Multi-Pligg 1.2.2

Always make current backups of your site, avatars and database just in case something goes wrong.

Discussion:

If you just need to run a second and/or third Pligg Install to divide up your site (and still allow the original, previously registered users to use the old and new pages) then you don’t need to do much more than install a second and third copy of Pligg in sub-directories under your original Pligg.

What you’ll need to do is:

Install Pligg 1.2.2 to the relevant sub directories then run install. Set the new Pligg install(s) to use the original DataBase info but you’ll need to set the MySQL Table Prefix slightly different for each install. Use a underscore at the end of the new name. Helps slightly when doing anything with the MySQL tables later.

Once you’ve done the install and confirmed everything works FTP into your sub-directory and navigate to /libs/define_tables.php. You’ll be editing this slightly. Find the line that says…..

define('table_users', table_prefix  . "users" );

Put a blank line or two above and below that whole line then replace the line with the code below.

// Begin Modified Tables definitions - MultiPligg
  // Modified to use the base tables for MultPligg by J.A.Hawkins
  // Mostly to use the user table from the base Pligg right now
  // More to come as needed
define('table_users', "pligg_users" );
// End of Modified Tables definitions - MultiPligg

 When you’re done save the file back and browse to your site and the proper sub-directory. If you’re logged in then good. If not, that’s okay ,too. Open a second tab or browser window and visit your main page. Login then go back to the Pligg in your new sub-directory. Refresh and you should be logged in there, too.

Do the same for any other sub-directories with new Pligg installs and don’t forget to set the MySQL Table Prefix slightly different for each install.

Think you’re done? Not quite. Each pligg install is a different system that only uses the user base from the top level Pligg. You’ll need to disable several features in the sub-Pliggs to cut down on confusion. Disable Groups for sure. And add a link to your main site on each subsite and disable profile in the menu while you’re there.

In your main Pligg’s menu you’ll probably want links to your sub Pligg Installations. And you can go to your Sub Pligg Installs and fix the Groups and Profile menu items to point back to your main Pligg install. I’ll leave all that up to you.

Posts:

Posts in your Sub Pligg Installs won’t appear in the main Install. I used RSS to send my Posts to main. Works for me. Maybe later I’ll address that issue.

Can I see this working?

Sure, try this link. It’s not a demo as it is a working website.

http://www.FreakyVirginia.com

Will this work with 2.0.x?

I can’t answer that. The idea should be mostly the same but I’m not running on 2.0.x yet. Take a look at the files and give it a try if you want. Your Backups will save you if it doesn’t work and corrupts the top level Pligg. Let me know if you try it…. especially if it works.