PDA

View Full Version : Variables not displaying! (such as $totalthreads)


pianoman993
10-31-2008, 09:39 PM
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

<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 (https://vborg.vbsupport.ru/forumdisplay.php?f=187)

And this may be a good starting article - vBulletin 3.5 Tutorial Index (https://vborg.vbsupport.ru/showthread.php?t=99570). 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?