configure wysiwyg editor functions per user

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
prost

configure wysiwyg editor functions per user

Post by prost »

I can't figure out how to configure the wysiwyg editor (TinyMCE) differently per user (or group). Is this not possible?

If not, is this possible with another editor? (I guess not, but if so, I'd be happy to switch -- I'm not married to TinyMCE :))

The problem is that I'm dealing with users who need a very simple wysiwyg editor (like most humans, they're confused by options they don't need), but some others who do need more functionality.
alby

Re: configure wysiwyg editor functions per user

Post by alby »

prost wrote: I can't figure out how to configure the wysiwyg editor (TinyMCE) differently per user (or group). Is this not possible?

If not, is this possible with another editor? (I guess not, but if so, I'd be happy to switch -- I'm not married to TinyMCE :))
No, you cannot to have different settings but different editors.
You can setting different editor (TinyMCE Basic, FCKEditor, TinyMCE Advanced) but attention because user can change own editor (User Preferences)

Alby
anivision
Forum Members
Forum Members
Posts: 33
Joined: Mon Feb 25, 2008 2:54 pm

Re: configure wysiwyg editor functions per user

Post by anivision »

Hello, as I have a similar problem as Prost here above, I thought I could reuse this thread a little...

I understood by Albys answer it's possible to have different editors to different users but they can change it back for themself in the "user preferences" area.n There is no way to block this area for a certain group then?

I don't mind if I have to change in the php scripts, but this could be a huge improvement for me.
anivision
Forum Members
Forum Members
Posts: 33
Joined: Mon Feb 25, 2008 2:54 pm

Re: configure wysiwyg editor functions per user

Post by anivision »

I found out that this is the code inside admin/editprefs.php to change the wysiwyg editor:

:



modules as $key=>$value)
{
if ($gCms->modules[$key]['installed'] == true &&
$gCms->modules[$key]['active'] == true &&
$gCms->modules[$key]['object']->IsWYSIWYG())
{
echo ''.$key.'';
}
}
?>

Maybe its possible to set an "if" term to hide the selection of the editor for a certain group and also set the wysiwyg variable fixed to TinyMCE.

Like:
if group=editor {set wysiwyg=tinymce} else (all the code above)

Is there anyone who knows the needed variables?
Or any other way to acheive the same thing?


Ideés are much appreciated
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: configure wysiwyg editor functions per user

Post by calguy1000 »

it can all be done given time.

All you need to do is: 
  Learn PHP
  Learn the CMS database structure
  Learn the CMS API's
  Edit the user preferences code
  Modify all of the module code and the apis to adjust the wysiwyg call on a per-user basis
 
it should be pretty simple.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
anivision
Forum Members
Forum Members
Posts: 33
Joined: Mon Feb 25, 2008 2:54 pm

Re: configure wysiwyg editor functions per user

Post by anivision »

Why do you think I'm asking here, pretty much not becouse I have the time to learn everything about this script.

If you don't have any suggestion, why post a reply? I meen, that replay can fit in to every asked question here right, so why should people bother to ask things here?
anivision
Forum Members
Forum Members
Posts: 33
Joined: Mon Feb 25, 2008 2:54 pm

Re: configure wysiwyg editor functions per user

Post by anivision »

Ok, I found a solution for my problem and I thought I should share this. It's an ugly one but it works.

I installed FCKeditor and removed almost every tool from the toolbar except for the most basic things. Then I logged in as the user I want to restrict the edit abilities for and changed to FCKeditor in his "user preferences". After this I removed the lines in admin/editprefs.php that makes you change the wysiwyg editor.

Now the user is locked to use FCKeditor with the choices of tools I give him.
This was done without knowing PHP, CMS database structure, the CMS API's or the user preferences codes.
Last edited by anivision on Wed Mar 05, 2008 8:49 am, edited 1 time in total.
Locked

Return to “CMSMS Core”