|
|
Joined: Jan 2003
Posts: 250
Member
|
|
Member
Joined: Jan 2003
Posts: 250 |
Hi gang, One of the things I really like about WOL is that it gives a great sense of the expansiveness of a site, so we try to track where users are pretty heavily. Sometimes the default mechanism of loading the name of the PHP file into the online table is not enough. For instance if you use PPPro, the PHP entry point is "index", which to WOL looks like you are at the entrance of your site. So, here is a little snippet of code you can add to your ubbt.inc.php file to set where you are in a single line. Just be sure to add the same string you pass as $Where to your online.php languages file. If you are running JustDave's OnlineInfo mod, use this one: function set_site_loc($Where) { <br /> global $dbh, $Username, $Usernumber, $config; <br /> <br /> $currtime = time (); <br /> $currtime = $currtime+($config['adjusttime']*3600); <br /> <br /> $Username_q = addslashes($Username); <br /> $Where_q = addslashes($Where); <br /> $Usernumber_q = addslashes($Usernumber); <br /> $IP = addslashes(find_environmental ("REMOTE_ADDR")); <br /> $aux = ""; <br /> $readperm = ""; <br /> $query = " <br /> REPLACE INTO {$config['tbprefix']}Online <br /> (O_Username,O_Uid,O_Last,O_What,O_Extra,O_Read,O_Type,O_IPaddy) <br /> VALUES ('$Username_q','$Usernumber_q','$currtime','$Where_q','$aux','$readperm','r','$IP') <br /> "; <br /> echo "Q = $query<p>"; <br /> $dbh -> do_query($query); <br />} If not, use this: function set_site_loc($Where) { <br /> global $dbh, $Username, $Usernumber, $config; <br /> <br /> $currtime = time (); <br /> $currtime = $currtime+($config['adjusttime']*3600); <br /> <br /> $Username_q = addslashes($Username); <br /> $Where_q = addslashes($Where); <br /> $Usernumber_q = addslashes($Usernumber); <br /> $aux = ""; <br /> $readperm = ""; <br /> $query = " <br /> REPLACE INTO {$config['tbprefix']}Online <br /> (O_Username,O_Uid,O_Last,O_What,O_Extra,O_Read,O_Type) <br /> VALUES ('$Username_q','$Usernumber_q','$currtime','$Where_q','$aux','$readperm','r') <br /> "; <br /> echo "Q = $query<p>"; <br /> $dbh -> do_query($query); <br />} Have fun!!!
"Some dream of doing great things, while others stay awake and get on with it." -- Anonymous
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 5,834
Joined: January 2000
|
|
|
Forums63
Topics37,583
Posts293,955
Members13,824
| |
Most Online151,614 Nov 14th, 2025
|
|
Currently Online 1731
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 20
|
|
|
|