Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
adding smilies to comments
Hi I’m searching for a way to add smilies to my comment form on my guestbook page
I found the "ied_replacer (formerly ied_smile_body)"
plugin but is not working for me (4.0.6).
Is there a way to do so by JS or something please?
Thanks :)
Offline
#2 2008-04-24 18:01:01
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: adding smilies to comments
If you are looking to replace a smiley code with a smiley image, you could try the an7_filter plugin.
<txp:Ruhh />
Offline
Re: adding smilies to comments
I’m using “ied_replacer” without any problems in 4.0.6. Have you edited the plug-in to show the paths to the images and which text they should replace? This is an example of what I am using:-
// text to replace with html
$smilies = array(
':wink:' => '<img src="<txp:site_url />images/716.gif" alt="wink smiley" style="height:15px;width:15px" />',
':binkybaby:' => '<img src="<txp:site_url />images/713.gif" alt="bimkybaby smiley" style="height:18px;width:15px" />',
':sad:' => '<img src="<txp:site_url />images/714.gif" alt="cry smiley" style="height:15px;width:15px" />',
':grin:' => '<img src="<txp:site_url />images/715.gif" alt="smile smiley" style="height:15px;width:15px" />',
);
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: adding smilies to comments
Thanks both ied_replacer & an7_filter are working fine now after I edit them correctly ;)
But is there a way to put the smiles near the textarea and make them clickable
so when you click it will write the smile code [:)] into the textarea please?
(like in all the forums and guestbook systems)
Offline
Re: adding smilies to comments
THE BLUE DRAGON, you could try hak_textile_tag
It will output textile tags by default, but you can edit the plugin’s code by changing the button functions insert values. In example, the plugin code contains Javascript where is something like this:
theButtons[theButtons.length] = new theButton('ol','ol','# ','');
theButtons[theButtons.length] = new theButton('strong','strong','*','*');
That you can change something like this:
theButtons[theButtons.length] = new theButton('smiley1',':)',':)','');
theButtons[theButtons.length] = new theButton('smiley2',':D',':D','');
PS. Don’t copy my code as it is, coz it won’t work. I didn’t look at the plugin’s JS, but it uses similiar method (as I do use same kind of method with my own editor), so I just made up that with my memory, memorize and brainz. So, it’s not 100% copy+paste nor absolute correct. But it’s the way it works – and it helps you to get the idea :)
Last edited by Gocom (2008-04-25 15:25:28)
Offline
Re: adding smilies to comments
Now there’s a good idea. I didn’t think of messing with that plug-in. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#7 2008-04-25 17:38:04
- Ruhh
- Member
- From: dakota dunes
- Registered: 2008-01-20
- Posts: 305
Re: adding smilies to comments
I never thought about using the hak textile tags but I used a JS instead.
<txp:Ruhh />
Offline
Re: adding smilies to comments
OK so now it’s works :)
(not lite but works)
I’m using hak_textile_tags
& ied_replacer
Thanks a lot for helping :)
Offline
Pages: 1