Shoutbox Blues
Permalink 1 user found helpful
Hi all!
I am working on a local-hosted site and I need a shoutbox on it. I am trying to use the Shoutbox Addon, which installed successfully. I added it to my site. It looks good.
My problem is this: I tested it by typing Hello World in it and sent that. It successfully sent it, but if I try to send another message, it acts like it is sending it, but it never actually shows up. I know that this addon is no longer supported, but it should still work, right? I am trying to do this without buying a add on, since it is just for local purposes.
I tried to search for a HTML code for a shoutbox, but I would have to either pay or give information I would rather not part with in order to get the code.
Any help is greatly appreciated!
I am working on a local-hosted site and I need a shoutbox on it. I am trying to use the Shoutbox Addon, which installed successfully. I added it to my site. It looks good.
My problem is this: I tested it by typing Hello World in it and sent that. It successfully sent it, but if I try to send another message, it acts like it is sending it, but it never actually shows up. I know that this addon is no longer supported, but it should still work, right? I am trying to do this without buying a add on, since it is just for local purposes.
I tried to search for a HTML code for a shoutbox, but I would have to either pay or give information I would rather not part with in order to get the code.
Any help is greatly appreciated!
Any ideas about this?
If an add-on is unsupported then it's very possible that it has stopped working because as time moves on, changes to the core functions can kill an add-on.
All the PHP code for the block is available for you to inspect so you will have to dig through that code to see if you can get it working.
All the PHP code for the block is available for you to inspect so you will have to dig through that code to see if you can get it working.
1) Open [root]/packages/shoutbox/db.xml
2) Change the <auto /> to <autoincrement />
3) Uninstall/reinstall Shoutbox
2) Change the <auto /> to <autoincrement />
3) Uninstall/reinstall Shoutbox
That was helpful. Thanks.
Now, I tried it using two browsers and it worked, but it didn't update on one browser when I send a message on the other browser.
Now, I tried it using two browsers and it worked, but it didn't update on one browser when I send a message on the other browser.
I might be wrong but I can't seem to find any functions that poll for new messages so I added my own.
In the view.php add the following just below the //functions comment:
This gives a 10 second 'silent' ajax refresh (i.e. without the fade in and fade out stuff).
In the view.php add the following just below the //functions comment:
window.setInterval(updateSilentShoutbox<?php echo $sbIdentity; ?>, 10000); function updateSilentShoutbox<?php echo $sbIdentity; ?>(){ $.ajax({ type: "POST", url: "<?php echo $path; ?>", data: "action=update&av=<?php if($controller->showAvatars) { echo 'y'; } else { echo 'n'; } ?>&msgs=<?php echo $controller->messageCount; ?>&time=<?php if($controller->showTimestamp) { echo 'y'; } else { echo 'n'; } ?>&lnk=<?php if($controller->showProfileLink) { echo 'y'; } else { echo 'n'; } ?>&sbIdentity=<?php echo $sbIdentity; ?>", complete: function(data){ messageList.html(data.responseText); } }); }
This gives a 10 second 'silent' ajax refresh (i.e. without the fade in and fade out stuff).
I get a error:
Parse error: syntax error, unexpected '?' in C:\xampp\htdocs\C\packages\shoutbox\blocks\shoutbox\view.php on line 4
Parse error: syntax error, unexpected '?' in C:\xampp\htdocs\C\packages\shoutbox\blocks\shoutbox\view.php on line 4
Save the attached file and rename it 'view.php' and upload it to '[root]/packages/shoutbox/blocks/shoutbox'
Thanks so much!!! You are brilliant!
No problem. Now I can use it too!
How could I add a feature that can play a sound when a new message arrives?
Learn php.
Just Kidding... I'll see what I can do.
Just Kidding... I'll see what I can do.
I know. I do need to learn PHP. So far I have not had much success.
How is it going?
It's not perfect but try this.
1) Download the attached zip file and expand to your local computer.
2) Upload the contents to '[root]/packages/shoutbox/blocks/shoutbox/'
3) Uninstall/Reinstall Shoutbox.
These files just replace the block files not the whole package.
It now allows you to choose a sound file from the File Manager if you want to but has a default sound. For compatibility, .ogg files should be used for all browsers. IE, on the other hand, gets a very Win3.1 sounding 'ding.mp3'. IE users are stuck with this sound just because they've chosen to use IE. All other browsers will use the included 'blop.ogg' sound file or any other .ogg file you assign through the File Manager.
Quirks: The sound fires even after you shout something which I wish I could stop. It also fires the sound when your computer comes out of hibernation/sleep. Oh well... you get what you pay for!
1) Download the attached zip file and expand to your local computer.
2) Upload the contents to '[root]/packages/shoutbox/blocks/shoutbox/'
3) Uninstall/Reinstall Shoutbox.
These files just replace the block files not the whole package.
It now allows you to choose a sound file from the File Manager if you want to but has a default sound. For compatibility, .ogg files should be used for all browsers. IE, on the other hand, gets a very Win3.1 sounding 'ding.mp3'. IE users are stuck with this sound just because they've chosen to use IE. All other browsers will use the included 'blop.ogg' sound file or any other .ogg file you assign through the File Manager.
Quirks: The sound fires even after you shout something which I wish I could stop. It also fires the sound when your computer comes out of hibernation/sleep. Oh well... you get what you pay for!
Have you tried this yet?
Oh, yes and it is great! Thanks!
Thank you for this mhawke! Worked perfectly.
Sorry for hijacking, but realize there aren't many threads on this Shoutbox addon. I'm trying to enable the shoutbox so that only users can 'shout', but guest can only view. When I edit the block, and uncheck Allow Guest Posting, the guest will not see the input fields nor any buttons, but Administrators also canno't see these fields. Is this a bug? Any ideas on a fix? Thanks!
The original Shoutbox was not a concrete5 creation so I don't believe the original code understands the 'roles' and permissions that live within concrete5. By saying 'Allow Guest Posts', I think the original authors meant any guest that landed on the page. By turning it off, you 'close' the conversation. It would take some re-working to make it 'concrete5-aware'.
Well gee, that makes total sense! Oh wells, Thanks!
mhawke,
Do ya know how to increase the font size for the shoutbox messages? Not the 'title'. Thanks!
Do ya know how to increase the font size for the shoutbox messages? Not the 'title'. Thanks!
Sure. If your talking about the size of the message as you type it in, that's on line 37 of [root]/packages/shoutbox/blocks/shoutbox/css/general.css
Any CSS can be found by right-clicking the element of interest and choosing 'Inspect Element'. Have a close look in the right pane and you can see location of the css file and the line number that controls that element. You can even change those values in the right pane to experiment with different styles and when you're happy, make the same change(s) to the underlying stylesheet.
Any CSS can be found by right-clicking the element of interest and choosing 'Inspect Element'. Have a close look in the right pane and you can see location of the css file and the line number that controls that element. You can even change those values in the right pane to experiment with different styles and when you're happy, make the same change(s) to the underlying stylesheet.
mhawke. You rule.
Is there a way to limit the history of the shout box? I know I can change the 'thread' in options but wanted to see if there was a better way. TIA
Is there a way to limit the history of the shout box? I know I can change the 'thread' in options but wanted to see if there was a better way. TIA
I'm not sure what you mean by changing the value of the 'thread'. I can adjust the number to messages showing and the height of the message's container. What exactly do you need to adjust?
Sorry for being so vague. The way we're using it is for live updates, but want to limit the amount of... lines that are visible (because the messages may be old).
Can you tell me how I can do both that you are suggesting? TY!
Can you tell me how I can do both that you are suggesting? TY!
mhawke, can you tell me how I can make the shoutbox height, static? I'd like it to only show a few lines only and scroll bar the rest rather than have the shoutbox increase in size (eventually taking over the entire screen!) Thanks!
Can't you already do that by just setting the 'Messages Height' in add/edit dialog? See attached screenshot.
I really appreciate the work you guys have done here as I'm just trying to implement shoutbox myself. Your ears are probably burning because I'm talking about you over here:
http://www.concrete5.org/community/forums/chat/marketplace-extreme-...
http://www.concrete5.org/community/forums/chat/marketplace-extreme-...