• Jimako
    Main Admin
    Posts: 359
    Joined: 1 year ago
    Mon Jul 02 2018, 09:21  Jimako

    Related featured request :  GITHUB

    Open file forum_post.php in forum plugin.

    replace this:

    if(USER)
    {
    define('e_TINYMCE_TEMPLATE', 'member'); // allow images / videos.
    }
    else
    {
    define('e_TINYMCE_TEMPLATE', 'public');
    }

    by this:

    if(getperms('0'))
    {
    define('e_TINYMCE_TEMPLATE', 'mainadmin'); // allow images / videos.
    }
    elseif(ADMIN)
    {
    define('e_TINYMCE_TEMPLATE', 'admin'); // allow images / videos.
    }
    elseif(USER)
    {
    define('e_TINYMCE_TEMPLATE', 'member'); // allow images / videos.
    }
    else
    {
    define('e_TINYMCE_TEMPLATE', 'public');
    }

    If you want to edit template (or made new one) , go to e107_plugins/tinymce4/templates, copy someone f.e. admin.xml to forumadmin.xml (change template name above).

    If you need to your tinymce editor supports more bbcodes (otherwise it will strip them), add them here:

    <extended_valid_elements>i[*], object[*],embed[*],bbcode[*], sp[*]</extended_valid_elements>

    This applies only for forum posts.  After looking at code in wysiwyg.php, it would be enough to remove definition of e_TINYMCE_TEMPLATE.  Then standard templates will be applied.