Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Hj Ahmad Rasyid Hj Ismail on August 20, 2010, 02:53:16 AM

Title: Align Smileys
Post by: Hj Ahmad Rasyid Hj Ismail on August 20, 2010, 02:53:16 AM
Align Smileys - Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=2690)

Taken over by: BurkeKnight (http://www.simplemachines.org/community/index.php?action=profile;u=150637) - BurkeKnight Enterprises (http://www.burkeknight.com/) from: Joker™ (http://www.simplemachines.org/community/index.php?action=profile;u=226111)

For Support: The mod's Support topic at SMF, or at BurkeKnight Enterprises (http://www.burkeknight.com/).

When a user is using a Smiley the text or other smiley etc next to it tends to go to bottom i.e there alignment is disturbed. This mod will align them in middle as referred to the Smiley.


Change Log

Version 1.3
- Fixed a bug pointed out here (http://www.simplemachines.org/community/index.php?topic=396701.msg3388813#msg3388813)


Version 1.2
- Mod updated for SMF 2.0 final and SMF 1.1.14


This mod is licensed under Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) (http://creativecommons.org/licenses/by-sa/3.0/)
Title: Re: Align Smileys
Post by: !RFAN on August 26, 2010, 06:24:48 AM
nice..
Title: Re: Align Smileys
Post by: Neo_TE on September 09, 2010, 04:48:16 AM
was looking for a mod like this for a very long time. thanks.
Title: Re: Align Smileys
Post by: Joker™ on September 09, 2010, 09:32:41 AM
Your welcome guys :).
Title: Re: Align Smileys
Post by: lovearat on October 03, 2010, 05:17:11 PM
Will this mod work for 1.1.11 with a manual install?  I have been wanting a mod like this for a long time. I love it, because I am a neat freak. lol
Title: Re: Align Smileys
Post by: Herr_Inoddorell on October 04, 2010, 10:35:42 PM
Thanks for the mod Joker™, pretty sweet 8)

Quote from: lovearat on October 03, 2010, 05:17:11 PM
Will this mod work for 1.1.11 with a manual install?  I have been wanting a mod like this for a long time. I love it, because I am a neat freak. lol

I tried it, and worked for me. In SMF 1.1.11, you should:

Find:


$smileytocache[] = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" border="0" />';


Replace with:


$smileytocache[] = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => '&#58;', '(' => '&#40;', ')' => '&#41;', '$' => '&#36;', '[' => '&#091;')) . '" style="vertical-align:middle" border="0" />';
Title: Re: Align Smileys
Post by: lovearat on October 05, 2010, 03:43:46 PM
Thank you very much, Herr_Inoddorell  :)
Title: Re: Align Smileys
Post by: Joker™ on November 14, 2010, 04:26:29 AM
Quote from: Herr_Inoddorell on October 04, 2010, 10:35:42 PM
Thanks for the mod Joker™, pretty sweet 8)

Quote from: lovearat on October 03, 2010, 05:17:11 PM
Will this mod work for 1.1.11 with a manual install?  I have been wanting a mod like this for a long time. I love it, because I am a neat freak. lol

I tried it, and worked for me. In SMF 1.1.11, you should:

Find:


$smileytocache[] = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" border="0" />';


Replace with:


$smileytocache[] = '<img src="' . htmlspecialchars($modSettings['smileys_url'] . '/' . $user_info['smiley_set'] . '/' . $smileysto[$i]) . '" alt="' . strtr(htmlspecialchars($smileysdescs[$i]), array(':' => ':', '(' => '(', ')' => ')', '$' => '$', '[' => '[')) . '" style="vertical-align:middle" border="0" />';

Thanks for sharing the code :).If you like, can i make package of this code also and put it on mod site with existing mod.
Title: Re: Align Smileys
Post by: Joker™ on November 14, 2010, 04:26:47 AM
Version 1.1 change log*
- Mod updated for RC4
Title: Re: Align Smileys
Post by: Herr_Inoddorell on November 24, 2010, 12:33:21 AM
@lovearat: You're welcome :D.

@Joker™: Sorry, didn't see the answer earlier. Sure, it would be great if you can package this code for both versions ;).

Regards!
Title: Re: Align Smileys
Post by: Linda.V on June 17, 2011, 05:45:23 AM
I've also just installed this mod, thx Joker  ;)
Title: Re: Align Smileys
Post by: nax on August 08, 2012, 11:42:27 AM
I have found a problem with this Mod, I use nested quotes and smileys within the nesting are removed. I am using SMF 2.0.2
Title: Re: Align Smileys
Post by: Joker™ on August 12, 2012, 09:17:49 AM
Quote from: nax on August 08, 2012, 11:42:27 AM
I have found a problem with this Mod, I use nested quotes and smileys within the nesting are removed. I am using SMF 2.0.2
Unable to reproduce the issue with "Default curve theme". Which theme and SMF version are you using?
Title: Re: Align Smileys
Post by: nax on August 12, 2012, 09:26:28 AM
SMF 2.0.2 | SMF © 2011, Simple Machines
Bright Forest Theme v2.3 by Aaron
Title: Re: Align Smileys
Post by: Joker™ on August 12, 2012, 10:10:25 AM
Quote from: nax on August 12, 2012, 09:26:28 AM
SMF 2.0.2 | SMF © 2011, Simple Machines
Bright Forest Theme v2.3 by Aaron
Please try it with default curve theme as well and see if the issue persist.
Title: Re: Align Smileys
Post by: emanuele on August 12, 2012, 10:14:59 AM
Joker the issue is with the WYSIWYG editor: when you have this mod installed and you switch between the WYSIWYG and the normal editor a couple of times the smiley are stripped out.

I told nax to link the topic where we debugged the issue, bug he didn't! :P
http://www.simplemachines.org/community/index.php?topic=417533.msg3386787#msg3386787
Few posts before there is the full story, but this is the core.
Title: Re: Align Smileys
Post by: Joker™ on August 12, 2012, 10:19:47 AM
Quote from: emanuele on August 12, 2012, 10:14:59 AM
Joker the issue is with the WYSIWYG editor: when you have this mod installed and you switch between the WYSIWYG and the normal editor a couple of times the smiley are stripped out.

I told nax to link the topic where we debugged the issue, bug he didn't! :P
http://www.simplemachines.org/community/index.php?topic=417533.msg3386787#msg3386787
Few posts before there is the full story, but this is the core.
Ahh ok, so steps to reproduce it(not near to PC right now)
Type something and add a smiley
Go to WYSIWYG mode
Back to normal mode and do some insane switching. Error appears :D.

Is that the case?
Title: Re: Align Smileys
Post by: emanuele on August 12, 2012, 11:36:39 AM
Yep, exactly!
You have always to do something insane! :P

In fact the same should be true also when you quote to the WYSIWYG (that means bbc to html including your change) and then you post the result (i.e. html to bbc), during this last step, probably html_to_bbc expects an <img> tag with a very well defined format (something like <img style="" class="" src="" />) instead it receives a slightly different tag (<img class="" src="" style="your style" />) and it fails to parse the image back to bbc.
Title: Re: Align Smileys
Post by: nax on August 13, 2012, 04:31:32 AM
Yup in my forum we are insane O:)  Sorry I didn't link that conversation Emanuele  :-[

Is this simply an issue with this mod or is there a fundemental flaw in SMF 2.x?  Shuold this be escalated to the Development team.
Title: Re: Align Smileys
Post by: emanuele on August 13, 2012, 10:32:36 AM
/me points nax to the badge under his nick. :P

Not worth. ;)
Title: Re: Align Smileys
Post by: nax on August 13, 2012, 10:57:18 AM
Ok so I'm blind as well as thick  :o
Title: Re: Align Smileys
Post by: Joker™ on October 05, 2012, 06:58:09 AM
Fixed. Please try the lastest version, i.e 1.3.
Title: Re: Align Smileys
Post by: Hj Ahmad Rasyid Hj Ismail on October 08, 2014, 05:49:38 AM
Hiya all.

I am entrusted with this mod now but I haven't have time to look into it deeply yet. I also believe that my brother Joker is a better coder than I am. I will try to do my best in handling this mod.

Thank you for supporting this mod and do feel free to ask for support.
Title: Re: Align Smileys
Post by: Dwev on December 22, 2017, 07:14:23 AM
I'm trying to install this mod in SMF 2.0.15 with emulation for 2.0.8, but I get Test Failed for the ./Sources/Subs-Editor.php