Version: , by Gutspiller
Developer Last Online: Nov 2013
Version: Unknown
Rating:
Released: 03-04-2002
Last Update: Never
Installs: 0
No support by the author.
How would I do this? It's a php news file ( http://www.theforumz.com/forumz/frontpage.php ), but I want to use some fo the variables in VB to call numbers and features, like getting the number of people that are online. (I have FireFly's lil' hack) or getting a PM box on the page, etc. I try it and instead of grabbing the variable, it just shows the variable text instead of getting it. Do I need to require certain VB files inorder to get this to work?
If somebody can help me, I would greatly appreciate it.
Thanks!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
If you want to know what code the $headeronline var calls here are the instructions written by you.
Code:
************************************************
** Number of online users in header / footer! **
************************************************
1. Add the following code to your phpinclude template (PHP-Parsed code):
************************************************************
// start - get online users (hack by firefly)
$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");
$headerguests=$headerguests[count];
$headerusers=$headerusers[count];
$headeronline=$headerguests+$headerusers;
// end - get online users (hack by firefly)
************************************************************
2. Save the template changes.
3. Place $headeronline wherever you want in either your header or footer templates to show number of online users. In addition, you can also use $headerguests to show number of online guests, or $headerusers to show number of online members.
Enjoy the hack. :-)
OK, well since I am still a complete noob and I have no idea what "echoing" even means, it's hard to answer your questions.
If you want to know how I am using it in my forum in my
forumdisplay_threadslist
file I added this line: <a href="http://www.theforumz.com/forumz/online.php"><b> $headeronline </b></a> Currently Online Users
Other than that I have given you everything I have done. The way I put it in the misc. php file that's in my forum directory, the instructions on how I got the users to be in a var from your instructions, the pages themselves, how I put it into forum pages.
If you want more you will have to convert your speaking to newbie terms, because I still don't understand. Is all I want it to do is make is to that my misc php file that I have in my forum directory to act like my forum templates and when I type $headeronline in my misc php file I don't want it to show "$headeronline", I want it to actually go get the number of people that were online.
Can you please help me to understand what you are saying and what I need to do?