01
Feb
2007
0

I got my smilies working again 🙂 😛 :D. After upgrading to WordPress 2.1 they were gone. This was because of the fact that the people of WordPress decided that there should be either a newline or a ‘word’ character behind your smilie. So a dot (.) was not enough. Kind of strange mutation, however, I was able to fix it.

Open wp-includes/vars.php and look near line 90. There you will find a line like:
$wp_smiliessearch[] = '/(\s|^)'.preg_quote($smiley, '/').'(\s|$)/';
Replace it with:
$wp_smiliessearch[] = '/(\s|^)'.preg_quote($smiley, '/').'/';
And you’re done :).

Another thing. If you also don’t like the fact that there is always a space after you’re smilie, you can change it. Scroll down a few lines (line 92 in my case). Change this line from:
$wp_smiliesreplace[] = " <img src='" . get_option('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' /> ";
To:
$wp_smiliesreplace[] = " <img src='" . get_option('siteurl') . "/wp-includes/images/smilies/$img' alt='$smiley_masked' class='wp-smiley' />";

Yes, indeed, just remove the space afterwards.

Written by Harm

Geen comments »

Plaats een comment