Help - Search - Members - Calendar
Full Version: Need Help WIth Smilies In Comments
Movable Type Community Forum > Additional Resources > Tips and Tricks
peroxidegrl
Hi, I have installed smilies into my toolbar on MT, using:

http://www.10500bc.org/code/mt_howto_smiliebar.php

Now I am trying to install them into my Comments using:

http://www.10500bc.org/code/mt_howto_smili...ar_comments.php

I have done everything as it has said, but still no smilies, can anyone help me?
maddy
Make sure that your Sanitize Specs include img tags. You can set this on a blog by blog basis in Weblog Config|Preferences, or by using the GlobalSanitizeSpec in mt.cfg (and setting the Preferences to use the default).

Something like:

GlobalSanitizeSpec a href target,b,ul,em,strong,img src alt, and so on
peroxidegrl
Ive done that, with the specs and still do not get smilies into my comments. I dont know why.


Here is a screen shot of how I have my Specs:

Specs Screen Shot
This is my Comment Listing Template:

CODE
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />

<title><$MTBlogName$>: Comment on <$MTEntryTitle$></title>

<link rel="stylesheet" href="<$MTBlogURL$>styles-site.css" type="text/css" />

<script type="text/javascript" language="javascript">
<!--

var HOST = '<$MTBlogHost$>';

// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
   var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
   document.cookie = curCookie;
}

function getCookie (name) {
   var prefix = name + '=';
   var c = document.cookie;
   var nullstring = '';
   var cookieStartIndex = c.indexOf(prefix);
   if (cookieStartIndex == -1)
       return nullstring;
   var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
   if (cookieEndIndex == -1)
       cookieEndIndex = c.length;
   return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
   if (getCookie(name))
       document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
   var base = new Date(0);
   var skew = base.getTime();
   if (skew > 0)
       date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
   var now = new Date();
   fixDate(now);
   now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
   setCookie('mtcmtauth', f.author.value, now, '', HOST, '');
   setCookie('mtcmtmail', f.email.value, now, '', HOST, '');
   setCookie('mtcmthome', f.url.value, now, '', HOST, '');
}

function forgetMe (f) {
   deleteCookie('mtcmtmail', '', HOST);
   deleteCookie('mtcmthome', '', HOST);
   deleteCookie('mtcmtauth', '', HOST);
   f.email.value = '';
   f.author.value = '';
   f.url.value = '';
}

function insertSmilies (v) {  
document.forms[0].elements[4].focus();  
document.selection.createRange().text = v;}


//-->
</script>
</head>

<body>

<div id="banner-commentspop">
<$MTBlogName$>
</div>

<div class="blog">

<div class="comments-head">Comments: <$MTEntryTitle$></div>


<MTComments>
<div class="comments-body">
<$MTCommentBody$>
<span class="comments-post">Posted by <$MTCommentAuthorLink spam_protect="1"$> at <$MTCommentDate$></span>
</div>
</MTComments>

<MTEntryIfCommentsOpen>

<div class="comments-head">Post a comment</div>

<div class="comments-body">
<form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" onsubmit="if (this.bakecookie[0].checked) rememberMe(this)">
<input type="hidden" name="entry_id" value="<$MTEntryID$>" />

<div style="width:180px; padding-right:15px; margin-right:15px; float:left; text-align:left; border-right:1px dotted #bbb;">
    <label for="author">Name:</label><br />
    <input tabindex="1" id="author" name="author" /><br /><br />

    <label for="email">Email Address:</label><br />
    <input tabindex="2" id="email" name="email" /><br /><br />

    <label for="url">URL:</label><br />
    <input tabindex="3" id="url" name="url" /><br /><br />
</div>

Remember personal info?<br />
<input type="radio" id="bakecookie" name="bakecookie" /><label for="bakecookie">Yes</label><input type="radio" id="forget" name="bakecookie" onclick="forgetMe(this.form)" value="Forget Info" style="margin-left: 15px;" /><label for="forget">No</label><br style="clear: both;" />

<label for="text"><div class="comments-head">
<table width="98%" border="0">
 <tr>
   <td width="15%">Comments:</td>
   <td width="85%" align="right"><script language="javascript">
if (document.selection) {
   document.write('<table border="0" cellspacing="0" cellpadding="1" width="170">');
document.write('<tr>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':computer\')"><img src="http://fused-emotions.com/smilies/computer.gif" alt="computer" width="50" height="20" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':hurl\')"><img src="http://fused-emotions.com/smilies/hurl.gif" alt="biggrin" width="18" height="18" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':music\')"><img src="http://fused-emotions.com/smilies/music.gif" alt="music" width="32" height="25" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':noc\')"><img src="http://fused-emotions.com/smilies/noc.gif" alt="kiss" width="18" height="18" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':redx\')"><img src="http://fused-emotions.com/smilies/redx.gif" alt="lol" width="13" height="13" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':sman\')"><img src="http://fused-emotions.com/smilies/sman.gif" alt="sman" width="21" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':angry\')"><img src="http://fused-emotions.com/smilies/angry.gif" alt="sad" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':sad\')"><img src="http://fused-emotions.com/smilies/sad.gif" alt="sad" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':smile\')"><img src="http://fused-emotions.com/smilies/smile.gif" alt="smile" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':cheesy\')"><img src="http://fused-emotions.com/smilies/cheesy.gif" alt="cheesy" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':cool\')"><img src="http://fused-emotions.com/smilies/cool.gif" alt="cool" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':cry\')"><img src="http://fused-emotions.com/smilies/cry.gif" alt="cry" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':embarassed\')"><img src="http://fused-emotions.com/smilies/embarassed.gif" alt="embarassed" width="15" height="15" border="0"></a>
   document.write('<td width="24"><a href="javascript:insertSmilies(\':grin\')"><img src="http://fused-emotions.com/smilies/grin.gif" alt="grin" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':huh\')"><img src="http://fused-emotions.com/smilies/huh.gif" alt="huh" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':kiss\')"><img src="http://fused-emotions.com/smilies/kiss.gif" alt="kiss" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':lipsrsealed\')"><img src="http://fused-emotions.com/smilies/lipsrsealed.gif" alt="lipsrsealed" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':rolleyes\')"><img src="http://fused-emotions.com/smilies/rolleyes.gif" alt="rolleyes" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':shocked\')"><img src="http://fused-emotions.com/smilies/shocked.gif" alt="shocked" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':tongue\')"><img src="http://fused-emotions.com/smilies/tongue.gif" alt="tongue" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':undecided\')"><img src="http://fused-emotions.com/smilies/undecided.gif" alt="undecided" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':wink\')"><img src="http://fused-emotions.com/smilies/wink.gif" alt="wink" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':tstone\')"><img src="http://fused-emotions.com/smilies/tstone.gif" alt="tstone" width="15" height="15" border="0"></a></td>');
   document.write('</tr>');
   document.write('</table>');
} else {
   document.write(' ');
}
</script></td>
 </tr>
</table>
</div>
<br />

<textarea tabindex="4" id="text" name="text" rows="10" cols="50"></textarea><br /><br />

<input type="button" onclick="window.close()" value=" Cancel " />
<input type="submit" name="preview" value=" Preview " />
<input style="font-weight: bold;" type="submit" name="post" value=" Post " /><br /><br />

</form>

<script type="text/javascript" language="javascript">
<!--
document.comments_form.email.value = getCookie("mtcmtmail");
document.comments_form.author.value = getCookie("mtcmtauth");
document.comments_form.url.value = getCookie("mtcmthome");
if (getCookie("mtcmtauth")) {
   document.comments_form.bakecookie[0].checked = true;
} else {
   document.comments_form.bakecookie[1].checked = true;
}
//-->
</script>
</div>

</MTEntryIfCommentsOpen>

</div>

</body>
</html>



This is my Comment Preview Template:

CODE
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />
<script type="text/javascript" language="javascript"><!--
function insertSmilies (v) {  document.forms[0].elements[5].focus();  document.selection.createRange().text = v;}
//-->
</script>
<title><$MTBlogName$>: Comment Preview</title>
<link rel="stylesheet" href="<$MTBlogURL$>styles-site.css" type="text/css" />
</head>

<body>

<div id="banner-commentspop">
<$MTBlogName$>
</div>

<div class="blog">

<div class="comments-head">Previewing your Comment</div>

<div class="comments-body">
<$MTCommentPreviewBody$>
<span class="comments-post">Posted by <$MTCommentPreviewAuthorLink spam_protect="1"$> at <$MTCommentPreviewDate$></span>
</div>

<div class="comments-body">
<form method="post" action="<$MTCGIPath$><$MTCommentScript$>">
<input type="hidden" name="entry_id" value="<$MTEntryID$>" />
<input type="hidden" name="static" value="<$MTCommentPreviewIsStatic$>" />

<label for="author">Name:</label><br />
<input id="author" name="author" value="<$MTCommentPreviewAuthor encode_html="1"$>" /><br /><br />

<label for="email">Email Address:</label><br />
<input id="email" name="email" value="<$MTCommentPreviewEmail encode_html="1"$>" /><br /><br />

<label for="url">URL:</label><br />
<input id="url" name="url" value="<$MTCommentPreviewURL encode_html="1"$>" /><br /><br />

<label for="text"><div class="comments-head">
<table width="98%" border="0">
 <tr>
   <td width="15%">Comments:</td>
   <td width="85%" align="right"><script language="javascript">
if (document.selection) {
   document.write('<table border="0" cellspacing="0" cellpadding="1" width="170">');
document.write('<tr>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':computer\')"><img src="http://fused-emotions.com/smilies/computer.gif" alt="computer" width="50" height="20" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':hurl\')"><img src="http://fused-emotions.com/smilies/hurl.gif" alt="biggrin" width="18" height="18" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':music\')"><img src="http://fused-emotions.com/smilies/music.gif" alt="music" width="32" height="25" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':noc\')"><img src="http://fused-emotions.com/smilies/noc.gif" alt="kiss" width="18" height="18" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':redx\')"><img src="http://fused-emotions.com/smilies/redx.gif" alt="lol" width="13" height="13" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':sman\')"><img src="http://fused-emotions.com/smilies/sman.gif" alt="sman" width="21" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':angry\')"><img src="http://fused-emotions.com/smilies/angry.gif" alt="sad" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':sad\')"><img src="http://fused-emotions.com/smilies/sad.gif" alt="sad" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':smile\')"><img src="http://fused-emotions.com/smilies/smile.gif" alt="smile" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':cheesy\')"><img src="http://fused-emotions.com/smilies/cheesy.gif" alt="cheesy" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':cool\')"><img src="http://fused-emotions.com/smilies/cool.gif" alt="cool" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':cry\')"><img src="http://fused-emotions.com/smilies/cry.gif" alt="cry" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':embarassed\')"><img src="http://fused-emotions.com/smilies/embarassed.gif" alt="embarassed" width="15" height="15" border="0"></a>
   document.write('<td width="24"><a href="javascript:insertSmilies(\':grin\')"><img src="http://fused-emotions.com/smilies/grin.gif" alt="grin" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':huh\')"><img src="http://fused-emotions.com/smilies/huh.gif" alt="huh" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':kiss\')"><img src="http://fused-emotions.com/smilies/kiss.gif" alt="kiss" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':lipsrsealed\')"><img src="http://fused-emotions.com/smilies/lipsrsealed.gif" alt="lipsrsealed" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':rolleyes\')"><img src="http://fused-emotions.com/smilies/rolleyes.gif" alt="rolleyes" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':shocked\')"><img src="http://fused-emotions.com/smilies/shocked.gif" alt="shocked" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':tongue\')"><img src="http://fused-emotions.com/smilies/tongue.gif" alt="tongue" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':undecided\')"><img src="http://fused-emotions.com/smilies/undecided.gif" alt="undecided" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':wink\')"><img src="http://fused-emotions.com/smilies/wink.gif" alt="wink" width="15" height="15" border="0"></a></td>');
   document.write('<td width="24"><a href="javascript:insertSmilies(\':tstone\')"><img src="http://fused-emotions.com/smilies/tstone.gif" alt="tstone" width="15" height="15" border="0"></a></td>');
   document.write('</tr>');
   document.write('</table>');
} else {
   document.write(' ');
}
</script></td>
 </tr>
</table>
</div>
<br />

<textarea id="text" name="text" rows="10" cols="50"><$MTCommentPreviewBody convert_breaks="0" encode_html="1"$></textarea><br /><br />

<input type="submit" name="preview" value=" Preview " />
<input style="font-weight: bold;" type="submit" name="post" value=" Post " /><br /><br />

</form>
</div>

<div class="comments-head">Previous Comments</div>

<MTComments>
<div class="comments-body">
<$MTCommentBody$>
<span class="comments-post">Posted by <$MTCommentAuthorLink spam_protect="1"$> at <$MTCommentDate$></span>
</div>
</MTComments>

</div>
</body>
</html>
maddy
So that I don't need to spend an hour going through the template, can you please post a link to your site so I can see where this is (not) happening?
peroxidegrl
http://fused-emotions.com/blog

Sorry, I should have put a link in the first post.
maddy
It's a javascript error. You need to add this to the end of the line that has your embarrassed smilie code:
CODE
</td>');
peroxidegrl
Ok now they show, but nothitng happens when I click them?


ADDING: When you click comments, and click a smiley it puts the code up ON TOP of the comments page, above the title Fused Emotions, then if u click PREVIEW it puts them in the text box.
maddy
Can't help with that. I used a variation on a different script for my smilies, and I'm not familiar with this code. Sorry.

If you want to try something different (that also works in most if not all browsers, unlike this one that doesn't even show the smilies in Opera), this is what I have in the head of my page:
CODE
function commentEmoticon(code)
{
var cache = document.comments_form.text.value;

document.comments_form.text.value = cache + " " + code;
document.comments_form.text.focus();
}


And where I want the clickable smilie to show up, I have them written like this:
CODE
<img alt=":computer" onclick="commentEmoticon(':computer')" src="http://fused-emotions.com/smilies/computer.gif" width="20" height="20" />
peroxidegrl
Ok i will try that then. I put that in both my preview and comments page? Both codes in both templates?
maddy
Yep.
peroxidegrl
Ok ill try this now, then post here how it goes...
peroxidegrl
Ok maddy it sort of works, I havent changed the prev template yet, but for the comment listing, it seems to work half ways, when I click Post, it goes to the blog index, it doesnt post it anywhere. sad.gif

CODE
<label for="text"><div class="comments-head">
<table width="98%" border="0">  
<tr>    
<td width="15%">Comments:
</td>    
<td>
<img alt=":computer:" onclick="commentEmoticon(':computer:')" src="http://fused-emotions.com/smilies/computer.gif" width="50" height="20" />

<img alt=":computer:" onclick="commentEmoticon(':computer:')" src="http://fused-emotions.com/smilies/computer.gif" width="50" height="20" />
</td>  </tr></table></div><br />

<textarea tabindex="4" id="text" name="text" rows="10" cols="50"></textarea><br /><br />

<input type="button" onclick="window.close()" value=" Cancel " />
<input type="submit" name="preview" value=" Preview " />
<input style="font-weight: bold;" type="submit" name="post" value=" Post " /><br /><br />

</form>


Could you maybe post your listing, and preview templates so I can look at them? Then cross referance them with mine?
maddy
It worked for me. Just posted a test comment.
peroxidegrl
what worked? Clicking post or preview? When I click Comments on my blog, then type something in, and click Post it goes to my blog for me.
peroxidegrl
Ok I think I got it working, but I didnt notice until now my I B U and URL thing dissapeared. How do I add it back?
peroxidegrl
Ok this is my comments listing template now. With smilies THX Maddy!

But now I have now Enter URL Option, or I, U, or B. How do I add them back in? This is my code on my template as of right now.

CODE
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<$MTPublishCharset$>" />

<title><$MTBlogName$>: Comment on <$MTEntryTitle$></title>

<link rel="stylesheet" href="http://fused-emotions.com/stylesheet.css" type="text/css" />

<script type="text/javascript" language="javascript">
<!--

var HOST = '<$MTBlogHost$>';

// Copyright (c) 1996-1997 Athenia Associates.
// http://www.webreference.com/js/
// License is granted if and only if this entire
// copyright notice is included. By Tomer Shiran.

function setCookie (name, value, expires, path, domain, secure) {
   var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
   document.cookie = curCookie;
}

function getCookie (name) {
   var prefix = name + '=';
   var c = document.cookie;
   var nullstring = '';
   var cookieStartIndex = c.indexOf(prefix);
   if (cookieStartIndex == -1)
       return nullstring;
   var cookieEndIndex = c.indexOf(";", cookieStartIndex + prefix.length);
   if (cookieEndIndex == -1)
       cookieEndIndex = c.length;
   return unescape(c.substring(cookieStartIndex + prefix.length, cookieEndIndex));
}

function deleteCookie (name, path, domain) {
   if (getCookie(name))
       document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT";
}

function fixDate (date) {
   var base = new Date(0);
   var skew = base.getTime();
   if (skew > 0)
       date.setTime(date.getTime() - skew);
}

function rememberMe (f) {
   var now = new Date();
   fixDate(now);
   now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
   setCookie('mtcmtauth', f.author.value, now, '', HOST, '');
   setCookie('mtcmtmail', f.email.value, now, '', HOST, '');
   setCookie('mtcmthome', f.url.value, now, '', HOST, '');
}

function forgetMe (f) {
   deleteCookie('mtcmtmail', '', HOST);
   deleteCookie('mtcmthome', '', HOST);
   deleteCookie('mtcmtauth', '', HOST);
   f.email.value = '';
   f.author.value = '';
   f.url.value = '';
}

function commentEmoticon(code)
{
var cache = document.comments_form.text.value;

document.comments_form.text.value = cache + " " + code;
document.comments_form.text.focus();
}

//-->
</script>
</head>

<body>

<div id="banner-commentspop">
<$MTBlogName$>
</div>

<div class="blog">

<div class="comments-head">Comments: <$MTEntryTitle$></div>


<MTComments>
<div class="comments-body">
<$MTCommentBody$>
<span class="comments-post">Posted by <$MTCommentAuthorLink spam_protect="1"$> at <$MTCommentDate$></span>
</div>
</MTComments>

<MTEntryIfCommentsOpen>

<div class="comments-head">Post a comment</div>

<div class="comments-body">
<form method="post" action="<$MTCGIPath$><$MTCommentScript$>" name="comments_form" onsubmit="if (this.bakecookie[0].checked) rememberMe(this)">
<input type="hidden" name="entry_id" value="<$MTEntryID$>" />

<div style="width:180px; padding-right:15px; margin-right:15px; float:left; text-align:left; border-right:1px dotted #bbb;">
    <label for="author">Name:</label><br />
    <input tabindex="1" id="author" name="author" /><br /><br />

    <label for="email">Email Address:</label><br />
    <input tabindex="2" id="email" name="email" /><br /><br />

    <label for="url">URL:</label><br />
    <input tabindex="3" id="url" name="url" /><br /><br />
</div>

Remember personal info?<br />
<input type="radio" id="bakecookie" name="bakecookie" /><label for="bakecookie">Yes</label><input type="radio" id="forget" name="bakecookie" onclick="forgetMe(this.form)" value="Forget Info" style="margin-left: 15px;" /><label for="forget">No</label><br style="clear: both;" />

<label for="text"><div class="comments-head">



<img alt=":computer:" onclick="commentEmoticon(':computer:')" src="http://fused-emotions.com/smilies/computer.gif" width="40" height="20" />
<img alt=":hurl:" onclick="commentEmoticon(':hurl:')" src="http://fused-emotions.com/smilies/hurl.gif" width="18" height="18" />
<img alt=":music:" onclick="commentEmoticon(':music:')" src="http://fused-emotions.com/smilies/music.gif" width="32" height="25" />
<img alt=":redx:" onclick="commentEmoticon(':redx:')" src="http://fused-emotions.com/smilies/redx.gif" width="18" height="18" />
<img alt=":sman:" onclick="commentEmoticon(':sman:')" src="http://fused-emotions.com/smilies/sman.gif" width="21" height="15" />
<img alt=":angry:" onclick="commentEmoticon(':angry:')" src="http://fused-emotions.com/smilies/angry.gif" width="15" height="15" />
<img alt=":sad:" onclick="commentEmoticon(':sad:')" src="http://fused-emotions.com/smilies/sad.gif" width="15" height="15" />
<img alt=":smiley:" onclick="commentEmoticon(':smiley:')" src="http://fused-emotions.com/smilies/smiley.gif" width="15" height="15" />
<img alt=":cheesy:" onclick="commentEmoticon(':cheesy:')" src="http://fused-emotions.com/smilies/cheesy.gif" width="15" height="15" />
<img alt=":cool:" onclick="commentEmoticon(':cool:')" src="http://fused-emotions.com/smilies/cool.gif" width="15" height="15" />
<img alt=":cry:" onclick="commentEmoticon(':cry:')" src="http://fused-emotions.com/smilies/cry.gif" width="15" height="15" />
<img alt=":embarassed:" onclick="commentEmoticon(':embarassed:')" src="http://fused-emotions.com/smilies/embarassed.gif" width="15" height="15" />
<img alt=":grin:" onclick="commentEmoticon(':grin:')" src="http://fused-emotions.com/smilies/grin.gif" width="15" height="15" />
<img alt=":huh:" onclick="commentEmoticon(':huh:')" src="http://fused-emotions.com/smilies/huh.gif" width="15" height="15" />
<img alt=":kiss:" onclick="commentEmoticon(':kiss:')" src="http://fused-emotions.com/smilies/kiss.gif" width="15" height="15" />
<img alt=":lipsrsealed:" onclick="commentEmoticon(':lipsrsealed:')" src="http://fused-emotions.com/smilies/lipsrsealed.gif" width="15" height="15" />
<img alt=":rolleyes:" onclick="commentEmoticon(':rolleyes:')" src="http://fused-emotions.com/smilies/rolleyes.gif" width="15" height="15" />
<img alt=":shocked:" onclick="commentEmoticon(':shocked:')" src="http://fused-emotions.com/smilies/shocked.gif" width="15" height="15" />
<img alt=":tongue:" onclick="commentEmoticon(':tongue:')" src="http://fused-emotions.com/smilies/tongue.gif" width="15" height="15" />
<img alt=":undecided:" onclick="commentEmoticon(':undecided:')" src="http://fused-emotions.com/smilies/undecided.gif" width="15" height="15" />
<img alt=":wink:" onclick="commentEmoticon(':wink:')" src="http://fused-emotions.com/smilies/wink.gif" width="15" height="15" />
<img alt=":tstone:" onclick="commentEmoticon(':tstone:')" src="http://fused-emotions.com/smilies/tstone.gif" width="18" height="25" />

</td>
 </tr>
</table>
</div>
<br />

<textarea tabindex="4" id="text" name="text" rows="10" cols="50"></textarea><br /><br />

<input type="button" onclick="window.close()" value=" Cancel " />
<input type="submit" name="preview" value=" Preview " />
<input style="font-weight: bold;" type="submit" name="post" value=" Post " /><br /><br />

</form>

<script type="text/javascript" language="javascript">
<!--
document.comments_form.email.value = getCookie("mtcmtmail");
document.comments_form.author.value = getCookie("mtcmtauth");
document.comments_form.url.value = getCookie("mtcmthome");
if (getCookie("mtcmtauth")) {
   document.comments_form.bakecookie[0].checked = true;
} else {
   document.comments_form.bakecookie[1].checked = true;
}
//-->
</script>
</div>

</MTEntryIfCommentsOpen>

</div>

</body>
</html>
peroxidegrl
Ok well nevermind I added URL B and I back, the only thing I couldnt find was U.

Thx again Maddy for the help!!
inababes
peroxidegrl, how'd you add them back?
peroxidegrl
Using this:


by placing the following code into the java script within the head tags:

CODE
function shortCuts() {
    if (event.ctrlKey != true) return;
    strSelection = document.selection.createRange().text;
    if (event.keyCode == 1) ahrefThis();
    if (event.keyCode == 2) boldThis(2);
    if (event.keyCode == 3) clipThis();
    if (event.keyCode == 20) italicThis(2);
}

function ahrefThis() {
    strSelection = document.selection.createRange().text
    if (strSelection == "") document.text.text.focus()
    strHref = prompt("Enter the URL of the site you to link:","http://")
    if (strHref == null) return;
    document.selection.createRange().text = "<a href=\"" + strHref + "\" target=\"_blank\">" + strSelection + "</a>"
    return;
}

function boldThis(from) {
    strSelection = document.selection.createRange().text
    if (strSelection == "") {
 document.text.text.focus()
 if (from == 2) document.text.text.select()
 strSelection = document.selection.createRange().text
 document.selection.createRange().text = strSelection + "<b></b>"
    }    
    else document.selection.createRange().text = "<b>" + strSelection + "</b>"
    return;
}

function clipThis(from) {
    strSelection = document.selection.createRange().text;
    document.text.text.focus();
    var dummy = document.text.text.value;
    document.text.text.value = "";
    if (dummy) {
 document.selection.createRange().text = dummy + "\n\n<i>" + strSelection + "</i>";
    }
    else {
 document.selection.createRange().text = "<i>" + strSelection + "</i>";
    }
    return;
}

function italicThis(from) {
    strSelection = document.selection.createRange().text
    if (strSelection == "") {
 document.text.text.focus()
 if (from == 2) document.text.text.select()
 strSelection = document.selection.createRange().text
 document.selection.createRange().text = strSelection + "<i></i>"
    }
    else document.selection.createRange().text = "<i>" + strSelection + "</i>"
    return;
}



Then placingthe following where you want the tags to appear:

CODE
<script language="JavaScript">
<!--
if (document.selection) {
document.write('<span class="signature">highlight your text then click to <A title="Make a Link" href="javascript:ahrefThis();" target=_self>LINK</A>, <A title=Bold href="javascript:boldThis();" target=_self><B>BOLD</B></A> or <A title=Italicize href="javascript:italicThis();" target=_self><I>ITALICIZE</I></A></span><br>')
}
//-->
</script>
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-2010 Invision Power Services, Inc.