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)

I'm hoping for help with this challenge.

For many installs prior to version 3.66, I've created a /lib/wysiwgy_custom.php with code suggested on the following forum post. That customization created a separate toolbar for admin and another for users:
https://interactivetools.com/forum/forum-posts.php?postNum=2239959#post2239959

Since updates to /lib/wysiwyg.php as of version 3.66, I've not been able to make that custom code work. If someone has figured this out and could please share their code, I'd be very grateful!

~ Deborah

Hi Deborah,

Add $CURRENT_USER line 15:

global $SETTINGS, $CURRENT_USER;

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

Hi Deborah, 

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

Dave Edis - Senior Developer
interactivetools.com
Attachments:

wysiwyg_custom.php 10K

Dave,

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

~ Deborah