This seemed like a good place to begin this thread. Here is some info I posted in another forum regarding this topic ....
I made a simple script for tinyMCE which allows you to enable on/off toggle for certain pages.
This code is placed at the very top of includes/javascript.php. Insert the allowed admin ops or module names into the array where *** is.
Example - $pages_to_allow_toggle = array("topicsmanager","Forums","Journal","adminStory");
Code:
global $op, $name, $editor;
// assemble list of allowed ops or names
$pages_to_allow_toggle = array("***","***");
// check for allowed pages in op or name
foreach($pages_to_allow_toggle as $pages){
// check for editor variable and define no_editor if off
if(eregi("$pages",$op) || eregi("$pages",$name)){
if($editor=="off"){define("NO_EDITOR", "true");
}
}
}
You can call this from a link something like this for admin ...
Note - You may have to set the global variable $editor in whatever pages you use the above php links in (global $editor;). I have already inserted it into the codes above, so you may not have to.
The above code only allows the user to toggle the editor if it is enabled by default.
The user cannot enable the editor from a page where it is not enabled by default.
Additionally, with a few minor alterations, you could make it so that tinyMCE is disabled by default except on the pages in your array.
There is a WYSIWYG editor tweak at http://www.nukeresources.com
It allows you to turn off the editor by module, using an On/off in your Modules admin panel
You can change the tinyMCE configuration (buttons, tag filters, etc.) in includes/javascript.php.
You can find reference material at the tinyMCE website at
http://tinymce.moxiecode.com/index.php
Note - PHP-Nuke uses an altered version of tinyMCE, so installing the latest version of tinyMCE on your PHP-Nuke site will probably cause errors.
Don't delete the old version and overwrite it with the new version.
_________________ - Prophet
Get the Last Visit module (and others modules I designed) from my website! FREE! http://jasonlau.biz
To remove from a module just add this to the module.
Code:
define('NO_EDITOR', 1);
adrian18w Nuke Cadet
Joined: Jan 28, 2006
Posts: 4
Posted:
Sun Jan 29, 2006 3:44 pm
Btw, how do I install the WYSIWYG editor tweak? Do I need to overwrite the files that i have curently? Is there a manual way to install it? Thx.
Mtwo Nuke Cadet
Joined: Nov 16, 2004
Posts: 8
Posted:
Sat May 27, 2006 5:58 am
Using PC-Nuke 7.9031 and both TinyMCE and SPAW strip tags from my valid HTML. Most annoying is the stripping of the <DIV> tag. <div align=center> becomes simply a div tag. All news postings that have centered elements use this and SPAW uses the <div> tag by default for centering. I have added "div"=>2 to my allowable html array, but still no success. What else can I do to allow <div align=center> tags?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum