November 16, 2004

Smile!

Okay, to add smilies, there are a couple of things you need to do.

First, define your smilies. We use MTMacro to do this. It can a lot of other stuff, but the way we use it for smilies is like this:

<MTMacroDefine name="happy" string=":)">
<img src="http://www.mu.nu/Forums/images/smiles/icon_smile.gif" alt=":)">
</MTMacroDefine>
<MTMacroDefine name="sad" string=":(">
<img src="http://www.mu.nu/Forums/images/smiles/icon_sad.gif" alt=":(">
</MTMacroDefine>
<MTMacroDefine name="happy2" string=":-)">
<img src="http://www.mu.nu/Forums/images/smiles/icon_smile.gif" alt=":)">
</MTMacroDefine>
<MTMacroDefine name="grin" string=":D">
<img src="http://www.mu.nu/Forums/images/smiles/icon_biggrin.gif" alt=":D">
</MTMacroDefine>
<MTMacroDefine name="razz1" string=":p">
<img src="http://www.mu.nu/Forums/images/smiles/icon_razz.gif" alt=":p">
</MTMacroDefine>
<MTMacroDefine name="razz2" string=":-p">
<img src="http://www.mu.nu/Forums/images/smiles/icon_razz.gif" alt=":-p">
</MTMacroDefine>
<MTMacroDefine name="razz3" string=":P">
<img src="http://www.mu.nu/Forums/images/smiles/icon_razz.gif" alt=":P">
</MTMacroDefine>
<MTMacroDefine name="razz4" string=":-P">
<img src="http://www.mu.nu/Forums/images/smiles/icon_razz.gif" alt=":-P">
</MTMacroDefine>
<MTMacroDefine name="wink" string=";)">
<img src="http://www.mu.nu/Forums/images/smiles/icon_wink.gif" alt=";)">
</MTMacroDefine>
You need to put that near the top of each template where you want smilies to work.

Then, you wrap the part of the template that actually displays the text in <MTMacroApply> and </MTMacroApply. Our individual entry archive, for example, contains this:

<MTMacroApply>
<MTComments>
<div class="comments-body">
<$MTCommentBody$>
<span class="comments-post">Posted by: <$MTCommentAuthorLink spam_protect="1"$> at <$MTCommentDate$></span>
</div>
</MTComments>
</MTMacroApply>
Our main template... Well almost the whole thing is contained inside those two.

Posted by Pixy Misa at November 16, 2004 03:06 PM
Comments
#1

Ummm... did that really show up in this post the way you wanted it to, Pixy?

Posted by Daniel at November 16, 2004 03:17 PM
#2

Ah! Nevermind

Posted by Daniel at November 16, 2004 03:17 PM
#3

:P

Posted by Pixy Misa at November 16, 2004 03:22 PM
#4

YAY! I was missing part two of the install! Now I'm blogging in smile!

Posted by Nick Queen at November 16, 2004 04:58 PM
#5

I added this to the sidebar as Thingys & Doodads - Smilies...

Do you have a list of new MuNuvians to add to the blogrolls?

Posted by Madfish Willie at November 16, 2004 06:49 PM
#6

Uh... I know this is the wrong section, and I was gonna make a seprate post for this, but it wont let me... hum. ANyways MookieRiffic has been hit by spam. Here's a list of some ofthe emails (some repeat and this is only half of them.)

comment@ alesemarshall.com
comment@google.com
comment@google.com
comment@ priscilla-chan.net
comment@ business-phone-america.com
comment@ freezieice.com
comment@ subspace2.com
comment@ strikerforsheriff.com
comment@ellione.com
comment@ insightbusinessmedia.com
comment@ artistnano.com
comment@twig.info
comment@pri-fix.com
comment@mseed.com
comment@ performanceportfolio.com
comment@ saltcreek.org
comment@ blackwoodjewelry.com
comment@kyrosgp6.com
comment@tv-4s.com
comment@ sexmolcakorea.com
comment@ bigplainsgolf.com
comment@ petsplussupplies.com
comment@ theenglandfamily.com
comment@ indigo-disco.com
comment@ asiansexgallery.net
comment@ thewirelessc.com
comment@ hempxchange.org
comment@ cavalierreferrals.com
comment@ saltcreek.org
comment@ schiresdesign.com
comment@ pemudaselangor.com
comment@ 24diamondnews.com
comment@ pirated-downloads.com
comment@ blackwoodjewelry.com
comment@ lesbian-teen-galleries.net
comment@ perupeace.net
comment@1lance.com
comment@ orthoeauclaire.com
comment@ petsplussupplies.com
comment@ addictions2002.com
comment@jobs2003.org
comment@ teenfilmxxx.com
comment@sex-wax.com
comment@ flavapill.com
comment@ dateline1-900.com
comment@ doesmywebsitesuck.com
comment@ backpackandstuffedtoys.com
comment@mseed.com
comment@almarco.net
comment@ churchill-weavers.com
comment@ lesbian-teen-galleries.net
comment@wdelta.com
comment@ adventuresinageing.org
comment@ nordicvoices.com
comment@ callgirlsinternational.com
comment@cicprep.com
comment@ addictions2002.com
comment@ orthoeauclaire.com
comment@ betteroptions.org
comment@udygroup.com
comment@ strikerforsheriff.com
comment@kmexsi.com
comment@pri-fix.com
comment@ headingtonforum.com
comment@ oasysgroup.com
comment@twig.info
comment@almarco.net
comment@ howtokegel.com
comment@hvaf.com
comment@ monterey-anaheimclinics.com
comment@ insightbusinessmedia.com
comment@ oughterard-tourism.com
comment@1lance.com
comment@ellione.com
comment@kmexsi.com
comment@ indigo-disco.com


I was gonna black list it or something but I didn't want to screw anything up.

Posted by M 0.o kie at November 16, 2004 11:51 PM
#7

If all the email addresses start with comment_@ then we can block that. In fact, I have. :)

De-spamming begins... Now.

Posted by Pixy Misa at November 17, 2004 12:09 AM
#8

Thanks Pixy!

Posted by M 0.o kie at November 17, 2004 12:41 AM
#9

But, but, what about the "winkrazz"? ;P
and "yikes"... :o
and "huh?"... :/
and "what,meworry?"... :B

Posted by Tuning Spork at November 17, 2004 01:59 AM
#10

Good Point. Anyways, this was where i met her. You can join for free as well www.redtricircle.com

Posted by click here at March 12, 2005 09:30 AM
#11

Not having much luck implementing this one...

I put all the Macros in a separate file so that it could be loaded in multiple places. I can see that it is being included OK but nothing happens.

Also, should the icons be given a size (in the image tag) to help dumb browsers....

Posted by Ozguru at May 30, 2005 01:18 PM
#12

I worked it out. If you put all the MTMacros in a standalone template, you then include it with <MTInclude template_name> near the start of <body>.

That works with both the <MTMacroApply> and also the apply_macros="1" flag.

Posted by Ozguru at May 30, 2005 01:49 PM
#13

Yay!

Posted by Pixy Misa at May 30, 2005 01:55 PM
Live Comment Preview
Post a comment









Remember personal info?