Pligg CMS Forums


Go Back   Pligg CMS Forum > Pligg Help > General Help



Once a Story is Submitted does it ever get deleted?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-28-2006, 11:47 AM
New Pligger
 
Join Date: Nov 2006
Posts: 6
Once a Story is Submitted does it ever get deleted?

Once a story/link is submitted, does it ever get deleted?

Put differently, if someone submits a link/story, does the Pligg system delete it after a certain amount of time?

I'm hoping the answer is "No". For what I plan to use Pligg for, I'd like all submitted links/stories to remain in the system forever.

In other words, does Pligg ever clean up the "Queued" or "Published" sections automatically? I hope not.

Thanks.

Sincerely,
Naomi

Last edited by Naomi; 11-28-2006 at 11:51 AM.
Reply With Quote
Sponsor
  #2 (permalink)  
Old 11-28-2006, 12:02 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Nope, they stay there forever.

Free and Premium Pligg Hosting
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #3 (permalink)  
Old 11-28-2006, 02:43 PM
Yankidank's Avatar
Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 2,913
Send a message via AIM to Yankidank Send a message via Skype™ to Yankidank
Eventually we need to make a way to purge stories from the DB to save room, but for now there is no method to actually clear it from mysql.

Need a Web Host ?
Save up to $84
when you purchase hosting from Dreamhost.com.
Use the coupon code PLIGG when buying a web hosting package from Dreamhost.com
Reply With Quote
  #4 (permalink)  
Old 11-30-2006, 04:14 PM
New Pligger
 
Join Date: Nov 2006
Posts: 6
Thanks!

Thanks! That's great.

Naomi
Reply With Quote
  #5 (permalink)  
Old 04-09-2007, 05:59 PM
Casual Pligger
 
Join Date: Mar 2007
Posts: 80
//deletes a story and dependencies
function delete_link($link_id)
{
global $db;
$tables = array
(
"pligg_links" => "link_id",
"pligg_comments" => "comment_link_id",
"pligg_feed_link" => "feed_link_id",
"pligg_tags" => "tag_link_id",
"pligg_trackbacks" => "trackback_link_id",
"pligg_votes" => "vote_link_id",
);

foreach($tables as $table => $field)
$db->query("DELETE FROM ".$table." WHERE ".$field." = '".$link_id."'");

return true;
}



You could just do a query for link_id for a certain date range, then then run the delete_link to get rid of the story. It's simple to do. Could even have a script on a cron job that deletes all stories older than say 1 month.

Or you can count how many link_id there are, and if you get over that threshold, then start deleting the oldest link_id until you are back under the threshold.
Reply With Quote
  #6 (permalink)  
Old 04-09-2007, 06:03 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 575
Another option could be to move older stories to an archive (move them to a separate database table) - and use a very simple text only viewing for old stories. Similar to what forums like vbulletin do with their archive viewing.

That way all stories can still be viewed in a "pligg_archived" table, and the pligg_links table will never become so big as to affect performance. You could also cache archived pages once they had been viewed once, since they will never really change.

Last edited by Simon; 04-09-2007 at 06:07 PM.
Reply With Quote
  #7 (permalink)  
Old 04-09-2007, 08:42 PM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 2,157
Archiving of Pligg stories would really be a great idea. But if they are again gonna remain there in DB itself - there is no use - we need to think of better solutions. - may be the story's link ID, title alone is saved as two rows of Pligg_Archive and the remaining contents compressed - but that too will not be more of a viable one- people throw in suggestions for archiving.
Reply With Quote
  #8 (permalink)  
Old 04-09-2007, 09:05 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 575
Why is it a problem for them to remain in the db? As long as archived stories are in their own table, and treated separately to "live" stories, then that keeps everything nice and clean. An admin could always choose to prune the archive table, or not include it in db backups. I don't think you can really have an archive unless the information is still somewhere in the database.
Reply With Quote
  #9 (permalink)  
Old 04-10-2007, 12:19 AM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,547
Hard thing about archiving things is that it probably requires some sort of cron job to change the tables after a certain period of time. After being around here for quite a long time I can tell you that many people have no idea what that is. When a feature has a high majority of users who aren't going to know how to use it it usually gets pushed down on the feature requests list.

Free and Premium Pligg Hosting
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
  #10 (permalink)  
Old 04-10-2007, 01:20 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 2,157
A simple suggestion would be to have it in god's admin panel - that he can initiate it - instead of cron job. So only those who really know uses and since it is there many admins start to use it (reading some descriptions etc)

- but it requires huge labour that the story is still searchable (or we need to add an check box to search in archive too - simpler that would not break any existing things), and a uncompression to display the data needs to be done - but since only search is going to be done less frequent - this should have a good overall effect on the Pligg system - by saving database size and giving an option for admins to even remove old stories and speedup many things like search (normal non-archival ones as lesser records) etc - what do you say?
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Complete solution to approve the story after being submitted redwine Modification Tutorials 39 06-18-2009 02:39 PM
Email notification when a story is submitted federrer General Help 1 04-24-2008 01:48 AM
In Profile Submitted view page not show in center & show only 1 story not all bhatiacane Template Support 3 10-13-2007 02:22 AM
Idea for scalable story promotion jvallery Suggestions 6 04-18-2006 09:41 PM

Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Use the coupon code PLIGG at Dreamhost.com to receive a discount of up to $84.00 Make a donation to support Pligg CMS development