PDA

View Full Version : Chat Modifications - Dream's Chatbox


Pages : [1] 2 3 4

Dream
11-06-2006, 10:00 PM
This adds a simple Chatbox in your forum home page for your members to chat.

The Chatbox is like a thread, members leave small messages in it for others to see. Think of it as an off-topic thread that never ends. The Chatbox can also help keep chatting out of the threads.

This mod is light on the server, uses little server resources to work. The default refresh rate is set to 5 minutes. You can disable automatic refreshing entirely in the options.

What's the refresh rate? The chatbox updates the messages shown every given seconds, that's the refresh rate. It sends a request to the server asking for new messages every X seconds, that you choose in the options.

Warning: If you set your refresh rate to 10 seconds this mod stops being so server friendly. You can do it, but be sure your server can handle it.


Features:
- Ajax (no page refreshes)
- Pages
- Set refresh rate in seconds
- Hide Chatbox contents from certain user groups
- Set user groups that can't send messages but can view chatbox
- Moderator user groups that can delete messages
- Disable auto refresh for guests
- Prune messages by user ID, user name, days old or all
- Enable/disable smilies, bbcode and [ img ]
- Automatic URL parsing
- Users can delete their own messages
- Smilies popup with all smilies you can use in messages
- Who's Online Support
- Show message dates or not
- User names linked and colored with their user group colors
- Banned Users
- Hide refresh button
- /me code
- Optional message colors
- Bunch of options in the Admin Control Panel

Live Demos: (leave your live demo in this thread!)
http://www.fliz.ru/ (russian)
http://www.sustainabilityforum.com/forum
http://www.virtualorbit.com/
http://www.bowlandcentral.com/forum


VERSION HISTORY (https://vborg.vbsupport.ru/showthread.php?p=1317150)



This mod is now final. It has all the features I think a chatbox should have, so I won't be adding more features to it. Anyone has my permission to use this as a base for another mod. It will still be updated for bugs though.

ahmed2000
11-07-2006, 06:33 PM
thanx alot

Ziki
11-07-2006, 07:05 PM
Awsome mate.I am using vBshout though but this is great.I would nominate it for HOTM but I already nominated APM :(

SgtTechHead
11-07-2006, 07:26 PM
I receive the following MySQL error during the Product Import:


Database error in vBulletin 3.6.2:
Invalid SQL:
show tables like vb_'sl_shout';
MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'vb_'sl_shout'' at line 1
Error Number : 1064


MySQL Version: 4.0.27-standard-log

PHP Version: 4.4.4

projectego
11-07-2006, 07:58 PM
Sounds awesome, I'll check this out ASAP. Cheers, Dream. ;)

Snake
11-07-2006, 08:28 PM
THanks!

redlabour
11-07-2006, 09:06 PM
Shoutbox 2.1 uses less Performance then 2.0.

But this happens if everybody only looking at vb.org .... :D

http://www.vbhackers.com/f76/ajax-flatfile-vbshout-2-1-a-4536/

Dream
11-07-2006, 09:25 PM
Awsome mate.I am using vBshout though but this is great.I would nominate it for HOTM but I already nominated APM :(

Thanks alot :)

I updated the code SgtTechHead, should solve your problem.

I wanna know why someone gave this 1 star.

Oh if you are using 0.6 don't upgrade with 0.7, uninstall and reinstall. I changed the product ID. You may have to manually remove the "chatboxlite_shouts" table from the database too, im not sure if the 0.6 uninstall code removes it. The 0.7 uninstall code does remove the shouts table, so be careful. The shouts table has been renamed from "chatboxlite_shouts" to "chatbox" in case you wanna know.

If you wanna modify it and share modifications be my guest.

mktrilogy
11-07-2006, 11:30 PM
nominated as hack of the month :) installed

SgtTechHead
11-08-2006, 12:11 AM
I updated the code SgtTechHead, should solve your problem.

Thank you sir! I'll give it another go then.

EDIT: Well done, works great now :)

RealRnB
11-08-2006, 03:14 AM
Nice thanks

Dream
11-12-2006, 05:57 PM
Thanks guys :)

I updated the FORUMHOME template edit so the iframe in Internet Explorer doesn't show a border. Just put this

frameborder="0"

inside the tag

<iframe src="chatbox.php?nofocus=1" width="100%" style="border: 0px">

I updated the instructions on the zip file.

Shazz
11-12-2006, 08:14 PM
Cool how guets can post :)

tamilrdx
11-13-2006, 07:11 AM
Thanks Installed ! But Can you Tell me how to add the chat box to the top not in the bottom ... !

Kayden
11-13-2006, 03:16 PM
Installed. Thanks.

Dream
11-13-2006, 08:28 PM
Thanks Installed ! But Can you Tell me how to add the chat box to the top not in the bottom ... !
Depends on where you want it. Only on the forum home, below what?

LBmtb
11-15-2006, 03:12 AM
Can permissions be set in usergroup manager? I'd like to prevent unregistered people from using it. If so then I'll be trying it out.

thanks!

Shazz
11-15-2006, 04:33 AM
This got over 1000 Views Very fast, potential

Basboss
11-15-2006, 05:55 PM
I'm sorry, but how can I delete shouts?
is there like a command?

Dream
11-15-2006, 07:39 PM
Can permissions be set in usergroup manager? I'd like to prevent unregistered people from using it. If so then I'll be trying it out.

thanks!

By editing chatbox.php, you can set usergroups that can't use the chatbox.

I'm sorry, but how can I delete shouts?
is there like a command?

You click on the "X" near a shout.

LBmtb
11-18-2006, 12:18 AM
Very nice. Installed with no issues.

edit: nevermind there was an issue. After the install I couldn't upload attachments even though I have the quota at 0 (no quota). Disabled chatbox and attachment uploads worked fine again so I completely uninstalled chatbox.

Any idea why this happened?

Dream
11-18-2006, 12:43 AM
Uhm no. Aren't you in two usergroups, one with 0 quota and another with maximum quota?

LBmtb
11-18-2006, 01:02 AM
Uhm no. Aren't you in two usergroups, one with 0 quota and another with maximum quota?
Ah yes . . .didn't realize I put myself in so many usergroups. I only checked two but one of the ones I didnt check had a limit. I'll try this again later tonight and let ya know how it goes.

Thanks.

LBmtb
11-18-2006, 08:42 PM
Thanks again, works perfectly now. Here's the URL: SocalTrailRiders.org (http://www.socaltrailriders.org/forum/)

Any way to bold comments made within the last x minutes?

Dream
11-18-2006, 09:22 PM
Looking good :)

You would have to edit the code, could be a little complicated to do.

deeoo
11-24-2006, 12:34 PM
-edit- Spoke too soon. Great mod!
Would be nice to have the shoutbox and the messages seperated so autorefresh won't steal the focus.

shadow smith
11-28-2006, 03:14 AM
Any compatibility as a vbAdvanced module?

mdzcpa
12-02-2006, 08:43 PM
Thanks for Mod!

Question: What is the easiest way to fix the navbar link on the vb advanced cmps page? The link to chatbox doesn't work from there.

Thanks.

haytham
12-03-2006, 07:14 PM
just installed on 3.6.4 with no problems so far..I'd like to be able to include smilies and colored text though..any chance I could? Thanks..the other VB shoutboxes never worked on my VB..no idea why though.

Knightmane
12-05-2006, 10:51 PM
Is it possible to run this at the same time as the usual vBShout... say... vBshout on forumhome and chatbox on another of the other forums? I ask because I know you can't have 2 instances of vBshout at the same time. Is this possible?

Feckie (Roger)
12-07-2006, 10:58 AM
I don't suppose there will be an ajax version..............

All The Same Installed and working great..

Many Thanks

scan-pa
12-07-2006, 11:42 AM
How can I set this so Some usergroups can not even See the chatbox?

