vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How do I display registered members (https://vborg.vbsupport.ru/showthread.php?t=162138)

Bit 11-07-2007 02:18 PM

How do I display registered members
 
I want to display only the registered members at the top of my forum home. I know it's located at the footer, but I just want to display that only as well on the header....

Example Members: 157

Anyone?

djdonx 11-07-2007 03:40 PM

Code:

$vbphrase[members]: $numbermembers<if condition="$show['activemembers']">
Paste that wherever you need it....

Opserty 11-07-2007 03:42 PM

I think your missing some code there dj...

EnIgMa1234 11-07-2007 03:43 PM

Why have you got an if condition in there?

Bit 11-07-2007 04:41 PM

Explain? I believe the if tag is missing

Lynne 11-07-2007 04:52 PM

Just ignore the if tag. It's for the (incomplete) code if you want to show active members also. Just use "$vbphrase[members]: $numbermembers"

Bit 11-07-2007 04:57 PM

no pasted in my forum header to no avail.......

"$vbphrase[members]: $numbermembers"

--------------- Added [DATE]1194461963[/DATE] at [TIME]1194461963[/TIME] ---------------

All I want to show in my header is Active or Members=1409

I tried and do appreciate your input, just need a working solution.

Brandon Sheley 11-07-2007 05:01 PM

Doesn't your forum already say this in the "who's online" ?

I'd search for the code down there, but what Lynn posted, should work

dyna88 11-07-2007 05:03 PM

Wouldn't you leave out the quotes, like this.

HTML Code:

$vbphrase[members]: $numbermembers

Lynne 11-07-2007 05:05 PM

Quote:

Originally Posted by dyna88 (Post 1377874)
Wouldn't you leave out the quotes, like this.

HTML Code:

$vbphrase[members]: $numbermembers

Yes, you would leave out the quotes that I posted. I was just being lazy and writing it inline instead of with code/html tags.

Bit 11-07-2007 05:09 PM

Quote:

Originally Posted by Loco.M (Post 1377872)
Doesn't your forum already say this in the "who's online" ?

I'd search for the code down there, but what Lynn posted, should work

Yes, read thread, there you go!

--------------- Added [DATE]1194462682[/DATE] at [TIME]1194462682[/TIME] ---------------

I pasted this in header $vbphrase[members]: $numbermembers the output i get is Members: no number. Should be Members: 1300

Peter85 11-07-2007 08:38 PM

The code that sets the $numbermembers variable to the right digit is at the end of the index.php file and as the header template is being parsed in the global.php file (witch is included in the beginning of the index.php file) there is no way that simply including that variable in the template will do any good.

To make it work you need to run some code that sets that variable before it is being used. I think the parse_templates hook would work. You add the code to it by using the plugin manager in the admincp.
I think this code will do the trick, however i havnt tested it.

Code:

// get total members and newest member from template
$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']);
$newusername = $vbulletin->userstats['newusername'];
$newuserid = $vbulletin->userstats['newuserid'];
$activemembers = vb_number_format($vbulletin->userstats['activemembers']);
$show['activemembers'] = ($vbulletin->options['activememberdays'] > 0 AND ($vbulletin->options['activememberoptions'] & 2)) ? true : false;



All times are GMT. The time now is 07: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.01609 seconds
  • Memory Usage 1,734KB
  • 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
  • (2)bbcode_html_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (12)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