Announcement

Collapse
No announcement yet.

Today's posts count

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Today's posts count

    I want to show posts count of the that day. For example;

    Hi, Admin.
    Today, we have 412 new post.

    How can I do that? I want to show this on main page.

  • #2
    There is no function to do this. This requires modifying the code. We cannot officially support code modifications or forums running modified code, however you can try searching or asking for help with this over at www.vbulletin.org.
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      I am going to be a bit norty, since this really belongs on vbulletin.org.

      However, this will give you the number of posts so far today.
      Create a new plug in at forumhome_complete with the following code:
      Code:
      $starttime = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
      $newposts = $db->query_first("SELECT COUNT(*) AS count FROM " . TABLE_PREFIX . "post WHERE dateline >= $starttime");
      $todtotal = vb_number_format($newposts['count']);
      Then simply add $todtotal wherever you want the figure to show at the bottom of forumhome.

      Eg:
      Code:
      <span style="bigusername">$todtotal posts so far today</span>
      I did mine like this:

      Code:
      <table cellspacing="1" cellpadding="4" class="tborder"><td class="tcat">Posts Today</td><tr>
      <td class="alt2" align="center"><div class="bigusername"><b> $todtotal</b></div></td></tr></table>
      You will need a play around to crowbar it into your style.

      See link in sig for how it looks on mine. It's bottom right.
      Last edited by Mark.B; Thu 31 Aug '06, 9:43am.
      MARK.B | vBULLETIN SUPPORT

      TalkNewsUK - My vBulletin 5.6.3 Demo
      AdminAmmo - My Cloud Demo

      Comment


      • #4
        thank you so much Mark B.
        Now I want to use it on 2 point. First one is Vbadvanced Portal (2.2) and New Posts. How can I do it? Which Hook Location need I use? again Forumhome_complete? (sorry for bad english, just I want to use it on adv_home and New Posts Template)

        Comment


        • #5
          yes it works on forumhome but how can it works on adv_portal template?

          Comment


          • #6
            This needs to be taken over to vbulletin.org now.
            Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
            Change CKEditor Colors to Match Style (for 4.1.4 and above)

            Steve Machol Photography


            Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


            Comment


            • #7
              Originally posted by DavutPasha View Post
              thank you so much Mark B.
              Now I want to use it on 2 point. First one is Vbadvanced Portal (2.2) and New Posts. How can I do it? Which Hook Location need I use? again Forumhome_complete? (sorry for bad english, just I want to use it on adv_home and New Posts Template)
              For vBAdvanced, I think you'd need to take the code I posted (the first block, the plugin code) and make a module php file out of it, call it something like todposts.php, & upload that to the modules folder

              Then create a template with the other code in it called something like adv_portal_todposts.

              Then add the module manually through the vBa section of the admincp, specifying the file as todposts.php and the template as adv_portal_todposts

              That should work *in theory* but I have not tested it anywhere.

              For the getnew search the hook location would have to be something like search_results_start I think. Then you'd need to add $todtotal to the relevant template, such as search_results. Again, untested but it should work....

              Remember also, everywhere you add this will add one query to the page.
              MARK.B | vBULLETIN SUPPORT

              TalkNewsUK - My vBulletin 5.6.3 Demo
              AdminAmmo - My Cloud Demo

              Comment


              • #8
                Originally posted by Steve Machol View Post
                This needs to be taken over to vbulletin.org now.
                Apologies Steve, I shall comment no more
                MARK.B | vBULLETIN SUPPORT

                TalkNewsUK - My vBulletin 5.6.3 Demo
                AdminAmmo - My Cloud Demo

                Comment

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