WordPress and TinyMCE

TinyMCE (platform independent web based Javascript HTML WYSIWYG editor) is developed by Moxiecode Systems AB.

Update wp-includes/js/tinymce with files from tinymce/jscripts/tiny_mce

3d party TinyMCE plugins can be downloaded from SourceForge and should be placed in wp-includes/js/tinymce/plugins

To activate plugins and/or tune TinyMCE edit wp-includes/js/tinymce/tiny_mce_config.php (do not forget to make a backup copy first).

To add/remove plugins change $plugins variable. By default (wp2.6) it’s set to:

$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen' , 'wpeditimage');

If you use full version of TinyMCE (e.g. downloaded from Moxiecode) instead of the bundled one, this string may look like (see Plugins reference):

$plugins = array( 'safari', 'inlinepopups', 'autosave', 'spellchecker', 'paste', 'wordpress', 'media', 'fullscreen', 'advhr', 'advimage', 'advlink', 'emotions', 'inlinepopups', 'insertdatetime', 'layer', 'nonbreaking', 'pagebreak', 'preview', 'searchreplace', 'style', 'table', 'visualchars', 'xhtmlxtras' , 'wpeditimage');

To add buttons to 4 available rows modify corresponding variables $mce_buttons, $mce_buttons_2, $mce_buttons_3 and $mce_buttons_4 (see Control reference). For example:

$mce_buttons = apply_filters('mce_buttons', array('search', 'replace', 'bold', 'italic', 'strikethrough',  'underline', '|', 'bullist', 'numlist', 'blockquote', '|', 'justifyleft', 'justifycenter', 'justifyright', 'justifyfull', '|', 'link', 'unlink', 'image', 'wp_more', 'pagebreak',  'spellchecker', 'fullscreen', 'table', 'wp_adv' ));

$mce_buttons_2 = apply_filters('mce_buttons_2', array('formatselect', 'code', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help', 'advhr', 'emotions', 'insertdate', 'inserttime', 'preview' ));

$mce_buttons_3 = apply_filters('mce_buttons_3', array('fontselect', 'fontsizeselect', 'fullpage'));

The result can be viewed in a browser:
/wp/wp-includes/js/tinymce/tiny_mce_config.php

Note: AdBlock Plus Firefox extension blocks the contents of the TinyMCE popups (you will see empty pop-up windows).  You might consider replacing ABP with Adblock or whitelisting your whole site.

How to compile wine under Solaris. Part II

See Part I

Beginning with wine 0.9.57 “-lsunmath” is needed. You can get the libsunmath library from blastwave, for example:

LIBS      = -lsocket -lnsl -lintl -L/opt/csw/lib -lsunmath

This is the error you might get if the library is not specified in dlls/wined3d/Makefile:

Undefined                       first referenced
symbol                             in file
isinf                               surface_base.o
ld: fatal: Symbol referencing errors. No output written to wined3d.dll.so
collect2: ld returned 1 exit status
winegcc: gcc failed
gmake[2]: *** [wined3d.dll.so] Error 2
gmake[2]: Leaving directory `/var/tmp/wine-0.9.57/dlls/wined3d'
gmake[1]: *** [wined3d] Error 2
gmake[1]: Leaving directory `/var/tmp/wine-0.9.57/dlls'
gmake: *** [dlls] Error 2

The isinf related discussion can be found here.

How to compile wine under Solaris. Part I

Unfortunately, wine can not be compiled under Solaris “as is”. Some tricks are needed.

    If you do not needed LDAP and 16bit support, turn them off:

  • ./configure --without-ldap --disable-win16
  • To get rid of the following error:
    In file included from object.h:30,
    from fd.c:76:
    ../include/wine/list.h:25: error: redefinition of `struct list'
    ../include/wine/list.h:97: error: conflicting types for 'list_remove'
    /usr/include/sys/list.h:48: error: previous declaration of 'list_remove' was here
    ../include/wine/list.h:97: error: conflicting types for 'list_remove'
    /usr/include/sys/list.h:48: error: previous declaration of 'list_remove' was here
    ../include/wine/list.h:104: error: conflicting types for 'list_next'
    /usr/include/sys/list.h:53: error: previous declaration of 'list_next' was here
    ../include/wine/list.h:104: error: conflicting types for 'list_next'
    /usr/include/sys/list.h:53: error: previous declaration of 'list_next' was here
    ../include/wine/list.h:112: error: conflicting types for 'list_prev'
    /usr/include/sys/list.h:54: error: previous declaration of 'list_prev' was here
    ../include/wine/list.h:112: error: conflicting types for 'list_prev'
    /usr/include/sys/list.h:54: error: previous declaration of 'list_prev' was here
    ../include/wine/list.h:120: error: conflicting types for 'list_head'
    /usr/include/sys/list.h:51: error: previous declaration of 'list_head' was here
    ../include/wine/list.h:120: error: conflicting types for 'list_head'
    /usr/include/sys/list.h:51: error: previous declaration of 'list_head' was here
    ../include/wine/list.h:126: error: conflicting types for 'list_tail'
    /usr/include/sys/list.h:52: error: previous declaration of 'list_tail' was here
    ../include/wine/list.h:126: error: conflicting types for 'list_tail'
    /usr/include/sys/list.h:52: error: previous declaration of 'list_tail' was here
    ../include/wine/list.h:153: warning: static declaration of 'list_move_tail' follows non-static declaration
    /usr/include/sys/list.h:49: warning: previous declaration of 'list_move_tail' was here
    gmake[1]: *** [fd.o] Error 1
    gmake[1]: Leaving directory `/var/tmp/wine-0.9.56/server'
    gmake: *** [server] Error 2
    

    Change server/fd.c:

    *** 71,76 ****
    --- 71,88 ----
    #include <sys/types.h>
    #include  <unistd.h>
    + /*
    +  struct list is defined at sys/list_impl.h on solaris
    +  this patches work around it.
    +  */
    + #define list		WINELIST
    + #define list_remove	WINELIST_REMOVE
    + #define list_next	WINELIST_NEXT
    + #define list_prev	WINELIST_PREV
    + #define list_head	WINELIST_HEAD
    + #define list_tail	WINELIST_TAIL
    + #define list_move_tail	WINELIST_MOVE_TAIL
    +
    #include "ntstatus.h"
    #define WIN32_NO_STATUS
    #include "object.h"
    
  • Compile with /usr/sfw/bin/gcc not /opt/csw/bin/gcc. You can successfully compile wine with CSWgcc but if you run wine or winecfg you will get the following error (at least under Solaris 11 builds83a-86):
    $ winecfg
    sock_init: ERROR in sock_check_pollhup()
    Assertion failed: next->flags & VFLAG_SYSTEM, file virtual.c, line 467
    Abort