Using Lazyman’s smilies for MT’s edit entry template

I was browsing around looking for a way to add smilies to my edit entry screen in MT. I found a few variations but none totally fit the bill. One of them was a modification of the lazyman smilies palette that worked on the edit entry screen.

But, it was not, unfortunately, xhtml compliant and it still pointed to the comments form - which meant it didn’t work.

So, I fixed it up and wrote up a tutorial on my site. I thought people here might be interested. The in depth explanation is in my post on my new/modified smilies hack

This one only requires a one line addition to edit_entry.tmpl; so while it is a hack, it’s pretty minor. Hope it helps someone out there! =)

11 Responses to “Using Lazyman’s smilies for MT’s edit entry template”

  1. Lisa Says:

    The link for this has changed, you can find the tutorial over here, at smilies hack.

  2. Jessy Says:

    I posted this question at Lisa’s site but I’ll post on here as well just in case :)
    This is where I am stuck: I see the ‘smilie’ link under the title bar. It’s clickable, but nothing pops-up.

    These are some of my details:
    My full path according to the MT-check I once did is [/export/home/amethyst/www/]
    I installed MT inside my cgi-bin so the edit_entry file was found there.
    My smilies (all 240+of them) are inside my www/ (i.e http://www.mysite.com/smilies/)

    This is what my edit_entry file looks like:
    [ smilies]

    This is what my index2.php file looks like:
    [//EDIT THESE PATH
    $smiliepath = ”/smiles/”;
    $serverPathToSmilies = ”/export/home/amethyst/www/smilies”/;
    // DO NOT EDIT BELOW THIS LINE
    $commentsFormName = “entry_form”;
    $commentsTextName = “text”;
    ?>]

    What do you suggest???

  3. Lisa Says:

    Hey Jessy; I responded to you in email, did you not receive it?

    You have in your path smiles and in your server path smilies. that could be causing a problem, you should double check and make sure that they point to the right ones… =) That’s the first thing to check. Also make sure the link in edit_entry is pointing to the right file.

    Let me know if you need more help!

  4. Jessy Says:

    Actually, my edit_entry file looks like this (sorry forgot to click on the auto link to strip the brackets):
    <a href=”#” onClick=”window.open(”/smilies/index2.php”,”smilies”,’toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=400,height=300′)”> smilies</a>

  5. Lisa Says:

    Ok, then you need to change where it says smiles in index2 to read smilies… this line:

    smiliepath = ”/smiles/”;

    let me know if that helps, or exactly what happens when you try it. =)

  6. Jessy Says:

    Nope, hadn’t gotten the email, but I’m sure it landed at my junk folder. :/

    I have made the changes you pointed out. I cannot believe I didn’t notice smiles and smilies. Anyhoo. Still my pop-up doesn’t pop :/

    Here’s what I have now:
    <a href=”#” onClick=”window.open(”/smilies/index2.php”,”smilies”,’toolbar=no,location=no,ect…ect…’)”> smilies</a>

    //EDIT THESE PATH
    $smiliepath = “/smilies/”;
    $serverPathToSmilies = “/export/home/amethyst/www/smilies”/;

    And the ugly part it that I tried right clicking on the smilie link to “open in new window” and it opens my Edit entry again. Then I tried to “copy short cut” and sure enough I get the url to my edit entry screen [http://www.amethystique.com/cgi-bin/mt.cgi?__mode=view&_type=entry&blog_id=1#]

  7. Jennifer Says:

    Jessy - I haven’t looked to far into your issue - but I’m noticing you keep putting the path in the comments here like this:
    $serverPathToSmilies = “/export/home/amethyst/www/smilies”/;

    That last / should be INSIDE the quotes…

    $serverPathToSmilies = “/export/home/amethyst/www/smilies/”;

    don’t know if that will fix ALL your problems - but that might be one of them.

  8. Underneath the Clothes Says:
    Blog improvements
    Raises arm. “Present!” -I say (I’ve things to talk about, but making blog repairs is more important. And that takes…

  9. Underneath the Clothes Says:
    Blog improvements
    Raises arm. “Present!” -I say (I’ve things to talk about, but making blog repairs is more important. And that takes…

  10. Jessy Says:

    Changed it. Still doesn’t pop-up. :/

  11. Jessy Says:

    I FIXED IT! Like I mentioned before I wasn’t able to get the smilies pop-up to, well, pop-up! As I compared the edit_entry code to to my comments code which uses Lazyman’s smilies I found that the only difference was in the “” vs ”.
    This is what I have now in my edit_entry.tmpl

    <table border=”0″ cellspacing=”0″ cellpadding=”0″>
    <tr>
    <td colspan=”2″ valign=”top”>
    <img src=”<TMPL_VAR NAME=STATIC_URI>images/spacer.gif” width=”1″ height=”10″></td>
    <a href=”#” onClick=”window.open(’/smilies/mtsmilies.php’,’smilies’,'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=440,height=300′)”> smilies</a>
    </tr>

    <tr>
    <td width=”402″><font class=”pagetitle”><MT_TRANS phrase=”Entry Body”></font></td>
    <td width=”98″ align=”right” valign=”top”>