Customize wysiwyg w/different admin & user toolbars (as of v3.66)

5 posts by 3 authors in: Forums > CMS Builder
Last Post: June 21   (RSS)

Hi Deborah,

Add $CURRENT_USER line 15:


Then you can use:

if ($CURRENT_USER['isAdmin']) { 
  $toolbar1 = "formatselect fontsizeselect | bold italic underline | bullist numlist | charmap | removeformat fullscreen";
  $toolbar2 = "link | table | pastetext paste | code";
  $toolbar3 = "";
} else {
  $toolbar1 ="bold italic | bullist numlist | link | removeformat fullscreen";
  $toolbar2 = "";
  $toolbar3 = "";

Thanks, Djulia

Djulia, thank you for the code suggestion.

I was working with version 3.70. The $CURRENT USER code addition doesn't have any effect, the WYSIWYG editor still doesn't appear. Error log shows "Can't set cookie(loginsession ... headers already sent!"

Next I tried both my original code and the modified code with beta 3.71 and both worked - no errors.

I'm guessing it was a cookies bug in 3.70 that has been fixed fixed.

Thanks again!
~ Deborah

Hi Deborah, 

Can you try the attached file?  Let me know if it works for you.

Dave Edis - Senior Developer

wysiwyg_custom.php 10K


Yes - it's working perfectly. Thanks for your assistance!

~ Deborah