tuanluu
12-09-2006, 02:26 AM
Nice I will give it a try on 3.6.4

TyPenn613
12-10-2006, 02:02 AM
I have two stupid questions as someone who is very illiterate with computers. First, how do you delete some of the chat logs? I would like to keep mine between 3 and 5 pages. The other, is there a way for an auto-refresh? Any help is greatly appreciated, and excellent work on this program.

scan-pa
12-10-2006, 04:58 AM
I have two stupid questions as someone who is very illiterate with computers. First, how do you delete some of the chat logs? I would like to keep mine between 3 and 5 pages. The other, is there a way for an auto-refresh? Any help is greatly appreciated, and excellent work on this program.

I am not the coder of this, but I do use it.

Click on the x next to the user on the posts you want to delete.

There is a setting in the chatbox.php file that allows you to set the time in sec. before it refreshes the chatbox. If I remember it is set to 300 seconds.

hope that helps.

TyPenn613
12-11-2006, 03:35 AM
Thanks scan-pa. I got the refresh and manual delete down.

Is there a way for it to delete automatically after either so many messages, pages, or time? If not, is there a way to mass delete? I ran it for about 24 hours, and 30 pages it seems that could be a problem. While I'm not really worried about space on my server, I don't want a log that goes on forever. Any thoughts? Thanks guys.

jailer
12-11-2006, 06:50 AM
edit

Dream
12-11-2006, 09:29 AM
Thanks scan-pa. I got the refresh and manual delete down.

Is there a way for it to delete automatically after either so many messages, pages, or time? If not, is there a way to mass delete? I ran it for about 24 hours, and 30 pages it seems that could be a problem. While I'm not really worried about space on my server, I don't want a log that goes on forever. Any thoughts? Thanks guys.

Right now there isn't a way unless you code it, sorry. I plan on making Admin Control Panel options for this with mass pruning. I'll keep your idea in mind to add mass pruning by date, page etc. There's no problem for the chatbox to keep lots of pages. I'm a little busy lately though, so if anyone wanna code this be my guest.

jyajay
12-11-2006, 12:36 PM
Everybody that loads the index will now be shown at the chatbox at who is online, how can I change that?

Unknown Location
/chatbox.php?&nofocus=1


Ok, this mod is sucking too much ressources - uninstalled. :(

*edit2*

With a simple wget cronjob set up that creates a static html file everything works fine now, I'd really recommend everybody doing that - especially on high loaded index pages.

TyPenn613
12-13-2006, 08:40 AM
Thanks Dream. Keep up the great work!

ezekiel97
12-27-2006, 01:30 AM
I cant find " <td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>" in my template, is it supposed to be something else?

Ziki
12-27-2006, 08:08 PM
I don't suppose there will be an ajax version..............

All The Same Installed and working great..

Many Thanks

This was made to replace the AJAX vBShout :)

dfb
01-03-2007, 12:34 PM
I like this a lot as it is very simple.

How can I move the chat box? Where in the code would I place it to put it above my forums, just below the navbar.

Right now it seems lost in the Whats Going On section.

Many thanks in advance,

derek

labocha
01-05-2007, 06:08 PM
What exactly does the "Refresh" button do ? On my site it does not seem to be doing anything ...

marcsmith73
01-07-2007, 10:27 PM
Awesome...thanks!

ep13
01-07-2007, 10:46 PM
it needs somthing showing whos in the chat room and autorefresh

lard007
01-10-2007, 04:44 PM
Is it possible to run this at the same time as the usual vBShout... say... vBshout on forumhome and chatbox on another of the other forums? I ask because I know you can't have 2 instances of vBshout at the same time. Is this possible?

Just done this - vbshout on CMPS with this as another module above it from admins only - all working so far - great add-on, many thanks!

BarryoBrien
01-11-2007, 09:04 PM
does this work with vb 3.6.4

Flow Fusion
01-11-2007, 09:35 PM
does this work with vb 3.6.4

I am running it right now and so far so good!

sys4096
01-12-2007, 02:57 PM
Great little chatbox, does the job perfectly for what I want, apart from 1 thing:

Is there any way to make this visible to only registered users, or members of a usergroup?

dfb
01-12-2007, 03:03 PM
Is there a way for the box to automatically refresh itself every x seconds?

thanks

sys4096
01-12-2007, 03:09 PM
Yes it does that - you can adjust the value by editing the php file

dfb
01-12-2007, 04:20 PM
thanks for the help with the box automatically refreshing,

where in the php file can I find that. What do I look for?

thanks for your help in advance

Flow Fusion
01-12-2007, 09:54 PM
thanks for the help with the box automatically refreshing,

where in the php file can I find that. What do I look for?

thanks for your help in advanceIn the shoutbox.php look for the
################### CONFIG VARS ##################

under that heading there is a bunch of configurations you can make including the one you asked for.

Flow Fusion
01-12-2007, 09:56 PM
Great little chatbox, does the job perfectly for what I want, apart from 1 thing:

Is there any way to make this visible to only registered users, or members of a usergroup?
Yes, in the chatbox.php under
################## CONFIG VARS ################

look for the heading $cantshout put in the usergroups you dont want ie 1 for unregistered and so forth.

Flow Fusion
01-12-2007, 09:58 PM
I like this a lot as it is very simple.

How can I move the chat box? Where in the code would I place it to put it above my forums, just below the navbar.

Right now it seems lost in the Whats Going On section.

Many thanks in advance,

derekAnybody solve this?

kewlfoogle
01-15-2007, 02:01 AM
adding this line thats stated in your install.txt i get an error...

this line:

<!-- Chatbox -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatbox')"><img id="collapseimg_forumhome_chatbox" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatbox].gif" alt="" border="0" /></a>
<a href="#" onclick="return openChatbox()">$vbphrase[chatbox_chatbox]</a>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_chatbox" style="$vbcollapse[collapseobj_forumhome_chatbox]">
<tr>
<td class="alt1" width="100%" colspan="2"><div class="smallfont" align="center"><iframe src="chatbox.php?nofocus=1" width="100%" style="border: 0px" frameborder="0"></iframe></div></td>
</tr>
</tbody>
<!-- / Chatbox -->

gives me this error:

An appropriate representation of the requested resource /admincphide111k/template.php could not be found on this server.

admincphide111k/template.php is indeed there.

sys4096
01-15-2007, 09:46 AM
Yes, in the chatbox.php under
################## CONFIG VARS ################

look for the heading $cantshout put in the usergroups you dont want ie 1 for unregistered and so forth.

That wasn't what I was asking m8, thanks for having a go but what I asked was if there is a way to make it VISIBLE to registered users ONLY

The above stops anyone but registered users from shouting, which is fine but I want to stop
non regged users even seeing the chatbox.

Cheers,
Paul.

darkilla2
01-15-2007, 08:57 PM
i guess u can put it under the

<if condition member show> something like that forgot the exact words i knoe its right on top of the usercp links part

SidelineSports
01-16-2007, 01:28 AM
Awesone! Installed! Love it!

N00BIE
01-25-2007, 07:27 PM
Anybody solve this?

mine is under the nav bar..

in
FORUMHOME
find:

[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header


about 14 lines down from the top below that add the code..

Flow Fusion
01-26-2007, 11:28 PM
mine is under the nav bar..

in
FORUMHOME
find:

[x_powered_by_vbulletin]</phrase></title>
</head>
<body>
$header


about 14 lines down from the top below that add the code..
Thanx for the reply. I solved this about a week ago and should have posted it. Again, thank you for the assistance!

MistaMarkael
01-28-2007, 03:59 AM
is there a way i could place this in users profiles so that each user had their own tagboard with their own posts n tags

TheFrienzNet
01-28-2007, 04:10 PM
Thanks, this looks great. :)

