hello
this is a learning how to create an advanced editor for PHPNUKE V. 7.9 and later
you must first copy the Advanced Editor theme in phpnuke V.7.8
from path : html\includes\tiny_mce\themes
into your theme of editor
and then edit \html\includes\javascript.php file and then convert these lines :
to these lines :
then u must to add this value to config.php file to set the Advanced editor
0 value will use the default simple text editor and 1 value will use the full featured text editor
have fun

this is a learning how to create an advanced editor for PHPNUKE V. 7.9 and later
you must first copy the Advanced Editor theme in phpnuke V.7.8
from path : html\includes\tiny_mce\themes
into your theme of editor
and then edit \html\includes\javascript.php file and then convert these lines :
| Code: |
|
if (file_exists("themes/".$ThemeSel."/style/editor.css")) { $edtcss = "editor_css : \"themes/".$ThemeSel."/style/editor.css\","; } else { $edtcss = "editor_css : \"includes/tiny_mce/themes/default/editor_ui.css\","; } if ($nuke_editor == 1) { if (is_admin($admin) AND $name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) { echo "<!-- tinyMCE --> <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script> <script language=\"javascript\" type=\"text/javascript\"> tinyMCE.init({ mode : \"textareas\", theme : \"basic\", language : \"$lang\", $edtcss force_p_newlines: \"false\", force_br_newlines: \"true\" }); </script> <!-- /tinyMCE -->"; } elseif ($name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) { echo "<!-- tinyMCE --> <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script> <script language=\"javascript\" type=\"text/javascript\"> tinyMCE.init({ mode : \"textareas\", theme : \"default\", language : \"$lang\", $edtcss force_p_newlines: \"false\", force_br_newlines: \"true\" }); </script> <!-- /tinyMCE -->"; } } |
to these lines :
| Code: |
|
if (file_exists("themes/".$ThemeSel."/style/editor.css")) { $edtcss = "editor_css : \"themes/".$ThemeSel."/style/editor.css\","; } else { $edtcss = "editor_css : \"includes/tiny_mce/themes/default/editor_ui.css\","; } if ($nuke_editor == 1) { if (is_admin($admin) AND defined('ADMIN_FILE') AND $advanced_editor == 1 AND !defined('NO_EDITOR')) { echo "<!-- tinyMCE --> <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script> <script language=\"javascript\" type=\"text/javascript\"> tinyMCE.init({ mode : \"textareas\", theme : \"advanced\", language : \"$lang\", force_p_newlines: \"false\", force_br_newlines: \"true\", plugins : \"table,advhr,advimage,advlink,emotions,iespell,insertdatetime,preview,zoom,flash,searchreplace,print\", theme_advanced_buttons1_add : \"fontselect,fontsizeselect\", theme_advanced_buttons2_add : \"separator,insertdate,inserttime,preview,zoom,separator,forecolor,backcolor\", theme_advanced_buttons2_add_before: \"cut,copy,paste,separator,search,replace,separator\", theme_advanced_buttons3_add_before : \"tablecontrols,separator\", theme_advanced_buttons3_add : \"emotions,iespell,flash,advhr,separator,print\", theme_advanced_toolbar_location : \"top\", theme_advanced_toolbar_align : \"right\", theme_advanced_path_location : \"bottom\", $edtcss plugin_insertdate_dateFormat : \"%Y-%m-%d\", plugin_insertdate_timeFormat : \"%H:%M:%S\", extended_valid_elements : \"a[name|href|target|title|onclick],img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name],hr[class|width|size|noshade],font[face|size|color|style],span[class|align|style]\", external_link_list_url : \"example_link_list.js\", external_image_list_url : \"example_image_list.js\", flash_external_list_url : \"example_flash_list.js\", file_browser_callback : \"fileBrowserCallBack\" }); function fileBrowserCallBack(field_name, url, type) { // This is where you insert your custom filebrowser logic alert(\"Filebrowser callback: \" + field_name + \",\" + url + \",\" + type); } </script> <!-- /tinyMCE -->"; } elseif (is_admin($admin) AND $advanced_editor != 1 AND $name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) { echo "<!-- tinyMCE --> <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script> <script language=\"javascript\" type=\"text/javascript\"> tinyMCE.init({ mode : \"textareas\", theme : \"basic\", language : \"$lang\", $edtcss force_p_newlines: \"false\", force_br_newlines: \"true\" }); </script> <!-- /tinyMCE -->"; } elseif ($name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) { echo "<!-- tinyMCE --> <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script> <script language=\"javascript\" type=\"text/javascript\"> tinyMCE.init({ mode : \"textareas\", theme : \"default\", language : \"$lang\", $edtcss force_p_newlines: \"false\", force_br_newlines: \"true\" }); </script> <!-- /tinyMCE -->\n"; } } |
then u must to add this value to config.php file to set the Advanced editor
| Code: |
|
# $advanced_editor: On/Off the advanced WYSIWYG text editor for admins # 0: Off, will use the default simple text editor # 1: On, will use the full featured text editor $advanced_editor = 0; |
0 value will use the default simple text editor and 1 value will use the full featured text editor
have fun
