vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vbStats (https://vborg.vbsupport.ru/showthread.php?t=30751)

JTMON 11-16-2001 09:28 PM

ok but lets say I wanted what you have in my index.php, when I put it in I get the parse error. Where would I put it to get it to show below the newest member text?

SWFans.net 11-16-2001 09:33 PM

Just add this to index.php right above the "// get newest member" section:


PHP Code:

// Total Thread Views
$boardviews=$DB_site->query_first("SELECT SUM(views) AS threadviews FROM thread");
$totalviews=number_format($boardviews['threadviews']);

// ########## Visits Today
$vbs_atviews $DB_site->query_first("SELECT count FROM vbstats_date WHERE date = '$vbs_date'");
$todayviews number_format($vbs_atviews[count]);

// Today [FireFly]
$getpoststoday=$DB_site->query_first("SELECT count(*) AS count FROM post WHERE dateline>='$tltoday'");
$poststoday=number_format($getpoststoday[count]);
$getthreadstoday=$DB_site->query_first("SELECT count(*) AS count FROM thread WHERE dateline>='$tltoday'");
$threadstoday=number_format($getthreadstoday[count]); 

Once that is there, then you can call the variables from the forumhome template. the variables it makes available are:

Code:

$totalviews
$todayviews
$poststoday
$threadstoday


Princeton 11-17-2001 12:53 AM

I have vbportal and I would like to add TOP POP REVIEWS and NEW REVIEWS to vbstats. How can I do this?
thank you

Bane 11-17-2001 01:12 AM

Interesting Idea. I will work on this in a minute and see if I cant get it to do what you want.

Bane 11-17-2001 01:20 AM

Or not.. I see SWFans.net has already :p For the Top Pop Reviews and such the code is in the top.php file I believe, you could just copy the code from there.

Bane 11-17-2001 03:28 AM

OK, I was a bit bored and decided to add this into the next version :D Here is an example.

Bane 11-17-2001 03:29 AM

For those of you who dont wish to wait for the next version instructions follow:

edit: attachment deleted. added on next page

Princeton 11-17-2001 04:37 PM

My $linkqueue and $navbar menu just disappeared. How can I get it back?

UPDATE: It's fixed.

|DarkManX| 11-17-2001 05:35 PM

Quote:

Originally posted by Bane
For those of you who dont wish to wait for the next version instructions follow:

getting a database error when i install this addon......

SWFans.net 11-17-2001 08:58 PM

I decided to remove the last 24 hour stats from my index.php and from my forumhome template. It was causing the load time of my main page to be about double, if not a little more, than without. 4 extra DB queries make a big difference there. @_@


All times are GMT. The time now is 01:41 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.02004 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (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