Page 4 of 9

Re: New post count on index

Posted: Wed Dec 19, 2007 1:23 pm
by moifest
comarzysko wrote:this mod is working only on index.
we're all the same, wainting for paul's answer...
read back through the topic and see the post about adding the info from index.php to functions.php instead to display on all pages.

That is what i did on mine.

Re: New post count on index

Posted: Mon Dec 24, 2007 9:47 am
by Rosca
I installed it but it displays just this:

Code: Select all

 View new posts () 
Between () is nothing, so what i have to do to display number of new posts ?


LE: Problem solved!

Re: New post count on index

Posted: Mon Dec 24, 2007 10:06 pm
by GurlzLubme
manwe_ wrote:Imho mod should use $user->data['user_lastmark'] or $user->data['user_lastvisit'] whichever is greater.

so will using something like "$user->data['user_lastmark'] OR $user->data['user_lastvisit']" in a line work to refresh the number of posts after reading it as opposed to logging off?

Re: New post count on index

Posted: Tue Dec 25, 2007 11:23 pm
by Tom@S
yes exactly like was for phpbb2

Re: New post count on index

Posted: Fri Dec 28, 2007 5:48 am
by GurlzLubme
Tom@S wrote:yes exactly like was for phpbb2

Sorry to ask for you to spell it out for me, but can you show me how the code should look exactly? thank you.

Re: New post count on index

Posted: Fri Dec 28, 2007 11:10 am
by Tom@S
i dont know :D iam not coder but i will ask authot o know him what hi think about this idea ;)

Re: New post count on index

Posted: Sat Dec 29, 2007 3:06 am
by ham1299
This works perfectly. Thanks! :D

Re: New post count on index

Posted: Sun Dec 30, 2007 10:33 pm
by Tom@S
so GurlzLubme i try it make like my own but i cant
here is my result and my opinion if somebody know please help http://startrekguide.com/community/view ... 090#p50090
and for GurlzLubme here is code wich was used in phpBB2

Code: Select all

if( $userdata['session_logged_in'] ) 
{ 
	$sql = "SELECT COUNT(post_id) as total 
		FROM " . POSTS_TABLE . " 
		WHERE post_time >= " . $userdata['user_lastvisit'] . " 
		AND poster_id != " . $userdata['user_id']; 

	$result = $db->sql_query($sql); 
	if( $result ) 
	{ 
		$row = $db->sql_fetchrow($result); 
		$lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")"; 
	}
}

Re: New post count on index

Posted: Wed Jan 02, 2008 10:09 pm
by Pinecamguy
Any idea why, when I hit "Mark All Forums Read".... all the forums in the list turn black but the modification's counter still says "View New Posts(30)" and when you click on it, it only shows 19 posts?

Two issues here: I've marked all forums read, so shouldn't the number of new posts be 0?

And why does it always say there are more posts than the number that comes up when you hit the link?

Re: New post count on index

Posted: Wed Jan 02, 2008 10:57 pm
by Tom@S
did you read about 10 post befor your? we talk here on 2 paginations :lol:

Re: New post count on index

Posted: Thu Jan 03, 2008 1:27 am
by Pinecamguy
So the answer is log off and log back in to remove the post count? That's it?

Re: New post count on index

Posted: Thu Jan 03, 2008 1:46 am
by Tom@S
for now yes.I try it make on my own but i cant. Just wait for now propably someone will know it and will change it

Re: New post count on index

Posted: Thu Jan 03, 2008 3:11 am
by MX-3.com
I haven't tried to use your code you put here yet. Does it work, or is it only your attempt to make it work, and are pasting the code here for assistance?

Thanks,
Tom@S wrote:so GurlzLubme i try it make like my own but i cant
here is my result and my opinion if somebody know please help http://startrekguide.com/community/view ... 090#p50090
and for GurlzLubme here is code wich was used in phpBB2

Code: Select all

if( $userdata['session_logged_in'] ) 
{ 
	$sql = "SELECT COUNT(post_id) as total 
		FROM " . POSTS_TABLE . " 
		WHERE post_time >= " . $userdata['user_lastvisit'] . " 
		AND poster_id != " . $userdata['user_id']; 

	$result = $db->sql_query($sql); 
	if( $result ) 
	{ 
		$row = $db->sql_fetchrow($result); 
		$lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")"; 
	}
}

Re: New post count on index

Posted: Thu Jan 03, 2008 10:26 am
by Tom@S
no if you read all you know that code is code for bb2 not bb3.i tried to fix it on my own but i cant it only work like now or not

Re: New post count on index

Posted: Thu Jan 03, 2008 2:42 pm
by moifest
The mod i believe is missing an UPDATE query.

If you look at includes/functions_privmsgs.php there is a load of new querys for updating the status of unread PMs