![]() |
Chat Invitation
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 :D 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. |
User Control Panel Interface:
|
Who's Online Link:
|
The popup:
Note: The popup behaves exactly like the pm popup. If you click ok the first time to accept the invitation, a second box pops up. The OK button takes you to chat in a new window. The Cancel opens up chat in the current window. |
If you downloaded the attachment before I made this post, I just made the following addiction to the install instructions:
Code:
|
I just fixed it so that it shows who invited you. If you already installed, you only need to upload the new php file and replace the head_chatInvite template contents with the contents of the updated text file.
You will also need to run this query: ALTER TABLE `user` ADD `inviter` VARCHAR(50) NOT NULL; Amy |
Great amykhar :) We use Jpilot chat and ik can't figure out where to put the link in head_chatInvite template.
|
See where I have the link to chat.html? It's in two places in that template. That's where it would go.
Amy |
BTW, My chat room went from DEAD to jumping just because of this hack.
Amy |
Hm..i only see this: $bburl/inviteChat.php?action=accept but no chat.html or i overlooked it.
|
OOPS. You are correct. The url is in the inviteChat.php file. Gotta love beta documentation. Zip File has been updated.
Amy |
It works! :) As you mentioned this needs urgent adjustments to do this in the chat itself or in reach of you when chatting.
The top in the table is missing on the right... |
You found another documentation bug.
In the whosonline template Find: Code:
$online_pm Code:
<td bgcolor="{tableheadbgcolor}"><smallfont color="{tableheadtextcolor}"><b>Chat</b></smallfont></td> I have updated the zip. |
I wonder...it is possible to generate a who's online in other pages so maybe the same method could be used to display all the members online above the chat togheter with the chatlink?
|
Nucliion, I've got it working on my site. I used 2 other hacks to get things working. I used Tubedog's Who's online on an external page.
I also used this hack: https://vborg.vbsupport.ru/showthrea...ight=whos+chat I am not putting the files into the install or release because they are other people's work. However, I will tell you what I did. In Tubedog's hack, I made the names into links to the inviteChat.php script. (The same links as on the who's online page) I then modified the top frame of the other hack to include Tubedog's file and to display at the top of the screen. That works beautifully. It refreshes the who's online at the top of the chat page every 5 minutes. Amy |
Here is a screenshot:
|
The only hack i don't have is tubedogs hack but i can't see where and how without an example. If you have permission then i would like to test it further. ;) Tnx so far Amykhar.
|
There is one flaw. If the person doesn't see the popup cause they have just left the board, it pops up when they return and nobody is in chat. I am going to put another field in the database to mark the invitation time and clear it if it has been longer than 15 minutes.
Amy |
Cool hack m8. Does it work with other versions of vB?
|
Try it and see. I only have 2.2.9 installed. I am 99% sure that it does though.
|
I updated the hack to time out 15 minutes after the invitation. If you have already installed, you need to reupload the inviteChat.php file and you need to modify the global.php file with the changes in the new install.txt file.
Amy |
Hi,
I;m getting this error: Invalid SQL: UPDATE user set chatpopup=2,inviter='Admin' WHERE userid=1 near ''Admin' WHERE userid=1' at line 1 mysql error number: 1064 Date: Tuesday 18th of February 2003 02:44:06 PM Script: http://www.***/forums/forums/inviteC...nvite&userid=1 Referer: http://***/forums/online.php?s= I did run the sql queries Any idea why? Thanks in advance. Hp |
Hi,
Another use tried to click the link. The redirector says succesfull, but nothing is showing up at the other site. He doesnt get the sql error, but is redirected back to the who's online... Regards, Hp |
You are going to have to be a bit clearer in your explanation.
1. What other site? 2. When a user invites somebody to chat, after they issue the invitation, they are redircted to where they were. In this case, that is the who's online page. 3. If you look in the database right after the invitation is issued, you should see the chatpopup value is set to 2 and the inviter's name is also set. 4. The popup behaves just like the pm popup; so if the invitee is just sitting there not changing pages, nothing is going to happen. Amy |
Hi,
I mean with the other side, the one I want to invite. I checked the database, the value is set to 2 when invited. After a refresh the value is 1 again, The WhoInvited field is still filled. Looks like this works, but still no popup After an invitation the location in the Who's online shows: Unknown Location: /forums/inviteChat.php?action=invite&userid=7&s=55a46d28bf 59a2af802a2e7ab79b45d1 Thanks in advance, Hp |
Did you modify the headinclude template as directed in the instructions? If that isn't done, the box won't pop up.
Amy |
Hi,
No, didnt do anything with it, just reupped the original, but same thing happens. Regards, T. |
Hi,
Yes I did. I pmed u a login/pass if u want to look for yourself. Not sure if its of any use tho.. THanks, hP |
No, you didn't modify the headinclude template like you were supposed to? It might just be easier if you would send me your forum url via PM so that I can look instead of trying to debug your installation problem this way.
Amy |
Last 3 lines of my headinclude:
</style> $headnewpm $headchatInvite hp |
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. Amy |
Double checked all files,
they are exactly as in the install.txt... :ermm: I'll check once more tomorrow, maybe I'm just overlooking something at the moment... Thanks, hP |
Howsa bout adding an "Invite All" link?
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 would honestly never use an Invite All link and hesitate to add the possibility of more bugs. Sorry.
Amy |
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. :) |
So, it's the timeout function giving you guys grief?
|
Hi,
Thanks, will try this tonight and let u know! hP |
Hi,
That did the trick, its working now! Thanks both! hP |
Anyone knows if its possible to assign a normal location instead of the url showing in the location field in who's online?
hP |
for when you are in chat, attic?
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. Amy |
All times are GMT. The time now is 04:46 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|