vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Today's Posts on forumhome (number). (https://vborg.vbsupport.ru/showthread.php?t=79465)

Deaths 04-05-2005 10:00 PM

Today's Posts on forumhome (number).
 
A couple of my members requested this hack, so I created it, and decided to share it with you guys :).

What does this hack do?
This hack will display the number of posts made today.

Misc Info:
The "today" text linksto search.php?do=getdaily, for your lazy members ;)
Creator: Deaths
Support is given in Hack's Thread, or preferably at vBadditions.com (when its back up).
Live Demo: http://board.xgnews.org/?styleid=1

The attached .zip contains an install file, for those who would like a copy.

Here we go:

Open up /index.php, and find:
PHP Code:

$userstats unserialize($datastore['userstats']);
$numbermembers vb_number_format($userstats['numbermembers']);
$newusername $userstats['newusername'];
$newuserid $userstats['newuserid']; 

Bellow, add:

PHP Code:

// START POSTS TODAY ON FORUMHOME HACK
$starttime mktime(000date('m'), date('d'), date('Y'));
$newposts $DB_site->query_first("SELECT COUNT(*) AS count FROM " TABLE_PREFIX "post WHERE dateline >= $starttime");
$poststoday vb_number_format($newposts['count']);
// END POSTS TODAY ON FORUMHOME HACK 

Save, Close & Upload.

Now, open up the TEMPLATE FORUMHOME.

Find:
HTML Code:

$vbphrase[posts]: $totalposts
REPLACE with:
HTML Code:

$vbphrase[posts] (<a href="search.php?do=getdaily">$vbphrase[today]</a>): $totalposts ($poststoday)
That's it, you're done!

If you use this hack, please click INSTALL!

Deaths 04-06-2005 11:08 AM

Reserved for... oh well, its here, live with it :p.

xtreme-mobile 04-06-2005 04:33 PM

works great on my forum using 3.0.6 :)

thanks

*clicks install*

Deaths 04-06-2005 05:08 PM

Glad to hear it works on 3.0.6 aswell :).

Zachery 04-06-2005 05:14 PM

Going to kill any large instaltions, also you are not adding any index to help with the query time.

Deaths 04-06-2005 05:15 PM

Hmm, didn't think about that yet.

I created it for my rather small board, so I didn't mind those things.

What would your suggestion be on this code?

Zachery 04-06-2005 05:17 PM

Add an index on dateline.

Deaths 04-06-2005 05:19 PM

Ok, I'll change it when I get some time.

boeserwolf 04-10-2005 06:03 PM

Hi


I wanted to ask if it is okay for you if I would translate your hack into german.


2.) Would you mind if I would post the translation at www.vbhacks-germany.com

I promise only licensed vB members may download add-ons from our board.


If that?s not okay for you I would post the translation here in thread


Yours


Markus

Zachery 04-10-2005 08:36 PM

Quote:

Originally Posted by boeserwolf
Hi


I wanted to ask if it is okay for you if I would translate your hack into german.


2.) Would you mind if I would post the translation at www.vbhacks-germany.com

I promise only licensed vB members may download add-ons from our board.


If that?s not okay for you I would post the translation here in thread


Yours


Markus

Markus, how can you do promise that only licensed members will be able to download?


All times are GMT. The time now is 07:00 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01172 seconds
  • Memory Usage 1,748KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete