Once a Story is Submitted does it ever get deleted?

Register an Account
Pligg Chat Room
Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 04-10-2007, 02:17 AM
savant's Avatar
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,181
Quote:
Originally Posted by abcdefgary View Post
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?
After a story url is submitted, it creates a new record in links table with the status as discard. So if you don't reach the end of the submit process it will stay as discard.
I think there was a file that would remove the links that are set as discard.
Reply With Quote
  #12 (permalink)  
Old 04-10-2007, 02:33 AM
dollars5's Avatar
Pligg Donor
 
Join Date: Dec 2006
Location: India
Posts: 1,961
Or discarded stories can now be removed from Admin control panel >> new management.
Reply With Quote
  #13 (permalink)  
Old 04-13-2007, 11:59 PM
kbeeveer46's Avatar
Pligg Developer/Admin
Pligg Version: 0
Pligg Template: none
 
Join Date: Jun 2006
Location: Muncie, Indiana
Posts: 3,215
There is no way to delete stories either in 9.1 or SVN. You can only discard.
Reply With Quote
  #14 (permalink)  
Old 07-05-2007, 11:55 AM
Pligg Donor
 
Join Date: Mar 2007
Posts: 85
Quote:
Originally Posted by kbeeveer46 View Post
There is no way to delete stories either in 9.1 or SVN. You can only discard.
I'm unclear on why a story that has been discarded would need to be kept in the database. If it was not suitable for publishing, or just never made it to that page naturally, what would the point be of having it in the archive?

The only reason I can think of, would be to have that check in the event someone else wanted to submit the same (already submitted, but discarded) story. Is that the rationale?

I do think it would be an enormous help to have a tool in the admin section that allows the God user to delete stories - based on status, user, or some other easily definable selection.

Has anyone created this kind of mod? I suppose adding another query and column to the admin_links.php page would do it.
Reply With Quote
  #15 (permalink)  
Old 07-28-2007, 06:01 AM
repute's Avatar
Casual Pligger
 
Join Date: Jul 2007
Posts: 44
Quote:
Originally Posted by acidride View Post
//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.
How can I use this as a link after the story link in admin_links.php for example: http://domain.com/admin_links.php?delete_link=1

Thanks for helping me out!
Reply With Quote
  #16 (permalink)  
Old 08-10-2007, 06:08 AM
repute's Avatar
Casual Pligger
 
Join Date: Jul 2007
Posts: 44
Nobody? bumb...
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 Questions and Comments 39 06-18-2009 02:39 PM
Email notification when a story is submitted federrer Questions and Comments 1 04-24-2008 01:48 AM
In Profile Submitted view page not show in center & show only 1 story not all bhatiacane Questions and Comments 3 10-13-2007 02:22 AM
Idea for scalable story promotion jvallery Questions and Comments 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! Make a donation to support Pligg CMS development