What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » php smilie code check

php smilie code check
Author: Message:
Plik
Veteran Member
*****

Avatar

Posts: 1489
Reputation: 46
34 / Male / –
Joined: Jun 2004
RE: php smilie code check
quote:
Originally posted by Methos2
quote:
Originally posted by hmaster
He means that the code will only work if you put the text in the $text variable.

This is my news post 0:) :D :)

code:
<?php

$text = "This is my news post  0:) :D :)[";

$smiley_list = array(":)", "0:)", ":D", the rest of the smilies);
$replacement_list = array('<img alt="smiley" src="smilies/grin.gif" />', '<img alt="smiley" src="smilies/angel.gif" />', '<img alt="smiley" src="smilies/biggrin.gif" />', The rest of the replacements here, using this format: '<img alt="alttext" src="location' />");

$text = str_replace($smiley_list, $replacement_list, $text);

echo $text;
?>



but having to to do this throughout the code deifes the object of a 'shortcut' such as :), unless i have missed something here it would be alot simpler and quicker to just use the html tag <img> wouldnt it.... :undecided:

The whole point in that is to test that you are setting the $text variable correctly and that you are executing the function correctly, you wont have to do that for the code once whe can make sure that it is working correctly.
also:
quote:
Originally posted by Madman
could you post your complete $smiley_list and $replacement_list, arrays? (the two limes that start with $smiley_list = Array, and $replacement_list = Array)
12-24-2005 08:15 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
php smilie code check - by stoshrocket on 12-24-2005 at 02:45 PM
RE: php smilie code check - by user27089 on 12-24-2005 at 02:46 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 02:47 PM
RE: php smilie code check - by Ezra on 12-24-2005 at 02:55 PM
RE: php smilie code check - by Stigmata on 12-24-2005 at 03:13 PM
RE: php smilie code check - by Plik on 12-24-2005 at 03:15 PM
RE: php smilie code check - by absorbation on 12-24-2005 at 03:47 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 03:49 PM
RE: php smilie code check - by Veggie on 12-24-2005 at 04:33 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 04:36 PM
RE: php smilie code check - by Veggie on 12-24-2005 at 04:54 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 05:06 PM
RE: php smilie code check - by Plik on 12-24-2005 at 05:11 PM
RE: php smilie code check - by hmaster on 12-24-2005 at 05:12 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 07:58 PM
RE: php smilie code check - by hmaster on 12-24-2005 at 08:03 PM
RE: php smilie code check - by Plik on 12-24-2005 at 08:15 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 08:18 PM
RE: php smilie code check - by Plik on 12-24-2005 at 08:29 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 08:33 PM
RE: php smilie code check - by Plik on 12-24-2005 at 08:38 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 08:43 PM
RE: php smilie code check - by Plik on 12-24-2005 at 08:55 PM
RE: php smilie code check - by stoshrocket on 12-24-2005 at 09:00 PM


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