funny you should ask.... I've been playing with this for hours.
There was a hack posted at the photo post site... which I haven't quite got working yet... but it said to add this into all your pages.... change the name of the O_What write for each page... and then add those words to your online.php language file.
Here's the code:
code:
$link = mysql_connect("localhost", "dbuser", "password") or die ('I cannot open the UBBThreads database.');
mysql_select_db ("threadsdb",$link)or die("Could not connect to UBBThreads database");
if ( IsSet($w3t_myname) ) $username = $w3t_myname;
if ( IsSet($w3t_myid) ) {
$query = "SELECT U_Username FROM w3t_Users WHERE U_Number=$w3t_myid";
$queryv = mysql_query($query,$link);
$results = mysql_fetch_array($queryv);
$username = $results[0];
}
if ( $username == "" ) {
$IP = $HTTP_SERVER_VARS{'REMOTE_ADDR'};
$username = "-ANON-$IP";
$status="a";
}
else $status="r";
$last = time();
$query = "REPLACE INTO w3t_Online
(O_Username,O_Last,O_What,O_Extra,O_Read,O_Type)
VALUES ('$username','$last','photopost','','','$status')";
$queryv = mysql_query($query,$link);
mysql_close( $link );
You have to substitue in database name, username and password. Then towards the bottom where it says 'photopost' you put whatever you want there, then add into your language file.
BUT... what isn't working for me is the $last
I don't get an entry into the table. But if I manually put a number there (within 10 minutes) then it works.... so I don't know if the time(); is what Threads is looking for.
When I look at the O_Last field with myphpadmin the time is a big long number which I don't quite understand.
If anyone knows how to tweak this to make it work... you could use it in any PHP page. Even if you aren't sending the threads headers.