- Moderated by:
- Support
-
- rank:
-
Freshman
- registered:
- December 1969
- Status:
- offline
- last visit:
- 22.05.03
- Posts:
- 18
For many reasons you may want to disable the visual editor included in the last versions of PostNuke but only for one or some Modules. This is what you shall do:
Edit www.yourdomain.com/header.php
More or less line 170 you'll find this code:
Code
/* Enable Wysiwyg editor configuration at seeting Added by bharvey42 edited by Neo */
$pnWysiwygEditor = pnConfigGetVar('WYSIWYGEditor');
Right afterwards insert this piece of code:
Code
////// Start: MODULES WITHOUT VISUAL EDITOR //////
$modInfo = pnModGetInfo(pnModGetIDFromName(pnModGetName()));
$ModName = pnVarPrepForStore($modInfo['directory']);
$novisualeditor = array('Module1',
'Module2'); // Insert here the Modules which you don't want to display Visual Editor.
foreach ($novisualeditor as $nve) {
if ($ModName == $nve) {
$pnWysiwygEditor = 0;
}
}
////// End: MODULES WITHOUT VISUAL EDITOR //////
Replace in the array where it says Module1, Module2, etc with the directory Name of the modules in which you don't want the Visual Editor to show.
That's it.
Cheers,
ÑÑ. 8) -
- rank:
-
Freshman
- registered:
- February 2003
- Status:
- offline
- last visit:
- 25.08.03
- Posts:
- 4
Please... It's not working for me! It returns errors! I tried to add a simple line of code like this:
Code
$pnWysiwygEditor = pnConfigGetVar('WYSIWYGEditor');
$pnWysiwygEditor = 0; // Add this line
And it has already become erroneous! How? Please... -
- rank:
-
Professional
- registered:
- April 2002
- Status:
- offline
- last visit:
- 24.11.08
- Posts:
- 716
There is a code snippet telling you how to disable the editor based on permissions. It might be a good addition to igmgs snippet.
BTW: If you have these snippets at hand, please put them in the NOC code snippets collection.
Jörg -
- rank:
-
Professional
- registered:
- April 2002
- Status:
- offline
- last visit:
- 24.11.08
- Posts:
- 716
Comments (the Original Comments module as well as EZComments) are ALWAYS shown with a module to comment on -- this "upmost" module ist the one you can en/disable the WYSIWSG for...
