1
The Wish:
Create a switchable (On/OFF) button that will change change two lines of code.
What the button will accomplish:
Allow "Tinyeditor" to be turned on and off as the default editor.
File that Needs to be Modified:
class/xoopsform/formdhtmltextarea.php
I have to manually change this file everytime I want to use TinyEditor in most modules and block. The problem is, I don't wish to give "users" the ability of use "TinyEditor". Just me...the Admin.
Section of Code that is Involved:
Around line 72-74 of formdhtmltextarea.php
Code from formdhtmltextarea.php:
/*var $htmlEditor = array();*/
var $htmlEditor = array( 'XoopsFormTinyeditorTextArea', '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php' );
Explanation of the Code:
As you can see, one line is commented out and one line is NOT commented out.
What I Would Like Help With:
Creating a button somewhere in the Adin Section of my XOOPS Site that would in effect:
When Selecting the "Off" button, it would Comment out:
var $htmlEditor = array( 'XoopsFormTinyeditorTextArea', '/class/xoopseditor/tinyeditor/formtinyeditortextarea.php' );
AND "uncomment" out:
/*var $htmlEditor = array();*/
Questions:
1. Is this something that can easily be accomplished with php coding by a novice php person?
2. Can some point me in the right direction or some documentation so I can figure out how to do this?