Support Forum

Some trouble with smileys options

TH Thorsten
Thorsten
Member

I’ve just spent a good three hours creating some custom icons and smileys for our forum. I first went and uploaded my custom icons via Forum > Custom Icons. That all worked without a hitch. However, when I then went under Components > Smileys I ran into some trouble – I now had all my custom icons show up in there but the original S:P smileys where gone. Thus I could no longer figure out the codes to use since I wanted to replace the original ones. After finding a rather outdated documentation with an old screenshot in S:P Wiki I decided to go ahead with the upload as I could make out the original codes.

So I uploaded the first smiley, but the page didn’t refresh. I had to click on Smileys to actually see my new upload. Suddenly the original smileys showed up again as well (the list now expanded) – but the Name and Code columns were empty. Oh well, I continued on uploading the rest of my smileys, assigned the original names and codes, clicked Update Smileys Component – and now the old smileys suddenly had names as well – and codes, e.g. sf-cool – :sf-cool:. I am attaching a screenshot to illustrate.

Capture.PNG

So, everything seems to be sort of well after all, but it has me wondering if things won’t go awry down the road. Also, I see no option to enable/disable WP smileys (see old Wiki entry). Thus when users type e.g. ‘colon bracket’ they get the WP smiley etc., not our new custom smiley. I am guessing I am missing something or am I misunderstanding how this works? Appreciate some light in the dark.

 

14 Answers

New Answer

MP Mr Papa
Mr Papa
Member

There is an enabling of new, custom smileys… its the In Use column…  that must be checked for smileys to show in the front end…

custom icons and custom smileys are totally unrelated and have no bearing on each other…  I see no way they could cross from one to the other…   unless you mistakenly set the storage for each to be the same….  can you please check that on forum – integration – storage locations…  clearly, they cannot be the same…

TH Thorsten
Thorsten
Member

Did the Usage option so they are showing up under Smileys in the editor. But in previous versions it seems there were additional options. I would like to avoid S:P pulling standard WP emoticons when users type e.g. ‘:’ and ‘)’ but rather use our custom icons for that as well. But I have a feeling that’s not possible.

Well, I checked the storage options, which I’ve never touched to this day. Smileys Folder and Custom Icons Folder both point to /forum-smileys. That’ll explain it then. No clue how this happened, I never even as much as looked at this option before. Which would be the custom icons folder? I don’t see anything matching under wp-content.

TH Thorsten
Thorsten
Member

I searched and found http://codex.simple-press.com/codex/getting-started/useful-information/storage-locations/. Folder forum-custom-icons listed there did not exist on my server. I created the folder manually and moved all my custom icons in there.

MP Mr Papa
Mr Papa
Member

sorting them into separate folders should fix your situation…

the smileys logic will use sp smileys first…  if not found, it will check wp… but if you replace wp with sp, it wont use the wp ones…  this is in the forum only, of course.

TH Thorsten
Thorsten
Member

Then it appears smileys aren’t working as intended, at least for us. I’ve set up all my custom smileys and they appear in the Smileys box under the editor but here’s what’s happening when a user types an emoticon:

Capture-1.PNG

 

 

So it’s still using the WP emoticons. Here’s how I configured my custom emoticons:

 

 

custom_smileys.PNG

 

 

 

Or am I still misunderstanding? Would typing : and ) always lead to a WP smiley and only using : and ‘smile’ and : to using the SP custom smiley? The latter would mean I have to explain this to students or point them to the Smileys box and we ultimately end up with a mix of smileys.

 

MP Mr Papa
Mr Papa
Member

correct.  if you want an sp smiley to “replace” the wp smiley, it has to have the same code as the wp smiley…

if you want an sp smiley for : and ) then make that the code, not : and smile and :

and dont forget, you can turn off wp smileys on wp – settings – writing..

TH Thorsten
Thorsten
Member

Got it. Tried it and it’s working now. Thanks so much for the clarification.

One final note though, the issue mentioned earlier. Something I just observed again:

– Went under Components > Smileys > Custom Smiley Upload > Browse

– Selected a smiley to upload >Uploading… > Smiley uploaded! However, the page does not refresh

– I uploaded another smiley

