View Full Version : template stuff
Snake~eyes
11-06-2001, 05:30 PM
There's two things I want to do.
1sts. I want to show the private msgs and Who's online in every forum. Not just the index forum page.
I want it to show what avatar they're using, like here. But I am dumb so I don't know. But with this I am still trying to figure out how to get a default avatar?
That's it.
Help is appreciated.
Admin
11-06-2001, 05:37 PM
[QUOTE]Originally posted by dhogan444
I want it to show what avatar they're using, like here. But I am dumb so I don't know. But with this I am still trying to figure out how to get a default avatar?
Snake~eyes
11-06-2001, 06:03 PM
So say I want to call that variable on a non vb page. How would i do that?
Originally posted by FireFly
For this see this thread:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=32153
As for Who's Online and PM stats on each page, doing this will add some decent queries to each page (since you're putting this in the header), so I don't know of any easy way of doing this.
This is what I have for the "xx online users" on this site.
I added this in global.php:
// get online users
$datecut=time()-$cookietimeout;
$headerguests=$DB_site->query_first("SELECT COUNT(*) AS count FROM session WHERE userid=0 AND lastactivity>$datecut");
$headerusers=$DB_site->query_first("SELECT COUNT(DISTINCT(userid)) AS count FROM session WHERE session.userid>0 AND session.lastactivity>$datecut");
$headeronline=$headerguests[count]+$headerusers[count];
right before this:
$header='';
$footer='';
Now I use $headeronline in my header template to show the number.
So is this the code you used on this page? at the top left? If not, let's start a release for that one :D
Admin
11-16-2001, 11:16 AM
[QUOTE]Originally posted by LuBi
So is this the code you used on this page? at the top left? If not, let's start a release for that one :D
All I can say is love brotha, your amazing! Thanks!
Will you be upgrading to 2.2.1?
Admin
11-16-2001, 06:06 PM
Yeah, I'm doing it as we speak. :)
Originally posted by FireFly
Yeah, I'm doing it as we speak. :)
Well if your doing it I think I'm going to do it, I didn't know because of all my hacks but I guess I can give it a try.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.