PDA

View Full Version : Hide smilies panel in WYSIWYG editor


Biker_GA
08-30-2005, 03:53 PM
I have a LOT of members who post from work and would like the ability to turn off the smilie panel in the WYSIWYG editor as a user option.

Cyricx
08-30-2005, 05:18 PM
I think you can create a new profile field, make it a single selection radio with the options being

Yes
No

write down the profile field number and then I "think" you will head to the

editor_toolbar_on template and find this code


<if condition="$show['wysiwygsmilies']">
<td><img src="$stylevar[imgdir_editor]/separator.gif" width="6" height="20" alt="" /></td>
<td><div class="imagebutton" id="{$editorid}_popup_smilie" title="$vbphrase[smilies]">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td><img src="$stylevar[imgdir_editor]/smilie.gif" alt="" width="21" height="20" /></td>
<td class="alt_pickbutton"><img src="$stylevar[imgdir_editor]/menupop.gif" width="11" height="16" alt="" /></td>
</tr>
</table>
</div></td>
</if>


and incase it in this conditional


<if condition="$bbuserinfo['fieldxx'] == Yes">

code above

</if>


changing xx to the number for the field

This is all hypothetical and I haven't tested it, so it could be MILES off from what you would need to do. But that's where I would start on trying to do it :)

Biker_GA
08-31-2005, 01:17 PM
It looked good! LOL Unfortunately, it didn't. No errors, tho. But the smilie panel still shows in the WYSIWYG editor.

Cyricx
08-31-2005, 05:27 PM
Hehe crap.

it's the thought that counts ;)

Will be quite awhile before I can look into this further, hopefully one of the coders with more time will fiddle it out. It should just be a new field and template edit, just a matter of finding where in the template(s) that need to be encased in the conditional.

Wayne Luke
08-31-2005, 06:20 PM
Yes has to be in quotes and is case sensitive since it is a string. Also make sure to change the XX in fieldxx to the appropriate field id number.

Biker_GA
08-31-2005, 08:49 PM
<if condition="$bbuserinfo['field12'] == 'Yes'">


Like that?

Adrian Schneider
08-31-2005, 08:50 PM
yes sir

Biker_GA
08-31-2005, 08:54 PM
:( Didn't work.