Go Back   Pligg CMS Forum > Pligg Help > General Help

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-28-2006, 11:47 AM
New Pligger
 
Join Date: Nov 2006
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
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
  #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
Thanks: 254
Thanked 649 Times in 513 Posts
Nope, they stay there forever.
__________________
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: 1,849
Thanks: 112
Thanked 183 Times in 129 Posts
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 Pligg Host?
Get 3 free months
when you buy a year of hosting.
Use the coupon PLIGG at either...
MidPhase hosting starting at $7.95/month.
ANhosting hosting starting as low as $4.95/month.
Reply With Quote
  #4 (permalink)  
Old 11-30-2006, 04:14 PM
New Pligger
 
Join Date: Nov 2006
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
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
Thanks: 5
Thanked 2 Times in 2 Posts
//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
The Following User Says Thank You to acidride For This Useful Post:
  #6 (permalink)  
Old 04-09-2007, 06:03 PM
Constant Pligger
 
Join Date: Mar 2006
Posts: 575
Thanks: 14
Thanked 126 Times in 61 Posts
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,154
Thanks: 290
Thanked 266 Times in 177 Posts
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
Thanks: 14
Thanked 126 Times in 61 Posts
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-09-2007, 09:16 PM
Constant Pligger
 
Join Date: Feb 2007
Posts: 236
Thanks: 20
Thanked 29 Times in 15 Posts
wow, I did not know that stories never get deleted.

I submitted a story and then previewed it, but didn't actually submit it in step 3, the funny thing is, after I left the page, the story could still be accessed if you enter in the URL if it passed step 2 in the submit process.

is this a bug or is this normal?
Reply With Quote
  #10 (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
Thanks: 254
Thanked 649 Times in 513 Posts
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.
__________________
I accept donations for my time helping users like you on the forum and IRC.
Reply With Quote
Reply

Thread Tools
Display Modes
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Complete solution to approve the story after being submitted redwine Modification Tutorials 36 11-09-2008 01:15 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


Search Engine Friendly URLs by vBSEO 3.2.0