Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Chas Large on June 13, 2011, 10:15:22 PM

Title: Special Characters and Symbols Insertion
Post by: Chas Large on June 13, 2011, 10:15:22 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3054)

Alternative Characters/Symbols Buttons for SMF2.0

This mod adds buttons to the Post area to allow one click insertion of special alternative characters or symbols.

Version History:

1.8 Added licence to allow for mod to be forked.
1.7 Added support for UTF-8 Characters - Many thanks to the customization team for assistance with this mod
1.6 Changed install code for the images so they go into all available themes - Many thanks Customization Team for the tip.
1.5 Corrected install operation code
1.4 Corrected character insertion from actual symbols to php codes. Added skip for non english_british language installation
1.3 Changed the position of the buttons as it impacted on the Font, Size and Color Drop Downs when browser not maximised.
1.2 Added 4 character/symbols Copyright, small O with circumflex, small e and i with Diaeresis, Micro and Plus/Minus symbols.
1.1 Added 3 symbols, Quarter, Half, Three Quarters.
1.0 Mod built and tested on two forums.

Please use the support link if required.

Regards

Chas Large
May 2018

Copyright (c) 2011/14, Charles Large
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Title: Re: Special Characters and Symbols Insertion
Post by: Bugo on June 20, 2011, 02:03:43 AM
SMF 2.0, UTF-8 => see screenshot.
Title: Re: Special Characters and Symbols Insertion
Post by: Jessica. on June 20, 2011, 11:42:47 AM
installed this without problems, inserted fine, but when I submit a test post with any of those symbols, NONE of them show up
Title: Re: Special Characters and Symbols Insertion
Post by: Chas Large on July 06, 2011, 04:00:16 PM
Quote from: Bugo on June 20, 2011, 02:03:43 AM
SMF 2.0, UTF-8 => see screenshot.
Sorry, never tested this with a UTF-8 forum so I can't say why this is occurring. The characters are inserted using PHP character insert from standard unicode character numbers, like you get in Windows Character Map so they should appear correctly. I'll see if I can set up a test forum based on UTF-8 and try the mod there. I'll get back to you.
Title: Re: Special Characters and Symbols Insertion
Post by: Chas Large on July 06, 2011, 04:01:49 PM
Quote from: Jessica. on June 20, 2011, 11:42:47 AM
installed this without problems, inserted fine, but when I submit a test post with any of those symbols, NONE of them show up
Are you using UTF-8 character set too? It might be a similar problem to Bugo's issue above.

Can you insert characters via Windows Character map or similar?
Title: Re: Special Characters and Symbols Insertion
Post by: Chas Large on July 06, 2011, 04:14:47 PM
Quote from: Chas Large on July 06, 2011, 04:00:16 PM
Quote from: Bugo on June 20, 2011, 02:03:43 AM
SMF 2.0, UTF-8 => see screenshot.
Sorry, never tested this with a UTF-8 forum so I can't say why this is occurring. The characters are inserted using PHP character insert from standard unicode character numbers, like you get in Windows Character Map so they should appear correctly. I'll see if I can set up a test forum based on UTF-8 and try the mod there. I'll get back to you.
I can confirm this is a bug with the mod for forums using UTF-8 character set. I'll work on a fix.
Title: Re: Special Characters and Symbols Insertion
Post by: Chas Large on July 07, 2011, 02:23:53 PM
Updated the mod to v1.7, this now supports both ASCII and UTF-8 Character sets.

Installed and tested on both types of forum and it works fine on both.
Title: Re: Special Characters and Symbols Insertion
Post by: mattio41 on August 29, 2011, 02:49:59 PM
I am sorry, I am new to this board, and had sent you a PM by accident, before seeing this section. My apologies.

I want to know, if the special characters can be replaces with icons or images instead? and if so, how might one do that?

thank you in advance.
Title: Re: Special Characters and Symbols Insertion
Post by: Chas Large on August 30, 2011, 01:54:51 PM
Quote from: mattio41 on August 29, 2011, 02:49:59 PM
I am sorry, I am new to this board, and had sent you a PM by accident, before seeing this section. My apologies.

I want to know, if the special characters can be replaces with icons or images instead? and if so, how might one do that?

thank you in advance.
If you download the zip file and unzip it to a folder, you'll see the images which are used as the buttons. You can use other images so long as either they have the same name or you recode the mod to use your images. I created the images to be the same size as other BBCode buttons.

Once you've created alternate images and renamed them or recoded the mod, repackage it and test it. The whole mod is easy to do.

Were you after some specific other characters or have some icons to use? I'd be happy to make a modified version if you provide the images.
Title: Re: Special Characters and Symbols Insertion
Post by: mattio41 on September 03, 2011, 02:12:00 PM
May I send my request to you in an email?
Title: Re: Special Characters and Symbols Insertion
Post by: Chas Large on September 09, 2011, 04:42:16 AM
Quote from: mattio41 on September 03, 2011, 02:12:00 PM
May I send my request to you in an email?
Please PM me with your e-mail address.
Title: Re: Special Characters and Symbols Insertion
Post by: elizadani01 on September 09, 2011, 06:15:18 AM
Special characters and symbols are useful to create attraction,always like to use that.

Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on March 23, 2018, 10:12:12 AM
Is there any standard which font and size is used to generate the symbols in the images, so that it looks nice in the WYSIWYG editor ;)? Is this documented somewhere? Is a standard font and size used in all of the images (that represent letters, like the Bold, Italic and Underline buttons) in the WYSIWYG post editor?
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on March 28, 2018, 06:31:46 PM
No one ???.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 01, 2018, 07:35:02 PM
I'm still looking for this info. Here are the images.

(https://s20.postimg.cc/yptvxp125/3qtr.gif)  (https://s20.postimg.cc/7rzyvyo4t/copywrt.gif)  (https://s20.postimg.cc/kje52h5ml/deg.gif)  (https://s20.postimg.cc/yd2hrj5xp/ediae.gif)  (https://s20.postimg.cc/eigg5fdvh/hlf.gif) (https://s20.postimg.cc/llobl13vh/idiae.gif) (https://s20.postimg.cc/xasb902jx/micro.gif) (https://s20.postimg.cc/osiv4obgt/ocirc.gif) (https://s20.postimg.cc/kw5j8oy71/plusminus.gif) (https://s20.postimg.cc/gn0t6j2nh/qtr.gif)

I just need the font and size info, that's all, so I could customize the mod to my forum's needs (generate the images that I need).

Since there is no copyright info for this mod, I will make my customization publicly available.
Title: Re: Special Characters and Symbols Insertion
Post by: Illori on May 02, 2018, 08:19:04 AM
the license or lack there of matters more then the copyright.
https://www.simplemachines.org/community/index.php?topic=461016.0
Title: Re: Special Characters and Symbols Insertion
Post by: Kindred on May 02, 2018, 09:42:05 AM
BTW: https://dev.w3.org/html5/html-author/charref
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 02, 2018, 10:44:09 AM
Quote from: Illori on May 02, 2018, 08:19:04 AM
the license or lack there of matters more then the copyright.
https://www.simplemachines.org/community/index.php?topic=461016.0

Quote from: IchBin™ on November 30, 2011, 03:06:21 PM
Starting January 1st we are requiring authors to do the following:

This mod is not covered by this new customization requirement. The initial release of the mod was on 14.06.2011 (the day this thread was opened). The copyright requirement came into effect 01.01.2012. Therefore, this mod is not affected by that decision... unless the requirement is applied retroactively, but I didn't get that from what was posted in the thread about the new copyright requirement.

Quote from: Kindred on May 02, 2018, 09:42:05 AM
BTW: https://dev.w3.org/html5/html-author/charref

Thank you ;). I'll keep it my bookmarks, It'll come in handy when editing the mod ;).

But, what I really needed was the font and size of the letters with which those images are generated.
Title: Re: Special Characters and Symbols Insertion
Post by: Illori on May 02, 2018, 11:05:48 AM
this mod is still covered by

Quote from: IchBin™ on November 30, 2011, 03:06:21 PM
Hello all,

Did you know that, whenever you create a new mod or theme, you have an exclusive copyright to your own work? International copyright law says that (http://en.wikipedia.org/wiki/Berne_Convention_for_the_Protection_of_Literary_and_Artistic_Works), when you create original work, nobody else has the right to redistribute your work or create a new version of it -- unless you say so.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 02, 2018, 11:09:13 AM
So... I have to wait for the author to pass, and another 50 years to make the mod of the mod publicly available for an outdated version of a forum from an organization (SMF) that might not even exist anymore ::)... if I actually live that long. Yeah... right ::).

I'll find another way... I always do.
Title: Re: Special Characters and Symbols Insertion
Post by: Kindred on May 02, 2018, 11:41:09 AM
Well, my point is that using an IMAGE is probably the wrong way to go about doing this.

the characters and symbols can all be done using html entities -- and that's how they SHOULD be done so that screen readers and google, etc can properly parse the content.

That way, you don't worry about font or size...   using the entity means that the system correctly displays in the current font and size along with every other bit of text.



However, if you want to update the mod -- contact the author and ask him to hand the license to you...
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 02, 2018, 05:54:10 PM
(https://s20.postimg.cc/yl4dci4il/Special_Characters_Mod.png)

I hope it's clearer now why I need the images.

Luckily, the author left a homepage on his profile that is still working and up to date, so I wrote him in the contact form of the site. Keeping my fingers crossed.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 03, 2018, 08:39:21 AM
OK, the author replied to my email and made it clear that I can modify and/or redistribute as I wish. I don't know if I'm allowed to post the entire content of the email (I'd have to ask). Unfortunately, the author is having some health issues and can't edit the mod's license agreement at the moment.

Can I customize this mod and post it as my own, clearly noting who is the original author of the code?
Title: Re: Special Characters and Symbols Insertion
Post by: Kindred on May 03, 2018, 09:47:03 AM
If you/he can send an email to the customization team
and
you agree to take over support of the mod

then the mod can be transferred to you and you can upload an updated version...   or you can submit your own version.

We do't typically like to see mods included as attachments, because that means that there was no review.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 03, 2018, 09:56:19 AM
I don't think he wants to transfer the mod and the rights to the mod, as well as the support, to me... I think what he meant in the email is that anyone can edit or copy the mod as they wish... I don't know which license would cover this.

I would much rather submit my own version of the mod. Is that permitted, even under the license (no license, Berne Convention) this mod is published under? I'd include the original author of the code and the code would not be identical to the original mod (well, mostly the same, but not identical). And, of course, I'd open a regular mod request (with the support topic and everything).
Title: Re: Special Characters and Symbols Insertion
Post by: Kindred on May 03, 2018, 10:01:42 AM
it's only allowed if the author has either changed the license to a permissive one or granted you specific permission to republish his code...  hence my indication that a message to the customization team is needed.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 03, 2018, 10:09:04 AM
OK, I'll pass that along.

Does the customization team have an email? I don't think he'll log in the forum, so I might pass that along as well. PM me if it's not allowed to share it in public.
Title: Re: Special Characters and Symbols Insertion
Post by: Illori on May 03, 2018, 10:22:24 AM
the cust team directly does not have an email address, you could have the email sent to [email protected] and we can take care of it from there.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 03, 2018, 08:26:29 PM
Got it. I'll pass the email along.
Title: Re: Special Characters and Symbols Insertion
Post by: GigaWatt on May 04, 2018, 06:37:15 PM
A license has been added to the mod, which, as I understand, allows modifying and redistributing the code, as long as the license agreement is present in the redistributed and/or modified work. Correct?