On vB 2, whenever you came onto the board there was text that told you how many posts there were since your last visit. It was with the welcome message at the top. I don't see that now. How do I get that back?
posts since last visit
Collapse
This topic is closed.
X
X
-
There was a "View New Posts" link, but I don't remember there being the actual number. However, this can be added with a little custom code in your phpinclude_start template.
Go to your:
Admin CP -> Styles & Templates -> Style Manager -> « » -> PHP Include Code Templates -> phpinclude_start
Add this code:
PHP Code:// GET NUMBER OF NEW POSTS
$newposts = $DB_site->query_first("SELECT count(*) AS count FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
// DETERMINE IF "POSTS" IS SINGULAR OR PLURAL
if ($newposts[count] == 1)
{
$newposts[plural] = "";
}
else
{
$newposts[plural] = "s";
}
Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> FORUMHOME
Add this code where ever you want the message to show up:
Code:<a href="search.php?$session[sessionurl]do=getnew">$newposts[count] new post$newposts[plural]</a>
-
There was a "View New Posts" link, but I don't remember there being the actual number. However, this can be added with a little custom code in your phpinclude_start template.
Go to your:
Admin CP -> Styles & Templates -> Style Manager -> « » -> PHP Include Code Templates -> phpinclude_start
Add this code:
PHP Code:// GET NUMBER OF NEW POSTS
$newposts = $DB_site->query_first("SELECT count(*) AS count FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
// DETERMINE IF "POSTS" IS SINGULAR OR PLURAL
if ($newposts[count] == 1)
{
$newposts[plural] = "";
}
else
{
$newposts[plural] = "s";
}
Admin CP -> Styles & Templates -> Style Manager -> « » -> Forum Home Templates -> FORUMHOME
Add this code where ever you want the message to show up:
Code:<a href="search.php?$session[sessionurl]do=getnew">$newposts[count] new post$newposts[plural]</a>
Comment
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Comment