Welcome Guest ( Log In | Register )



 
Reply to this topicStart new topic
> New PHP-Nuke In Fantastico Needs Patch!
Houdini
post Jun 25 2005, 02:58 AM
Post #1


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



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.
Go to the top of the page
 
+Quote Post
crs_cwiz
post Jul 22 2005, 11:55 AM
Post #2


Member [ Level 2 ]
Group Icon

Group: Members
Posts: 54
Joined: 8-July 05
From: In Tech-dom
Member No.: 6,911



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?? thanks

P.S.: the editor does not appear in IE - try it out. i guess it's only for firefox.
Go to the top of the page
 
+Quote Post
Houdini
post Jul 23 2005, 04:58 PM
Post #3


Super Member
Group Icon

Group: Members
Posts: 572
Joined: 25-April 05
From: Nashville Tennessee
Member No.: 4,340



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.

CODE
<?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,fl
ash,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|on
mouseout|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.
Go to the top of the page
 
+Quote Post
Dark Raven
post Nov 24 2006, 09:49 PM
Post #4


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 1
Joined: 24-November 06
Member No.: 17,542



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?
Go to the top of the page
 
+Quote Post
Doradolai
post Nov 24 2006, 10:25 PM
Post #5


Newbie [ Level 1 ]
Group Icon

Group: Banned
Posts: 1
Joined: 24-November 06
Member No.: 17,543



There's no time off from Internet threats. A flaw common to Firefox and IE could leak passwords, while a security hole in Mac OS X is among the latest in a promised month of bugs.


__________
50 didrex mg
buy in online usa viagra
Go to the top of the page
 
+Quote Post
wwheeler
post Jul 16 2007, 12:27 AM
Post #6


Premium Member
Group Icon

Group: Members
Posts: 257
Joined: 29-November 04
From: Marietta, GA
Member No.: 1,561



All you have to do is edit your config.php file and $nuke_editor = 0 and the Editor is turned off!!!

-William
Go to the top of the page
 
+Quote Post
iGuest
post May 22 2008, 11:18 AM
Post #7


Newbie [ Level 1 ]
Group Icon

Group: Members
Posts: 0
Joined: 1-November 07
Member No.: 25,869



Thanks for a beautiful site! I have added you in elected! http://cbnch.Icr38.Net
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. PHP Nuke Database Help(13)
  2. What Is: PHP-Nuke?(11)
  3. Php Nuke Platinum 7.6 Released(0)
  4. Comparative Review Of Mambo And PHP-Nuke(9)
  5. PHP-Nuke(7)
  6. Need Help With PHP-Nuke Themes(5)
  7. PHP-Nuke(3)
  8. PHP-Nuke Help(4)
  9. PHP-Nuke 7.7.0.3: Newest Official Release(5)
  10. Glad To See The Sub Forum(0)
  11. Anyone Wanting Mods For PHP-Nuke?(1)
  12. Want PHP-Nuke With IPB Forums?(7)
  13. PHP-Nuke With IPB Forums(1)
  14. Problem With PHP-Nuke Not Being Able To Mail Out(1)
  15. PHP-Fusion [mod Of PHP-Nuke](1)
  1. Is PHP-Nuke Hard To Use?(5)
  2. PHP-Nuke Header Question(2)


 



- Lo-Fi Version Time is now: 1st December 2008 - 11:53 PM