News:

Wondering if this will always be free?  See why free is better.

Main Menu

nneonneo's Shoutbox

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

Previous topic - Next topic

nneonneo

@Joris: odd, I've never seen that bug before.
Locate the two places in yshout/yshout.php and change the messages to make them distinguishable. Then tell me which line causes the error.
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

Maybe Joris, you should do a new install because it works for all these other people ;)

JohnnyMcKinney

Ok if I make it so no one can use the IMG tag does it come with an error message like "Sorry you are not permitted to use this code" or is it possible to make one?

Second
I am also confused by your answer?

QuoteI don't think the BBC parser is able to distinguish different access levels, though if users have taken to abusing the image tag, you can add it to the BBC exclusion list (search for
in yshout/yshout.php)

Is that a yes? Cause it sounds different from the first answer or is that the same answer?

Lastly
Thanks for the fix on the shoutbox. I don't know the purpose of the impersonate, but its freaking funny when members say WTF I DIDNT SAY THAT!! Guess thats why you made it lol.  

Zwerko

How can I limit size of history? Can I set somewhere size in kB or how far back in days? tnx

nneonneo

@Zwerko: I've always used a cron job on my server, but if your server won't let you (and I just realized most don't), then you need to edit truncateChat function to your needs. I can't give you an exact guideline for that though.

@Johnny: If you want to disable [ img ] tag, then search for [left] in yshout/yshout.php (there are two occurences). In each occurrence, add [img (note lack of final "]") to the array.
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!

slvreagl

I have ver. 1.05 installed it appears there is no uninstaller is this correct? Should I just delete it from the packager? When I try to uninstall it from the packager it says This package cannot be uninstalled, because there is no uninstaller!

Please contact the mod author for more information.

?? :-\ ??

JohnnyMcKinney

So I can't make it so only admins and mods can use the IMG tag?

bobbbb

#447
Hello nneonneo,

Thank you sir for all your help and for your mod.

I would like to know, is it possible to disable HTML code the same way we can disable BBC code? I would like to disable the <IMG> tag, but it doesn't work in the BBC parsing line.

$newText = str_replace(array("[list]","[center]","[left]","[right]","[img]","[font]","[color]","[size]","[glow]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
preparsecode($newText); // gah, sanitize input!!
$newText = parse_bbc($newText); // w00t!
censorText($newText);



I'm not quite sure how this works.

And also, are you accepting donations? I would like to send you a Paypal donation for your efforts.

*EDIT*
Found the solution,

instead of putting in "<img" I entered the equivalent "&lt;img", and all <img text is successfully parsed out.

Zwerko

Quote from: nneonneo on March 20, 2007, 06:47:29 PM
@Zwerko: I've always used a cron job on my server, but if your server won't let you (and I just realized most don't), then you need to edit truncateChat function to your needs. I can't give you an exact guideline for that though.

Shout's are deleted automatically but back 10 days or so, I was thinking that u have somewhere in code line that I can change to only few days. If not never mind, I will delete it manually....What I have to do to edit truncateChat function?

brianjw

Nneonneo, I use the theme XD3Dv1 with SMF 1.1.2 and TinyPortal v0.9.8.3. :)
I am no longer gonna try to integrate this with the TinyPortal part, but I will integrate it as it should with SMF. OK, I want to make the shoutbox appear right before the copyright. What do I do? ???

kichu

Hey nneonneo Thnaks for the Mod. Am using it in my site http://da-pirates.com and it is working good. I started my website 2 months back and now 12,500 members joined. All members liking Shoutbox so  Once again thaks to you nneonneo.

nneonneo

#451
@Johnny: Under
$newText = str_replace(array("[list]","[center]","[left]","[right]"),"",$newText); // kill some BBCode--these tags are useless and can be abused
add
if(!$user['is_mod'] && !$user['is_admin']) $newText = str_replace("[img","",$newText)
and then admins/mods will be able to use [ img ], others won't (be sure to edit both locations)

@slvreagl: There's an uninstaller, but if you have upgraded to 1.1.2, then the Package Manager will not allow uninstall.
One solution is to manually uninstall it -- remove the yshout folder and modifications made to index.template.php (all three blocks of code between // YSHOUT HERE and // YSHOUT END)
Another is to uninstall 1.12 patch, uninstall shoutbox and reapply 1.1.2 patch (not recommended for a big forum, but it will probably work)
Finally, you can edit the package directly and change the uninstall versions in install.xml.

@bobbbb: I'm not accepting donations, but thanks for the kind thoughts :)

@Zwerko: something like
if(time() - filectime("$logdir/history.$chatFile") > (60*60*24*10)) unlink("$logdir/history.$chatFile");
right before the final "}" of the truncateChat method should do the trick.
So, that would go after fputs($handle, $oldText);
fclose($handle);
}

60*60*24 = one day, so *10 means ten days.

@brianjw: You mean the copyright at the bottom of the page? That would be in index.template.php in template_main_below() I think. You'd copy the first block of code between // YSHOUT HERE and // YSHOUT END (the CSS+JS includes) from the default theme to the new theme's index.template.php, ignore the second block (JS header collapse) and add
// YSHOUT HERE
echo '<div id="yshout">',$txt['yshout_loading'],'</div>';
// YSHOUT END

to whereever you wanted the shoutbox to appear in template_main_below(), probably right after the global line or perhaps about 3 lines after that.

@kichu: glad you like 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!

JohnnyMcKinney

I must admit man. This is the best shoutbox around. I love how I can reply to something and the next time I check rather you're offline or not you've replied. I've been waiting 2 weeks for some other coder to actually reply. Maybe you can look into this and tell me if this is possible.

http://www.simplemachines.org/community/index.php?topic=158750.0

If so do you think you can stick to the task ;)

brianjw

@nneonneo: Thanks :) It's a little confusing, maybe ill do it tomorrow

JohnnyMcKinney

I recently transfered my server and now all of a sudden I get this error:

Warning: fopen(chats/home.txt) [function.fopen]: failed to open stream: Permission denied in /home/silentki/public_html/forum/yshout/yshout.php on line 715
File error (writeLine); aborted

Any advice?

EDIT: LOL I figured it out, I forgot when I transfered I had to edit the permissions back to 777 lol.

I did how ever add your code and there three different spots to add it... A little help. Do I add the code underneath the code above or inside of it?

brianjw

@nneonneo: you have already registered on my site a while back but let me know if your willing to do this:
QuoteBecome an admin on my site and you can set it up in the XD3Dv1 theme ;)
If you say yes, I will send you a PM to let you know a little more detail ;)

Zwerko

Quote from: nneonneo on March 21, 2007, 06:15:55 PM
@Zwerko: something like
if(time() - filectime("$logdir/history.$chatFile") > (60*60*24*10)) unlink("$logdir/history.$chatFile");
right before the final "}" of the truncateChat method should do the trick.
So, that would go after fputs($handle, $oldText);
fclose($handle);
}

60*60*24 = one day, so *10 means ten days.

It's working, thanks  ;) Keep up a good work  >thumbup up<

barinov

Hi there people!
I just cant get working the shoutbox..I´ve got latest version 1.06 and SMF1.1.2
Appears like this :

hxxp:img162.imageshack.us/my.php?image=untitled2eo1.jpg [nonactive]


First I got that error, relating to refreshing etc, I edited as I saw trough the inicial topic, and now Just got Loading and nothing..
As some user posted before when I type yshout.php adress nothing appens, just white window, no error or something

Help please!!

brianjw

#458
@barinov: This has been discussed somewhere in this topic ;)

@nneonneo: have you seen my post before?


barinov

I found that fixed index.template..does anyone still have it?

Advertisement: