Align Smileys

Started by Hj Ahmad Rasyid Hj Ismail, August 20, 2010, 02:53:16 AM

Previous topic - Next topic

Hj Ahmad Rasyid Hj Ismail

Align Smileys - Link to Mod

Taken over by: BurkeKnight - BurkeKnight Enterprises from: Joker™

For Support: The mod's Support topic at SMF, or at BurkeKnight Enterprises.

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


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)

!RFAN


Neo_TE

was looking for a mod like this for a very long time. thanks.

Joker™

Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

lovearat

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
<span style="font-size: 12px; color: red;">Do Not Pm Me For Support. Please use the appropriate board</span>

Herr_Inoddorell

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" />';

lovearat

Thank you very much, Herr_Inoddorell  :)
<span style="font-size: 12px; color: red;">Do Not Pm Me For Support. Please use the appropriate board</span>

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Version 1.1 change log*
- Mod updated for RC4
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Herr_Inoddorell

#9
@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!

Linda.V

I've also just installed this mod, thx Joker  ;)

nax

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

Joker™

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?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

nax

SMF 2.0.2 | SMF © 2011, Simple Machines
Bright Forest Theme v2.3 by Aaron

Joker™

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.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

emanuele

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.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Joker™

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?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

emanuele

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.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

nax

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.

emanuele

* emanuele points nax to the badge under his nick. :P

Not worth. ;)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

nax

Ok so I'm blind as well as thick  :o

Joker™

Fixed. Please try the lastest version, i.e 1.3.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Hj Ahmad Rasyid Hj Ismail

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.

Dwev

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

Advertisement: