New post count on index

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in the Customisations Database.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTICE: This forum is only for the announcement of new releases and/or updates of MODs. Any MOD support should be obtained through the Customisations Database in the support area designated for each MOD.

A direct link to support for each MOD is in the first post of the respective topic.
Locked
Tom@S
Registered User
Posts: 96
Joined: Thu Jul 12, 2007 7:33 pm
Location: SVK
Contact:

Re: New post count on index

Post by Tom@S » Thu Jan 03, 2008 3:58 pm

thx moifest i will look on it.You mean that is enough to add some queries ?

moifest
Registered User
Posts: 251
Joined: Tue Nov 06, 2007 4:58 pm

Re: New post count on index

Post by moifest » Thu Jan 03, 2008 4:21 pm

There is another MOD that displays unread posts here: http://www.phpbb.com/community/viewtopic.php?p=3015775

Obviously it is slightly different but once an unread post is viewed, it is removed from the list.

I have this MOD running on my board as my member prefer too be able to link straight to new unread posts. Once read its no longer on their list.

Tom@S
Registered User
Posts: 96
Joined: Thu Jul 12, 2007 7:33 pm
Location: SVK
Contact:

Re: New post count on index

Post by Tom@S » Thu Jan 03, 2008 4:28 pm

great thx i will look on it inmediatelly because i looking in this query and get headakes :)
edit/i looked on it and it is not very similar mod it show only if is new pist or not

Tazmanian
Registered User
Posts: 218
Joined: Wed Jan 25, 2006 7:02 pm
Location: Belgium
Contact:

Re: New post count on index

Post by Tazmanian » Thu Jan 03, 2008 9:32 pm

I have this mod running on my forum. But i just figured out this 'problem'.

If somebody post a new message or topic in a private forum it also count for the new post count on index mod. So for example, there is 1 new post, but if the user has no permissions to view that post there are no new message available. Althought, on the index stand that there is one new message.

Do you understand? Sorry, i can't explain it wel in English. :oops:

bardosoft
Registered User
Posts: 69
Joined: Sat Dec 15, 2007 8:12 pm
Contact:

Re: New post count on index

Post by bardosoft » Thu Jan 17, 2008 8:45 pm

Hi great mod.

;)
BS Video Saver <=- Video downloader
BS Video Saver Community <=- Our Community

Sascha Mueller
Registered User
Posts: 95
Joined: Tue Mar 28, 2006 8:11 pm
Contact:

Re: New post count on index

Post by Sascha Mueller » Tue Feb 12, 2008 3:48 am

This mod is for RC7. Do you plan to release an new version for 3.0.0?
Please excuse my bad English, I'm German!

User avatar
lefty74
Registered User
Posts: 3649
Joined: Wed Sep 14, 2005 8:26 pm
Location: NL
Contact:

Re: New post count on index

Post by lefty74 » Tue Feb 12, 2008 5:25 pm

works fine on gold for me :)
lefty74
zoocrew.eu - help us save our wildlife
My MODS | Due to lack of time I unfortunately am unable to work on my mods anymore, anyone who has ideas to improve them and would like to take any of them over, please PM me.

User avatar
Jaymie1989
Registered User
Posts: 1991
Joined: Thu Aug 02, 2007 5:21 pm
Name: Jaymie

Re: New post count on index

Post by Jaymie1989 » Tue Feb 12, 2008 10:47 pm

After seeing all the problems that people have had.

Is this now working with GOLD and files are updated?
Dear creators of Sesame Street,
Kids are still fat. Can I come back now?
Sincerely, Cookie Monster.

View my MODs - Need phpBB help with MODs and Styles? Take a look at my phpBB3 services

bsoder
Registered User
Posts: 7
Joined: Fri Feb 08, 2008 8:36 pm

Re: New post count on index

Post by bsoder » Sat Feb 16, 2008 4:12 pm

My setup is working now - I'm using this query, which indicates the correct unread post count now. I just replaced the sql query in index.php (actually in includes/functions.php per the first page or two of this thread) with this.

$sql = 'SELECT count(*) as count FROM (
SELECT t.topic_id, t.topic_last_post_time tlpt ,tt.mark_time as tmt, ft.mark_time as fmt, u.user_lastmark as umt
FROM ' . USERS_TABLE . ' u, ' . TOPICS_TABLE . ' t
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON tt.topic_id = t.topic_id AND tt.user_id=' . $user->data['user_id'] . '
LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON ft.forum_id=t.forum_id AND ft.user_id=' . $user->data['user_id'] . '
WHERE u.user_id= ' . $user->data['user_id'] . ' AND topic_last_post_time > u.user_lastmark
) marktimes
WHERE 1 AND NOT ((tlpt <= tmt AND NOT ISNULL(tmt)) OR (tlpt <= fmt AND NOT ISNULL(fmt)))';

