vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=228)
-   -   Chat Modifications - Dream's Chatbox (https://vborg.vbsupport.ru/showthread.php?t=167569)

Dream 01-11-2008 10:00 PM

Dream's Chatbox
 
This adds a Chatbox in your forum home page.

Here's how it works: every 5 minutes the chatbox asks the server if there are new messages. You can change this 5 minutes to any number of seconds you want, but the lower you go the more server resources the chatbox uses.

Features:
- AJAX
- Pages
- Change refresh rate
- Hide chatbox content from chosen usergroups
- Set usergroups that can't send messages
- Set moderator usergroups that can delete messages
- Can disable auto refresh for guests
- Prune messages by user ID, user name, days old or all messages
- Enable smilies, bbcode and/or [ img ]
- Automatic URL parsing
- Option for users to delete own messages
- Smilies popup with all smilies you can use
- Who's Online Support
- User names uses usergroup colors
- Ban Users
- /me code
- Message colors
- and more

This mod is final, no new features will be added.

Dream 01-12-2008 05:49 AM

VERSION HISTORY

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!

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.

version 1.4
- Added Ajax!
Now you can set your refresh rate to 3 seconds and make your server cry to mommy!

version 1.5
- Show Time? now correctly removes time from messages. When it does, mouseover the user name will show the time.
- Added automatic URL parsing. Requires BBCode to be enabled.
- Added hide refresh button option, good if you have a low refresh interval.
- Added option to change the image smilies button into a normal button, same as send and refresh.
- Added Banned Users option.
- Input buttons now use the correct button CSS class.
- Added cron files to the zip file, auto prune and auto post, the instructions to use them are in cron/cron.txt

version 1.6
- Fixed IE7 bug, the ajax code now uses vB's ajax functions.

version 1.7
- Added /me code. Users can use the /me code in front of messages to denote an action.
- When posting the posted message now appears right away, as opposed to having to wait for a refresh. This is faster and uses a little less resources.
- Added Chatbox height option. To use it, redo your forumhome template edit. If you like your Chatbox size you don't need to do it.

version 1.8
- Forced align="left" on main <div>s because people were having problems with the chatbox content being centered.
- Changed javascript function name from deleteShout() to deleteMessage(), because this is a chatbox not a shoutbox :P and the name was visible to users on mouseover
- Added time CSS class to times so it matches the rest of the forum (btw Mark I always loved your forum ;) since I made games for v3arcade)
- Added javascript isRefreshing check, so the chatbox won't have two parallel refresh instances and show duplicate messages, to fix problem on slower connections.
- When showing latest messages at the bottom, the chatbox now will only scroll to the bottom when there are new messages. (only works if you are not updating all messages on each refresh)
- Fixed javascript warning, was getting shoutsDiv <div> by it's name, wasn't defining shoutsDiv variable. (wonder how it worked in the first place)
- Added option to update all messages on refresh. This will fix deleted messages not being removed from users chatboxes, but can highly increase resource usage. The default method is getting only the new messages.
- Added message colors. You must enable it in the Chatbox options. You can change the available colors in the options.

version 1.9
- Added option to disable auto refreshing for guests. This can save resources if you have a low refresh rate.

version 2.0
- fixed minor bug that could stop the chatbox from working if the ajax response had newlines
- fixed bug that the chatbox was using the primary usergroup colors instead of the display usergroup colors for the username coloring
- fixed instructions for the chatbox under the navbar or under the forum list, old code's collapse wasn't working properly
- changed the default Chatbox place on the forum home page in the install instructions to show it after the forum listing
- updated the install instructions to be easier to follow and have more info

version 2.1
- changed ajax code for compatibility with vB 3.7

version 2.1.1
- color chosen by user now gets saved in a cookie. to update mod, just upload chatbox.php and chatbox_ajax_color.php

Dream 01-12-2008 05:52 AM

reserved2

Dream 01-12-2008 06:26 AM

I just saw the options of this mod after 1 year and I was overwhelmed. I don't remember coding all that. I must had too much free time.

Sofia 01-12-2008 07:43 AM

Hii Dream ! Thank you for this Chatbox 3.7 :)

projectego 01-12-2008 11:09 AM

Nice one. Cheers! :)

jerrygad 01-13-2008 08:26 AM

I like this. Thanks for sharing it with us :)

Toxizen 01-13-2008 04:16 PM

A few things I noticed people were unhappy about when I switched to this chatbox from a prior chatbox and I wanted to know if there was a way I could fix these.

Bold, Underline, Font Style implemented in the chatbox. Also a way for when you select Font Color for the user not to have to keep reselecting their font color every time they type a message.

When you set it so that people can delete their own messages, the X appears not after the message, but after their username, hence the whole message doesn't delete, just the username of the person who posted the comment in the chatbox. The comment remains.

Lastly, how can I make it so that mods can prune, edit and delete messages from the Chatbox?

Other than that on the positive this chatbox is more readable than the other one we were using and also it fits in much better with the template. This will show you whats been done with it:

http://www.tonycomix.com/forum/

Since the install instructions threw me off cause I couldn't find:

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

in the navbar template I just went into the FORUMHOME template, used the instructions for the Whats Going On? box, copied and pasted that code where I wanted the Box located and added it to the top of the forum that way.

JamesC70 01-13-2008 04:27 PM

Quote:

Originally Posted by Toxizen (Post 1420720)
Since the install instructions threw me off cause I couldn't find:

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

in the navbar template I just went into the FORUMHOME template, used the instructions for the Whats Going On? box, copied and pasted that code where I wanted the Box located and added it to the top of the forum that way.

This installation code is written for 3.6.8 and 3.7 templates. You're still on 3.6.6, so a search in the Navbar template for "calendar" will work. Insert the desired code just before the </tr> appearing after "calendar".

C.ooder 01-13-2008 04:32 PM

thank you

Toxizen 01-13-2008 04:34 PM

Quote:

Originally Posted by JamesC70 (Post 1420726)
This installation code is written for 3.6.8 and 3.7 templates. You're still on 3.6.6, so a search in the Navbar template for "calendar" will work. Insert the desired code just before the </tr> appearing after "calendar".

I dunno it sorta looks ok the way it is. However, still there is the issue with the delete code so I disabled it. Heres the way it looks on the board:

http://img236.imageshack.us/img236/1654/cbfq5.gif

Oh yeah one thing I forgot, when you click on the chatbox link, nothing happens.

JamesC70 01-13-2008 06:18 PM

Having the chatbox on your front page negates the need for a link on the Navbar, so all is good. Leave the Navbar link out. :up:

Dream 01-14-2008 12:13 AM

Toxizen, no new features are planned for this chatbox. You can choose from other two chatboxes that are full of features in the 3.6 mod forum.

This chatbox version is for 3.7, I see you are using 3.6.

Lombardo 01-14-2008 12:18 AM

Hey dream is it possible to put an image on the righthand side of the chatbox?

Dream 01-14-2008 01:08 AM

I think it would be complicated to do, you would need to edit chatbox.php.

Mark.B 01-14-2008 03:22 PM

Thanks for updating this, Dream, I was hoping you would since I have just upgraded to 3.7 and didn't want to use one of the other shoutboxes.

All working fine, for a demo (from a guest view) see in my sig, if the link is still there.

Lombardo 01-14-2008 07:51 PM

Quote:

Originally Posted by Dream (Post 1420962)
I think it would be complicated to do, you would need to edit chatbox.php.

ok i'll just leave it.Thank you.

Alibass 01-22-2008 05:07 PM

Running 3.6.8PL2 here and when I type a message and click send, box grays out and nothing happens. Refresh button doesn't work either. Can't seem to get chatbox working at all. :confused:

Dream 01-22-2008 06:43 PM

this one is for 3.6

https://vborg.vbsupport.ru/showthread.php?t=131002

Alibass 01-22-2008 07:00 PM

Damn my bad, thanks dream. What's the ole saying "if all else fails read the directions!"
I have a 3.7 test board setup and was going to install on 3.6.8 first and then 3.7.0
I guess it's obvious I installed 3.7 product to 3.6.8 :o

Kaelon 01-23-2008 03:00 AM

Works beautifully with vB 3.7 Beta 4. Very nicely done, Dream. I love the simplicity and elegance of it.

Kaelon 01-23-2008 12:28 PM

Update: So, I have found a problem. I want to disable the Chatbox's use for non-subscribers. Subscriptions in vBulletin typically add a user to a secondary usergroup. However, if I prevent a primary usergroup from using the Chatbox, no matter what secondary usergroup they are added to, they are still prevented from entering text in the Chatbox.

Help!

gwerzal 01-25-2008 12:05 PM

Thanks!

Just installed and added it as a Vba module and there both working perfectly.

Cheers man

metin 01-25-2008 06:43 PM

mm nice thanx

Kaelon 01-27-2008 05:28 PM

Quote:

Originally Posted by Kaelon (Post 1427324)
Update: So, I have found a problem. I want to disable the Chatbox's use for non-subscribers. Subscriptions in vBulletin typically add a user to a secondary usergroup. However, if I prevent a primary usergroup from using the Chatbox, no matter what secondary usergroup they are added to, they are still prevented from entering text in the Chatbox.

Help!

Any thoughts on this, Dream?

Mark.B 01-29-2008 01:42 PM

I am not sure the refresh button works properly on this version....If I post a shout on one account and then, on another PC with a different accoutn press the refresh button, it doesn't bring the new shout up.

I've tried it with "get all new shouts" both enabled and disabled tono avail.

ramsayeg 03-11-2008 10:41 PM

This is exactly what I was after .Thank you very much for the hard work!

powerful_rogue 03-21-2008 07:54 PM

Dream,

Just a quick question! How come you no longer wish to develop this mod and add further features?

Just out of curiosty!

Dream 03-26-2008 09:43 PM

Because I use this on my own website, and it fits my needs. Also it already has a lot of features, and I don't wish to work on this anymore that is needed.

There are many different chatboxes to choose from too if you need more features. I don't think chatboxes should do and be so complicated as some are today though.

powerful_rogue 04-04-2008 08:21 PM

Hi Dream.

When I had this installed on 3.6.7 I managed to have it in the "Whats Going On" section, however for the 3.7 version I cant seem to find the template edits to place it there.

I know this is un-supported, but could you help please!

Thanks

Dave

Dream 04-04-2008 09:22 PM

in the zip file theres a text file with instructions on how to add there

yinyang 04-05-2008 03:06 PM

Thank you. Installed and users loving it.

One thing, and this may be simple, but I can't figure it out.

How do you change the background color of the chatbox?

yinyang 04-06-2008 01:27 PM

figured it out!

just paste
PHP Code:

allowTransparency="true" 

in the iframe attributes.

AlexanderT 04-11-2008 05:01 AM

I upgraded to 3.7rc yesterday and subsequently also upgraded Dream's Chatbox to 2.1. Now I (and my users) have random Ajax error messages popping up on the Forumhome where Chatbox is installed. This never happened while we were still running 3.69 + Chatbox 2.0.

See attachment.

AlexanderT 04-11-2008 05:35 AM

Quote:

Originally Posted by AlexanderT (Post 1488049)
I upgraded to 3.7rc yesterday and subsequently also upgraded Dream's Chatbox to 2.1. Now I (and my users) have random Ajax error messages popping up on the Forumhome where Chatbox is installed. This never happened while we were still running 3.69 + Chatbox 2.0.

See attachment.

Update: It seems the error occurs when, as the error message suggests, there is a communication loss. This can happen for instance when you unplug your internet connectivity while the chatbox ajax call is waiting for a response, or when you put your notebook to standby and resume again later.

Perhaps there is a parameter to vb's/Yahoo's Ajax routines to surpress the error exception?

Update 2: It seems there is. Yahoo Ui Library defines a YAHOO.util.Connect.asyncRequest callback for handling failures: http://developer.yahoo.com/yui/connection/ and vB is handling this via vBulletin_AJAX_Error_Handler.

AlexanderT 04-11-2008 08:32 AM

OK, I replaced

PHP Code:

failure: function(o) { window.alert('AJAX error, please try again. (HTTP status: ' o.status ' / ' o.statusText ')'); } 

with

PHP Code:

timeoutvB_Default_Timeout,
failurevBulletin_AJAX_Error_Handler 

in getNewShouts(), and the error popup seems to be gone.

Dream 04-11-2008 12:56 PM

Yup that happens here too when my computer hibernate and lose connection to the internet. If this gets too annoying I'll remove it depending on the status error.

AlexanderT 04-11-2008 09:49 PM

Dream, there seems to be also other situations. I had a couple of my users report this to me the first day I upgraded to vB 3.7rc. To me it also popped up a few times when I switched back from another Firefox tab to the one containing my forum with the chat installed. It's probably best to make the error handling conditional and ignore it in case of a "connection loss".

rapidphim 04-19-2008 01:59 PM

can someone please tell me how many queries this thing will use? What are the pro and con among this with MCG and CChat?

bornoffire 05-02-2008 10:29 PM

When i am idle on the forum page it pops this error up.

"AJAX error, please try again (HTTP status:0/Communication failure)"

I see you guys are aware of this. Can u tell me how to disable this?


All times are GMT. The time now is 05:31 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
  • Page Generation 0.01250 seconds
  • Memory Usage 1,831KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete