Announcement

Collapse
No announcement yet.

posts since last visit

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • posts since last visit

    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?

  • #2
    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";

    Then go to your:

    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


    • #3
      Originally posted by Jake Bunce View Post
      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";

      Then go to your:

      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>
      I have vBulletin 3.7.4 and I do this but cannot find any php_include or anything with php really.

      Comment


      • #4
        Please do not bump old threads. Please start your own thread in the relevant forum for the version of vBulletin that you are running. Thank you.
        Kerry-Anne :)

        Twitter Blog

        www.peterska2.com www.worldnewszone.com www.popularusenetgroups.com www.superclickers.co.uk www.forumsforchrist.com www.browsergameplanet.com

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X