vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Total members registered in showthread template (https://vborg.vbsupport.ru/showthread.php?t=286573)

Jaffery 08-12-2012 04:19 PM

Total members registered in showthread template
 
HI,

I want to show how many registered members my forum have on SHOWTHREAD template, so how do I show it ?

Jaffery 12-16-2012 01:18 PM

Any help for v4.2 for this ?

I guess its rightly to bump this thread..

mokujin 12-16-2012 02:23 PM

You mean this on FORUMHOME?
Members: 488,651, Active Members: 14,718

Jaffery 12-16-2012 04:51 PM

Not really, I am actually looking to say something on Showthread to guest..

Join community of 40382+ members and counting ....

preferably in area where we say welcome guest.... login or join ... blah blah..

kh99 12-16-2012 05:40 PM

If you create a plugin using hook location init_startup and code like this:
Code:

$new_datastore_fetch[] = 'userstats';

The you should be able to use {vb:raw vbulletin->userstats.numbermembers}

If you want the number formatted with commas, then you need another plugin. Maybe at hook showthread_complete and code like:

Code:

$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']);
vB_Template::preRegister('SHOWTHREAD', array('numbermembers' => $numbermembers));

and then in the template use {vb:raw numbermembers}.

Jaffery 12-16-2012 07:03 PM

Thanks, though I have decent knowledge of PHP and related thing, I am almost NIL in vbcoding and template system.

Is there any quick guide etc to learn vb template and plugin system ?

EDIT.
Thanks, I got it working as was trying to play Add new plugin thing..


All times are GMT. The time now is 08:17 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.00960 seconds
  • Memory Usage 1,715KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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