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! =)
April 30th, 2004 at 8:23 pm
The link for this has changed, you can find the tutorial over here, at smilies hack.
May 12th, 2004 at 1:27 am
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???
May 12th, 2004 at 1:31 am
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!
May 12th, 2004 at 1:33 am
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>
May 12th, 2004 at 1:35 am
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. =)
May 12th, 2004 at 1:49 am
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#]
May 12th, 2004 at 7:55 am
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.
May 13th, 2004 at 9:17 am
Raises arm. “Present!” -I say (I’ve things to talk about, but making blog repairs is more important. And that takes…
May 13th, 2004 at 9:20 am
Raises arm. “Present!” -I say (I’ve things to talk about, but making blog repairs is more important. And that takes…
May 13th, 2004 at 11:23 am
Changed it. Still doesn’t pop-up. :/
May 14th, 2004 at 12:20 am
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”>