vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Forum Stats below nav (https://vborg.vbsupport.ru/showthread.php?t=256201)

Xtrato 12-30-2010 04:37 PM

Forum Stats below nav
 
im trying to display the forum statistics somewhere around the navigation.. i thought putting this :
Code:

    <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/showt...uot-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

1 Attachment(s)
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

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!.


All times are GMT. The time now is 11:13 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.00974 seconds
  • Memory Usage 1,725KB
  • 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
  • (8)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