Help - Search - Members - Calendar
Full Version: clickable smilies in comments
Movable Type Community Forum > Additional Resources > Tips and Tricks
Maggie
Good afternoon  smile.gif
I just finished the upgrade.  My clickable smilies in my pop-up comment window are no longer working on My Webpage .  Also, when I click on a smilie in my mt.cgi the smilie goes into the extended entry screen as opposed to the entry body.  I uploaded the edit_entry.tmpl as well as the Util.pm in the upgrade with the changes added to them to incorporate the smilies.  Does anyone have any idea why they are not clickable in the comment pop-up window or the entry body after this upgrade?  I would really appreciate your help
oscarf
Which method did you use to implement them? Your comments smilies do enter the literal into the comments box, so the click function is working.

Mine work in comments and preview after the upgrade, so I'm sure I and/or others can get you straightened out with a little more info.
Maggie
I used this tutorial and this one.
maddy
QUOTE
Also, when I click on a smilie in my mt.cgi the smilie goes into the extended entry screen as opposed to the entry body.  I uploaded the edit_entry.tmpl as well as the Util.pm in the upgrade with the changes added to them to incorporate the smilies.

Yes, I noticed that as well last night. I'm about to go and investigate further, but if any one has their smilies going into the EntryBody textarea and ExtendedEntry textarea on the New Entry screen, please pipe up! biggrin.gif
Maggie
anyone??
milk
Smilies are broken in my comments also.

http://www.toomuchsexy.org/
Maggie
We definitely need a smilie diva
milk
There is another thread on this with a solution:
http://www.movabletype.org/cgi-bin....t=14481
maddy
Maggie, your smilies are clickable - they are placing the text into the comments box for me. What browser are you using?

Are they not parsing? You will need to add img src to your Sanitize specs. Have you done that? I haven't upgraded my install that has comment smilies, so I can't double check that for you - but I'm sure it is necessary. smile.gif
Maggie
Sanitize specs??  Do you mean Sanitize.pm ??  If so, where??
maddy
Either on a per blog basis, in Weblog Config, or by adding a line to mt.cfg. Check out this part of the manual for more details. smile.gif
Maggie
I don't see anything in there about mt.cfg
maddy
QUOTE
You can override this setting globally by setting the GlobalSanitizeSpec setting in the mt.cfg file
and then under Configuration Settings (which basically repeats the information included in the new mt.cfg), you'll find
QUOTE
GlobalSanitizeSpec
By default, Movable Type cleans up (``sanitizes'') any data submitted by visitors to your site. This is done to remove any code (HTML or otherwise) that could compromise the security of your site. The sanitization code works by only allowing certain HTML tags--any other tags, and all processing instructions (PHP, for example) are stripped. The GlobalSanitizeSpec setting, then, specifies the tags and attributes that are allowed. Default value: a href,b,br/,p,strong,em,ul,li,blockquote
Example:
CODE
GlobalSanitizeSpec blockquote,div


You might like to download a copy of the new mt.cfg to see if there is anything else you'd like to modify. smile.gif
Maggie
so what do I need to put in there to get my smilies back??
maddy
QUOTE
Are they not parsing? You will need to add img src to your Sanitize specs.


Did you read this thread. huh.gif
Maggie
They are now working in my comments pop-up window but in my new entry screen they are still going to the extended entry window as opposed to the entry body window when clicked  ???
oscarf
I don't have it set up this way myself, so I'm only offering a hurried guess here, but where you installed this function (in edit_entry.tmpl):
QUOTE
function insertSmilies (v) {
document.forms[2].elements[6].focus();
document.selection.createRange().text = v;
}


Can you try changing the "elements[6]" to "elements[5]"?

Might fix it.
Maggie
Worked like a charm Oscar...thank you so much once again!!  ;)
oscarf
smile.gif
Dyanna
Oscar, your tip half-worked for me.  Clicking on the smile now places the :code where it should go, but the images do not show up when the entry is built.  Any additional ideas?   biggrin.gif
maddy
Did you re-edit Util.pm (for the smilies hack) after the upgrade, Dyanna? huh.gif
Dyanna
I did... twice, even!
oscarf
Also, did you go through the Sanitize thing?  :)

In your Preferences|Configuration page, did you go to Sanitize Specs and click "Use My Settings" and paste in:
CODE
a href,b,br,p,strong,em,ul,li,blockquote,img src

?
Dyanna
Yes, I did that, too, but doesn't the sanitize option in the Config section only pertain to the comments?  Once I added the permitted tags, my comments smilies worked fine.  The problem now is the smilies in my entry editing/creating sections...
oscarf
Okay, next diagnostic test ...

When you click your entry smilies and the codes get placed in the edit box, and then you publish your entry, what do you get?

Everything, but no smilies?
Everything, except the smilies show up as their code?

What does the source of your built page look like? That is, is there an image path to a smiley, or just the code, or nothing at all where the smiley should be?
Dyanna
This is what shows up in the Entry Body when I click on the smilie:

CODE
:confused


This is what shows up when the page is published:

CODE
:confused


This is the source of that same published page:

CODE
<p>:confused</p>


ARGH!   huh.gif

I appreciate all your help1  :)
oscarf
I think the problem has to be in the Util.pm hack somewhere ... the hack is working for Maggie with MT 2.62 ...

Maybe you should start with a clean Util.pm from the upgrade package, and re-hack it?

Will re-engage brain in AM and think more about it ...
Dyanna
I shall try it from a fresh copy and let you know the results!   biggrin.gif
Dyanna
Well, I downloaded fresh files from the 2.62 release, went back in and added the hack back in, and all is well.  Very bizarre.  Thanks for all your help!!   biggrin.gif
oscarf
Delighted.  :D
Catmommy9
Hey Oscar...

Just wanted to say that I was having the exact same problems as Maggie. Was tearing my hair out trying to fix them, until I came here and found your answers.  Thank you!

Christine smile.gif
oscarf
Oh, why thank you! I seem to have been able to bring almost all of my real work to a halt by hanging around here looking for questions I can actually answer. Guess I should bring that little matter up with my analyst. But, I'm glad I have at least been helpful - I just HATE it myself when things don't work!!!  :p
lindsey297
I have a smiliar problem...

For my comments window (here is a samle one)

The images of the smilies show up, but they aren't clickable! Anyone have a solution for this?
oscarf
I see you fixed.
lindsey297
Haha, yes. But I don't know how... I had to use two different hacks in order to do it.

I wanted to post here that i had it fixed, but I couldn't figure out where this thread was. lol!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.