Why not make it possible for anyone to click on the users name and send them a message. The next time they do any vB function the session table or another table detects that they have a IM waiting for them.. and voila .. a pop up window displays the message.
Possible I think.
Any ideas?
Shri
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Private Messaging is planed for the summer release.. this shouldn't be hard to add once that's in if it's not built directly in. The other option is WWWThreads had a new message or no new messages indicator on every page...
Yeah, but i think Shri means actual <i>instant</i> messeging; i.e. a messege will pop up *right* when recieved.
Yet, the only problem with that is that PHP can't do anything real-time, if you know what i mean. Everything PHP does is sent out as HTML and HTML can't do anything like Java can with real-time stuff, thus taking away some of the instantness. But everyone hates Java (at least i do. ;P) and it's *extremely* slow.
What we would need is something that is already in the HTML code and that thing itself would modify. Anything that can be streamlined (like movies) would work. But, that's another bad idea, too. ;P
A gif that changes when a new messege appears could work, but it's still not great. Rather crappy, too.
But all of this hassle for instant messeging would bring below par product which itself is rather useless also. Why would you need *instant* and private messeging at a public messege board? It's supposed to be a place to post you thoughts publically.
Its hardly a hack I just ripped it out of index.php and it worked!
Code:
<?
require("global.php");
if ($displayloggedin==1) {
$datecut=time()-$cookietimeout;
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session");
$totalonline=$loggedins[sessions];
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid=0");
$numberguest=$loggedins[sessions];
$loggedins=$DB_site->query_first("SELECT COUNT(sessionid) AS sessions FROM session WHERE userid<>0");
$numberregistered=$loggedins[sessions];
$numbervisible=0;
$loggedins=$DB_site->query("SELECT DISTINCT user.userid,username,location FROM user,session WHERE session.userid=user.userid AND session.userid<>0 AND invisible=0 ORDER BY username");
if ($loggedin=$DB_site->fetch_array($loggedins)) {
$numbervisible++;
$userid=$loggedin[userid];
$username=$loggedin[username];
$location=$loggedin[location];
eval("\$activeusers .= \"".gettemplate("loggedinuser")."\";");
while ($loggedin=$DB_site->fetch_array($loggedins)) {
$numbervisible++;
$userid=$loggedin[userid];
$username=$loggedin[username];
$location=$loggedin[location];
eval("\$activeusers .= \", ".gettemplate("loggedinuser")."\";");
}
}
$numberinvisible=$numberregistered-$numbervisible;
eval("\$loggedinusers = \"".gettemplate("loggedinusers")."\";");
}
echo $loggedinusers;
?>
Why? Well, why not... after all we all try to make the site sticky ... a lot of the members atleast on my site do not leave their e-mail address open for viewing.
Not a perfect solution .. and it might get annoying also let me think about this!