What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » code for inserting smilies easily

code for inserting smilies easily
Author: Message:
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
33 / Male / Flag
Joined: Aug 2005
O.P. code for inserting smilies easily
i want to know if there is a code you can use so that if you automatically type :) it would produce a simly image from the folder /images/smilies/smile and so on, is there a peice of code i can add to make this possible so i dont have to keep typing <img src=".... />?? thanks!
formerly methos
12-14-2005 07:51 PM
Profile PM Web Find Quote Report
saralk
Veteran Member
*****

Avatar

Posts: 2598
Reputation: 38
35 / Male / Flag
Joined: Feb 2003
RE: code for inserting smilies easily
in what context?

If you are talking about in php or something then
code:
$text = str_replace(":)", "<img src='images/smilies/smile.gif' />", $text);
should work.

This post was edited on 12-14-2005 at 08:47 PM by saralk.
The Artist Formerly Known As saralk
London · New York · Paris
Est. 1989
12-14-2005 08:46 PM
Profile PM Find Quote Report
Chris4
Elite Member
*****

Avatar

Posts: 4461
Reputation: 84
32 / Male / Flag
Joined: Dec 2004
RE: code for inserting smilies easily
If it's in HTML, you can always copy and paste?
Ctrl + c ... Copy
Ctrl + v ... Paste
Twitter: @ChrisLozeau
12-15-2005 01:59 AM
Profile PM Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
33 / Male / Flag
Joined: Aug 2005
O.P. RE: code for inserting smilies easily
quote:
Originally posted by saralk
in what context?

If you are talking about in php or something then
code:
$text = str_replace(":)", "<img src='images/smilies/smile.gif' />", $text);
should work.

thanks, im guessing i can put this code at the head tag or iam i going to have to direct it to a php file??

quote:
Originally posted by chris4
If it's in HTML, you can always copy and paste?
Ctrl + c ... Copy
Ctrl + v ... Paste

thats what iuve been doin until now but i am using the smilies once evcery time i insert news the webpage, and there are about 10 different ones so c and v wont be that effective, thanks anyway!
formerly methos
12-15-2005 12:16 PM
Profile PM Web Find Quote Report
user27089
Disabled Account


Posts: 6321
Joined: Nov 2003
Status: Away
RE: code for inserting smilies easily
quote:
Originally posted by Methos2
thanks, im guessing i can put this code at the head tag or iam i going to have to direct it to a php file??

<?PHP $text = str_replace(":)", "<img src='images/smilies/smile.gif' />", $text); ?>

I think (in the <head></head> section).

This post was edited on 12-15-2005 at 12:34 PM by user27089.
12-15-2005 12:33 PM
Profile PM Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
33 / Male / Flag
Joined: Aug 2005
O.P. RE: code for inserting smilies easily
works a treat thanks, would i be able to direct the page to a seperate php document like you do a style sheet, or is that not possible??
formerly methos
12-15-2005 03:41 PM
Profile PM Web Find Quote Report
hmaster
Senior Member
****

Avatar

Posts: 716
Reputation: 24
33 / Male / Flag
Joined: Nov 2004
RE: code for inserting smilies easily
Put the code into a seperate php file and in your head tag put
code:
<?php include "simlies.php"; ?>
[Image: sig.png]
12-15-2005 05:33 PM
Profile PM Web Find Quote Report
stoshrocket
Senior Member
****

Avatar
formerly methos

Posts: 748
Reputation: 31
33 / Male / Flag
Joined: Aug 2005
O.P. RE: code for inserting smilies easily
thanks, thats exactly what i wanted, thanks for all your help guys!
formerly methos
12-15-2005 05:34 PM
Profile PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On