Jump to content
xisto Community
Sign in to follow this  
Houdini

New PHP-Nuke In Fantastico Needs Patch!

Recommended Posts

The PHP-Nuke 7.7 version that is on the Fantastico in the Control Panel is broken, it is inserting the WYSIWYG editor into the forums, I didn't test for the PM's, and it is probably there also. The problem is in the includes/javascript.php and if you have put this on your site and have never used the PHP-Nuke you might not know that it is not only wrong but it doesn't work properly becuase the WYSIWYG is an HTML editor and the forums are looking for BB Code, so if you have this version installed send me a PM and I'll give you the code to replace the JavaScript and fix your installation, that problem started with version 7.6 and FB has never seen fit to fix it and keeps releasing new versions with the same flaw. He needs better quality control.

Share this post


Link to post
Share on other sites

So that's what it is!!! I made the forum recently and was surprised to find a wysiwyg editor, and decided to try it out, but it is rubbish - the html is not accepted only and the tags show up in the message. could you send me the javascript.php file, so that i can fix it?? thanksP.S.: the editor does not appear in IE - try it out. i guess it's only for firefox.

Share this post


Link to post
Share on other sites

The WYSIWYG that FB put into PHP-Nuke atarting with 7.6 was flawed but can be fixed by using this PHP file which I am adding to this post.

I run a site that corrects flaws with PHP-Nuke and add to it more than the "Plain Jane" version that it comes up with.

The corrected file works with all browsers and removes it from areas where it is not supposed to be, basically those areas that only admins are supposed to be, although there are exceptions.

Send me a PM if you are having trouble with the 7.7 and I can either fix the current version or send you to a link that has a fully working and modified version of PHP-Nuke not available elsewhere.

Here's the code to correct the problem copy and paste this into your includes/javascript.php to fix it.

<?php/************************************************************************//* PHP-NUKE: Web Portal System                                          *//* ===========================                                          *//*                                                                      *//* Copyright (c) 2005 by Francisco Burzi                                *//* http://phpnuke.org                                                   *//*                                                                      *//* This program is free software. You can redistribute it and/or modify *//* it under the terms of the GNU General Public License as published by *//* the Free Software Foundation; either version 2 of the License.       *//************************************************************************/  if (eregi("javascript.php",$_SERVER['PHP_SELF'])) {    Header("Location: ../index.php");    die();}################################################### Include for some common javascripts functions  ###################################################global $module, $name, $admin, $advanced_editor, $lang;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 ($name == "Private_Messages" OR $name == "Forums") { } elseif (is_admin($admin) AND defined('ADMIN_FILE') AND $advanced_editor == 1) { 	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 : \"left\",  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") {	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") {	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 -->";}if ($userpage == 1) {    echo "<script type=\"text/javascript\">\n";    echo "<!--\n";    echo "function showimage() {\n";    echo "if (!document.images)\n";    echo "return\n";    echo "document.images.avatar.src=\n";    echo "'$nukeurl/modules/Forums/images/avatars/gallery/' + document.Register.user_avatar.options[document.Register.user_avatar.selectedIndex].value\n";    echo "}\n";    echo "//-->\n";    echo "</SCRIPT>\n\n";}if ($module == 1 AND file_exists("modules/$name/copyright.php")) {    echo "<script type=\"text/javascript\">\n";    echo "<!--\n";    echo "function openwindow(){\n";    echo "	window.open (\"modules/$name/copyright.php\",\"Copyright\",\"toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=200\");\n";    echo "}\n";    echo "//-->\n";    echo "</SCRIPT>\n\n";}?>
Actually there is an easy fix but you have to pour over the code and edit certain sections that are incorrect, but if you just copy and past the above into the proper file then you will see the difference immediately. At least backup your faulty copy and if it dos not work to your satisfaction then you can keep the broken version.

Share this post


Link to post
Share on other sites

I have just installed PHP-Nuke 7.8 with Fantastico and the TinyMCE editor has broken my entire database! I has removed all of the tables formatting and my ability to display any images - it just strips the code right out of the post.Any ideas on what I can do to fix it?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.