vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help displaying Total Members (https://vborg.vbsupport.ru/showthread.php?t=232471)

mariohn 01-07-2010 05:22 PM

Help displaying Total Members
 
I am having dificulties displaying a few variables on my forums. I want to display the total number of members, thread, post, and number of people online on a side bar of my forums, whenever i use the variables it doesn't work. Here is what i am using

Code:

<li>Forum Members: <strong>$numbermembers</strong></li>
<li>Total Threads: <strong>$totalthreads</strong></li>
<li>Total Posts: <strong>$totalposts</strong></li>


mariohn 01-09-2010 04:24 PM

No help? Anybody knows how to accomplish this?

Lynne 01-09-2010 05:42 PM

Where are you putting that code? And what hook location are you using for the plugin that defines those variables? And what is the code you put in that plugin?

mariohn 01-09-2010 09:49 PM

Lynne if you visit www.webdevplace.com you will see the statistics block to the left and that is where I am trying to put the information. I am not using any plug in

Lynne 01-09-2010 10:34 PM

It should display just fine if you use it in your FORUMHOME template then. That's where the variable is used already, so moving it around in that template should be fine. If that is NOT in your FORUMHOME template, then you need to look at when/where that template is evaled. If you look at the file index.php, you'll see those variables are not defined until the very end of the file and will not be available for any template that is evaled prior to the forumhome_complete hook.

mariohn 01-10-2010 02:06 PM

the code for the forum statistics is on the header and that maybe why its not displaying, how can i accomplish displaying this if the code is not on the forumhome template

Lynne 01-10-2010 02:59 PM

You'd have to create a plugin to create all those variables at an earlier time than they are currently done. Copy (and delete) the code from where it currently is in the index.php page and put it in a plugin that is evaled prior to the templates being rendered.


All times are GMT. The time now is 06:39 AM.

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.01054 seconds
  • Memory Usage 1,719KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete