Firefox PHP

New Count module

Posted by Panu 
Re: New message count next to "new" in list view
January 18, 2005 10:50AM
Sorry, it was 1.4, but I'm using 1.5 now. I have List view as Flat and Read view as Threaded. Example:

[age.salsashark.net]

Note, for example, the "New Recruit" thread. It just reports "new" but in the read view you can see there are quite a few:

[age.salsashark.net]

This happens in several threads. Another example is the "Outstanding wrestler" thread which shows 11 new, but actually has 15 new:

[age.salsashark.net]
Re: New message count next to "new" in list view
January 18, 2005 12:11PM
Thankyou for testing.

I tested my own phorum and I get the correct amount every time. I found another problem thou which I'm fixing tonight.

There's not many places where it can go wrong on the mod, it basically just removes already read message id's from an array and count's the remaining array.

So the only thing that comes to my mind is that you run out of newflags? On the other hand you shouldn't see the "new" next to the subject in threaded view either? I quess.

Additionally I don't calc the message as new if the message id is smaller than users newinfo minid

so if you can find that, for the user and then compare that to the "missing" messages id's.

Hmm I don't know if you understood anything from the above sentence, even I had some difficulties.


---
-=[ Panu ]=-
Re: New message count next to "new" in list view
January 18, 2005 06:34PM
Ok I kind of found the problem, but I'm not sure what's right.

I don't count message as new if
messageid > $PHORUM['user']['newinfo']['min_id']

Phorum shouldn't either, but it does...

if (!isset($PHORUM['user']['newinfo'][$row['message_id']]) && $row['message_id'] > $PHORUM['user']['newinfo']['min_id']) {
    $messages[$key]["new"]=" " . $PHORUM["DATA"]["LANG"]["newflag"];
}

Or have I understood min_id wrong?

Anyway attached is new version of the mod, I fixed a problem when showing old messages

---
-=[ Panu ]=-
Attachments:
open | download - new_count-1-6.zip (2.4 KB)
Re: New message count next to "new" in list view
January 19, 2005 03:31AM
you shouldn't count as new if *smaller* than min_id.

all messages with a smaller id than min_id are taken as old/read.


Thomas Seifert
Re: New message count next to "new" in list view
January 19, 2005 03:59AM
Sorry, my mistake, I should have said either:

if messageid > $PHORUM['user']['newinfo']['min_id']

then I count message as new

or

messageid < $PHORUM['user']['newinfo']['min_id']

then I don't count message as new.

So I do exactly the same as main phorum code? What could be the reason for threaded read to have "new" attached to messages that have messageid < minid?



---
-=[ Panu ]=-
Re: New message count next to "new" in list view
February 13, 2005 05:58PM
I have another suggestion. Once implemented, this would make this module real useful and worth including with the original phorum distribution.
Suppose, I have made some folders in phorum and have forums inside them. Now, I should get the new message count next to the folders also? What I mean is, suppose I have a folder "bla Folder" and there are 3 forums in it f1, f2 and f3. Now suppose a new post is done in f2, then, next to the bla Folder on the main page, (1 new) appears.




Edited 2 time(s). Last edit at 02/13/2005 06:00PM by nikhil.
Re: New message count next to "new" in list view
February 13, 2005 06:54PM
have fun with the load on the server this would create.


Thomas Seifert
Re: New message count next to "new" in list view
February 13, 2005 07:02PM
We can keep this feature as an "option". This is a very handy feature expecially for those forums where you want to have folders on the main page and still want the users to come to know about the new postings. Or option can also be kept for only "new" appearing instead of the message count.
Re: New message count next to "new" in list view
February 14, 2005 04:23AM
we will never add something like that to the core-distribution.
even if its an option or you only add "new" (which doesn't make much of a difference) it will make the index-page slow as hell with firing dozens of queries just for listing how many new messages are in a folder and all subsequent forums.


Thomas Seifert
tkt
Re: New message count next to "new" in list view
April 23, 2005 01:50PM
I've tried to make polish translation of the language file, but it isn't possible yet.
The problem is that in polish there are diferent word for 2, 3 or 4 new items, and different for 5 and more, like following:

1 nowy
2,3,4 (also 22,23,24,32,33,34 etc.) nowe
5 nowych

Two possible solutions (with polish translation files) in attachments
(The 1st looks, maybe, more universal, but when I've written it I saw, that something like the 2nd one would be better)

This hanges would be usefull while making other slavonic-languages translations.

ps. If you want to see it working, look at [puszkin.org]



Edited 2 time(s). Last edit at 04/23/2005 02:05PM by tkt.
Attachments:
open | download - new_count_1.zip (2.8 KB)
open | download - new_count_2.zip (3.2 KB)
Sorry, only registered users may post in this forum.

Click here to login