– I clicked on Components > Smileys to refresh the page (probably not supposed to do that)

– The first smiley uploaded appears, the second didn’t. In addition two of my pre-existing smileys disappeared

– Thus I click Update Smiley Component. Now all smileys appear again, including the second one and the two ‘lost’ ones’

– The two ‘lost’ ones now have no entry under Name or Code, though they were populated before.

That is the same behavior I experienced yesterday. I am assuming the system expects a smiley to be uploaded and that the user then clicks Update Smiley Component after each upload. And because I am not doing this I am seeing the order of events as outlined above. Correct or bogus?

TH Thorsten
Thorsten
Member

I’m giving up, S:P keeps resetting my smileys after a random number of edits. See screenshot below. I’ve just wasted another hour making some changes and redoing this over and over, again and again, and it keeps blanking out:

 

Capture-2.PNG
MP Mr Papa
Mr Papa
Member

I am not sure I understand the issue – appreciate you are losing data occasionally…  it is best, but not sure its required (frankly, dont touch smileys after getting them set up once), to do one smiley at a time…

the only way it would blank out like that is for invalid data…  its a really tough one to perform error checking on and since the data gets serialized before stored in the db, often dont know there is a problem before its too late…  that said, normally that would result in losing all the smiley data, not just the name or code…  just ran a couple of tests and I could lose everything with bad data, but I couldnt get it to drop just the name and code…  odd..

TH Thorsten
Thorsten
Member

For now I have all our custom smileys loaded. I tried a few different ways, including loading one smiley at a time, which required uploading and clicking Update Smiley Component each time to see the new smiley, then adding Name and Code, then upload the next one, clicking Update Smiley Component to see that one etc. No matter what, I hit a point where it would eventually reset. Interestingly only though when using : and – and ) etc. (so I had a list of 20 edited and then suddenly it wiped). When using : and keyword and : it would stick. So this is how I’ve set it up for now and we’ll just give our students the list of shortcodes.

Perhaps there is something wrong with the backend. In which table would I find the data? Maybe a clean up would resolve this.

MP Mr Papa
Mr Papa
Member

the smileys are kept in the sfmeta table…  its a messy serialize array…

TH Thorsten
Thorsten
Member

Thanks so much! If I feel daring enough I’ll delve into that.

TH Thorsten
Thorsten
Member

Well, I dared. So I went into sfmeta > smileys. This is the content before my edits, which works fine:

a:16:{s:4:"cool";a:5:{i:0;s:8:"cool.gif";i:1;s:6:"cool";i:2;i:1;i:3;i:0;i:4;i:0;}s:10:"embarassed";a:5:{i:0;s:14:"embarassed.gif";i:1;s:6:":oops:";i:2;i:1;i:3;i:1;i:4;i:0;}s:4:"wink";a:5:{i:0;s:8:"wink.gif";i:1;s:6:"wink";i:2;i:1;i:3;i:2;i:4;i:0;}s:5:"smile";a:5:{i:0;s:9:"smile.gif";i:1;s:7:"smile";i:2;i:1;i:3;i:3;i:4;i:0;}s:5:"laugh";a:5:{i:0;s:9:"laugh.gif";i:1;s:7:":laugh:";i:2;i:1;i:3;i:4;i:4;i:0;}s:10:"tongue-out";a:5:{i:0;s:14:"tongue-out.png";i:1;s:12:":tongue-out:";i:2;i:1;i:3;i:5;i:4;i:0;}s:4:"kiss";a:5:{i:0;s:8:"kiss.gif";i:1;s:6:"kiss";i:2;i:1;i:3;i:6;i:4;i:0;}s:4:"evil";a:5:{i:0;s:8:"evil.png";i:1;s:6:"evil";i:2;i:1;i:3;i:7;i:4;i:0;}s:4:"yell";a:5:{i:0;s:8:"yell.gif";i:1;s:6:"yell";i:2;i:1;i:3;i:8;i:4;i:0;}s:9:"surprised";a:5:{i:0;s:13:"surprised.gif";i:1;s:11:":surprised:";i:2;i:1;i:3;i:9;i:4;i:0;}s:8:"confused";a:5:{i:0;s:12:"confused.gif";i:1;s:10:":confused:";i:2;i:1;i:3;i:10;i:4;i:0;}s:10:"speechless";a:5:{i:0;s:14:"speechless.png";i:1;s:12:":speechless:";i:2;i:1;i:3;i:11;i:4;i:0;}s:7:"silence";a:5:{i:0;s:11:"silence.png";i:1;s:9:":silence:";i:2;i:1;i:3;i:12;i:4;i:0;}s:3:"sad";a:5:{i:0;s:9:"frown.gif";i:1;s:5:":sad:";i:2;i:1;i:3;i:13;i:4;i:0;}s:5:"angry";a:5:{i:0;s:9:"angry.png";i:1;s:7:":angry:";i:2;i:1;i:3;i:14;i:4;i:0;}s:3:"cry";a:5:{i:0;s:7:"cry.gif";i:1;s:8:":crying:";i:2;i:1;i:3;i:15;i:4;i:0;}}

