Results 1 to 10 of 10
  1. #1
    Casual Pligger vgn24's Avatar
    Joined
    Sep 2011
    Posts
    52

    Submission Time Resest

    Is there a way to have a submissions time reset once it is voted onto the frontpage? Depending on the time set in the admin panel, a submission can sit in "Upcoming" for X days.

    Would be very nice if the submission's time reverted to that of a new submission once it hit the front page.

    Any ideas?

  2. #2
    Constant Pligger voxxxlll's Avatar
    Joined
    Jun 2010
    Posts
    156
    That its easy.Youll have to edit your template, no need to add that setting on admin panel.Ill tell you how when ill be home.

  3. #3
    Casual Pligger vgn24's Avatar
    Joined
    Sep 2011
    Posts
    52
    Any tips on what to edit in the template? Thanks in advance.

  4. #4
    Casual Pligger vgn24's Avatar
    Joined
    Sep 2011
    Posts
    52
    Bump shaker. Still trying to figure out how to reset the time of submissions once they are voted from "Upcoming" to "Published" since stories typically get voted in different orders.

  5. #5
    Constant Pligger JoseffB's Avatar
    Joined
    Sep 2011
    Posts
    129
    What happens to a published link when it hits the timer again? It goes back to upcoming or gets discarded or something? I don't see why you want to reset the timer.

  6. #6
    Casual Pligger vgn24's Avatar
    Joined
    Sep 2011
    Posts
    52
    Really? okay:

    I want the submitted time (the time an article is submitted) to reset once it goes from upcoming (place submissions go first) to published (place submissions go once they reach X number of votes require to leave upcoming).

    This way articles appear in the order they're approved, but the times are reset so they too are in order.

    So - the question is how to have the submission's time stamp reset once it's published.

  7. #7
    Casual Pligger vgn24's Avatar
    Joined
    Sep 2011
    Posts
    52
    Quote Originally Posted by JoseffB View Post
    What happens to a published link when it hits the timer again? It goes back to upcoming or gets discarded or something? I don't see why you want to reset the timer.
    I want the time to reset once approved, not return to upcoming. This way when a story that sits in upcoming for 24 hours and gets voted to the front page (published), it will look more current.

    I have stories appear on the frontpage in the order they're published. It looks pretty odd when the first story on the frontpage is 8 hours old followed by a story that's 4 minutes old.

    Seems completely logical that published stories should have the time they're published, not initially submitted.

  8. #8
    Casual Pligger vwdw's Avatar
    Joined
    Apr 2010
    Posts
    81
    pligg has link_published_date variable, which is the time the story gets published. You can try and use it. EDIT: basically, default SQL is ORDER BY link_published_date DESC, link_date DESC if I'm not mistaken, so it's already half the way you want it.

  9. #9
    Casual Pligger vgn24's Avatar
    Joined
    Sep 2011
    Posts
    52
    Okay. That makes sense. Is there a way to enable the link_published_date variable in the admin or is it something that needs to be hard coded into a template? I've already ordered the frontpage in order of published (newest at top). So the published variable is exactly what I'm looking for.

    Thanks for a very helpful and accurate (based on the actual question) reply.

  10. #10
    Casual Pligger vwdw's Avatar
    Joined
    Apr 2010
    Posts
    81
    It's hard code only, I'm afraid.
    I can't give you exact instructions, just pointers.

    EDIT: Disregard what was written here before, since it might corrupt upcoming story display.

    Edit 2: okay, for starters try opening index.php and rewrite the string
    PHP Code:
    if(!isset($_REQUEST['search'])){$search->orderBy "link_published_date DESC, link_date DESC";} 
    like this:
    PHP Code:
    if(!isset($_REQUEST['search'])){$search->orderBy "link_published_date DESC";} 
    see what happens.

Similar Threads

  1. Need a little {if or else} help with time
    By vgn24 in forum Questions & Comments
    Replies: 2
    Last Post: 12-14-2011, 04:29 AM
  2. set the time zone for MySQL to US time
    By Harmain in forum Questions & Comments
    Replies: 1
    Last Post: 09-26-2009, 12:22 PM
  3. Replies: 0
    Last Post: 10-05-2007, 05:16 AM
  4. all time mod
    By byoung in forum Questions & Comments
    Replies: 0
    Last Post: 04-30-2007, 03:43 AM
  5. Time
    By Geoserv in forum Questions & Comments
    Replies: 3
    Last Post: 03-12-2007, 04:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting