Results 1 to 5 of 5

Thread: Forum Question

  1. #1

    Join Date
    Jan 2010
    Location
    Wales, UK
    Posts
    683
    Thanks
    12
    Thanked 21 Times in 21 Posts
    Rep Power
    1

    Default Forum Question

    (excuse my laziness for not downloading and examining the source)


    I'm curious as to how this forum knows what a new post is per user.

    I can see the links include "goto=newpost" and therefore there's a bit of PHP magicness carried out....but how does it work out what the new post is for me?

    It sounds daft to have the pointers in the thread table or holding a user table which contains posts viewed...and I can't see any cookies leaving trails, so I'm a bit confused/curious.


    Does anyone know how it's working?
    Big Sig's Ruin Forums.

  2. #2
    Military Grade Tester DoubleTop's Avatar
    Join Date
    Nov 2009
    Location
    In a lamp
    Posts
    9,878
    Thanks
    117
    Thanked 1,453 Times in 908 Posts
    Rep Power
    4

    Default

    indeed I do

    The 'state' is held in the DB, it can be cookie based or DB based but DB is generally more reliable for the users as it's server side and many users have usage of multiple machines which kinda kills the cookies method.

    Get hold of the OpenSource phpbb code, I think it does it in the same manner.

    DT.
    Quote Originally Posted by Aaron View Post
    By the way DT - what happened to the initiation process of them being pink for a few weeks?

  3. The Following User Says Thank You to DoubleTop For This Useful Post:


  4. #3

    Join Date
    Jan 2010
    Location
    Wales, UK
    Posts
    683
    Thanks
    12
    Thanked 21 Times in 21 Posts
    Rep Power
    1

    Default

    Thanks DoubleTop.

    Any chance you could elaborate on the design? Is the 'state' held as a per user table or in a thread table?


    It runs fast as **** however it's working.
    Big Sig's Ruin Forums.

  5. #4
    Military Grade Tester DoubleTop's Avatar
    Join Date
    Nov 2009
    Location
    In a lamp
    Posts
    9,878
    Thanks
    117
    Thanked 1,453 Times in 908 Posts
    Rep Power
    4

    Default

    at the moment, these forums run off a database marker, and threads older than 7days old if you don't log in for a while are automatically marked as read - to save the load on the server.

    To go a little more technical, there is table with userid, forumid and time read, that's where the data is pulled from.

    DT.
    Quote Originally Posted by Aaron View Post
    By the way DT - what happened to the initiation process of them being pink for a few weeks?

  6. The Following User Says Thank You to DoubleTop For This Useful Post:


  7. #5

    Join Date
    Jan 2010
    Location
    Wales, UK
    Posts
    683
    Thanks
    12
    Thanked 21 Times in 21 Posts
    Rep Power
    1

    Default

    Thanks for that DT...gives me something to think about.
    Big Sig's Ruin Forums.

Posting Permissions

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