Log in

View Full Version : Moving "Currently Active Users" from FORUMHOME to FOOTER


tjnugent
09-01-2004, 04:20 AM
I'm modifying a vB setup in a relatively radical way; at the end of the day, it will be spartan and look very different from 'normal' vB setups. One thing I've been asked to do is move the "Currently Active Users" (the 'loggedinusers' list) out of the "What's Going On" box (which is being deleted) and down to the FOOTER section, right above the "Contact Us - FAQ - etc." bar.

The weird thing is that the code works fine when it's in the FORUMHOME template, but it doesn't when it's in the FOOTER template. When it's in FOOTER then all the variables are missing. So instead of saying "Most users ever online was 5, 08-28-2004 at 05:48 PM." like it should, it says "Most users ever online was , at ." Which is really annoying. In fact, if I leave the exact same code in both the FORUMHOME and FOOTER at the same time, then it displays properly up in the FORUMHOME section but not in the FOOTER SECTION.

When I say "same code" I'm referring to everything between the <!-- logged-in users -->
...
<!-- end logged-in users --> comments.

Does anyone know why this is happening?? I thought that all $ variables, such as: <phrase 1="$recordusers" 2="$recorddate" 3="$recordtime">
$vbphrase[most_users_ever_online_was_x_y_at_z]
</phrase>
<div>$activeusers</div> would be evaluated no matter where which template they occur in. Why is it happening? How can I get around this apparent limitation??

rake
09-01-2004, 10:13 AM
the footer template is being evaluated before those variables are given values, somewhere in global.php i think. You can try moving the whole WOL part out of index.php to global above the spot where the footer template is evaluated.

tjnugent
09-01-2004, 03:25 PM
You can try moving the whole WOL part out of index.php to global above the spot where the footer template is evaluated. Oh, OK. I'd rather not make changes to the PHP pages themselves, so I'll look into other ways of achieving the effect we want.

Thanks for the info!

Zachery
09-01-2004, 03:34 PM
Oh, OK. I'd rather not make changes to the PHP pages themselves, so I'll look into other ways of achieving the effect we want.

Thanks for the info!
Its going to be near impossible without editng some php to accompish what you want.