Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

Is there away to turn OFF the basic editor from all users except for administrators and moderators?

Quote Reply
Is there away to turn OFF the basic editor from all users except for administrators and moderators?
Since I found out while experimenting and replying in another thread that the basic editor is the one that will allow html to be entered into posts, I'd like to utilize that for moderators and myself (administrators), but not regular members. Is there a simple and clean way to turn off the basic editor from being used by regular members? Maybe like in Links with a if tag to check if the user is an admin or mod?

As it is now, it's really funky, If I set a forum to be HTML only, and I go to post a new message Im shown the advanced editor to enter my message. If I click on the basic editor button, it takes me to the basic editor and it removes the button to allow me to go back to the advanced editor again.

If I set the forum to markup and html, I go to post a new message and start in the advanced editor, click the basic editor button and it maintains the button to take me back to the advanced editor.

If I set the forum to text only, and I go to post a new message Im shown the advanced editor to enter my message. If I click on the basic editor button, it takes me to the basic editor and it removes the button to allow me to go back to the advanced editor again.

It's all good to confuse the user as to what the heck is going on, but not much towards functionality of truly allowing me to enter html code and used the advanced editor. Most wysiwyg web editors let me see my message in an advanced editor, and click a button to see the underlying html code, but they also let me swap back to the advanced editor so that I can see the results before submitting. i think that's necessary here to.

But anyway, please if someone can just tell me how to turn off the basic editor from all regular members I'll worry about the rest myself.

Last edited by:

Westin: May 19, 2009, 1:24 AM
Quote Reply
Re: [Westin] Is there away to turn OFF the basic editor from all users except for administrators and moderators? In reply to
The easiest way, would be to make it so "moderators" can only access both forms. In post_write.html, find:

Code:
<%if ie_version >= 5.5 or mozilla_version >= 1.4%>
<%if advanced_editor%>
<%include include_post_html_common_write.html%>
<%elsif current_user_advanced_editor and not basic_editor%>
<%include include_post_html_common_write.html%>
<%else%>
<%include include_post_common_write.html%>
<%endif%>
<%else%>
<%include include_post_common_write.html%>
<%endif%>
..and change to:


Code:
<%if current_user_forum_permission == 4%>

<%if ie_version >= 5.5 or mozilla_version >= 1.4%>
<%if advanced_editor%>
<%include include_post_html_common_write.html%>
<%elsif current_user_advanced_editor and not basic_editor%>
<%include include_post_html_common_write.html%>
<%else%>
<%include include_post_common_write.html%>
<%endif%>
<%else%>
<%include include_post_common_write.html%>
<%endif%>

<%else%>
<%include include_post_html_common_write.html%>
<%endif%>

Untested, but should work.

NB: current_user_forum_permission == 4 is the "user group" of your moderator - its "4" by standard, so should work fine for ya.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Westin] Is there away to turn OFF the basic editor from all users except for administrators and moderators? In reply to
Oh, and in include_post_html_common_write.html , you would also need to change:

Code:
<input type="submit" class="button" name="do=<%this_do%>;basic_editor=1;basic_editor_switch=1" value="Switch to Basic Editor">

..to;

Code:
<%if current_user_forum_permission == 4%>
<input type="submit" class="button" name="do=<%this_do%>;basic_editor=1;basic_editor_switch=1" value="Switch to Basic Editor">
<%endif%>

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!