vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Variables not displaying! (such as $totalthreads) (https://vborg.vbsupport.ru/showthread.php?t=195102)

pianoman993 10-31-2008 09:39 PM

Variables not displaying! (such as $totalthreads)
 
Hello, I am having a really hard time getting variables like $totalthreads are not displaying anywhere but the homepage!! I have tried and tried to resolve this issue but could not find what was causing the variables to become hidden but to no avail. Something interesting however was that one of the variables, $totalthreads, would display it's value when the user when go to the Control Panel main screen (but no where else).

Here are the variables that specifically are not showing

Code:

<span class="lhbt">Total Threads:</span> $totalthreads<br />
<span class="lhbt">Total Posts:</span> $totalposts<br />
<span class="lhbt">Registered members:</span> $numbermembers<br />

If anyone has ANY ideas on how to resolve this issue I would be forever in your debt!

Thank you to anyone who read this,
Mark

Lynne 10-31-2008 10:58 PM

The variables need to be available in other areas in order to show them. You can't show them on, say, the showthread page because there is no such variable called $totalthreads on that page unless you code there to be that variable. You will need to make a plugin that determines these variable values in order to use them on other pages.

pianoman993 10-31-2008 11:22 PM

Thank you for your input. Are there any tutorials available where I can begin to understand how to create a plugin in order to display variables?

- Mark

Lynne 11-01-2008 12:04 AM

This is always a great place to start for tutorials - vBulletin Articles

And this may be a good starting article - vBulletin 3.5 Tutorial Index. I know it says 3.5, but plugins haven't changed much since they were introduced in 3.5

tbathgate 11-11-2008 10:23 AM

Did you ever resolve this issue.

I have the same problem, and tried those links but couldn't find anything of use, I'm not a php programmer so don't really understand how the variables are restricted to one template and not available for all of them?


All times are GMT. The time now is 11:48 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.01047 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
  • (5)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