User avatar
manchumahara
Registered User
Posts: 65
Joined: Sun Jul 15, 2007 2:07 pm
Location: Bangladesh
Contact:

Re: New post count on index

Post by manchumahara » Sat Feb 16, 2008 6:31 pm

bsoder wrote:My setup is working now - I'm using this query, which indicates the correct unread post count now. I just replaced the sql query in index.php (actually in includes/functions.php per the first page or two of this thread) with this.

$sql = 'SELECT count(*) as count FROM (
SELECT t.topic_id, t.topic_last_post_time tlpt ,tt.mark_time as tmt, ft.mark_time as fmt, u.user_lastmark as umt
FROM ' . USERS_TABLE . ' u, ' . TOPICS_TABLE . ' t
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON tt.topic_id = t.topic_id AND tt.user_id=' . $user->data['user_id'] . '
LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON ft.forum_id=t.forum_id AND ft.user_id=' . $user->data['user_id'] . '
WHERE u.user_id= ' . $user->data['user_id'] . ' AND topic_last_post_time > u.user_lastmark
) marktimes
WHERE 1 AND NOT ((tlpt <= tmt AND NOT ISNULL(tmt)) OR (tlpt <= fmt AND NOT ISNULL(fmt)))';
Thanks.. it works for me. I was looking for this for many days.

bsoder
Registered User
Posts: 7
Joined: Fri Feb 08, 2008 8:36 pm

Re: New post count on index

Post by bsoder » Sat Feb 16, 2008 7:01 pm

Welcome. It's not my query, it was in another thread here somewhere - not directly related to post counts, but close enough.

bardosoft
Registered User
Posts: 69
Joined: Sat Dec 15, 2007 8:12 pm
Contact:

Re: New post count on index

Post by bardosoft » Sat Feb 16, 2008 9:17 pm

demo, please
BS Video Saver <=- Video downloader
BS Video Saver Community <=- Our Community

bsoder
Registered User
Posts: 7
Joined: Fri Feb 08, 2008 8:36 pm

Re: New post count on index

Post by bsoder » Sun Feb 17, 2008 2:11 pm

The SQL I posted doesn't reflect the actual number of new posts, it reflects the number of new topics. I've changed the text in language/en/common.php, the SEARCH_NEW value, to read "View new topics" on my board. I like topic count better than post count anyway, but just so you all are aware of the difference.

-.-PhanTom-.-
Registered User
Posts: 18
Joined: Sat Feb 16, 2008 7:45 pm

Re: New post count on index

Post by -.-PhanTom-.- » Tue Feb 19, 2008 10:29 am

bsoder wrote:The SQL I posted doesn't reflect the actual number of new posts, it reflects the number of new topics. I've changed the text in language/en/common.php, the SEARCH_NEW value, to read "View new topics" on my board. I like topic count better than post count anyway, but just so you all are aware of the difference.
Nice one. But it is not working 100% for me. It is not updating the number/count as it should...

Would it be possible to change the query to show new topics since last page refresh instead of last login?

Also, is it possible to add a new variable "SEARCH_NEW_TOPIC" instead of altering the text for SEARCH_NEW n language/en/common.php?
If so, I guess I have to somehow add this new variable in index.php or somewhere else?

bsoder
Registered User
Posts: 7
Joined: Fri Feb 08, 2008 8:36 pm

Re: New post count on index

Post by bsoder » Tue Feb 19, 2008 9:47 pm

I think the problem comes from the fact that the newposts query in search.php for threads uses user_lastvisit to key on, rather than a similar query to the one I posted. So what happens is that the query I posted will show you a count of all threads in the system that you've never viewed, but the query when you click on the link is showing active threads since your last login.

At the moment, I'm experimenting with replacing the query in search.php, around line 375 or so. Here's the query I'm trying.

$sql = 'SELECT t.topic_id
FROM ' . USERS_TABLE . ' u, ' . TOPICS_TABLE . ' t
LEFT JOIN ' . TOPICS_TRACK_TABLE . ' tt ON tt.topic_id = t.topic_id AND tt.user_id=' . $user->data['user_id'] . '
LEFT JOIN ' . FORUMS_TRACK_TABLE . ' ft ON ft.forum_id=t.forum_id AND ft.user_id=' . $user->data['user_id'] . '
WHERE u.user_id= ' . $user->data['user_id'] . ' AND topic_last_post_time > u.user_lastmark
AND NOT ((t.topic_last_post_time <= tt.mark_time AND NOT ISNULL(tt.mark_time)) OR (t.topic_last_post_time <= ft.mark_time AND NOT ISNULL(ft.mark_time)))';

Locked

Return to “[3.0.x] MOD Database Releases”