SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Sep 2000
    Location
    Ontario, Canada
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    did they read the announcement?

    I don't know if this is even worthwhile but is it possible to only display items from a db that a particular user has not seen before?

    I have a content management system where users have their own profile area. I just made a little announcement feature where I can post announcements to all users or just 1. Instead of listing all the announcements every time a person visits, is it possible to display unseen one's only?

    A field $lastlogin gets updated every time a user logs in so I was thinking of comparing $lastlogin to the announcement date to display new messages - but I'm not sure if this is the right way to go.

    Any input is greatly appreciated!
    Jason Dulberg
    Extreme MTB
    http://extreme.nas.net

  2. #2
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You could do several different things for this sort of thing...

    1. Have an expiring announcement
    2. Use Cookies and track which ones they've seen
    3. In their profile, add a field for announcement viewing. IN this you could list all the annoucements that the user has seen seperating them by a comma (,). After this, called the field from the database, and explode it into an array, and check whether the announcements that are trying to be shown, are in that list of seen announcements. If they are, then don't show it, otherwise do, then update the field by adding a ,321 to the end (321 is an example ID)

    I hope this helps you work outsomething for your site, but if it was me, I'd leave the announcements there. Some people like to re-read announcements and make sure they got all the info.

    -Peter

  3. #3
    SitePoint Addict
    Join Date
    Sep 2000
    Location
    Ontario, Canada
    Posts
    320
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your input... your right about people wanting to read old announcements. I'm going to leave the old ones there and just show the new ones first. Makes things easier too.

    Thanks again.
    Jason Dulberg
    Extreme MTB
    http://extreme.nas.net


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
  •