[wp-trac] [WordPress Trac] #10145: Tango/GNOME smilies in core

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 13 16:57:45 UTC 2009


#10145: Tango/GNOME smilies in core
-------------------------+--------------------------------------------------
 Reporter:  jdub         |        Owner:          
     Type:  enhancement  |       Status:  reopened
 Priority:  normal       |    Milestone:  2.9     
Component:  Formatting   |      Version:  2.8     
 Severity:  normal       |   Resolution:          
 Keywords:  has-patch    |  
-------------------------+--------------------------------------------------

Comment(by Otto42):

 Replying to [comment:23 matt]:
 > I suggest we go back to the old smilies in core, and have a canonical
 plugin for switching smilies that ships with as many open source smiley
 packs as possible. If we need a filter to do this more elegantly, let's
 add it.

 Goodie.

 In particular, this line in translate_smiliey($smiley) in wp-
 includes/formatting.php needs a filter:

 {{{
 return " <img src='$siteurl/wp-includes/images/smilies/$img'
 alt='$smiley_masked' class='wp-smiley' /> ";
 }}}

 Having "/wp-includes/images/smilies/" hardcoded makes it difficult to use
 smilies that are in a plugin directory. Only way to do it is to filter the
 content and do a search/replace for that string, which is less than
 optimal, of course.

 Suggest adding a "smilies_path" filter or similar on that string. Not sure
 whether $siteurl should be included in the filter as well though... if it
 is, suggest passing it as a second parameter to the filter function, to
 let the filter have that part of the string as well.

 Given this, a plugin can be easily created to use any of a number of
 smiley sets. Basically it would be a simple admin screen to select a set
 to load and a filter to use that set. Each set would be image files in a
 subdirectory of the plugin, and a php file in the subdirectory could be
 loaded to define the set itself.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10145#comment:25>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list