News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

nneonneo

I've missed a lot, apparently -_-

Thanks brian for helping out :)

@Devilsin (and th2mods): I have *never* seen that error before. It almost sounds like an excessively broken web server...since the script yshout.php is queried through AJAX. It would help to know your hosting provider, and maybe any errors which appear in the web server logs.

I have added a note about the Modifications.*.php thing, so hopefully it won't confuse too many people.
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!

brianjw

Quote from: nneonneo on July 20, 2007, 07:12:15 PM
I have added a note about the Modifications.*.php thing, so hopefully it won't confuse too many people.
There is a way to make it so if there is an error it will ignore it. Let me see if I can find what it is....
Ok here it is.
This would be in the install xml file:

<file name="$languagedir/Modifications.english.php">
<operation error="ignore">

and

<file name="$languagedir/Modifications.english-utf8.php>
<operation error="ignore">

This would be at the beginning of the modification for those files ;)
This way should also keep users from confusion.
<operation error="ignore"> is the key.

Brianjw

Iamok

Well, I added it like you said, but it stays as a large box (with no bg or anything) and it says shoutbox with the message ".....loading shoutbox...." but it never loads o.O

th2mods

#763
Quote from: nneonneo on July 20, 2007, 07:12:15 PM
I've missed a lot, apparently -_-

Thanks brian for helping out :)

@Devilsin (and th2mods): I have *never* seen that error before. It almost sounds like an excessively broken web server...since the script yshout.php is queried through AJAX. It would help to know your hosting provider, and maybe any errors which appear in the web server logs.

I have added a note about the Modifications.*.php thing, so hopefully it won't confuse too many people.

it was working perfectly for the first 3 days, then suddenly BAM and it doesn't work, My host is www.ulmb.com. and also when i go to the yshout.php file on my host, there is nothing in it. maybe thats the problem? so could you PM me the code that goes inside it, and ill tell you if it works.

EDIT, what directory is the default for it to be stored in, because its not in my "packages" folder. its in the root folder

EDIT, i just noticed that when i modified my other themes to load the shout box, guests dont view it. am i missing a code for a guest to use the shoutbox?

Gears of war fan site/modding site ||| Get the latest halo 2 plugins
------------------------------------------------------------------------

nneonneo

@brianjw: I have never encountered this option in the docs. Where did you find such a gem?
@Iamok: There are a hundred and one causes for this, though most are pretty easy to fix. Have you visited http://domain.com/board/url/yshout/yshout.php directly? It should say "Nothing to do", or possibly blank (blank --> language files not installed)
@th2mods: If it's blank, usually that means the language modifications aren't installed. The usual symptoms of this are a lack of admin links and a blank submit button -- did you see that before the shoutbox died?
If you check your webserver error logs, I'm fairly sure something interesting will crop up.
Point by point:
QuoteMy host is www.ulmb.com. and also when i go to the yshout.php file on my host, there is nothing in it. maybe thats the problem?
Do you mean by going to it using your browser (http://domain.com/path/to/forum/yshout/yshout.php) and seeing blank (in which case the above comment on the language files holds), or that the file on FTP is blank (in which case something is very wrong)?
Quotemaybe thats the problem? so could you PM me the code that goes inside it, and ill tell you if it works.
There's a lot of code, so simply see the file yshout/yshout.php inside the mod .tar.gz file (if you have an archiver capable of opening it)
QuoteEDIT, what directory is the default for it to be stored in, because its not in my "packages" folder. its in the root folder
The entire mod, except for the SMF-side code, is housed in /<forum>/yshout. The PHP script lives in yshout/yshout.php, the JS is in yshout/js/. So, if it's in the forum root, that's normal.
QuoteEDIT, i just noticed that when i modified my other themes to load the shout box, guests dont view it. am i missing a code for a guest to use the shoutbox?
Yes, you'll have to insert the <div id="yshout"> piece of code twice if you placed it in a members-only part (once for members-only, once for guests). This varies a lot depending on theme; some themes have a nice spot to place it where both members & guests see it, others are very similar to the default theme and hence have two spots (in the header), etc.
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!

th2mods

http://domain.com/board/url/yshout/yshout.php  loads fine for me. im willing to give you my admin info to figure out this error. would you mind? pm me for further info

site is, http://cafe.ulmb.com just so you can see it in person

Gears of war fan site/modding site ||| Get the latest halo 2 plugins
------------------------------------------------------------------------

brianjw

Quote from: nneonneo on July 21, 2007, 12:02:50 AM
@brianjw: I have never encountered this option in the docs. Where did you find such a gem?
I found it in another mod install file. It does work, you might try it. ;)

nneonneo

@th2mods: When I load up yshout/yshout.php, I get the download request

Download yshout.php
Your request to download yshout.php is being processed.

Please Wait... (25 seconds remaining)



...that's so broken...
It seems that ULMB has detected yshout.php as a "downloadable file" and is forcing the countdown upon it (which honestly doesn't make sense, because it is a PHP script). Could be a permissions thing, I suppose.

@brianjw: I will add it to 1.07 and upload it. Thanks so much!
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!

th2mods

#768
could i change the permissions for that file trough FTP, and maybe that will work??

EDIt... i think i found my problem...... http://forum.unlimitedmb.com/showthread.php?t=1690


can i bypass that in anyway?

Gears of war fan site/modding site ||| Get the latest halo 2 plugins
------------------------------------------------------------------------

glxpa

Has anyone thought about a "popup" function for nneonneo's shoutbox?

I love it thus far, but my users are asking for the popup functionality a la Xoop's (crappy) shoutbox.

I gave it a shot by creating a php article and popping that up (in TinyPortal) but that didn't work.

th2mods

is there anyway that i can upload the yshout files to another host then my member can access the shoutbox there? i tried but it doesn't work, is it tied with SMF?

Gears of war fan site/modding site ||| Get the latest halo 2 plugins
------------------------------------------------------------------------

brianjw

Quote from: nneonneo on July 21, 2007, 01:59:34 PM
@brianjw: I will add it to 1.07 and upload it. Thanks so much!
Have you tested it? :) You're welcome. ;)

nneonneo

@brianjw: Yes, I just tested it on guinea and it seemed to like that.
@th2mods: Well, that really sucks...I suppose there would be a way to have manual refresh (actually, it would be pretty easy; remove the automatic timer in the JS and add a little link into the form which says "refresh"...
And yes, the functions are tied into SMF (e.g. administrative privs, BBCode parsing, usernames, profile links, etc.). If you want a shoutbox like it, I suppose you could go for the original yshout (http://yurivish.com/yshout), which, since the initial v1 (which I use) has undergone a lot of changes.
@glxpa: What kind of "popup" functionality are we talking about? I'm assuming you mean a separate window for yshout, which is in fact entirely possible. It consists of taking the code you would usually put in index.template.php and placing that in an HTML file instead, then adding a popup-link to your forum (as for functionality like Google's "Pop out", I think that would be a bit more difficult, but probably still doable).
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!

cru

#773
hi! i installed it in the default 1.1.3 theme! this is so cool! I ignored the

"  ./Themes/default/languages/Modifications.english-utf8.php     File not found"

... and my shoutbox works good. i have some questions..

1. i would like to remove the "History" and "Commands" clickable texts above the shoutbox. h0w do i do it?


Ryan

File attachmentment problem since installing Shoutbox.Ive installed this shoutbox on my forum since ive installed it when users that browse forum with Firefox and attach 2 small files to there post, after the post is submitted only 1 file is attached instead of what should have been 2 files attached...This is bizzare as it doesnt do it in Internet Explorer, IE attaches them fine.The reason i post this here is becuase when i uninstalled shoutbox the attachments were working fine in firefox.This leads me to thinking somthing added tot he index.template.php by shoutbox causes confliction with the multiple file upload javascript in the post box.Can anyone test this on there forum whosh running this shoutbox.. Remember use Firefox. 

glxpa

Quote from: nneonneo on July 21, 2007, 08:35:38 PM
@glxpa: What kind of "popup" functionality are we talking about? I'm assuming you mean a separate window for yshout, which is in fact entirely possible. It consists of taking the code you would usually put in index.template.php and placing that in an HTML file instead, then adding a popup-link to your forum (as for functionality like Google's "Pop out", I think that would be a bit more difficult, but probably still doable).

Gave it a shot..

hxxp:www.wiredjc.com/yshout/test.php [nonactive]

two issues - one is, if you do it as a "pop a new window" type link, you get

Shout Box


Shoutbox loaded in another window. Retrying...

which is understandable - but is there any way to disable that check (and have two going concurrently) or make the "new" one take over?

Second, when I try to shout from that popped page, I get an "Error on Page" error that says:

Line: 112
Char: 2
Error: Object Expected
Code: 0
URL: hxxp:www.wiredjc.com/yshout/test.php [nonactive]

I put a copy of the php file I created to do the popup at hxxp:www.wiredjc.com/yshout/test.php.src [nonactive]

Thanks for any help!

nneonneo

@cru: In yshout/yshout.php: find the line
echo '<a href="javascript:goTo(\'file=',checkName($chatFile),'&amp;history\')">',$txt['yshout_history'],'</a>&nbsp;<a href="javascript:goTo(\'help\')">',$txt['yshout_commands'],'</a>';
(about line 313). Remove or comment out this line (by adding "//" without quotes to the beginning) and the History and Commands links will not show up.
@M3THOD: I have not encountered this problem. On my forums, it works fine (I attached two images to the post, on the default theme where the shoutbox is installed, and the resulting page had both, and I am using FF 2.0.0.5.) I do not change post code at all, only adding a few JS includes and some inline CSS.
@glxpa: To disable the check, see yshout/js/yshout.js: in loadChat, there's a block of code starting with "if(get_cookie"; remove that block of code and also remove the set_cookie line.
As for the other problem, add the script "Themes/default/script.js" to the includes list, and it will work (this error is triggered by the missing "textToEntities" function defined in that script):
<script src="',$boardurl,'/Themes/default/script.js" type="text/javascript"></script>
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!

nneonneo

#777
[announce] 1.08 has been released, and it is a recommended upgrade for any users on large boards. (@th2mods: you _may_ be able to convince ulmb to accept this script now; see below)

There are a few minor bugfixes, but the major change is the way the shoutbox performs updates (and I owe all credit to Sarke, as he details here: http://www.simplemachines.org/community/index.php?topic=137508.msg996154;topicseen#msg996154). Instead of querying the server every 1.5 sec for data, the client now opens a connection, which the server holds open until new shouts arrive. This system should drastically reduce the CPU load of the shoutbox on your server, and should allow it to be run reliably without a PHP accelerator.

The controlling option for this "push" feature is $updateTimeout in yshout/yshout.php. Do NOT increase this past the maximum script execution time; if you don't know what this is, leaving it at 20 is probably safe. The default setting means that instead of a query every 1.5 seconds, even with no changes, yshout.php will now be queried only once every 20 seconds, which should be more than enough for most people.

Enjoy! As always, report bugs and I will do my best to eliminate them.

EDIT: I should, however, note a caveat: this feature will cause several server processes to be kept alive for up to 20 seconds (if there are 10 shoutboxes open, then 10 server processes will be opened). Some hosts may not like this, but, to be honest, it is a lot less stressful on servers than 10 requests every second ;)
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!

cru

#778
i installed 1.08 today, and it worked well

i have a question: i would like to put it just above the footer, not in the default position. could that be possible?

im not good in coding... TIA

nneonneo

It's entirely possible.

There are four "blocks" of code which are inserted into index.template.php. They start with "// YSHOUT HERE" and end with "// YSHOUT END".

The first one is quite long: it is the JS+CSS block. Leave that one alone.
The second is the JS collapse code; remove it.
The third and fourth should be identical; remove them both.

Now, on the main mod page, I list a piece of code that needs to be placed at the desired location. I'm not too sure what you mean by footer (i.e. by the board stats, by the Powered by logos or elsewhere?) so you might have to experiment a bit.
The code you'll need to insert is
// YSHOUT HERE
echo '
<br /><b>Shout Box</b><br /><br />
<div id="yshout">',$txt['yshout_loading'],'<br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /></div>';
// YSHOUT END
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!

Advertisement: