News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Special Characters

Started by Jeff B, February 14, 2006, 03:58:08 PM

Previous topic - Next topic

Jeff B

I have received so much help from this group that hopefully this is a little something I can contribute back that perhaps had not been thought of. I hope it is innovative enough to be included in the tips and tricks index.

There are times when a member has the need to use a special character but does not have the understanding to use the character maps available on most machines. This is a way for them to include special characters within a post without any knowledge at all.

edit post.template.php

// Print a drop down list for special characters!
echo ' <select onchange="surroundText(\'\'+this.options[this.selectedIndex].value+\'\', \'\', document.', $context['post_form'], '.', $context['post_box_name'], '); this.selectedIndex = 0;" style="margin-bottom: 1ex;">
<option value="" selected="selected">Special Characters</option>
                                                <option value="¢">Cent Sign ¢</option>
                                                <option value="°">Degree °</option>
                                                <option value="©">Copyright ©</option>
                                                <option value="®">Registered ®</option>
                                                <option value="£ ">pounds sterling £</option>
                                                <option value="§">Section symbol §</option>
                                                <option value="¥">Yen sign ¥</option>
                                                <option value="±">plus or minus ±</option>
                                                <option value="»">quote right angle »</option>
                                                <option value="«">quote right angle «</option>
                                                <option value="µ">micro µ</option>
                                                <option value="¼">one quarter ¼</option>
                                                <option value="½">one half ½</option>
                                                <option value="¾">three quarter ¾</option>
                                                <option value="÷">divide ÷</option>
</select>';
echo '<br />';

Advertisement: