If you want to add some Yahoo_like smilies, there will be some problems:
if you add :
)) , it will display as

and
)
See picture:
FIX:
in function.php, look for
PHP Code:
if($dosmilies) {
$bbcode=str_replace(">", "> )", $bbcode);
$bbcode=str_replace("<", "< )", $bbcode);
if(!isset($smilies)) {
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie" );
} else {
$DB_site->data_seek(0,$smilies);
}
while ($smilie=$DB_site->fetch_array($smilies)) {
if(trim($smilie[smilietext])!="" ) {
$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
}
}
}
Replaced by
PHP Code:
if($dosmilies) {
$bbcode=str_replace(">", "> )", $bbcode);
$bbcode=str_replace("<", "< )", $bbcode);
if(!isset($smilies)) {
$smilies=$DB_site->query("SELECT smilietext,smiliepath FROM smilie ORDER BY LENGTH( `smilietext` ) DESC" );
} else {
$DB_site->data_seek(0,$smilies);
}
while ($smilie=$DB_site->fetch_array($smilies)) {
if(trim($smilie[smilietext])!="" ) {
$smilie[smilietext]=str_replace("<","<",$smilie[smilietext]);
$smilie[smilietext]=str_replace(">",">",$smilie[smilietext]);
$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
}
}
}
All YIM smilies will be displayed fine.
However, there'll be one problem in the
popup_smilies function
- with
:"> the "> will stop the html command in
vbcode_popup_smiliesbits template, it's not clickable either.
Code:
<td bgcolor="$backcolor"><a href="javascript:smilie('$smilie[text]')"><img src="$smilie[path]" border="0" alt="$smilie[title]"></a></td>
<td bgcolor="$backcolor"><normalfont>$smilie[text]</normalfont></td>
- with
\:-D/ , when you click on the smilie, it will only display
:-D/ ; the
\ gone
Anyone know how to fix this problem