Then I edited and replaced all : code : with text emoticons:

a:16:{s:4:"cool";a:5:{i:0;s:8:"cool.gif";i:1;s:6:"8-)";i:2;i:1;i:3;i:0;i:4;i:0;}s:10:"embarassed";a:5:{i:0;s:14:"embarassed.gif";i:1;s:6:":oops:";i:2;i:1;i:3;i:1;i:4;i:0;}s:4:"wink";a:5:{i:0;s:8:"wink.gif";i:1;s:6:";-)";i:2;i:1;i:3;i:2;i:4;i:0;}s:5:"smile";a:5:{i:0;s:9:"smile.gif";i:1;s:7:":-)";i:2;i:1;i:3;i:3;i:4;i:0;}s:5:"laugh";a:5:{i:0;s:9:"laugh.gif";i:1;s:7:":-D";i:2;i:1;i:3;i:4;i:4;i:0;}s:10:"tongue-out";a:5:{i:0;s:14:"tongue-out.png";i:1;s:12:":-P";i:2;i:1;i:3;i:5;i:4;i:0;}s:4:"kiss";a:5:{i:0;s:8:"kiss.gif";i:1;s:6:":-*";i:2;i:1;i:3;i:6;i:4;i:0;}s:4:"evil";a:5:{i:0;s:8:"evil.png";i:1;s:6:">:)";i:2;i:1;i:3;i:7;i:4;i:0;}s:4:"yell";a:5:{i:0;s:8:"yell.gif";i:1;s:6:":-O";i:2;i:1;i:3;i:8;i:4;i:0;}s:9:"surprised";a:5:{i:0;s:13:"surprised.gif";i:1;s:11:":-o";i:2;i:1;i:3;i:9;i:4;i:0;}s:8:"confused";a:5:{i:0;s:12:"confused.gif";i:1;s:10:":-S";i:2;i:1;i:3;i:10;i:4;i:0;}s:10:"speechless";a:5:{i:0;s:14:"speechless.png";i:1;s:12:":-|";i:2;i:1;i:3;i:11;i:4;i:0;}s:7:"silence";a:5:{i:0;s:11:"silence.png";i:1;s:9:":-x";i:2;i:1;i:3;i:12;i:4;i:0;}s:3:"sad";a:5:{i:0;s:9:"frown.gif";i:1;s:5:":-(";i:2;i:1;i:3;i:13;i:4;i:0;}s:5:"angry";a:5:{i:0;s:9:"angry.png";i:1;s:7:">:(";i:2;i:1;i:3;i:14;i:4;i:0;}s:3:"cry";a:5:{i:0;s:7:"cry.gif";i:1;s:8:":'-(";i:2;i:1;i:3;i:15;i:4;i:0;}}

Guess what? Forum > Components > Smileys > blank again save for the images. I suspect that some of the text emoticons cause issues, probably by interpretation. Of note would be that the data in the table didn’t change, it’s still there.

I’ll leave it at that. Maybe this data provides some clues for future troubleshooting.

MP Mr Papa
Mr Papa
Member

but there are some differences in the data…  the one you claim works (first), doesnt have a code for cool…

for the latter, the only one that looks odd is the cry with the single quote in the code…