Warning - Read Tracking is being cleared Nov 2, 2003

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I am giving everybody a 3 day notice that your read tracking is going to be cleared this Sunday. Read tracking is what lets you know what new posts you have not read yet. Do to the extreme size this read tracking has taken up, we are clearing Read tracking this Sunday. This should improve the performance of the board as well. So for those of you who like to read every post, you might want to make sure you are caught up by 12:00 am Sunday.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

:shock: thx for the warning
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

I am assuming this is because of the 1400 people who visited once, and it has been tracking ever since? You should put a cap on unactive people somehow or something.

Thanks for the notice.
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

yeah i think he's gonna run a querie at some point and remove any user
inactive for more than say 90 days. we'll see, because we really don't
want anyone to feel rejected or closed out of the site.
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

maybe not remove them, but clear their read tracking?
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

sorry, i was just talking about removing unused users, not just the read
tracking. that's gonna happen anyway.
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

maybe I am not understanding this...But the reason the read traqcking is so big right now is because it stores it all in the sql database, and there are so many unused users that it has been tracking for quite a while?

Why not just run a script every thirty days that clears the tracker for users who haven't used their account in the past thirty days?

Or am I confuseled?
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Posts: 6376
  • Loc: twitter.com/unflux

Post 3+ Months Ago

i don't think you are confused...i htink you mixed 2 conversations into 1! :P
which btw, I think is a great idea. It's just we need someone to write
that script, now don't we? ;)
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

hehehe I don't know how well I'd be able to integrate that security wise, but it really isn't anything to difficult script wise....I think :-P
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

so I wont be able to come in every morning and go "view new posts"?

that sucks :cry:
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

no you will be able to
He is just dumping the database and starting fresh.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

oh thats ok then :D
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

Well there you go BWM Musik ok'd it so go on ahead! :-P
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

ahahahaaa ya smarty pants!!!! I thought he meant forever!!
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yeah this isn't forever. Just a one time dump since the read tracking is taking up 50+ megs in the database. What I am thinking about doing is writing a mod (since it doesn't exist) to make so the read tracking only tracks for the last 2 weeks. If anybody has any new posts that are over 2 weeks old then it would be cleared from the database as far as tracking is concerned. I think doing this will keep the file size down dramatically. Anyway, when and if that is implemented I will let everyone know.

Oh and down the road I may be clearing users from the table who are a few months old and have 0 posts.
  • musik
  • Legend
  • Super Moderator
  • User avatar
  • Posts: 6893
  • Loc: up a tree

Post 3+ Months Ago

good-o xoxox
  • b_heyer
  • Web Master
  • Web Master
  • User avatar
  • Posts: 4581
  • Loc: Maryland

Post 3+ Months Ago

I'd say go for a month without dumping, if I went on a vacation for two weeks, i'd like to beable to come back and still have all the newposts highlighted...even though they'd be a lot and I wouldn't read most of them anyways....
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Primarily this is for BWM. Just some possibly useful stuff that may assist with this and other things you are thinking of doing. I know none have nothing to do with your plan to dump the reaad tracking, but they may be helpful if you haven't seen them already. I noticed that there were three additional pages at phpBBhacks that weren't there last time I visited so new hacks have been added. They're up to 34 pages now. It does look like the read tracking hack may be an original if you write it. I haven't seen it anywhere yet either.

First as far as deleting multiple users (in the event that you choose to delete users with zero posts at times) you may find this mod useful: http://www.phpbbhacks.com/viewhack.php?id=1692

In regards to the conversation in the suggestion board dealing with birthdays, this hack may be useful: http://www.phpbbhacks.com/viewhack.php?id=187

This is a new one on me :http://www.phpbbhacks.com/viewhack.php?id=1685 Adds an option in admin to add notes about any hacks or mods added to the board.


Identify Inactive users who have never activated to make an easier decision to delete or email them:
http://www.phpbbhacks.com/viewhack.php?id=1866

Remove Zero posters: http://www.phpbbhacks.com/viewhack.php?id=1570 Removes all traces of members with zero posts, without removing their ability to post.


I have noticed this come up several times regarding inline posts. Restrict image size in posts: http://www.phpbbhacks.com/viewhack.php?id=1590

A good one! : http://www.phpbbhacks.com/viewhack.php?id=868
(*lol just kidding! - please don't use this one.)
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Thanks for all those links ATNO/TW. I may be using some of those in the future :)
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

P.S. I was very curious about this read tracking thing. I am about 95% positive read tracking, i.e. showing a post marked as read or not is handled by a cookie, not the database. I'm about as equally sure that the following is the code that does it:

Code: [ Select ]
// Handle marking posts
//
if( $mark_read == 'forums' )
{
    if( $userdata['session_logged_in'] )
    {
        setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
    }

    $template->assign_vars(array(
        "META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
    );

    $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');

    message_die(GENERAL_MESSAGE, $message);
}
//
// End handle marking posts
//

$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();
  1. // Handle marking posts
  2. //
  3. if( $mark_read == 'forums' )
  4. {
  5.     if( $userdata['session_logged_in'] )
  6.     {
  7.         setcookie($board_config['cookie_name'] . '_f_all', time(), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
  8.     }
  9.     $template->assign_vars(array(
  10.         "META" => '<meta http-equiv="refresh" content="3;url=' .append_sid("index.$phpEx") . '">')
  11.     );
  12.     $message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . append_sid("index.$phpEx") . '">', '</a> ');
  13.     message_die(GENERAL_MESSAGE, $message);
  14. }
  15. //
  16. // End handle marking posts
  17. //
  18. $tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_t"]) : array();
  19. $tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . "_f"]) : array();


I sincerely doubt that this is what's taking up your 50 megs of db space since the cookie is on the user's machine. Perhaps you installed a mod which tracks read posts? Perhaps this is the mod that is incorporated into the board statistics? If so, be careful before you clear it, because you may be clearing out all those nice stats. (I'm letting you know this, because nowhere on my database did I see anything that remotely resembled a read or not read type catagory - I'm thinking that an extra mod you added is the culprit, and very inclined to believe it's the board stats one.

I really am confident that the read/unread stuff is a cookie as you see above. It may be necessary to free up the space for sure, but think about it before you do.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Well normally you would be right. The default PHPBB board uses cookies to track topics. What that means is when you visit your board it will show all new topics that you have not seen since your last visit. It will mark them with different icons. But the major drawback to this default PHPBB tracking system is that if you close your browser because you did not have time to go through them all, all tracking would be lost since your cookie has been updated to a new time. Now if you reopen your browser and come back to the forum, all those new posts are now marked as old and you would have no idea what you have read or haven't read.

What I actually did was install a mod that tracks each members topics through the database. This allows members to actually leave Ozzu and come back later being assured that all topics that are new and they have not read, are still marked as unread. They will only be marked as read once they have actually read the topic. By having the board like this it only encourages people to post more, because people know what they have read and haven't read yet.

The major drawback to this system is that it takes up a ton of space to have read tracking. The reason being, is that for each post that is made, the database has to place some data in each members profile to say "this certain post is unread now". This ultimately takes up a great deal of space and I am going to need to fine tune this mod so that it doesn't take up so many resources with the database.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Well, here's the deal. You are probably correct in the initial assumption. I have to disagree to a point. You are probably correct if the user does not select the option to "allways log in" when they do their login. But I can tell you with 100% certainty...I have 4 computers I use "always logged in".

Scenario one:
Computer A and Computer B
I refresh both -- both show the same unread
I read on computer A
refresh both
Both show the same read and unread.

Scenario two:
I read posts on computer A
I mark all posts read on computer A
I close all browsers on computer A
I refresh computer B
All posts show marked as read
I reopen a browser on computer A
New posts appear marked as unread
refresh computer B (without closing browsers)
New posts appeaar marked as unread

Scenario three:
I read posts on computer A before going to work. Mark remaining as read
Go to work. Log in. Only new posts appear.


This is consistent between here, as well as my own board (which is the default install)

I'm sure you are probably 100% correct for users who don't log in by selecting always log me in. I think it's a combination of sessions and the cookie that does it, but I've never seen this as a problem by logging in and checking the "always log me in" box.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I just tested it at my board. My theory holds true. If the user does not check the always logged in box, they lose the cookie when they close the browser and new posts won't show up. However, if they log in and check the "always log me into this computer" box and close their browser, the read/unread remains intact. So it's a combo of session and cookies. I read an indepth thing on sessions written by one of the phpBB programmers a few weeks ago and that's why I thought this was the case.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I'm guessing that the determination is in the session cookie set in the login script as to whether it's "perm" or session only.

(sorry for the added post here -- This forum is set so I can't edit my own posts or I would have just included this above) I don't have the time tonight to look for it, but I vaguely remember seeing the code at some point that does that.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

Bigwebmaster wrote:

What I actually did was install a mod that tracks each members topics through the database. This allows members to actually leave Ozzu and come back later being assured that all topics that are new and they have not read, are still marked as unread. They will only be marked as read once they have actually read the topic. By having the board like this it only encourages people to post more, because people know what they have read and haven't read yet.



OK -- now I get it. Hmmm... after rereading that a couple times I see your "assured" part. Yep, the way that you are doing it will certainly take care of that, but is it becoming a burden to do so? Wouldn't it be easier and cheaper to just to explain to users in the Announcement board that to be sure they see New posts to check the "always log me in" thing? It would also save you the time of rewriting a mod and clearing out the database every now and then so you don't go over your quota.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Yeah, well I used to have it the default way and it really annoyed me. I haven't check all your scenarios yet, but it would be hard to explain to everyone to tell them how to do it so they can easily track read/unread posts without it clearing.

So far its not a huge burden on the board with the mod that was installed. I really don't think it will take much work to write a mod that clears out old posts in the tracking. Anyway thanks for the ideas, when I start playing with that part again I will look into it more.
  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

By acccident, because the Stats Page is now linked exactly where I used to go to "mark all posts read", I've been seeing the stats page more this last week since all the time I've been at OZZU.

Without seeing the script for the stats board and knowing which tables the data is being queried from it's hard to say for sure, but I'm pretty convinced when you zero out the read/views stuff, I'm pretty certain it's going to affect , Most Viewed Topics, Most Active Topics, and Perhaps Most Used Smiley's and/or Top Posting Users (although that one probably comes from the same table that's used to keep track of users total posts). I can't find anywhere on the default setup where those stats could be obtained, so I'm making a general assumption that the data is being queried from the same tables that you are planning to clear.

I'm sure you'll do your database export and all to restore it if necessary, but I just wanted to point that out one more time while there's still time left for you to check it. I hope I'm wrong.

Good luck. *gets ready for the housecleaning.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

No the read tracking is totally seperate and has its own table. The statistics use nothing from this since the read tracking mod is not required to have the statistics.php script. Anyway the only thing that is in the read tracking table (phpbb_read_history is the actual name) are:

user_id
forum_id
topic_id
post_time

And the only purpose of those columns is to track what topics people have read or haven't read. Anyway I always backup the database before I start messing with it, but I know I will not have any problems :)
  • PluTunium
  • Professor
  • Professor
  • User avatar
  • Posts: 812
  • Loc: Touring the USA

Post 3+ Months Ago

Well, I am catching up on my reading... thats for sure!
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9089
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

All read history has now been cleared. I was originally going to only clear read history that was only 7 days or older, but I have also updraded the read history script and because of that I had to drop the whole read tracking database.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 46 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.