Previous Thread
Next Thread
Print Thread
Rate Thread
#241702 03/28/2003 4:06 PM
Joined: Jan 2003
Posts: 250
Member
Member
Offline
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:


Code
 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:

Code
 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
Sponsored Links
Entire Thread
Subject Posted By Posted
Setting WOL location easily Raconteur_dup1 03/28/2003 11:06 PM
Re: Setting WOL location easily Slawek_L 03/29/2003 1:48 AM
Re: Setting WOL location easily Raconteur_dup1 03/29/2003 2:39 AM
Re: Setting WOL location easily msula 03/29/2003 2:56 AM
Re: Setting WOL location easily Raconteur_dup1 03/31/2003 9:36 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Shock Hosting
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,834
Joined: January 2000
Forum Statistics
Forums63
Topics37,583
Posts293,955
Members13,824
Most Online151,614
Nov 14th, 2025
Today's Statistics
Currently Online 1731
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 20
Top Posters
AllenAyres 21,080
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2026 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260108)