Code:
Introduction
This Tutorial Shows how to Completely Disable the WYSIWYG editor in PHP-Nuke 7.7 & 7.8 and add a switch in the config.php file.
It will Contain four sections, the first is the Introduction.
Second is for the changes that are the same in both versions.
The third for PHP-Nuke 7.7 and the Last for 7.8. I will seperate these sections with Page Breaks.
Well to start off My Name is Max and I am the Redhat Resources Administrator.
I will try to make this tutorial as easy as possible.
I will not offer support for this modification I use it myself so I know it works correctly.
I STRONGLY RECOMMEND THAT YOU BACK UP YOUR FILES OR AT LEAST THE ONES WE ARE MODIFYING, We are going to modify your config.php and /includes/javascript.php. once you have backed up these files you are ready to begin.
LETS START :
Modifying config.php
Find the file config.php this should be located in your phpnuke root.
Often where the index.php and mainfile.php files reside in.
In config.php:
FIND:
Code:
Code:
$advanced_editor = 0;
AFTER ADD:
Code:
Code:
$AE_off = 1;
This is the variable that we are adding to your config file to Disable all WYSIWYG editor occurences on your PHP-Nuke site.
1 will turn ALL WYSIWYG editor occurrences off.
0 will leave it as the files were before this modification.
Once you finish this step go to Page 3 for the rest of the modifications for PHP-Nuke 7.7 or Page 4 for the rest of the modifications for PHP-Nuke 7.8.
NEXT :
Find the javascript.php file in your includes directory which is in your PHP-Nuke root.
This also has meta.php for your meta tags, bbcode.php for you phpbb forums bbcode and sessions.php.
In javascript.php:
FIND:
Code:
Code:
global $module, $name, $admin, $advanced_editor, $lang;
REPLACE WITH:
Code:
Code:
global $module, $name, $admin, $advanced_editor, $lang, $AE_off;
FIND:
Code:
Code:
if (is_admin($admin) AND defined('ADMIN_FILE') AND $advanced_editor == 1) {
REPLACE WITH:
Code:
Code:
if (is_admin($admin) AND defined('ADMIN_FILE') AND $advanced_editor == 1 AND $AE_off != 1) {
FIND:
Code:
Code:
} elseif (is_admin($admin) AND $advanced_editor != 1 AND $name != "Private_Messages") {
REPLACE WITH:
Code:
Code:
} elseif (is_admin($admin) AND $advanced_editor != 1 AND $name != "Private_Messages" AND $AE_off != 1) {
FIND:
Code:
Code:
} elseif ($name != "Private_Messages" AND $name != "Forums") {
REPLACE WITH:
Code:
Code:
} elseif ($name != "Private_Messages" AND $name != "Forums" AND $AE_off != 1) {
That's it now you can change everything back to how it was by changing [code:1:95ae1761fd]$AE_off = 1[/code:1:95ae1761fd] from 1 to 0 in the config.php file.
NEXT :
Find the javascript.php file in your includes directory which is in your PHP-Nuke root. this also has meta.php for your meta tags, bbcode.php for you phpbb forums bbcode and sessions.php.
In javascript.php:
FIND:
Code:
Code:
global $module, $name, $admin, $advanced_editor, $lang, $no_editor;
REPLACE WITH:
Code:
Code:
global $module, $name, $admin, $advanced_editor, $lang, $no_editor, $AE_off;
FIND:
Code:
Code:
if (is_admin($admin) AND defined('ADMIN_FILE') AND $advanced_editor == 1 AND !defined('NO_EDITOR')) {
REPLACE WITH:
Code:
Code:
if (is_admin($admin) AND defined('ADMIN_FILE') AND $advanced_editor == 1 AND !defined('NO_EDITOR') AND $AE_off != 1) {
FIND:
Code:
Code:
} elseif (is_admin($admin) AND $advanced_editor != 1 AND $name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) {
REPLACE WITH:
Code:
Code:
} elseif (is_admin($admin) AND $advanced_editor != 1 AND $name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR') AND $AE_off != 1) {
FIND:
Code:
Code:
} elseif ($name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) {
REPLACE WITH:
Code:
Code:
} elseif ($name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR') AND $AE_off != 1) {
|