Firefox PHP

List no. NEW posts on homepage

Posted by Mat 
Mat
List no. NEW posts on homepage
September 05, 2002 05:37AM
Hi,

Im looking for a hack that when a user goes to the Hompage they see a column that lists the number of new posts in each forum since their last visit, it must use a cookie to do this as al my forums do not require any login at all.

Can this be done?

Thanks

Mat
Re: List no. NEW posts on homepage
October 23, 2002 01:07PM
yes I belive it can be done... when i have time i will revicse my script which is in this forum to function in that way... pretty busy lately thouhg with college among other things.

unless you know how to code it yourself, feel free to use my script.
e
Re: List no. NEW posts on homepage
November 11, 2002 03:59PM
I posted this request somewhere a while back and cant find where i put it. Anyways someone was working on a mod for it which worked but has a few issues...

If you find it let me know im looking for it again.
Re: List no. NEW posts on homepage
January 27, 2003 07:55AM
hello
im looking for this mod too, is anyone can help me ???
Re: List no. NEW posts on homepage
January 29, 2003 11:57AM
i too am waiting for this mod, and remember the original post. That was quite a while back so if anybody is still working on it, or if the person who was is no longer able to then could they reply here please,

cheers,

matt
Anonymous User
Re: List no. NEW posts on homepage
March 04, 2003 11:37AM
The mod for this is quite simple. In index.php, find the line that starts with:
$posts = "$lNumPosts etc etc

above it, add these lines:

=============
// $index_old_message contains the last read message ID.
// $max_id contains the last post message ID.
// Subtract them, and you know how many new messages there are.
// If $index_old_message is not set, assume all posts are new.

if ($index_old_message) {
$new_posts = $index_max_id - $index_old_message;
} else {
$new_posts = $num_posts;
}
=============

and change the line mentioned above into something like this:

$posts="$lNumPosts: <strong>$num_posts</strong>&nbsp;($new_posts&nbsp;new)&nbsp;&nbsp;";


This should display the number of new posts on the bigger lists.

regards,

Yvo Brevoort
Anonymous User
Re: List no. NEW posts on homepage
March 04, 2003 11:41AM
It might be a good idea to change the spaces in the last line above to (ampersant)nbsp like it is in the original line. For some odd reason phorum ate part of my reply :P

Yvo
Re: List no. NEW posts on homepage
March 18, 2003 08:31PM
anyone have this working.. i tried but seems to assume all posts are always new. This is in 3.4.1
Martin Aftevik
Re: List no. NEW posts on homepage
November 27, 2003 05:09AM
nope, it doesn't work on 3.4.4 either...
Sorry, you do not have permission to post/reply in this forum.