Page 9 of 9

Re: New post count on index

Posted: Thu Dec 25, 2008 4:29 pm
by sard
DragonMaster1 wrote:
sard wrote:I will apreciate Instructions for subsilver based themes :) .

BUMP?
I don't now what bump is :? but the modification works only on prosilver based themes :( .

Re: New post count on index

Posted: Thu Dec 25, 2008 10:44 pm
by DragonMaster1
sard wrote:
DragonMaster1 wrote:
sard wrote:I will apreciate Instructions for subsilver based themes :) .

BUMP?
I don't now what bump is :? but the modification works only on prosilver based themes :( .

Someone asked that a while back is why it was a bump?

No problem, I am using a different mod that does the same

Thanx anyway

Re: New post count on index

Posted: Sat Dec 27, 2008 8:01 pm
by matt1206
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
Fantastic. Works a treat :D

Re: New post count on index

Posted: Wed Apr 15, 2009 1:32 am
by DoYouSpeakWak
subsilver2 is a bit more difficuelt because the new post number are shown in the overall_header.html file. So its easy to get it shown on index.

Search

Code: Select all

{L_SEARCH_NEW}
Add after in-line

Code: Select all

 ({NEW_POST_COUNT})
But it needs to be viewable on viewforum,viewtopic,mcp,ucp,faq etc as well. My guess is that each of those main root files have to have the same edits in them as the index.php (or very similar) in them for it to work.