vb.org Archive

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

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

Quote:

Originally Posted by Dream (Post 1238682)
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

Quote:

Originally Posted by Dream (Post 1239082)
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

Quote:

Originally Posted by bandarsq (Post 1238800)
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

Quote:

Originally Posted by Dream (Post 1239123)
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:

Code:

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....


Quote:

Originally Posted by BadgerDog (Post 1238146)
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

Quote:

Originally Posted by Dream (Post 1239217)
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:

Code:

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

To:

Code:

    if ($tagarounduser) {
        $tagopen = "<span title=\"$time\"><$tagarounduser>";
        $tagclose = "</$tagarounduser></span>";
    }

And the following from:

Code:

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

Code:

    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

Quote:

Originally Posted by Dream (Post 1239217)
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

Quote:

Originally Posted by Dream (Post 1239340)
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
Quote:

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.


All times are GMT. The time now is 04:42 AM.

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.01762 seconds
  • Memory Usage 1,824KB
  • 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
  • (5)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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