• Register
Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

User based WYSIWYG Editor permission

+1 vote
190 views
How to make it such that regular users have acces to basic editor while editor, moderators & admins have access to WYSIWYG editor.
asked Jun 19, 2011 in Q2A Core by Ruchie.com

1 Answer

+1 vote
 
Best answer

You'd have to modify the core code to do this. Take a look at function qa_load_editor(...) in qa-app-format.php. You can add the following to the start of the function to make editors and above always use a rich text editor:

if (qa_get_logged_in_level()>=QA_USER_LEVEL_EDITOR)
  $editorname='WYSIWYG Editor';

I've not tested this, so sorry for any mistakes!

answered Jun 20, 2011 by gidgreen
selected Nov 30, 2011 by Ruchie.com
Thanks gidgreen. I will try this and post the update.
This worked out. Thank you so much.
Thanks gid. I tried this using v 1.5 and it's not working for me. I inserted the code you suggested (see above) at line 1473. I tried with admin's posting settings WYSIWYG both turned on and off, but did not see a difference. When code was implemented, WYSIWYG editor was available for all users and anonymous as well. What am I missing here? Thanks
Sorry, my mistake. It worked fine when I inserted the code just above the line of code that says $maxeditor=qa_load_module. Thanks! Feature suggestion for future release...make editor options available for admin to set different user permission/access WYSIWYG editor... anon/guest/editors/moderators/admin
...