*Edit*

Sorry, I don't really like it. Nice effort though!

Patria
02-03-2007, 02:44 PM
- prune support for moderators added
- guests (people who are in the canshout array) couldnt see the content of the chatbox anymore

xoclanes
02-05-2007, 06:00 PM
is there a way to make the chatbox appear on all the forums no just the index?

inspiration100
02-11-2007, 11:06 PM
is there a way to make the chatbox appear on all the forums no just the index?

Would like to know also, plus is there a way to make th enames the same colours as the group legend...e.g admin group displays in red

Kadi
03-03-2007, 02:24 PM
My members have been asking for this for a while. I've installed it on a test page and its working fine.

My forum is in Arabic, right to left, is it possible to have the text and time on the right?

Thanks

Dream
03-03-2007, 07:21 PM
I wouldn't know how to change that Kadi, sorry :(

You can ask for help, for someone to try and change the script and release it again.

scan-pa
03-03-2007, 09:00 PM
You should look for this code in chatbox.php:

echo '['.$time.'] <em>'.$shout['username'].$del.'</em>: '.$parsed.'<br />';
}
echo '</div>';

Re arange this to how you would like to display it.

be sure to save a backup before making changes. if I have time I will try it.

Kadi
03-04-2007, 04:03 AM
Thanks but I know nothing of codes...I just follow directions. :o

Really good mod, though. I would have liked to add it. :up:

Zidane007nl
03-05-2007, 08:13 PM
Thanks for releasing this mod. I had to remove vBShout because my host was complaining about a high load my website is causing.

It's a simple and effective shoutbox. :)

Zidane007nl
03-05-2007, 10:41 PM
However, there's one problem. One member can't post in the shoutbox because there's a ' (apostrophe) in his name and that is causing a database error. The apostrophe in his name isn't converted to HTML code.

rnmcd
03-06-2007, 05:38 PM
How does Chatbox differ from vbShout 2.0?

Can anyone tell me the differences? Is it that ChatBox doesn't use as much resources?

Thank you.

mcqwert
03-07-2007, 02:02 PM
What code should I use to list this only on one specific forum, and for it to not be included in threads.

Example, I'd like it to appear in forum id: 2... but I don't want it to appear in the threads of that forum? Is this possible?

rnmcd
03-07-2007, 03:27 PM
With a simple wget cronjob set up that creates a static html file everything works fine now, I'd really recommend everybody doing that - especially on high loaded index pages.

Can you tell us newbies how to do that?

rnmcd
03-07-2007, 03:36 PM
What code should I use to list this only on one specific forum, and for it to not be included in threads.

Example, I'd like it to appear in forum id: 2... but I don't want it to appear in the threads of that forum? Is this possible?

If I wanted a different chat box in each forum id, is that possible? Would I need to install multiple instances of Chatbox?

letsjoy
03-09-2007, 08:27 PM
very nice

Dream
03-12-2007, 09:34 AM
However, there's one problem. One member can't post in the shoutbox because there's a ' (apostrophe) in his name and that is causing a database error. The apostrophe in his name isn't converted to HTML code.

I think I fixed this, let me know if you still have problems.

Updated, added AdminCP options to prune messages.

rnmcd
03-12-2007, 04:23 PM
For a fee, could this be made to have a different chat box in each forum?

Dream
03-12-2007, 04:54 PM
Not by me, sorry

LaPiba
03-13-2007, 06:16 PM
Installed on 3.6.5 and working fine. Thank you! :)

Is there a way to display who is currently in the Chatbox?

Dream
03-13-2007, 11:43 PM
No there isn't LaPiba, unless you change the code.

GXT Owner
03-14-2007, 10:34 PM
How Do i make it so the chatbox is on the top of the page?

Dream
03-14-2007, 11:47 PM
Where, after the navbar and before the forum listing?

GXT Owner
03-14-2007, 11:49 PM
Right below the nav bar

daddygrim
03-14-2007, 11:53 PM
chatbox sucks

GXT Owner
03-14-2007, 11:57 PM
Any help would be thankfull

Dream
03-15-2007, 12:05 AM
GXT try this

GXT Owner
03-15-2007, 01:03 AM
<a href="http://www.xeon-gaming.net/forums/index.php" target="_blank">http://www.xeon-gaming.net/forums/index.php</a>

How Do i delete the bottom chat?

Dream
03-15-2007, 01:08 AM
remove this

<!-- Chatbox -->
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_chatbox')"><img id="collapseimg_forumhome_chatbox" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_chatbox].gif" alt="" border="0" /></a>
<a href="#" onclick="return openChatbox()">$vbphrase[chatbox_chatbox]</a>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_chatbox" style="$vbcollapse[collapseobj_forumhome_chatbox]">
<tr>
<td class="alt1" width="100%" colspan="2"><div class="smallfont" align="center"><iframe src="chatbox.php?nofocus=1" width="100%" style="border: 0px" frameborder="0"></iframe></div></td>
</tr>
</tbody>
<!-- / Chatbox -->


also, add a <br /> before <!-- / Chatbox --> in the new code I gave you

edit:

not before <!-- Chatbox -->, before <!-- / Chatbox -->

GXT Owner
03-15-2007, 01:25 AM
Thank you for all your help.

Dream
03-15-2007, 01:33 AM
No problem

You added the <br /> in the wrong place, its before <!-- / Chatbox --> not before <!-- Chatbox -->

GXT Owner
03-15-2007, 12:34 PM
<a href="http://www.xeon-gaming.net/forums/" target="_blank">http://www.xeon-gaming.net/forums/</a>

Why doesnt mine work now?

Dream
03-16-2007, 04:25 PM
Updated, added "Delete messages older than XX days" in the Admin options. Just upload chatbox_admin.php again.

dbirosel
03-16-2007, 05:03 PM
Question: How is the server load and does this add any queries? I just removed Shoutbox and i am looking for a reliable chat mod. Is this the one for me?! :D

Dream
03-16-2007, 05:10 PM
This adds one query, two if you send a message or delete a message.

I wouldn't know the exact server load to tell you.

dbirosel
03-16-2007, 05:13 PM
Would recommending setting autorefresh = 0?

Dream
03-16-2007, 05:22 PM
Yep, if you have a busy forum and your load is too high.

Please click install if you use it :)

dbirosel
03-16-2007, 05:27 PM
Looks great so far. Thank you dream. And sorry, i forgot to click Install.


www.CarAudioJunkyard.com/forum


Nothing big, but my collapse arrow isn't the same as my template skin. usually it's automatic and matches.

Also, suggestion, it would be great if the username has that certain color like the usergroups. But i assume that it will be too much ehh?


Thanks again!

Dream
03-16-2007, 05:32 PM
I'll take a look on the template issue O_o

Colored usernames would need a slower query, maybe two. I can look into making it as an option.

dbirosel
03-16-2007, 05:33 PM
Also, is it possible to increase the size of the text a bit? Members are complaining it's hard to see. They like how it loads fast though.

But there main concern is..

-the size of the text
-There username is not colored

dbirosel
03-16-2007, 05:35 PM
Overall, i love your mod. I'll keep getting suggestons from my members and keep testing it. I'll be coming over here more often. :) So far the support is great!

Dream
03-16-2007, 05:47 PM
You are welcome :)

I'm looking into making the text bigger for you. There doesn't seem to be a CSS class for bigger text in vB. But you have to change all appearances of the code "smallfont" in chatbox.php for another class.

khoadv
03-16-2007, 10:32 PM
I've used this mod. It's great.

I've made some modifies: the $cantshout group won't see the text box so they can't input text. It'll prevent the guest posting and the script won't run.

Open the chatbox.php, find:


echo '<div class="smallfont">'.$date.'<form action="'.THIS_SCRIPT.'.php" method="post" name="chatboxForm"><input type="text" name="shout" size="50" maxlength="255" class="smallfont"> <input type="submit" value="'.$text_send.'" class="smallfont"> <input type="button" value="'.$text_refresh.'" onclick="refreshChatboxLite(\'\')" class="smallfont"> '.$pagelinks.'<br /></form></div>';

(line 162)


replace with:


echo '<div class="smallfont">'.$date.'<form action="'.THIS_SCRIPT.'.php" method="post" name="chatboxForm">';
if ( !empty($canshout) ) {
echo '<input type="text" name="shout" size="50" maxlength="255" class="smallfont"> <input type="submit" value="'.$text_send.'" class="smallfont">';
}
echo '<input type="button" value="'.$text_refresh.'" onclick="refreshChatboxLite(\'\')" class="smallfont"> '.$pagelinks.'<br /></form></div>';


Then find:


if (empty($_REQUEST['nofocus'])) {
?>


replace with:


if (empty($_REQUEST['nofocus']) && !empty($canshout)) {
?>

obmob
03-16-2007, 11:46 PM
Wondering how is this different from vbshout?

And would be nice to have smilies available too :D

Dream
03-17-2007, 12:46 AM
It's a lot more simple than vBShout.

Smilies are available.

Dream
03-17-2007, 12:54 AM
Nice modifications khoadv! I'll add them in the next version.

Oh and please click install if you still use it :)

ggiersdorf
03-18-2007, 09:27 PM
can this be used in ANY forum? I want to place this in my Staff forum only so we can chat is this possible?

Dream
03-18-2007, 11:08 PM
You can configure chatbox.php to only allow usergroupid 6 people to use it (admin group ID), and make it show only on that forum with template modifications.

But people knowing the URL where chatbox.php is can view the conversation.

scan-pa
03-18-2007, 11:44 PM
Someone needs to add a few lines of code that only allow usergroup id"s to View the chatroom box.

How hard is that? Make it just like the readpms userid check, but use usergroup id checks.

Dream
03-19-2007, 01:13 AM
Yeah it's not hard to do, I can do it for him if he needs.

scan-pa
03-19-2007, 01:27 AM
Dream,

I think alot of us would like that option added in.

Thanks in advanced.

Dream
03-19-2007, 01:35 AM
Ok I'll put it into my to-do list.

Would an option like this work?

$hide_from_cantshout = true; // hides the whole chatbox from people that can't shout. true or false

evotion
03-19-2007, 11:39 AM
Great mod.. Thanks vm.

by the way, did anybody find a way to have the chat JUST show up in a forum of one's choice....

I'd like it to just show up only in forum ID 6, for example, and NOT the forum home.

Where do I got to make the required change.

ra7al
03-19-2007, 12:03 PM
i'll try it

it seem good

momo2
03-20-2007, 09:50 AM
can this be installed in the portal section only ? and yet still have the vbshout 2.0 in the forum ????

vbreal
03-21-2007, 10:19 PM
how is this different from vbshout does it use less resources

Dream
03-21-2007, 10:40 PM
Yes Vbreal

Yes Momo

obmob
03-22-2007, 04:02 AM
It's a lot more simple than vBShout.

Smilies are available.I'll test it, thanks!

Dream
03-22-2007, 03:47 PM
10,000 views! WOOHOO \o/

:)

Mark.B
03-25-2007, 11:27 AM
Just to say, this is really good and is much less resource-intensive than other shoutboxes.

For pruning, I created a scheduled task cron file to delete all shouts over 48 hours old, this runs every hour via the admin CP and keeps things manageable. I also disabled autorefresh to keep resources down.

The only thing I think would be useful would be a smilie popup window or dropdown, with clickable smilies.

rnmcd
03-26-2007, 12:46 PM
Great mod.. Thanks vm.

by the way, did anybody find a way to have the chat JUST show up in a forum of one's choice....

I'd like it to just show up only in forum ID 6, for example, and NOT the forum home.

Where do I got to make the required change.

I'd like to know the answer to this too.

lard007
03-26-2007, 01:41 PM
thanks again - just put the updated version in

We use vbshout but as you can't have more than one shoutbox, and also because flashchat is to intensive for just admin chat I have once again put this great little chat client in place

One query that I have is whether you can restrict who can view chats - I have it so that only admins can see the CMPS module that I put this in but if you browse to the chat.php page anyone can view it - any ideas how to restrict this?

Thanks again!

Larry

solinarius
03-26-2007, 08:23 PM
Hello, how can i change order of display- eg. last shout on the bottom, first on top?
and ofcourse, form on bottom?
thanks in advice.

Dream
03-26-2007, 08:46 PM
You would need to get someone to change the code for you solinarius.

I'll be making a major update to this mod to address most if not all of you guys concerns, but it will take me some time.

Fungsten
03-26-2007, 08:46 PM
This is interesting!

solinarius
03-26-2007, 08:49 PM
awsome :) i can't wait ;)

Fungsten
03-26-2007, 09:43 PM
This is what's in the Chatbox.php:

$cantshout = array(1,3,8,12); //usergroup ids that are not allowed to send messages
Also, do all members who have access to the chatbox see everything that has been posted? In other words, this chatbox is not for a one-on-one member to chat with?

solinarius
03-29-2007, 05:38 PM
No, is something like shoutbox, small thing to talk online about nothing :)

GnG_ShoOk
03-30-2007, 05:12 AM
it said, the my 404 page cannot be found. I noticed in the install guide that is says find:

<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>

^^ My Vbulletin didn't have this, so what should i do?

MelH
03-30-2007, 05:21 AM
Can someone please tell me how to change the height of the chatbox?

Thanks...

Dream
03-30-2007, 05:32 AM
it said, the my 404 page cannot be found. I noticed in the install guide that is says find:

<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>

^^ My Vbulletin didn't have this, so what should i do?

You must have a custom style, you have to choose somewhere to put the Chatbox link in the style, or not use one at all. The box Chatbox goes has a link.

Can someone please tell me how to change the height of the chatbox?

Thanks...

Find this in FORUMHOME template

<div class="smallfont" align="center"><iframe src="chatbox.php?nofocus=1" width="100%" style="border: 0px" frameborder="0"></iframe>

And replace with this

<div class="smallfont" align="center"><iframe src="chatbox.php?nofocus=1" width="100%" style="border: 0px, height: XX" frameborder="0"></iframe>

Where XX is the height you want. That should do it, *I think*. If not let me know and I'll look into it again.

MelH
03-30-2007, 05:47 AM
Thanks for your quick reply... but I'm afraid it didnt work.

To change the height I did as you said. Changed to this:

<div class="smallfont" align="center"><iframe src="chatbox.php?nofocus=1" width="100%" style="border: 0px, height: 500px" frameborder="0"></iframe>

also tried just 500

But there is no difference..

Dream
03-30-2007, 05:57 AM
Sorry, do

style="border: 0px; height: 500px"

use ; instead of ,

MelH
03-30-2007, 06:03 AM
Thanks so much, that did it.
But obviously 500px is too big. :)

Thanks for a great mod

mawby
03-30-2007, 11:53 AM
Would it be possible to repost the contents of the send message box during arefresh so that its contents is not lost when an automatic refresh occurs?

rnmcd
03-30-2007, 03:26 PM
What changes were made in the Last Update: 16. Mar 2007?

Can this be installed to work in an forum other than forumhome?

MelH
03-31-2007, 04:02 AM
I have this Chatbox in a vBadvanced CMPS side module and its working great.

When I am on the forumhome pages the pop up works fine but when I am on the CMPS portal pages I get a page not found error in the pop up window.

The link in the Navbar has the full url to chatbox.php so I don’t understand why it doesn’t work all the time. Anyone have any ideas??

Also while I’m here - anyone know how to make the pop up chatbox always stay on top when other programs are accessed?

