News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Smiley Limit

Started by bdtcomp, April 02, 2012, 02:06:41 PM

Previous topic - Next topic

bdtcomp

All right,  :) it's been asked before  :D and I have searched the forums. But a couple of people on my new forum asked about limit smileys. We have a person putting on up to 70 smileys and yes we are going to have a  :o heart to heart talk, and maybe take him to the smiley woodshed!   :'( :'( :'(

Yes, it is aggravating, and I like to use the smileys, lord my moderator has put many on my server,  ;D but 70  >:( is a lot.

I don't mind doing a hack and just insert the code (smiley_limit = 15; ) for example. So is there an easy way to do this? There is sort of a limit in signature, it would be okay for me to set it there and then just use the number in the posts!  8)

kat

Looking at this post:

http://custom.simplemachines.org/mods/index.php?mod=430

You can do the edits mentioned and go for it.

http://custom.simplemachines.org/mods/index.php?mod=430

You'll probably need to change <install for="2.0.1"> to <install for="2.0.2"> and   <uninstall for="2.0.1"> to   <uninstall for="2.0.2"> though.

Just in case, READ MY SIG, woncha? ;)

Also, be aware that this won't stop people posting smileys from external sites...


bdtcomp

Thanks Doc Writer. I looked at the parsing for SmileyLimit - Installation Instructions for 2.0 RC3 . So I am assuming I could parse it this way.  8)

kat

If the files have the correct lines for editing, yep!

bdtcomp

Well I got the files changed, and the field to put the number limit works okay. And I ran the update file but you can still add past the limit. So I don't know, will triple check the code to see if I left something out!

bdtcomp

 :) :) :) :) :) :) SUCCESS  8) 8) 8) 8) 8) 8) 8)

Sorry about the smiles, but I wanted to make an impression. OK, this works in 2.0.2  ;)

What you need to be carefull is in the first file you parse. the code for post.php has the first line to parse and add after: But there are two identical lines, so add the code to parse after this snippet of code.

Quote// Prepare the message a bit for some additional testing.
$_POST['message'] = $smcFunc['htmlspecialchars']($_POST['message'], ENT_QUOTES);

kat

Well figured!

You might want to add that to the support topic that I linked you to, to share with other users of the mod. ;)

bdtcomp

QuoteWell figured!

You might want to add that to the support topic that I linked you to, to share with other users of the mod. ;)

Will do Doc Writer, but I don't think you gave me the support post? (See below)

Quote from: K@ on April 02, 2012, 02:16:16 PM
Looking at this post:

http://custom.simplemachines.org/mods/index.php?mod=430

You can do the edits mentioned and go for it.

http://custom.simplemachines.org/mods/index.php?mod=430



I think the top link should be to the post, but it's the same as the mod!

8)

NanoSector

There's a link to the Support topic on that page :)
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

bdtcomp

Thanks I posted there!  O:)


Advertisement: