Version: 1.00, by amykhar
Developer Last Online: Nov 2013
Version: 2.2.x
Rating:
Released: 02-15-2003
Last Update: Never
Installs: 11
Is in Beta Stage
No support by the author.
OK. This one was by request. It is most definitely in Beta.
This Hack puts a link on the Who's Online page that if clicked, invites the user to chat in your forum chat room.
1. You will have to do some customization to make this work for your chat system.
2. This is a manual install. Don't go anywhere near it if you don't know how to run queries, update files, create templates, etc.
3. I will support bugs and possibly add new features. However, I will not teach hacking basics in this thread.
Know Issues:
a) Resolved.
b) Currently, the only invitation link is on the Who's Online page. I will probably add it to the user profile later.
c) You are probably going to want to create an invitation icon to use instead of the text link I have. Feel free to share with the rest of us
Features:
a) User Control Panel interface allows members to turn off chat requests.
b) Shows who invited you to chat.
ScreenShots to Follow in subsequent posts.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
The javascript is not in the code on your page. Therefore, you have one of a few problems:
1. You didn't do the head include, but the source you showed me shows that you did.
2. You didn't modify global.php so it's not calling the popup box
or
3. You didn't modify functions.php to put the call to the function in the body
or
4. You didn't put in the new popup templates.
I am not seeing any sql errors, and you say the values are getting updated in the database. So, I believe the invitation part is working on the inviter side.
This wouldn't always be practical, of course, but if there are only a handful of people online, and I wanna invite them all, a single click would be nice.
I had a similar issue with the hack: The pop-up box just wouldn't show up after I invited myself to chat.
What was actually happening was that the chat invite javascript was not loading into the head of the file. Yes, the template existed and yes, I'd made every change to the other four PHP files.
I checked the database and the changes I made to my account in the UserCP were working properly when I enabled and disabled pop ups for chat.
I finally got it to work when I commented out the following in global.php:
---------
$headchatInvite='';
if ($bbuserinfo['userid']!=0 and $bbuserinfo['chatpopup']==2) {
if ($noshutdownfunc) {
$DB_site->query("UPDATE user SET chatpopup=1 WHERE userid=$bbuserinfo[userid]");
} else {
$shutdownqueries[]="UPDATE LOW_PRIORITY user SET chatpopup=1 WHERE userid=$bbuserinfo[userid]";
}
// $cutTime = time()-(15*60);
// if($bbuserinfo[invitetime] > $cutTime){
$chatInvite=1;
eval("\$headchatInvite = \"".gettemplate('head_chatInvite')."\";");
// } else {
// $chatinvite=0;
// $headchatInvite ="";
// }
}
-----------
So, obviously - I'm not getting the benefits of the timer functionality and - well - I was hoping to leave any solution up to you.
That depends on which chat hack you are using and isn't in the scope of this hack. If you mean while the person is inviting somebody, they are only there for seconds. I am not sure it is worth the effort to put that in who's online.