Any help would be gratefully appreciated - thanks…

rnmcd
03-31-2007, 10:13 PM
I installed this on two different vb 3.6.4, with different results:

1) On one installation I have a working Chatbox link in the Navbar but the Chatbox doesn't appear in the "What's Going On?" area. Any idea what I did wrong? By the way, I didn't do the "chatbox below navbar.txt" instructions.

2) (fixed)

Thanks.

Dream
04-01-2007, 04:25 AM
If you want me to take a look, send me your forum link through PM rnmcd

MelH
04-01-2007, 10:55 PM
I'm trying to get the pop up to stay on top when pages are changed etc.

I found this code by searching google.
<body onblur="self.focus();">

In chatbox.php I changed this:
echo '</head><body class="alt1">';

to this:
echo '</head><body onBlur="self.focus();" class="alt1">';

The change made the pop up stay on top but you cant change pages or open or close other programs on your desktop.

The idea of having the pop up stay on top is so that you can use other programs whilst still always having the chatbox visible. Just move it if it gets in the way of what you are doing.

Any ideas anyone??

LBmtb
04-02-2007, 01:31 AM
Found a small bug today. I got this email about a db error from chatbox:
Database error in vBulletin 3.6.4:

Invalid SQL:
INSERT INTO vb_chatbox (userid, username, shout, dateline, ipaddress)
VALUES (1030, '26'er Zen Master', 'Sart Kicked ASS Today', 1175478886, '66.74.144.57');
It was due to the single quote in the user's name. Here's the fix:

FIND: (was on line 47 for me)
$db->query_write("INSERT INTO ".TABLE_PREFIX.$chatbox_table." (userid, username, shout, dateline, ipaddress)
VALUES (".$vbulletin->userinfo['userid'].", '".$db->escape_string($vbulletin->userinfo['username'])."', '".$db->escape_string($_POST['shout'])."', ".TIMENOW.", '".$db->escape_string(IPADDRESS)."')");
REPLACE WITH:
$db->query_write(htmlentities("INSERT INTO ".TABLE_PREFIX.$shoutstable." (userid, username, shout, dateline, ipaddress)
VALUES (".$vbulletin->userinfo['userid'].", '".$vbulletin->userinfo['username']."', '".$db->escape_string($_POST['shout'])."', ".TIMENOW.", '".$db->escape_string(IPADDRESS)."')"));

This will sanitize the query a bit more before it gets run on the database.

Emre Goren
04-02-2007, 02:39 AM
great stuff thanks..but how can I change send and refresh buttons? and I need to know how change text color written on these buttons..thanks again

rnmcd
04-02-2007, 03:36 PM
If you want me to take a look, send me your forum link through PM rnmcd

I will PM it to you.

Also,
Do a lot more server 'resources' get used if I change the refresh time to 1 second versus 300 seconds?

Dream
04-02-2007, 05:25 PM
Yep.

mawby
04-02-2007, 05:53 PM
Also,
Do a lot more server 'resources' get used if I change the refresh time to 1 second versus 300 seconds?It also becomes unusable (as I found out) because every time the page refreshes you lose the contents of the new/send message box and so you wont have a chance to type something and press send before it refreshes and is gone. :)

Would it be possible to only refresh the message history and have the new message box on a separate frame which isn't refreshed?

Dream
04-02-2007, 07:18 PM
Nope sorry. Would make stuff too complex.

You can get someone to do that for you though.

monasa
04-03-2007, 04:53 PM
I have installed vbShout 2.0 on the main page of my forum and it works fine. I'm planning to install another shoutbox in the same forum but in different page or subforum. Is this possible, having 2 shoutbox in one forum? Appreciate your feedback and guide.

VB Version : 3.6.5

porscheman170
04-05-2007, 12:22 AM
Hi I just want to install chatbox in the center module of my vbadvanced home page is this possible and if so how do I do it? I tried to add a module using chatbox.php but it crashed the whole site lol... I am a total noob when it comes to this stuff.

Thanks for all your help!

Dream
04-07-2007, 02:49 AM
Updated, added settings to AdminCP, under vBulletin Options.

When a user can't send messages, the text input and send button will appear disabled.

New option for usergroup IDs that are not allowed to view the chatbox content.

Fixed the user name apostrophe bug.

Added option to show text input field and latest messages at the bottom.

Also added option for size of the text input field.

Let me know how this works out for you.

rnmcd
04-07-2007, 02:55 AM
If we are running your previous version of Chatbox, do we need to completely uninstall and then reinstall this product?

Thanks Dream.

Dream
04-07-2007, 02:57 AM
No, just import the product file again with Allow Overwrite on and upload chatbox.php

jkwasn01
04-07-2007, 06:31 PM
Update works great, Thanks!

Dream
04-07-2007, 09:08 PM
Sorry guys, had to do a quick update, fixed an issue with the new option "Text Input on Top?", the page wasn't scrolling to the bottom (javascript issue).

Also fixed the font for the Can't View Chatbox error message, should be pretty.

To update just upload chatbox.php again.

Let me know if you have issues with this version.

NaughtyStud
04-07-2007, 10:43 PM
Like someone posted earlier, I never could get the other chat boxes to work on my forum.This one works perfect, Thanks. ;)

Dream
04-10-2007, 07:16 AM
You are welcome NaughtyStud :)

I have installed vbShout 2.0 on the main page of my forum and it works fine. I'm planning to install another shoutbox in the same forum but in different page or subforum. Is this possible, having 2 shoutbox in one forum? Appreciate your feedback and guide.

VB Version : 3.6.5
Yes you can have vBShout and Chatbox running separately on the same forum.

Dream
04-10-2007, 07:22 AM
I have this Chatbox in a vBadvanced CMPS side module and its working great.

When I am on the forumhome pages the pop up works fine but when I am on the CMPS portal pages I get a page not found error in the pop up window.

The link in the Navbar has the full url to chatbox.php so I don?t understand why it doesn?t work all the time. Anyone have any ideas??

Also while I?m here - anyone know how to make the pop up chatbox always stay on top when other programs are accessed?

Any help would be gratefully appreciated - thanks?
The vBAdvanced portal pages must not be loading the javascript to open the popup for some reason. Send me your forum link via PM and I can have a look for you.

As for the Chatbox popup to always stay on top, I don't think thats possible, the popup is a browser window, and I don't think there's an option for a browser window to stay on top all times, but I could be mistaken. Page authors could abuse that kind of option I think.

MelH
04-10-2007, 08:59 AM
Thanks but I sorted the first question. I needed to put the full url in both bits of code in the navbar template.

BadgerDog
04-11-2007, 04:49 PM
Thanks..... :)

Installed on 3.6.4 and seems good so far....

Can't make up my mind as to whether to out the chatbox at the top of the forum, or at the bottom. Looking forward to other code development on this very simple, yet effective system..... :)

Regards,
Badger

kewl1uk
04-11-2007, 06:10 PM
The vBAdvanced portal pages must not be loading the javascript to open the popup for some reason. Send me your forum link via PM and I can have a look for you.

As for the Chatbox popup to always stay on top, I don't think thats possible, the popup is a browser window, and I don't think there's an option for a browser window to stay on top all times, but I could be mistaken. Page authors could abuse that kind of option I think.

CMPS doesn't include the forum directory even when chatbox.php is added to Navbar Replacements. I hard-coded mine in the navbar template.

kewl1uk
04-11-2007, 07:41 PM
Usergroup controls are now in Admin options but are duplicated in chatbox.php. Do we still place usergroup IDs in chatbox.php or ignore it:
$moderator_usergroups = array(); //usergroup ids that can delete shouts
$cantshout = array(); //usergroup ids that are not allowed to shout
$cantview = array(); //usergroup ids that are not allowed to view shouts

