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
Thanks,
Tim
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
Thanks,
Tim
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();
forward(substr($_SERVER['PHP_SELF'],1));
}
if(isset($_REQUEST['post']) && is_numeric($_SESSION['u']['user_id'])) {
include("{$glob[dINC]}/z_post.php");
$_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']);
$note='05';
}
}
good luck
Carsten
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();
forward(substr($_SERVER['PHP_SELF'],1));
}
if(isset($_REQUEST['post']) && is_numeric($_SESSION['u']['user_id'])) {
include("{$glob[dINC]}/z_post.php");
$_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']);
$note='05';
}
}
good luck
Carsten
Sorry, you do not have access to post...
Wanna post? Join Today!