Getting Pligg to Auto-Fill
Late January of this year I attempted to get my Pligg install to auto populate the description of a story submitted on step 2 of the submission process.
This is the code I started with:
$description = preg_replace( ‘~^(.+?)content="([^"]+?)"(.+?)$~i’, ‘$2′, $matches[1].$matches[2] );
echo $description;
}
That obviously didn’t do the trick for me. It fetched the description of the story being submitted, but it would place it above my website, it was trying to make the description of my Pligg install.
I have been working on this off and on over the past couple of months to no avail. Thanks to a fellow Pligger, this mod is now a reality heres what you need to do:
- Open libs/link.php, find:
if( preg_match( ‘~~is’, str_replace( ‘»’, ‘:’, $this->html ), $matches ) ){
$this->url_title = $matches[2];
}below, add:
if(preg_match(‘~<meta(.+?)name="description"(.+?)>~i’, $this->html,$matches)){
$description = preg_replace(‘~^(.+?)content="([^"]+?)"(.+?)$~i’, ‘$2′, $matches[1].$matches[2] );
$description= str_replace("content="", " ", trim($description));
$description= str_replace(""", " ", trim($description));
$this->content=$description;
}Save and close.
- Open submit.php, and find:
$main_smarty->assign(‘submit_url_title’, $linkres->url_title);
below, add:
$main_smarty->assign(‘submit_content’, $linkres->content);Save and close.
Thats it.
I have tested this on v9.8.2, and will later today test it on v9.9.0, it should work for any version though.
Submit a story, if the story being submitted, has the meta tag “description” filled in, your Pligg install will automatically enter it in the Description box on step 2 of the 3 step submission process.
Big thanks to Knight01 for his contribution to getting this to work. If anyone knows Knight01′s URL, post it below in a comment so a proper link to him can be posted.
Next, I will show you how to auto populate the tag field.
If you use this mod, or would like to show appreciation for it, please consider linking back to http://www.pliggs.com
Remember to backup the above files before making code changes.
UPDATE:
Here is my lib/link.php file that auto-fills, libs/link.php.
Need a host, midPhase has been tested to run Pligg.
Related Search:
- pligg auto rss module
- pligg auto submit
- pligg description autofill step 2
- pligg populate news from rss
- pligg stop auto description
- pligg stop auto fill meta description








Pingback: Top Stumbles - Best of StumbleUpon
Pingback: bloggingzoom.com
Pingback: pligg.com
Pingback: [BLOCKED BY STBV] pligg.com
Pingback: Hot Aphrodite - hot Pligg install
Pingback: SEO for Pligg