News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

How to change default smiley when adding one ...

Started by Steve, August 25, 2014, 06:45:17 PM

Previous topic - Next topic

Steve

How do I change the smiley that shows when I click on 'Add Smiley'?



I know how to change it using the dropdown to the right but I'd like it to default to something other than what's showing.
DO NOT pm me for support!

mashby

You want the default to be something other than afro.gif in the drop-down on the right which would in theory change up the picture on the left?
Always be a little kinder than necessary.
- James M. Barrie

Steve

Yes. I realize I can upload a smiley with a name alphabetically prior to afro.gif but I was wondering if there was an easy way to make any one I want the default.
DO NOT pm me for support!

mashby

Not entirely sure. I know it's Themes/default/ManageSmileys.template.php, lines 326 through 335:
else
{
echo '
<select name="smiley_filename" id="smiley_filename" onchange="updatePreview();selectMethod(\'existing\');">';
foreach ($context['filenames'] as $filename)
echo '
<option value="', $filename['id'], '"', $filename['selected'] ? ' selected="selected"' : '', '>', $filename['id'], '</option>';
echo '
</select>';
}
That's about as far as I could read before my head exploded. I'm not sure what makes this get set to true:
$filename['selected']
Always be a little kinder than necessary.
- James M. Barrie

Steve

Lol ... know what you mean ... that's why I stay out of the coding business.

Thanks for looking. I was hoping it was an easy fix but since it's not I'll just upload the smiley I want with a filename that's alphanumerically first and that'll work.
DO NOT pm me for support!

Deaks

unfortunately mashby is correct aswell as yourself this isnt possible without altering some code.
~~~~
Former SMF Project Manager
Former SMF Customizer

"For as lang as hunner o us is in life, in nae wey
will we thole the Soothron tae owergang us. In truth it isna for glory, or wealth, or
honours that we fecht, but for freedom alane, that nae honest cheil gies up but wi life
itsel."

mashby

A little bit of jQuery magic could be applied to make it so (Star Trek sound snippet here). :)

I'm a little curious now as to what you're trying to achieve with this though. It can certainly be done, but how often are you in there adding smileys that it would make a real difference?
Always be a little kinder than necessary.
- James M. Barrie

Steve

It isn't that so much as having a personal issue with the smiley that currently shows. I dislike it for personal reasons so wanted to change it. :)
DO NOT pm me for support!

mashby

I can appreciate that for sure. Perhaps that specific smiley shouldn't even be included in the default SMF package like it is now. Are you currently using it? If not, delete it altogether and let another smiley show up there instead.

I don't have a smiley like that in my global set, but when I go to Add Smiley, that is the one that's set. No image appears though. That seems odd to me. But I also have three different smiley sets in addition to the Default one. One is for light themes (that I really no longer have), another for the dark themes (which I love), and one for a beer theme. Imagine that. It's on the Default one where I am seeing afro.gif. None of the other sets have that. And when I go to Edit Smileys and select Default, I don't see afro.gif there either. Something's not right in Denmark.
Always be a little kinder than necessary.
- James M. Barrie

Steve

It didn't occur to me to just delete it.

I agree, that particular smiley probably shouldn't have been included but since it was I can see it's easily gotten around now. Thanks mashby. :D
DO NOT pm me for support!

Advertisement: