Userroles
-
Hello!
Is it possible that a user has the role to use the sortcodes, but doesn’t have the ability to edit the shortcodes?
-
Nice idea. I’ll do research and implement that.
great. It would also be nice when I can use it for frontend-pulishers (like https://de.ww.wp.xz.cn/plugins/front-end-publishing/). Now the tinymce-button in the frontend is not displayed.
@monika21 I tested the existing behavior.
Shortcodes can be created only by “administrators” (or) users who have ability to edit plugin settings.
But they cannot be edited by other users.
Example:
Admin user created a shortcode, an editor/author can only use the shortcode but cannot edit it.Can you please help me if this is what you are trying to achieve ?
Thanks,
Aakash@vaakash You are right. Authors cannot edit the shortcodes, but the “edit”-link is visible (in the editor).
Now I have a second problem: When I add the tinymce-editor with the plugin https://ww.wp.xz.cn/plugins/front-end-publishing/ the tinymce-button for the shortcodes are not visible. How can I add the button?
@monika21, yes the edit button will be visible but when the user clicks it, he will get permission denied error.
Regarding the tinymce issue, that is a unique requirement.
Can you please try changingadmin_inittoinitin this file ?https://plugins.trac.ww.wp.xz.cn/browser/shortcoder/trunk/admin/sc-admin.php#L25
Thank you for the help, @vaakash.
Now I see the button, but nothing happens when I click on the button…
@monika21, I guess it is because the WordPress admin UI elements are not loaded outside in the frontend.
Can you please share me the site URL where I can see the editor ?
One more question, do other tiny mce buttons from other plugins work ? because the implementation is not specific to Shortcoder.
Thanks,
Aakash@vaakash, unfortunately the site is in construction and behind a htaccess-password… but I use also this plugin https://ww.wp.xz.cn/plugins/wp-user-avatar/
and in the front-end editor I can use the button of the wp-user-avatar plugin.
Ok, can you please try adding the below code in your theme’s functions.php file ?
add_thickbox();If this does not work, try the one below.
add_action( 'wp_enqueue_scripts', 'sc_add_thickbox' ); function sc_add_thickbox(){ wp_enqueue_script( 'thickbox' ); wp_enqueue_style( 'thickbox' ); }
The topic ‘Userroles’ is closed to new replies.