The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Plugin PHP Code to show total number of members.
I am trying somr thing:
$t_members = $vbulletin->userstats['numbermembers'] + $vbulletin->options['t_stats_members']; where @ "$t_members" I am able to get the value i have added. But what i am not getting is $vbulletin->userstats['numbermembers'] total number of users. I have placed $t_members in header template just to test and its showing the added value but not getting total users value. I have tried this as well. $t_members = $numbermembers + $vbulletin->options['t_stats_members']; where @ $numbermembers i am getting total numers of users. But by combining this i am not getting. t members value + total members value : So any help please so i could get total users + t members. I searched a lot but nothing helps so posting here. |
#2
|
||||
|
||||
I don't believe this is valid - $vbulletin->userstats['numbermembers'] . Can you print that out on it's own? If not, then it isn't valid. (I don't think I've ever seen that variable used before.)
|
#3
|
||||
|
||||
Should look something like this
PHP Code:
|
#4
|
|||
|
|||
Trying this ..
$numbermembers = vb_number_format($vbulletin->userstats['numbermembers']); $t_members = $numbermembers + $vbulletin->options['t_stats_members']; " $numbermembers = vb_number_format($vbulletin->userstats['numbermembers']); " Nothing displaying on it.. still nothing ... |
#5
|
||||
|
||||
Can you paste the code you're using in your php file and template please?
|
#6
|
|||
|
|||
Redlinemotorsports Thanks a lot for your help...
Templates Code:
$numbermembers Code:
$fake_members Code:
Hook Location: global_start Code:
$fake_members = vb_number_format($vbulletin->userstats['numbermembers']) + $vbulletin->options['fake_stats_members'] ; $numbermembers = vb_number_format($fake_members); as i mentioned above @ "$numbermembers" in templates is showing total registered users value but at "$fake_members" is showing added fake value. What i am want to get is "$numbermembers" + "$fake_members" by using either on these $fake_members or $numbermembers veriab is templates. Once again "Redlinemotorsports" thanks a lot boss. |
#7
|
||||
|
||||
Ok, so to clarify and get some things sorted, you have BOTH values (Registered Users and Fake Users) showing up in the templates? You just want to combine the 2 values?
|
#8
|
|||
|
|||
Right sir i am getting both of these values in templates but not getting,
"$numbermembers" + "$fake_members" That's all i want to get. |
#9
|
||||
|
||||
Try this:
PHP Code:
|
#10
|
|||
|
|||
To make it more clear by using
Code:
$fake_members Code:
$fake_members = number_format($numbersmembers['users']) + $vbulletin->options['fake_stats_members'] ; --------------- Added [DATE]1246918984[/DATE] at [TIME]1246918984[/TIME] --------------- SHowing just a 0. So bottom line didn't work. Quote:
huuuh? |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|