BadgerDog
04-11-2007, 10:14 PM
Any way of having the Who is ON display, or the one in the User's Profile, display that they are in CHATBOX, or something other then:

Unknown Location
/chatbox.php

Thanks

Regards,
Badger

Dream
04-12-2007, 12:03 AM
Usergroup controls are now in Admin options but are duplicated in chatbox.php. Do we still place usergroup IDs in chatbox.php or ignore it:
No ignore it. The new chatbox.php fills them. You are using the new chatbox.php right?

Any way of having the Who is ON display, or the one in the User's Profile, display that they are in CHATBOX, or something other then:

Unknown Location
/chatbox.php

Thanks

Regards,
Badger

I'll add WOL support in the next version.

BadgerDog
04-12-2007, 09:01 AM
I'll add WOL support in the next version.


Thank you...... :)

Regards,
Badger

Hiranmanu
04-13-2007, 11:52 AM
Wow this is excellent. Going to install it later on. Got some emails from my host that vBSHOUT is causing the server CPU to spike to high levels.

Looks great

Keep up the good work

Kimiko
04-15-2007, 05:59 PM
Thank you! So far so good!

INSTALLED

Patria
04-16-2007, 08:03 AM
Suggestion: After WOL support you could maybe add the option to show the people who are chatting on the frontpage (Forumhome).

Thanks! :)

BadgerDog
04-16-2007, 01:27 PM
Hi Dream ....

I also added the optional part to the NavBar so it appears up there. I notice now that when I open the forums page, the "chatbox" is open for business. If I close it, leave the page, then return, it's open again. Is there anyway to have it retain the last setting (open or closed) that the user left it at?

Thanks

Regards,
Badger

MelH
04-18-2007, 09:59 PM
Is it possible for users to delete their own shouts? If so how is that activated?

If not is there a way of doing it?

Zidane007nl
04-23-2007, 02:11 PM
When I overwrite chatbox.php with the new one (1.1) I'm getting a database error:

Invalid SQL:
SELECT * FROM chatbox ORDER BY dateline ASC LIMIT 0,;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

GBSteve
04-23-2007, 04:31 PM
that comma is killing you.

LIMIT 0,;

Zidane007nl
04-23-2007, 09:31 PM
Yeah, but when I remove the comma from the query it doens't show any shouts.

Dream
04-24-2007, 01:45 AM
Did you update the product file?

Dream
04-24-2007, 01:47 AM
Suggestion: After WOL support you could maybe add the option to show the people who are chatting on the frontpage (Forumhome).

Thanks! :)
That?s interesting, but I think it should be done as an add-on. I?ll give it more thought after I release the update of this mod.

Dream
04-24-2007, 01:48 AM
Is it possible for users to delete their own shouts? If so how is that activated?

If not is there a way of doing it?
There?s no way to do that currently. I?ll see in adding that in the next version.

Dream
04-24-2007, 01:49 AM
Hi Dream ....

I also added the optional part to the NavBar so it appears up there. I notice now that when I open the forums page, the "chatbox" is open for business. If I close it, leave the page, then return, it's open again. Is there anyway to have it retain the last setting (open or closed) that the user left it at?

Thanks

Regards,
Badger
I?m talking to you over PMs.

Dream
04-24-2007, 05:52 PM
Updated, version 1.2

Added option to let users delete their own messages.

Added option to show username links with user group colors. Note this may raise resource usage.

Added WOL support.

Added option to change the HTML tag used around usernames.

Added smilies! :)

Let me know how this works out for you.

snoop1979
04-24-2007, 06:00 PM
love this hack thanks, is there a way to put it in all forums (not one for each forum)

Dream
04-24-2007, 06:06 PM
You can try to add the code in "chatbox below navbar.txt" in the navbar template.

auctionguy
04-24-2007, 06:14 PM
Nice upgrade!! Installed and working great!!

Zidane007nl
04-24-2007, 07:57 PM
Did you update the product file?
I tried that, but I get "Table 'chatbox' already exists" (with overwrite activated). Also with the just released version.

optrex
04-24-2007, 08:18 PM
smilies don't animate, but a great start :)

arco
04-24-2007, 09:50 PM
Nice mod! Will follow the progress of this for sure. :)

I'm posting this hoping it will help others who want the chatbox as a module in vBadvanced.

In vBa CMPS:

Add Module -> TemplateTemplate to Include: adv_portal_chatbox
Template Content:
<tr>
<td class="alt1" width="100%" colspan="2"><div class="smallfont" align="center"><iframe src="{$vbulletin->options[bburl]}/chatbox.php?nofocus=1" width="100%" style="border: 0px; height: 300px" frameborder="0"></iframe></div></td>
</tr>That's it. :)

Edit: I have it as a side module, so I have "height: 300px". Adjust that to your liking if you want it shorter/longer or have it in the center module position.

Download the module (https://vborg.vbsupport.ru/showthread.php?t=131002) and import it in the vBa CMPS if you want to avoid the manual editing.

Dream
04-24-2007, 10:38 PM
I tried that, but I get "Table 'chatbox' already exists" (with overwrite activated). Also with the just released version.
Did you uninstall it before? You may have to delete your chatbox table from your database and try again.
smilies don't animate, but a great start :)

??

Dream
04-28-2007, 06:21 AM
Nice mod! Will follow the progress of this for sure. :)

This mod is pretty much final, unless you guys come up with something interesting I didn't think of.

Thanks for the vbAdvanced instructions, I'll add them in the zip file :)

I updated the install instructions, everyone should remove this line from the javascript function openChatbox() in the navbar template

return false;

To fix a problem when clicking a chatbox link in Who's Online.

BadgerDog
04-28-2007, 09:10 AM
Nice mod! Will follow the progress of this for sure. :)

I'm posting this hoping it will help others who want the chatbox as a module in vBadvanced.

In vBa CMPS:

Add Module -> TemplateTemplate to Include: adv_portal_chatbox
Template Content:
<tr>
<td class="alt1" width="100%" colspan="2"><div class="smallfont" align="center"><iframe src="{$vbulletin->options[bburl]}/chatbox.php?nofocus=1" width="100%" style="border: 0px; height: 300px" frameborder="0"></iframe></div></td>
</tr>That's it. :)

I have vbadvanced installed, but I didn't have to do this to get Chatbox working as per Dream's standard instructions. Did I miss something?

Regards,
Badger

Dream
04-28-2007, 10:01 AM
Do you have it as a module in vBadvanced Badger? I don't use vBadvanced, so I can't help.

A user awhile ago had some problems with the Chatbox installed as a module and the function to open the Chatbox popup. I think the solution is in this thread somewhere.

arco
04-28-2007, 02:55 PM
I have vbadvanced installed, but I didn't have to do this to get Chatbox working as per Dream's standard instructions. Did I miss something?

Regards,
Badger

My instructions are only for having the chatbox showing as a module on the vBadvanced frontpage. If you have the chatbox elsewhere on the forum you just follow Dreams instructions. I don't use the popup or have it anywhere else on the forum, just as a side module on the vBadvanced frontpage. :)

BadgerDog
04-29-2007, 09:20 AM
My instructions are only for having the chatbox showing as a module on the vBadvanced frontpage. If you have the chatbox elsewhere on the forum you just follow Dreams instructions. I don't use the popup or have it anywhere else on the forum, just as a side module on the vBadvanced frontpage. :)

Thanks...

I have "vBadvanced CMPS 2.2.0 vBadvanced Content Management &amp; Portal System" installed as an add-on product along with Dream's Chatbox.

On my front page it says "Powered by vBadvanced CMPS v2.2.0".

I use the chatbox on the "Forums" page only, so I guess I'm ok. It's been working fine and the latest addtions are great.

Regards,
Badger

arco
04-29-2007, 02:55 PM
I use the chatbox on the "Forums" page only, so I guess I'm ok. It's been working fine and the latest addtions are great.

Yep, you're fine then. :)

Dream
04-29-2007, 06:18 PM
Updated, version 1.3

Now when the Chatbox auto-refreshes, the message the user was typing isn't lost.

This is not perfect, because by the time the Chatbox refreshes it gets the message, and the user has time to type more stuff while the page is loading, so it may lose some letters.

BadgerDog
04-29-2007, 06:32 PM
Installed v1.3 update... works fine.... :up:

BTW, my animated smiles work fine in the chatbox....

Regards,
Badger

Fungsten
04-29-2007, 10:02 PM
This is when I try to upload the Product XML from the ACP.

Database error in vBulletin 3.6.5:
Invalid SQL:
CREATE TABLE chatbox (
`shoutid` INT( 10 ) NOT NULL AUTO_INCREMENT ,
`userid` INT( 10 ) NOT NULL ,
`username` VARCHAR( 100 ) NOT NULL ,
`shout` VARCHAR( 255 ) NOT NULL ,
`dateline` INT( 10 ) NOT NULL ,
`ipaddress` VARCHAR( 16 ) DEFAULT '0' NOT NULL ,
PRIMARY KEY ( `shoutid` )
);;

Never had that before. :confused:

Dream
04-29-2007, 10:07 PM
That shouldn't be happening, and I don't know why it's happening to you.

Anyway, use the attached product file. It's the version 1.3 product file with the code to create the database table removed.

Fungsten
04-29-2007, 10:13 PM
It worked.

That shouldn't be happening, and I don't know why it's happening to you.

Anyway, use the attached product file. It's the version 1.3 product file with the code to create the database table removed.

On Edit:

Where the chatbox should be I get a "404 Error". Question, in the code it says:


<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_stats')"><img id="collapseimg_forumhome_stats" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_stats].gif" alt="" border="0" /></a>
<phrase 1="$vboptions[bbtitle]">$vbphrase[x_statistics]</phrase>
</td>
</tr>
</tbody>


When editing the Forumhome temp there is this:

<!-- end logged-in users -->
</if>

just above the portion of the template you want to edit.

Dream
04-30-2007, 12:20 AM
Did you upload chatbox.php to your forum main folder?

You need to find that <tbody></tbody> code and add the Chatbox code right before it.

Fungsten
04-30-2007, 12:27 AM
to the forum. Now it works! Thanks!!

Did you upload chatbox.php to your forum main folder?

You need to find that <tbody></tbody> code and add the Chatbox code right before it.


On Edit:

I logged into my test forum with a regular account and though I have in the settings not to show to that group the Chatbox area says something like "chatbox can't be viewed". IS that the way it is? Thanks.

Dream
04-30-2007, 01:11 AM
Yes, thats only so that group can't view the contents. If you want to hide the entire chatbox you need to do some template coding, but I wouldn't know the exact code to tell you.

Fungsten
04-30-2007, 01:13 AM
I think I might, possibly, could know a way to do that.

Yes, thats only so that group can't view the contents. If you want to hide the entire chatbox you need to do some template coding, but I wouldn't know the exact code to tell you.

BadgerDog
04-30-2007, 11:42 AM
I think I've found an anomaly, but I can't quite track down the sequence.

It's minor and I only noticed it after the code started showing in the "Who's on-Line" function, the fact that a user is in "Chat". I have noticed that on my system using v1.3 (also did it in v1.2), that it shows a "clickable" link to the Chatbox in the display, but under ""Who's on-Line", I'm always seeing myself and some others as being "in chat", when in fact, they never visited "Chat" at all during the current session?

Anyone else seeing this?

Thanks

Regards,
Badger

Kimiko
05-01-2007, 12:44 AM
Thanks so much! Love the upgrade ^^

Dream
05-01-2007, 01:18 AM
Glad you liked it :)

Updated, version 1.4

Added Ajax! :)

Now you can set your refresh rate to 3 seconds and make your server cry to mommy!

Dream
05-01-2007, 01:21 AM
Oops does someone have the old zip file? I want to keep a copy of the chatbox with no ajax in this thread.

arco
05-01-2007, 01:25 AM
Nice work! I was meaning to ask if you had considered using Ajax. :D
I was using Joomla/SMF before switching to vB, and used a really nice shoutbox as a module in Joomla.
That one used Ajax. It also had another feature which I would like to see you implement. Since I have your chatbox as a side module in vBadvanced, the space is limited. So I've removed the code that outputs the date before every message. In the Joomla shoutbox the nice thing was that if you held your mouse over the username of a person that had sent a message, it showed how long since that message was entered. Would be cool to have that here too. :)

Here's the previous version.

Dream
05-01-2007, 01:30 AM
Thanks arco! :)

I'll consider doing that. If you were able to remove the dates, you could well be able to add the dates as a mouseover on the user name in the code.

arco
05-01-2007, 01:54 AM
Yeah I probably could. I'll experiment a little and see what happens. :)

arco
05-01-2007, 02:06 AM
Got this message when the window refreshed in the new version.

[object HTMLSpanElement]

It appeared in a line on the top, above all the messages.

Dream
05-01-2007, 02:31 AM
Send me your forum address on a PM?

Dream
05-01-2007, 02:58 AM
Try this chatbox.php

arco
05-01-2007, 03:10 AM
Seems to work fine now with the new file. Good work! :)

Edit: Noticed it added current time before the username/message even though I took out $time from the code. I have "Show Time?" off in options too, but that's only for the time before the input box I think.

Edit2: Maybe you should make an option to turn of time completely in messages too? :)

Edit3: LOL!! I went to another page, and when I went back to the page the chatbox is, the time I mentioned in my first Edit: is gone.

ComputerVitals
05-01-2007, 03:40 AM
Excuse the dumb question.....

What does the Ajax do?

Dream
05-01-2007, 03:40 AM
Found a bug while using Internet Explorer 7, use this chatbox.php while I work on a fix, or the "no ajax" version.

Arco, yeah it's ajax now, remember? :P you won't be affected by this bug, it's related to the time before the text input, it's not being updated correctly in IE7.

Dream
05-01-2007, 03:41 AM
Ajax means the page won't refresh when a user sends a new message, or updates the list of messages, it's all done by javascript in the background.

Dream
05-01-2007, 04:00 AM
Seems I was using a variable with the same name as one used by vBulletin's javascript, and it gave errors just in IE7. I updated the zip, just update your chatbox.php if you installed before.

bandarsq
05-01-2007, 09:41 AM
Thank you for the nice Mod. :)
I typed in Arabic Lang. and nothing came in the chat box, any help on this issue?

Big-K
05-01-2007, 11:12 AM
Apologies. Wrong hack

ComputerVitals
05-01-2007, 12:43 PM
Ajax means the page won't refresh when a user sends a new message, or updates the list of messages, it's all done by javascript in the background.

Ah..
Cool hack anyways.
Upgraded mine.. Thanks.

kewl1uk
05-01-2007, 05:47 PM
Upgraded to 1.4 but had to go back to 1.3: In IE7 the Chatbox doesn't refresh either automatically or manually using the Refresh button. The only way is to refresh the whole page. But 1.4 works in IE6, Firefox and Opera. Ajax works on the rest of the board in IE7, i.e. edit post.

Dream
05-01-2007, 06:09 PM
kewl, did you use the latest chatbox.php I updated?

kewl1uk
05-01-2007, 06:33 PM
kewl, did you use the latest chatbox.php I updated?

I think so. I downloaded the zip from the Download Now section at around 7:00PM U.K. time - around 90 minutes ago from the time of this post.

Dream
05-01-2007, 06:51 PM
Thank you for the nice Mod. :)
I typed in Arabic Lang. and nothing came in the chat box, any help on this issue?
This mod doesn't support right to left text, sorry.

