Category Archives: Pligg 1.2.2

I offer professional web solutions for SMBs

Including Open Source CMS Solutions!

  • Website Revamp/Redesign
  • Website Development
  • Webmaster Services
  • Content Management Systems
    (Specializing in WordPress and Pligg)
  • E-Commerce Solutions
  • Contact Relationship
    Management Systems
  • Enterprise Resource Planning
    Systems
  • Blogs (WordPress Based)
  • Bookmarking Websites (Pligg
    Based)
  • Social Media Integration
  • Classified Ad Sites
  • Auction Websites
  • Link Directories (Specializing
    in PhpLD and Pligg)
  • PHP Development

Products: Turnkey Websites, Namespace
Rescue℠ (Website Maintenance and Repair).

Technologies: Joomla, WordPress, Pligg, PhpLD (Link Directory),  Magento, and Drupal.
I also offer domain name registration and webhosting including complete virtual or dedicated web servers through
Paradigm Domains

Lost admin access in Pligg after running Killspam?

When activated, the Pligg spam module disables the ‘spammer’, sets the user account to ‘spammer’ and I think it also changes the password. Been my experience anyway. Every once in a while this activity can Killspam the admin or ‘God’ level account. You probably missed the admin username in the confirmation box but I can’t swear to that happening either.

What I’ve done in the past is: Get into the user portion of the database, re-enable the user, set the user to admin (or god in 1.2.2 and earlier versions) and double check that the email address is a ‘known good’ working address. Save your changes and login from a second browser window. If you get a ‘bad password’ response on this attempt, just use the ‘forgot password mechanism’ to the ‘known good email address’ and follow the directions in the email.

Optionally, You can setup a new user account then get back into the database as above but set the new user to admin ((or god in 1.2.2 and earlier versions). You won’t need to set anything else in the database but the user level with this method and once you’re in you can fix the old user.

Further Discussion:

You may have noticed that in the above I didn’t call the user table ‘pligg_users’ either. That’s something that only works if you set the database table prefix to the default ‘pligg_’ during install or upgrades.

Some of my Pligg installs don’t use that as they run several Pliggs in one database or are running under Multi-Pligg. I figured I’d better mention that before someone calls me out on it or it confuses someone.

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.

 

Adding a ‘Moderated’ Option to Pligg 1.2.2 Story Administration

If you’re running either the Story Moderation Module or Spam Trigger Module or both, you might want to add this code to your admin panel to provide a story moderation option to the ‘story types’ drop down.

FTP into your Pligg directory and Navigate to templates/admin/admin_links_center.tpl. If you haven’t already, make sure to save all your admin template files. Open admin_links_center.tpl with your editor and navigate down until you find this line:

{#PLIGG_Visual_AdminPanel_Spam#}</option>

Insert a couple blank lines under that then add the below code

// Begin Code to Add 'moderated' as an option to the story management drop down menu by JHawkin //

	<option value="moderated" {if $templatelite.get.filter == "moderated"} selected="selected" {/if}>Moderated</option>

// End Code to Add 'moderated' as an option to the story management drop down menu by JHawkin//

Save the file back and visit the site to make sure everything including your new file works.