![]() |
$totalonline, $numbervisible, $numberguests in navbar?
I added the code in red to my navbar template:
Code:
<strong><phrase 1="$bbuserinfo[username]" 2="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[welcome_x_link_y]</phrase></strong><br /> But when I view the page, it shows up as follows: Online Users: 217 ( members and guests) - notice it's not getting the values for members and guests. What else do I need to add to display those values? Thanks for the help guys. |
You would need to add a plugin that then has the code that creates those variables for you. The code is on the bottom of the index.php page (if I recall correctly).
|
Thanks for the help, Lynne. I'm confused. I tried creating a new plugin with a hook location of global_start and the following code...
Code:
$activeusers = ''; ...but it didn't work. No doubt I don't quite understand plugins well enough, but I'm learning! :) |
I hope you didn't do that on a live site cuz my guess is you have zapped your max logged in users now.
The best thing you can do is start troubleshooting it by spiting out variables and see exactly what is going through there. Do you know if your code went through the if or else path? Find that out first. Then start doing other little things to find exactly what is going on. |
Uh oh, zapping sounds bad. Site works fine, though. :shrug: Here's an excerpt from my navbar template, looks like it's going through the if path? If that's what you mean.
Code:
<if condition="$show['member']"> I found this post on vbulletin.com. Would this accomplish what I'm trying to do? For example would I be able to paste this code... Code:
$db->free_result($forumusers); ...somewhere in global.php? Usually I can figure these things out pretty quickly but this one is proving elusive. I must be missing something. LOL |
All times are GMT. The time now is 06:12 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|