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.
Shalom07
Registered User
Posts: 8
Joined: Wed Nov 14, 2007 5:35 pm

Re: New post count on index

Post by Shalom07 » Wed Nov 14, 2007 5:37 pm

Im not seeing it on prosilver either. I purged my cache and refreshed the template as well.

ramonax
Registered User
Posts: 6
Joined: Wed Nov 14, 2007 4:28 am

Re: New post count on index

Post by ramonax » Fri Nov 30, 2007 5:44 pm

this doesnt work?

User avatar
*Capmaster*
Registered User
Posts: 159
Joined: Tue Mar 20, 2007 5:00 pm
Location: Albuquerque, NM
Contact:

Re: New post count on index

Post by *Capmaster* » Sat Dec 01, 2007 10:06 am

It's working for me now. I must have missed a cache purge somewhere. It works good in Prosilver and Odyssey, since in those styles the code change is made to index_body.html.

However ....in Subsilver2 and eTech Green (SS2-based style) I had to place it in overall_header.html since that's where the search links are.

And it shows the number OK on the index page, but for some strange reason it won't show the number when you move into forumview or topicview, or any other page besides the index. It just shows the parentheses with no number between them. Not a huge issue, but I know some members will want to know what gives.

Here's a screen grab in forumview in subsilver2:

Image

moozer
Registered User
Posts: 102
Joined: Sat Nov 10, 2007 10:36 pm
Location: Netherlands
Contact:

Re: New post count on index

Post by moozer » Mon Dec 03, 2007 5:51 pm

nice mod,
just one question, is'nt it supose to decrease when you read your unread posts?
like the "new messages" number does as soon you read your messages.....
Now it only resets the number when you logout/login
Board at http://www.noobdude.com , Running phpbb3, Template(s) used: ProSilver, Language(s) used: English, Its hosted on a local server, Version of PHP used: 5.2.0, Database and version used: MySQL 5

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: New post count on index

Post by FaresNB » Fri Dec 07, 2007 9:46 pm

It doesn't work with me :cry:

it gives this erorr massage

Code: Select all

Parse error: parse error, unexpected ';', expecting ')' in C:\AppServ\www\forum\index.php on line 112
also .... i didn't find the code to edit for Subsilver2 :|

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 » Fri Dec 07, 2007 10:39 pm

*Capmaster* wrote:It's working for me now. I must have missed a cache purge somewhere. It works good in Prosilver and Odyssey, since in those styles the code change is made to index_body.html.

However ....in Subsilver2 and eTech Green (SS2-based style) I had to place it in overall_header.html since that's where the search links are.

And it shows the number OK on the index page, but for some strange reason it won't show the number when you move into forumview or topicview, or any other page besides the index. It just shows the parentheses with no number between them. Not a huge issue, but I know some members will want to know what gives.

Here's a screen grab in forumview in subsilver2:

Image
The reason why you don't see the number in any page except the index page is because the counting only happens in index.php. If you want this across the board, you will need to put the code from index.php into includes/functions.php within the function page_header.
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
GurlzLubme
Registered User
Posts: 880
Joined: Wed Sep 01, 2004 11:21 am
Location: New York

Re: New post count on index

Post by GurlzLubme » Mon Dec 10, 2007 4:30 am

Hi, Lefty,

can you be a lil more specific where in the code should lay?

Also, I might be missing a {something} in the html file to show the new post count? Maybe someone can show what that should be?
1,000,000 Thank Yous to everyone who's been helping me on phpbb.com!

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 » Mon Dec 10, 2007 7:29 pm

you could try
open includes/functions.php

FIND

Code: Select all

		// The following assigns all _common_ variables that may be used at any point in a template.
BEFORE, ADD

Code: Select all

$sql = 'SELECT COUNT(post_id) as count
    FROM ' . POSTS_TABLE . ' 
		WHERE post_time > ' . $user->data['user_lastvisit'] . '
    AND poster_id != ' . $user->data['user_id'];

$result = $db->sql_query($sql);
$post_count = $db->sql_fetchfield('count', false, $result);
$db->sql_freeresult($result);  
FIND

Code: Select all

		'SITENAME'						=> $config['sitename'],
BEFORE, ADD

Code: Select all

		'NEW_POST_COUNT' => $post_count ,
and then delete the parts referred to in the mod in the index.php page
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.

bassi
Registered User
Posts: 32
Joined: Tue Nov 06, 2007 6:40 pm

Re: New post count on index

Post by bassi » Fri Dec 14, 2007 8:09 am

Nice MOD, works fine with Gold, thx

ticky
Registered User
Posts: 60
Joined: Mon Nov 17, 2003 1:30 pm
Location: Canada/Australia

Re: New post count on index

Post by ticky » Fri Dec 14, 2007 3:09 pm

cheers for the mod, no problems with gold release

just wondering, as mentioned before, if there is a way it can decrease as you read each new post instead of logging out & what-have-you

User avatar
FaresNB
Registered User
Posts: 271
Joined: Tue May 22, 2007 11:50 am
Location: Syria
Name: Fares Alnaeb
Contact:

Re: New post count on index

Post by FaresNB » Sat Dec 15, 2007 8:15 pm

Great ..... it works also with me on Gold

8-)

User avatar
GurlzLubme
Registered User
Posts: 880
Joined: Wed Sep 01, 2004 11:21 am
Location: New York

Re: New post count on index

Post by GurlzLubme » Sun Dec 16, 2007 10:34 am

lefty74 wrote:you could try
open includes/functions.php

FIND

Code: Select all

		// The following assigns all _common_ variables that may be used at any point in a template.
BEFORE, ADD

Code: Select all

$sql = 'SELECT COUNT(post_id) as count
    FROM ' . POSTS_TABLE . ' 
		WHERE post_time > ' . $user->data['user_lastvisit'] . '
    AND poster_id != ' . $user->data['user_id'];

$result = $db->sql_query($sql);
$post_count = $db->sql_fetchfield('count', false, $result);
$db->sql_freeresult($result);  
FIND

Code: Select all

		'SITENAME'						=> $config['sitename'],
BEFORE, ADD

Code: Select all

		'NEW_POST_COUNT' => $post_count ,
and then delete the parts referred to in the mod in the index.php page

awesommmmmmmmmmmmme!
1,000,000 Thank Yous to everyone who's been helping me on phpbb.com!

lifeguard81
Registered User
Posts: 147
Joined: Tue Dec 04, 2007 10:11 am

Re: New post count on index

Post by lifeguard81 » Sun Dec 16, 2007 11:39 am

Thanks for this mod!

Its also on my portal, but not everyone comes there.
So its very nice!

Sorry for my bad english, but its a great mod!
Bye phpBB, hello Compo.sr A complete website package with news, forum, chat, gallery and much more!

comarzysko
Registered User
Posts: 30
Joined: Sun Dec 16, 2007 2:05 pm

Re: New post count on index

Post by comarzysko » Sun Dec 16, 2007 9:50 pm

why, if I've readed everything, it still show me same count? f.e. 3

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 » Sun Dec 16, 2007 10:10 pm

because it counts new posts since your last visit, it does not take into account posts you have read.
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.

Locked

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