PDA

View Full Version : How do I disable smilies in text by default?


Snowhog
09-07-2014, 11:17 PM
vBulletin 4.2.2

Where do I change the setting for "Disable smilies in text" which is unchecked by default when creating/replying to a post? (Additional Options | Miscellaneous Options:) I'd prefer that it was enabled by default.

When you start or reply, scroll down and there are three Additional Options:

Show your signature
If enabled, your signature will be displayed below the message.

Automatically parse links in text
Will turn www.example.com into http://www.example.com.

Disable smilies in text
If selected, :) will not be replaced with

The first two are checked (enabled) by default. The third, 'Disable smilies in text' is unchecked by default. This is what I want to change. The Posting Phrases Containing 'Disable smilies in text' is disable_smilies_in_text. The template this phrase is in is newpost_disablesmiliesoption:
<li>
<label for="cb_disablesmilies"><input type="checkbox" name="disablesmilies" value="1" id="cb_disablesmilies" {vb:raw checked.disablesmilies} tabindex="1" /> {vb:rawphrase disable_smilies_in_text}</label><p class="description">{vb:rawphrase disable_smilies_in_text_explain}</p>
</li>
I'd assume that value="1" needs to be changed, and I tried that (to "0"), but it didn't have any effect. When I looked at the two other options, both contained the same value="1" as does this option, and those two are checked by default. The code to set this has to be somewhere.

nerbert
09-08-2014, 03:01 AM
I don't know what that value of "1" does. The way you set a checkbox to checked by default is with checked="checked"


<input type="checkbox" name="disablesmilies" value="1" id="cb_disablesmilies" tabindex="1" checked="checked">



Actually I think checked ="duckies_and_bunnies" will work too. Any value at all sets it to true

cellarius
09-08-2014, 05:32 AM
The default value of 1 is what is sent to the underlying php code if the box is checked. In a binary/boolean sense: yes/no, 0/1, checked/unchecked.

Snowhog
09-11-2014, 03:49 AM
This is the section of code from the newthread template that I assume causes the check boxes to be checked by default for "Show your signature" and "Automatically parse links in text", and causes the check box for "Disable smilies in text" to be unchecked by default:
<vb:if condition="$show['misc_options']">
<div class="blockrow">
<label>{vb:rawphrase miscellaneous_options}:</label>
<ul class="checkradio group rightcol">
<vb:if condition="$show['signaturecheckbox']">
<li>
<label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="1" {vb:raw checked.signature} /> {vb:rawphrase show_your_signature}</label><p class="description">{vb:rawphrase show_your_signature_explain}</p>
</li>
</vb:if>
<vb:if condition="$show['parseurl']">
<li>
<label for="cb_parseurl"><input type="checkbox" name="parseurl" value="1" id="cb_parseurl" tabindex="1" {vb:raw checked.parseurl} /> {vb:rawphrase automatically_parse_links_in_text}</label><p class="description">{vb:rawphrase automatically_parse_links_description}</p>
</li>
</vb:if>
{vb:raw disablesmiliesoption}
</ul>
</div>
</vb:if>

My assumption is that much is missing from {vb:raw disablesmiliesoption}, but I don't know what the label, input type name, and id are for disablesmiliesoption.