FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

How to create an advanced editor for PHPNUKE V. 7.9 - 8.0...

 


farhad0
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 :

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 Very Happy Very Happy
murdo
I tried this, and got a javascript error:

Line: 2
Char: 80956
Error: 'delta_width' is null or not an object
Code: 0
URL: http://..... (my site)
murdo
Ok i fixed it...

I uploaded the entire tinymce folder from PHPNuke 7.8 and it appears to work.

However, I cannot get the ColorPicker to show??
Related topics

PhpNuke Installation Tutorial
Phpnuke 7.8 - How do i stop the new member active emails ?
Create a Flash Contact form, sends to your email account
Un programme pour réduire automatiquement la taille des imag
Access denied as Admin in phpNuke

[man]Photoshop: Tutos en español.
Do you know...?
Phpbb and PhpNuke Help
<::PHP-Nuke and phpBB Installs Along With Themes::>
Script php about gallery

Security Code Graphic
islam is...
Free Mac FTP Software
Whats Your Top 10 Desktop Applications
[var]Actualización de Softwares a versiones nuevas.
Reply to topic    Frihost Forum Index -> Scripting -> Website Software

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.