View Full Version : Forum Stats below nav
Xtrato
12-30-2010, 04:37 PM
im trying to display the forum statistics somewhere around the navigation.. i thought putting this :
<dl>
<dt>{vb:rawphrase threads}</dt>
<dd>{vb:raw totalthreads}</dd>
<dt>{vb:rawphrase posts}</dt>
<dd>{vb:raw totalposts}</dd>
<dt>{vb:rawphrase members}</dt>
<dd>{vb:raw numbermembers}</dd>
</dl>
would do the job, but it doesnt , any ideas ?
thanks
oh by the way , this information will go in navbar template..
I found this , but it only works for the header...
http://www.vbulletin.com/forum/showthread.php/347256-How-to-display-stats-from-quot-What-s-Going-On-quot-in-header?
Thanks
Xtrato
01-05-2011, 04:01 PM
Hi does anyone have an idea of how i can achieve such results?
thanks!
Lynne
01-05-2011, 04:09 PM
Those variables are most likely not available for use where you are trying to use them. Those variables are defined at the very bottom of the forum.php page. What template are you putting that code into? And is that template rendered before or after those variables are defined?
Xtrato
01-06-2011, 07:31 PM
Hi there Lynne , thanks for your imput on the matter... the template would be the navbar
SS is attached:
I will probably have to call them globally ,as they will be displayed in most of the pages , im just not quite sure how to accomplish that , i know they need to be placed in head include or something of that nature , but any help would be grateful
Regards
Lynne
01-06-2011, 09:52 PM
Have you preregistered any of the variables for use in the navbar template?
Have you added any of the code that spits out the variables into a plugin?
You need to do both of those things in order for that to work.
Xtrato
01-07-2011, 02:15 AM
hmm no , actually i wouldnt really know how to do that , is it difficult ,or where can i find more info on how to achieve such things .
Thanks
Lynne
01-07-2011, 02:48 AM
Cellarius wrote a really good article for help on preregistering the variables - [vB4] Rendering templates and registering variables - a short guide (https://vborg.vbsupport.ru/showthread.php?t=228078)
As for writing a plugin, there are articles in the articles forums for that or the manual shows the basics - http://www.vbulletin.com/docs/html/add_plugin
I've always found the best way to start is to download a simple product and read their code to see how they did things.
Xtrato
01-07-2011, 07:19 PM
ok thanks ,i'll let you know how it goes!.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.