#1November 8th, 2008 · 06:51 PM
115 threads / 18 songs
1,414 posts
United States of America
Hey, TK. Question for you.
Hey, TK.  Question for you:

Do you know how the AMP currently tracks whether or not a thread should be marked as "read" for a user?  I'm not sure if there are any shortcuts that I should know about.

If not, I'll be figuring it out myself, trying to optimize it

#2November 15th, 2008 · 06:38 AM
187 threads / 27 songs
2,802 posts
As far as I can remember is that it has to do with the time stamp of your session id in compare with the actual system time and date and the your last login. In this case you can forge the topics as "new". The style is created in the main.css Every time you open a thread or new post the time stamp is renewed. This happens with every single forum.
The time can be stored with a cookie. But you can also use the database with the time of your last login. Try that with different browsers.
But for now that's all I know. I should explore the old coding a bit...

this should be the part of the code where you can unset the SESSION variable to mark a forum as read
It's from the forum.php

if(is_numeric($_SESSION['u']['user_id'])) {
    if($mark_topics_read || $mark_forums_read) {
       if($mark_topics_read) { foreach($u_forum as $id=>$v) { if($v==$pg[path]) unset($_SESSION['u_forum'][$id]); } } else $_SESSION['u_forum']=Array();

    if(isset($_REQUEST['post']) && is_numeric($_SESSION['u']['user_id'])) {
        $_POST['subject']=stripslashes($_POST['subject']); $_POST['note']=stripslashes($_POST['note']);
        if(isset($_REQUEST['delete'])) post_delete($pg['path'],$pg['split']);
        elseif(isset($_REQUEST['edit_save'])) post_edit($pg['path'],$pg['split'],$_POST['subject'],$_POST['note']);
        elseif(!((in_array(substr($pg['uri'],1),$access) && $_SESSION['u_root'][1]==NULL) || $base[0]['action']==0)) post_new($pg['path'],$pg['split'],$_POST['subject'],$_POST['note']);

good luck
Sorry, you do not have access to post...
Wanna post? Join Today!

Server Time: June 17th, 2019 · 2:24 AM
© 2002-2012 BandAMP. All Rights Reserved.