SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Conway, Arkansas
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Picture Approving for rating site

    I'm having trouble coming up with a solution for multiple picture approvers. Right now I'm displaying the images in descending order by timestamp so the oldest pictures needing approval is first in line.

    However, when there are multiple approvers the same pictures are displayed at the same time on both of the approvers screens so the same ones would be approved over and over, so its pointless.

    You guys have any idea how I could do this?

  2. #2
    Non-Member
    Join Date
    Jan 2004
    Location
    Los Angeles
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could have a locked field in your database table.

    for example if you are displaying 10 images at a time, collect the image id's and put a lock code on them with a timestamp, then when you first come to the page you go through and unlock all images that have an old time stamp and lock the ones you're viewing with a new timestamp.

    just a thought.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2004
    Location
    Ontario, Canada
    Posts
    99
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, viewing the images in ASCENDING order by a timestamp would produce oldest->newest.
    Brock Ferguson
    Lead Developer, Caribou CMS
    A Subscription/Membership CMS and Ecommerce Platform - FREE Trial

  4. #4
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Conway, Arkansas
    Posts
    15
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks recchi_8 I was thinking about something like that but you gave me a better idea of how its done. So i create a locked field with 0 as the default and a locked timestamp field. A pic approver loads the page and I use an extra query to update the fields with 1 (as locked) and a new timestamp.

    This also gave me another idea and now it all seems efficient. Whenever a pic is uploaded also store a timestamp, then when the pictures are shown on the picture approvers screen just update the timestamp.

    All I would have to do is only show the pictures that have an older timestamp, without using a locked field. Whenever the picture is approved its deleted and moved to a different table replacing the old picture anyway so I believe this would work.

    Is there a query to use to get the rows that have passed a specified time? Maybe comparing nows timestamp with the one in the database?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •