nneonneo's Shoutbox

Started by nneonneo, December 26, 2006, 06:58:11 PM

Previous topic - Next topic

nneonneo

Is there nothing else? That error means that the server didn't finish running my script, which means some other error happened.

Can you try to chmod (change permissions) the script to 755? Most FTP clients have some way to do this.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

BethInaK

AHA, much better but still not quite there -the page (at http://www.islandofmisfittoyz.net/yshout/yshout.php [nofollow] ) gives me a "nothing to do' which I think means its probably working!

The shoutbox however, still says loading shoutbox indefinitely. I have an error on line 25 character3
You can check out the source - at http://www.islandofmisfittoyz.net [nofollow] without logging in, I think

Thanks gain,

nneonneo

You need to undo the changes you made to index.template.php.

Right now, it looks like
// var board_url = "http://www.islandofmisfittoyz.net/yshout/js/yshout.js?Feb142008" type="text/javascript"></script>

(that's the output, so it might not look exactly as shown in the template). If you change that all back to what it should be, the shoutbox should start working.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

BethInaK

dammit!! I messed with that to try and fix things and forgot
I'm a moron.
thank you VERY much.
you went above and beyond!

Jimi_Hendrix

Quote from: nneonneo on March 01, 2008, 06:59:42 PM
@ivpn: I suppose there are two ways to do it; one is to make another PHP script and have doRefresh call it too (this is probably not the best way); the other is to edit readChat function in yshout/yshout.php to add that information to the bottom. So, right before return $chatText.' ';, you would add the echo line.

As for the other problem, I have tentatively posted 1.13 at http://www.simplemachines.org/community/index.php?topic=137508.msg1444735#msg1444735, though due to a serious lack of time this week, I will not be able to post it "officially" that soon :-\
Thanks nneonneo  ;)

The refresh is ok...and the problem with statistic's page is resolved.



BethInaK

I just wanted to tell you my users are totally loving this mod.

dannbass

Could you add also cURL instead of fopen? my host doesn't have fopen and I would like to use your shoutbox.

Thanks a lot!

nneonneo

Wait, what? This shoutbox is using strictly local fopen, so cURL isn't required. There are no remote fopen calls, thus it should work...
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

dannbass

Well... I installed it manually and put it in a phpblock of TP and just added the folder and the modification to the index.template.php of my theme... and open Firefox and gave me the error  for the fopen... I'll try it again tomorrow morning and I'll double check for everything.

Thanks a lot!

nneonneo

Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

afahmic

Any idea to auto scrolling to the bottom for each shout message? I found this resource http://radio.javaranch.com/pascarello/2006/08/17/1155837038219.html [nofollow] but really have no idea how to integrate it with this mod.

Any help would be greatly appreciated.

nneonneo

http://www.simplemachines.org/community/index.php?topic=137508.msg1188746;topicseen#msg1188746

It uses the code that you pointed out. I believe it should still work in the newer revisions of the mod.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

dannbass

The error that is saying is

Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /www/xxxxx/x/x/forocontrabasso/htdocs/yshout/yshout.php on line 793
File error (writeLine); aborted

And I did again the same thing, I used this message http://www.simplemachines.org/community/index.php?topic=137508.msg1031509#msg1031509 and extract to the root the yshout folder, weird isn't it?

Thanks Nneonneo!

nneonneo

OK, you need to make yshout/chats/home.txt writable (644 should work, but if it doesn't, try 666). That should fix it.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

dannbass

#1714
Great it fix it! Now, the minor thing is that the HideAdminLinks is not hiding and the commands window is not showing. But besides that everything is smooth!

Thanks again!

Edit
I installed it in the default and everything is working fine, now I think that my problem is all the java errors that I have in my theme and those conflict with the shoutbox, what a shame, because I don't know how to solve them... anyway thought to let you know that the problem is all mine... :P

afahmic

Quote from: nneonneo on March 04, 2008, 12:29:26 PM
http://www.simplemachines.org/community/index.php?topic=137508.msg1188746;topicseen#msg1188746

It uses the code that you pointed out. I believe it should still work in the newer revisions of the mod.

Cool. It works like a charm. Thanks bunch, nneonneo! :D

Bithunter

My shared account was suspended two days after installing this mod, because of high CPU usage. Is there a way to make it more shared hosting friendly?

nneonneo

Hmm, I have heard this before, but it got a lot better after 1.08 I think.

How busy is the forum? The shoutbox script, by default, will run every 20 seconds for each connected user (too much higher and PHP's script timeout kills it). If someone shouts, the shoutbox will refresh for each user, so if people are shouting at a rate of one per second, constantly (this would be somewhat similar to what you'd see on a busy IRC channel, I suppose), then the script would certainly run a high cost in resources. However, that's a rather unlikely usage pattern unless your forum is _really_ busy.

If your host doesn't have a PHP accelerator installed, they really should get one; it speeds this script up by a lot, since the loading times are cut significantly (noting that the load time contributes much to the overall time to execute the script).

Some parameters you can change are:
1) [yshout/yshout.php] $updateTimeout: I usually suggest this be set as high as possible, without causing the script to die prematurely (from a PHP timeout). The wait loop queries the chats every second, and if nothing new is found, the script sleeps for another second. This is measured in seconds.
2) [yshout/yshout.php] The sleep time. As mentioned before, the script queries chats every second; this can be increased if required. Increase the "1" in "sleep(1);".  This is measured in seconds.
3) [yshout/js/yshout.js] The refreshTime can be increased, which leads to a longer wait between client refresh requests. Increasing this has the largest effect on interactivity, which is something you may or may not need. This is measured in milliseconds.

That's all I can think of right now. If you don't need a very interactive shoutbox, you can raise refreshTime very high (~5000-10000 makes for 5-10 second refresh intervals) or even higher.

Potentially, your host may be complaining about the fact that the script is waiting at all, because that causes it to consume some resources (and multiple copies running simultaneously could be a problem for some hosts, particularly shared ones.). In this case, you should *reduce* updateTimeout to 0, and increase refreshTime to 5000-10000. You *must* in this case change Feb142008 in
<script src="',$boardurl,'/yshout/js/yshout.js?Feb142008" type="text/javascript"></script>
What this does is ensure that your users get a fresh copy of the shoutbox code immediately. Otherwise, the old versions will bring a heavy load upon the server.

Hope that helps. It would be wise to ask your host which of the two problems (CPU usage caused by constant access, or resource usage caused by constant waiting) is the culprit, so that you can apply the correct fix.
Check out the AJAX Shoutbox (my one and only mod to date :P)
Do you like SMF? Are you using ProBoards, InvisionFree, ActiveBoards or some other web-hosted forum? I can help you convert to SMF (without having to purchase a DB conversion)...contact me [nneonneo {at} gmail *dot* com], and see this topic
spammers here!

sherwinaval

hi wanna thank nneonneo for this very nice script... but just a question... is there a possible way that the shout box be scrollable so that you don't always have to look at the history? I mean like 30 shouts will be stored always... and so the size will be fixed?

just a question though :) but if it's possible, it's a very big help. if this was already asked, please point me to the solution. Thanks...

ByeVas

Hi!
Thanks for the great mod again!
Is there a way to output the chat in a separate window?

Advertisement: