Your ultimate PunBB resource!
You are not logged in.
##
##
## Mod title: Mark topics as read
##
## Mod version: 1.1.3
## Works on PunBB: 1.2.5
## Release date: 2005-04-22
## Author: Miles Kaufmann (webmaster@twmagic.com)
##
## Description: This mod makes it so that topics are no longer marked as
## "new" in the forum view after they have been read, if
## they have not been posted in since being read. This
## mod also works on the list of forums in index.php.
##
## Affected files: header.php
## include/functions.php
## index.php
## lang/English/common.php
## lang/English/misc.php
## login.php
## moderate.php
## misc.php
## search.php
## viewforum.php
## viewtopic.php
##
## Affects DB: Yes; adds column "read_topics" to table "users".
##
## Notes: For notes see the included readme.txt.
##
## DISCLAIMER: Please note that "mods" are not officially supported by
## PunBB. Installation of this modification is done at your
## own risk. Backup your forum database and any and all
## applicable files before proceeding.
##
##
###########################################################################
# #
# Mark topics as read v1.1.3 #
# Copyright (C) 2005 Miles Kaufmann #
# PunBB 1.2.5 mod #
# #
###########################################################################
--[ Description ]----------------------------------------------------------
"Mark topics as read" is a PunBB mod which makes topics which have been
viewed no longer appear as "new" in the forum view. It adds a single column
to the "users" table, and uses no cookies. Installing this mod adds about
6KB of code to PunBB.
If you install this mod, you should set the "timeout_visit" option to at
least 30 minutes. After the user's visit times out, the data associated
with this mod will be cleared from the database, and all posts before the
user's last visit will be marked read. I would recommend setting
"timeout_visit" to one hour.
Because of the difficulty of creating mods for PunBB, it has become
impossible for me to maintain concurrent versions of this mod.
Unfortunately this means I have been forced to discontinue support for
older versions of PunBB. You really should be using the latest version
anyway, so head to http://www.punbb.org/ to grab it.
--[ Installation using patch files ]---------------------------------------
There is a unified diff file provided with this mod, which will allow you
to easily install the mod on an unmodified or lightly modded installation
of PunBB.
To install this mod via patch, first upload install_mod.php to the root of
your PunBB installation, run it, and delete it. Then, place the patch.diff
in the PARENT directory of your PunBB root directory (i.e., if your forums
are located in public_html/forums/ you should place the patch file directly
in the public_html/ folder). Then, issue the following command in your
shell:
patch -ul -d [punbb_dir] -p1 < [patch_file]
Replace [punbb_dir] with the path to your forums root directory and
[patch_file] with the name of the patch file. If you are running an
unmodified version of PunBB, the command should finish quickly without any
failures. If it does fail, you will have to update the failed files
manually.
Remember that YOU MUST RUN INSTALL_MOD.PHP PRIOR TO INSTALLING THIS MOD
WITH A PATCH. Failure to do so may render your PunBB installation
INOPERABLE. You have been warned :)
--[ Version history ]------------------------------------------------------
Changes in v1.1.3:
o Updated for compatibility with PunBB 1.2.5.
o Miscellaneous minor code improvements.
Changes in v1.1.2:
o Topic-read data will now be cleared when the user logs out manually.
Changes in v1.1.1:
o Fixed bug which caused mod to make database queries more often and
take up more database space than was necessary. Thanks to Smartys for
pointing out this issue.
Changes in v1.1.0:
o Fixed major bug with display of index.php; reduced number of DB queries
made by the mod in index.php to 1. Reported by cheesypeanut.
o Updated search.php to display search results with the correct state of
"newness", like viewtopic.php and moderate.php
o Added language definitions for mod text.
o Changed database to use a MEDIUMTEXT column to store the data.
o Topic is now only marked read if it needs to be.
v1.0.0:
o Initial release.Offline
It doesn't works with active topics mod ![]()
Offline
Did any of the changes affect places where code needs to be changed for this mod to work? If not, it will work just fine, although you'll need to edit install_mod.php
Offline
Smartys wrote:
Did any of the changes affect places where code needs to be changed for this mod to work? If not, it will work just fine, although you'll need to edit install_mod.php
That's why I wanted to know if someone tried it with 1.2.6 ; before upgrading using the patch tool. It can merge, but he's not that smart ![]()
Offline
Works perfectly with 1.2.6 ![]()
I install the mod on 1.2.6 and it's not work fine!
When i read the post, it write in database a:1:{s:1:"t";a:1:{i:6;i:1123092230;}}
then i go to index or viewforum and it erase a:1:{s:1:"t";a:1:{i:6;i:1123092230;}} from database
then i refresh or go to viewforum/index and it isn't read!
why??
First, I see that it is possible to install it in a latter version then the 1.2.5. When I run install_mod.php, I have got a message telling me that I don't have the right version (I've got the 1.2.7). How do I do to install the mod anyway ?
Second, may we expect a version of this mod for the 1.2.7 version of PunBB ? This mod seems so great, it's sad that it's not availlable for the last version of PunBB.
Last edited by Philippe Worontzoff (2005-09-10 04:48:27)
Offline
It does work with 1.2.7 as well. It does need a few code changes and what not to make it run but other than that it works pretty well. I found some more info on a post in the Punbb forum.
Sorry I couldnt help you anymore.
Offline
help pls !
i am getting Error: Unable to update user visit data.
but when i refresh the page the page seems to load
as i have discovered the error appears when user has no cookies from the site
do you know where is the problem?
tnks
Last edited by intolerance (2005-10-01 08:45:36)
Offline
Just installed on v1.2.8 and seems to be working fine. I had to really search for the insertion points sometimes as my bb is already heavily modded so the line numbers din't match. Maybe something to consider for anyone who updates this mod.
Offline
Did anyone apply this successfully on 1.2.10?
Offline
bkhl wrote:
Did anyone apply this successfully on 1.2.10?
Yep - I've used this successfully on every version of PunBB since the mod was released.
Offline
OK. I get some errors running the install script. (Even when I change it to accept the new version string.)
Offline
nm works. Thanks.
Last edited by Twig (2005-11-30 20:23:16)
Offline
Hi.
How do i do this part of the installation in Windows 2000?:
Then, issue the following command in your
shell:
patch -ul -d [punbb_dir] -p1 < [patch_file]
Offline
You don't use the patch file on Windows ![]()
You have to manually edit the code
Offline
Smartys wrote:
You don't use the patch file on Windows
You have to manually edit the code
Oh. Well I have to try to use my small skills then ![]()
Offline
Hi everybody,
I have run this mod on PunBB 1.2.10 and it's seems to run perfectly but i've a graphic bug, when i'm on a forum, the style is modified...
For example :
http://outremonde.info/forums/forum2.html
When i delete this ligne of code which be present in header.php, it's run ok !
// MOD: MARK TOPICS AS READ - 2 LINES NEW CODE FOLLOW
else if (basename($_SERVER['PHP_SELF']) == 'viewforum.php')
$tpl_temp .= '</ul>'."\n\t\t\t".'<p class="conr"><a href="misc.php?action=markforumread&id='.$id.'">'.$lang_common['Mark forum as read'].'</a></p>'."\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';Last edited by llanis (2006-01-14 12:18:34)
Offline
I have a problem.. My punbb 1.2.10 display 1030 guests.. I think it comes from function update_users_online()
Can you help me ? (Sorry but I'm french)
Offline
How is that even related to this? ![]()
Offline
working for my
but not working in function show_new in search
someone pls help
Offline
ow and someone can do this mod for a subforum mod in a viewforum.php? PLS
Offline
skoruppa wrote:
working for my
but not working in function show_new in search
someone pls help
The same thing for me. Work perfectly, but when i want to show message since last visit, it's show me only new message, not the title of the topic. Help, please.
basilou