Welcome, Guest. Please Login or Register.
April 30, 2025, 02:55:05 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  read topics « previous next »
Pages: [1] Reply Ignore Print
Author Topic: read topics  (Read 531 times)
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
read topics
« on: March 24, 2002, 10:26:41 PM »
Reply with quote

where does yabb store what you have and have not read?
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Big P
Mod Team
YaBB God
*****
Posts: 1462


"Back in '68, I don't like you, The End."

ICQ - 76064555pierceward@hotmail.com WWW
Re:read topics
« Reply #1 on: March 24, 2002, 11:59:31 PM »
Reply with quote

Its all in the MySQL database. I *think* each board opens the database and checks read posts there.
Just look with PHPAdmin to make sure.
Logged

PHPNews has been released!!! Download it now!!!
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:read topics
« Reply #2 on: March 25, 2002, 12:23:03 AM »
Reply with quote

log_mark_read is the name of the mysql table but it only does it when you click "mark as read" and then it only does it to the board.  What I want to know is about each topic and how it decides where or not the topic is new
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Godai
Mod God :P
Sr. Member
****
Posts: 473


YaBB SE!!!!

ICQ - 70621553godai78@hotmail.com WWW
Re:read topics
« Reply #3 on: March 25, 2002, 07:06:21 AM »
Reply with quote

In which section of the board?

Anyway in BoardIndex.php it's done in this way:
      $result2 = mysql_query("SELECT ID_BOARD,name,description,moderators,numPosts,numTopics FROM {$db_prefix}boards WHERE (ID_CAT=$row_cat[ID_CAT]) ORDER BY boardOrder");
      while ($row_board = mysql_fetch_array($result2))
      {
         $result3 = mysql_query("SELECT m.posterName,m.ID_MEMBER,m.posterTime,m.modifiedTime,m.subject,t.ID_TOPIC,t.numReplies FROM {$db_prefix}messages as m, {$db_prefix}topics as t WHERE (m.ID_MSG=t.ID_LAST_MSG && t.ID_BOARD=$row_board[ID_BOARD]) ORDER BY m.posterTime DESC LIMIT 1");
         $latestPostName = $txt[470];
         $latestPostTime = $txt[470];
         $latestPostID = '-1';
         $latestModTime = $subject = $topicID = '';
         $numReplies = 0;
         if (mysql_num_rows($result3) > 0)
            list ($latestPostName,$latestPostID,$latestPostTime,$latestModTime,$subject,$topicID,$numReplies) = mysql_fetch_row($result3);
         $latestEditTime = $latestModTime = $latestPostTime;

         if ($latestPostID != '-1') {
            $result3 = mysql_query("SELECT memberName,realName FROM {$db_prefix}members WHERE ID_MEMBER=$latestPostID");
            $rowmem = mysql_fetch_row($result3);
            $latestPostRealName = isset($rowmem[1])?$rowmem[1]:$rowmem[0];
         }

         ........

         $new = "<img src=\"$imagesdir/off.gif\" alt=\"$txt[334]\">";

         if ($username!= 'Guest')
         {
            $result3 = mysql_query("SELECT logTime FROM {$db_prefix}log_boards WHERE (ID_BOARD=$row_board[ID_BOARD] && memberName='$username' && logTime >= $latestEditTime) LIMIT 1");
            $result3b = mysql_query("SELECT logTime FROM {$db_prefix}log_mark_read WHERE (ID_BOARD=$row_board[ID_BOARD] && memberName='$username' && logTime >= $latestEditTime) LIMIT 1");

            if (($latestPostTime != $txt[470]) && ((mysql_num_rows($result3) + mysql_num_rows($result3b)) == 0))
               $new = "<img src=\"$imagesdir/on.gif\" alt=\"$txt[333]\">";
         }
« Last Edit: March 25, 2002, 07:07:08 AM by Godai » Logged

Emanuele 'Godai' Sparvoli
YaBB Italian Team
100% YaBB Lover
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:read topics
« Reply #4 on: March 27, 2002, 02:02:46 AM »
Reply with quote

does anyone know where it logs what time that you read a post or an instant message?
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Godai
Mod God :P
Sr. Member
****
Posts: 473


YaBB SE!!!!

ICQ - 70621553godai78@hotmail.com WWW
Re:read topics
« Reply #5 on: March 27, 2002, 08:41:59 AM »
Reply with quote

I don't think it logs the time you have read it.
Logged

Emanuele 'Godai' Sparvoli
YaBB Italian Team
100% YaBB Lover
groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:read topics
« Reply #6 on: March 27, 2002, 06:54:02 PM »
Reply with quote

I think it does cuz it has a timestamp in mysql for the topic_logs.
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Joseph Fung
Global Moderator
YaBB God
*****
Posts: 4512


Keep smiling: it makes others nervous.

WWW
Re:read topics
« Reply #7 on: March 29, 2002, 01:42:29 AM »
Reply with quote

Here's how it works.

When you view a board listing, and entry is added to log_boards  (it logs the ID_BOARD, the time and your user)

When you read a topic, an entry is added to log_topics (ID_TOPIC, time and your user).

When you click mark as read on the topic listing, it adds a record to mark_read, and deletes all the records in log_topic.

The reason it was done this way was so that when you click mark as read, it doesn't need to add a record for every single topic on the board.
Logged

groundup
Disciple of Joe, Head Cleric
Mod Team
YaBB God
*****
Posts: 2983


Error 309: Please notify the administrator of this

WWW
Re:read topics
« Reply #8 on: March 29, 2002, 05:35:31 AM »
Reply with quote

so does it check to see if the current time is newer than the logged time or does it just determine whether or not the row is in mysql?
Logged

http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
http://www.fastfinancialfreedom.org - financial freedom is a myth
fastfinancialfreedom.org
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  read topics « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.029 seconds with 18 queries.