WordPress.org

Ready to get started?Download WordPress

Forums

TinyMCE Templates
[resolved] Not working when used on front-end (5 posts)

  1. dianaperkins
    Member
    Posted 1 year ago #

    I am using Pods 2.0 to create a membership area for subscribers. Everything works great when viewed from wp-admin however the template button does not show at all when the form is pushed out to a Pod Page.

    It shows all regular TinyMCE JavaScript but is not including any of the proper changes for templates to be included. This problem happens for both logged-in subscriber's and administrator's so I don't think it is a role problem. Your help is greatly appreciated!

    http://wordpress.org/extend/plugins/tinymce-templates/

  2. dianaperkins
    Member
    Posted 1 year ago #

  3. Takayuki Miyauchi
    Member
    Plugin Author

    Posted 1 year ago #

    This plugin allowed to show templates only logged-in user.

  4. dianaperkins
    Member
    Posted 1 year ago #

    The user is logged in... but it still won't show, even if the logged in user is the admin (Yet everything else in TinyMCE does show on both the front-end and the admin, just not the Templates feature on the front-end.)

    I believe the problem is that the footer code for TinyMCE-Templates is only printing out in the 'admin' but when a TinyMCE field is added to an 'external' pod page, it is not triggering TinyMCE-Templates at all. These pod page are not within the WP editor, they appear on the front-end of the site but are only visible to subscribers, admin's etc.

    I've been scouring the code for quite some time now and I cannot find where or how to get the tinyMCE.addI18n and other relevant coding to update on the front-end like it does when I'm in the wp admin area.

    Your help is so greatly appreciated.

  5. dianaperkins
    Member
    Posted 1 year ago #

    I believe I've finally figured this out but I am sure there is a better way to do this...

    I added this code to the end of the __construct() function:

    add_action('wp_head', array(&$this, 'admin_head'));
    add_action('wp_footer', array(&$this, 'admin_footer'));

    Seems to be working now... These two lines were restricting it only to the editor:

    add_action('admin_head', array(&$this, 'admin_head'));
    add_action('admin_footer-post-new.php', array(&$this, 'admin_footer'));

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic