Code:INSTALLATION
Before installing, consider upgrading to RavenNuke(tm) (http://ravenphpscripts.com),
which has nukeWYSIWYG (tm) already incorporated, along with thousands of additional
features, improvements and security.
1. Security settings, in the form of custom toolbar settings ("toolbar sets"),
are defined in includes/fckeditor/fckconfig.js. Several are used with
nukeWYSIWYG (tm), including PHPNukeAdmin, NukeUser, and PHPNuke. By modifying or
creating additional toolsets in includes/fckeditor/fckconfig.js, you can
flexibly define access to different functions in FCKeditor.
2. Copy the contents of includes/fckeditor and includes/kses to your Nuke server.
3. Modify (if not already modified) mainfile.php to replace function check_html
and add function wysiwyg_textarea as shown in mainfile.txt
4. Modify (if not already modified) config.php to replace the $AllowableHTML
assignment as shown in config.txt.
NOTE: To disable the editor, simply set $advanced_editor = 0; in config.php
NOTE: To override the default folder for uploading files through the
FCKeditor filemanager, change the following in config.php (or rnconfig
if you use RavenNuke), and set $uploadpath to your desired location:
// To override the default uploads/ folder used for storing files uploaded
// through nukeWYSIWYG (tm) via FCKeditor's filemanager. It should include the
// full path from the root.
$uploadpath = '';
5. For Linux / Apache users: In order to upload images and flash files on
administrative functions, the permissions for uploads/file, uploads/flash,
uploads/image and uploads/media folders must either be set to 777, or the
Apache user must own these folders.
If you have addons / modules that do not already use nukeWYSIWYG (tm), you can complete the following:
6. For the standard "display-as-you-go" approach, replace textarea HTML tags in
modules and admin scripts with a PHP call to function wysiwyg_textarea with 5
arguments: textarea name, textarea value, the toolbar set name, textarea
columns and textarea rows. For example, in modules/Submit_News/index.php:
echo "<br><br>"
."<b>"._STORYTEXT.":</b> ("._HTMLISFINE.")<br>
."<textarea cols=\"50\" rows=\"12\" name=\"story\"></textarea><br>";
becomes:
echo "<br><br>"
."<b>"._STORYTEXT.":</b> ("._HTMLISFINE.")<br>";
# ."<textarea cols=\"50\" rows=\"12\" name=\"story\"></textarea><br>"
wysiwyg_textarea("story", "", "NukeUser", "50", "12");
If there is a value between the <textarea> and </textarea>, tags, that should
be specified as the second argument in the wysiwyg_textarea function call.
The 3rd argument defines the toolbar set, which controls which functions are
available to the user. Since these functions can present security risks,
this should be chosen carefully. By default, the most limited toolset bar
will be chosen. In admin functions, you may choose to use PHPNukeAdmin which
loads all FCKeditor functions. The NukeUser toolbar set is more limited,
more secure and loads faster.
The textarea columns and rows are used in the event the WYSIWYG editor is
turned off. Rows are used to control the height of the text editor when the
WYSIWYG editor is on.
NOTE: The name of the first argument cannot contain reserved HTML tags, e.g.
description contains SCRIPT. This requires that the fields be renamed.
7. For a template / "build, then display" approach, replace the textarea HTML
with a similar PHP function call, wysiwyg_textarea_html. For example, from
My_eGallery:
$out .=
'<center><p align="center"><form action="'.$baseurl.'" method="POST">'
.'<input type="hidden" name="do" value="Post">'
.'<font class="'.$font['title'].'">'._GALNAME.'</font> <b>'.$userdata[1].'</b>'
.'<input type="hidden" name="gname" value="'.$userdata[1].'">'
.'<input type="hidden" name="member" value="1"><br>'
.'<font class="'.$font['title'].'">'._GALCOMMENT.'</font><br>'
. '<textarea wrap="virtual" cols="40" rows="8" name="comment" type="text" maxlength="70"></textarea><br>'
$out .= '<input class="textbox" type="hidden" name="pid" value="'.$pid.'"> '
.'<input type="submit" value="Envoyer">'
.'</form>'
.'<font class="option">'._GALNOTE.'</font></p></center>';
becomes:
$out .=
'<center><p align="center"><form action="'.$baseurl.'" method="POST">'
.'<input type="hidden" name="do" value="Post">'
.'<font class="'.$font['title'].'">'._GALNAME.'</font> <b>'.$userdata[1].'</b>'
.'<input type="hidden" name="gname" value="'.$userdata[1].'">'
.'<input type="hidden" name="member" value="1"><br>'
.'<font class="'.$font['title'].'">'._GALCOMMENT.'</font><br>';
$out .= wysiwyg_textarea_html("comment", "", "NukeUser", "40", "8");
# . '<textarea wrap="virtual" cols="40" rows="8" name="comment" type="text" maxlength="70"></textarea><br>'
$out .= '<input class="textbox" type="hidden" name="pid" value="'.$pid.'"> '
.'<input type="submit" value="Envoyer">'
.'</form>'
.'<font class="option">'._GALNOTE.'</font></p></center>';
|