Kewl, it's working fine for me here in IE7, do you know what javascript error you get?

kewl1uk
05-01-2007, 07:40 PM
This mod doesn't support right to left text, sorry.

Kewl, it's working fine for me here in IE7, do you know what javascript error you get?

No idea, sorry. I'll have another go later when my board is less busy and this time I'll uninstall 1.3 and make a fresh install of 1.4 and see if that helps.

The error is with Ajax not working so the whole page needs to be refreshed.

Also another error seen by a member in Firefox is that when the auto refresh is set to a low number - 3 seconds - the refresh button flashes.

Dream
05-01-2007, 07:51 PM
You don't need to reinstall, just change chatbox.php from 1.3 to 1.4 or the other way.

I sent you a PM.

arco
05-01-2007, 07:53 PM
Hi Dream,

I'm trying to get the time showing when hovering the mouse over a username. I tried changing the function chatbox_make_user_link($user) to this:

function chatbox_make_user_link($user) {
$name = fetch_musername($user);
return "<a href=\"member.php?u=$user[userid]\" title=\"$time\" target=\"blank\">$name</a>";
}

Added a simple title inbetween there, but it doesn't show anything. :confused:

Dream
05-01-2007, 08:00 PM
Arco, I don't know what HTML code to use to show mouse over text over text. It could be title, could be alt, and could need to be in <span> tags.

You need to update your chatbox.php too because of the IE7 bug, it actually affects you too.

Dream
05-01-2007, 08:20 PM
I wish people that rate my mods with 1 star would state a reason :/

BadgerDog
05-01-2007, 08:26 PM
Well, I rated it 5 stars.... clean simple install, efficient code, low system resource use and it gets the job done... good work and thanks again ... :up:

I did notice one thing... still wondering if it's just something on my system, or if others are seeing this....


I think I've found an anomaly, but I can't quite track down the sequence.

It's minor and I only noticed it after the code started showing in the "Who's on-Line" function, the fact that a user is in "Chat". I have noticed that on my system using v1.3 (also did it in v1.2), that it shows a "clickable" link to the Chatbox in the display, but under ""Who's on-Line", I'm always seeing myself and some others as being "in chat", when in fact, they never visited "Chat" at all during the current session?

Anyone else seeing this?

Thanks

Regards,
Badger

Dream
05-01-2007, 08:28 PM
Thanks Badger :)

That happens to everyone, when a user loads the forum homepage, it loads the chatbox after, making the user appear on the chatbox in Who's Online. I'll see if I can add something to fix that.

BadgerDog
05-01-2007, 08:31 PM
Thanks Badger :)

That happens to everyone, when a user loads the forum homepage, it loads the chatbox after, making the user appear on the chatbox in Who's Online. I'll see if I can add something to fix that.

Ahhhh... roger that ... :up:

That makes sense.... :)

Thanks...

Regards,
Badger

arco
05-01-2007, 08:43 PM
I did update the chatbox.php earlier. :)

Holy macaroni! I got it working!
Changed the following:

if ($tagarounduser) {
$tagopen = "<$tagarounduser>";
$tagclose = "</$tagarounduser>";
}To:

if ($tagarounduser) {
$tagopen = "<span title=\"$time\"><$tagarounduser>";
$tagclose = "</$tagarounduser></span>";
}And the following from:

echo "\n".'<span id="shout'.$shout['shoutid'].'">['.$time.'] '.$tagopen.$username.$del."$tagclose: ".$parsed.'<br /></span>';
To:

echo "\n".'<span id="shout'.$shout['shoutid'].'"> '.$tagopen.$username.$del."$tagclose: ".$parsed.'<br /></span>';So now the time of the message is only shown when holding the mouse over the username. I'm happy! :D

Dream
05-01-2007, 08:50 PM
Nice grats! :D

I didn't know you could do that with <span>.

I'll see to adding that in the next version so you won't need to edit it everytime.

arco
05-01-2007, 09:00 PM
That would be nice Dream. And yeah, it's amazing what you can achieve by experimenting a little. :)

Mark.B
05-01-2007, 10:00 PM
Thanks Badger :)

That happens to everyone, when a user loads the forum homepage, it loads the chatbox after, making the user appear on the chatbox in Who's Online. I'll see if I can add something to fix that.

I'm not finding that actually....I've tested this with a test account, if someone loads forumhome they show as viewing the index. I think.

Mark.B
05-01-2007, 11:01 PM
I have to say I've been using this for a while now and it knocks spots off any other shoutbox....it's quick, clean, efficient, and doesn't get you nasty emails from your host about use of server resources!

The only modification I made to it was to adapt some of the code into a cron job so that shouts are pruned automatically every 48 hours via a vB scheduled task.

Dream
05-01-2007, 11:11 PM
Glad to hear it :) let me know if you have problems with the new ajax.

Did you like the smilies feature?

Mark.B
05-01-2007, 11:21 PM
Glad to hear it :) let me know if you have problems with the new ajax.

Will do...no problems so far in any browser, despite me playing with the layout slightly....nothing much, just added the date into each shout line and made the input box and shout button invisible to guests. I managed not to break it doing that, which has impressed me. :D

Did you like the smilies feature?
Yes...that's perfect, thanks!

Mads
05-01-2007, 11:40 PM
nice work!

eurofunny
05-02-2007, 12:55 PM
Great Work, thx from Germany.

Is there a way to post every hour a text with cron?? Is there a way then post please the script for this and post please to autoprune after 24 hour.

Thx for this Chatbox i clicked install :)

Dream
05-02-2007, 01:06 PM
Hello, glad you liked it :)

This is possible, but you would have to code two php files to be called by vBcron every hour and another every 24 hours. I'm not sure how vBcron works, but maybe Mark. B could help you out, he made an auto prune file, send him a PM.

Mark, could you share your cron script? I could add it to the zip file with instructions on how to set it up.

eurofunny
05-02-2007, 01:24 PM
Okay thx for your quick answer.....When Guest post is there a way that the guest has a number below Guest

Dream
05-02-2007, 01:36 PM
What text would you like to be posted every hour?

What do you mean by guest number?

If you mean a visitor number that's not possible, sorry. vBulletin doesn't keep a count of visitors.

eurofunny
05-02-2007, 02:03 PM
What text would you like to be posted every hour?

What do you mean by guest number?

If you mean a visitor number that's not possible, sorry.

What text would you like to be posted every hour? mhmm Hello at My-CheckPoint.de or what ever :)

Dream
05-02-2007, 02:06 PM
I will try to make the cron files you requested :)

Check this thread back later.

ge66
05-02-2007, 02:36 PM
Thank you for this Chatbox!

How about a pop-up for vBcode and [IMG] or something else to help people to fill in the vBcodes?

Dream
05-02-2007, 03:54 PM
Maybe, I would have to think this through.

Mark.B
05-02-2007, 08:33 PM
I will happily release the cron file I made to prune the shoutbox, I just need to wait 48 hours so I know for certain it still works with the newest release. :D

It is very basic though and is hard coded to 48 hours....whilst that can be changed quite easily, it may be possible for someone to write an admin option into the hack to make this user-configurable.

Bit beyond my rather basic skills though that....all my cron is is a lift of some code from the original hack, placed into a php file. :D

Dream
05-03-2007, 12:23 AM
No problem, I'll see how the other vB cron files work and make some for this mod, thanks Mark.

Dream
05-03-2007, 02:30 AM
eurofunny, see if these work for you, the instructions are in cron.txt

eurofunny
05-03-2007, 07:51 AM
eurofunny, see if these work for you, the instructions are in cron.txt


Many thx for this.

At the autopost-test comes this error Chatbox Auto-Post

Fatal error: Call to a member function on a non-object in /home/www/checkpoint/includes/cron/chatbox_autopost.php on line 18