Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff
Author Message
ANTH
Regular
Regular


Joined: May 27, 2005
Posts: 62

PostPosted: Thu Jun 16, 2005 12:06 pm Reply with quote

Hi im trying to disable the wysiwyg editor in a block but cant can anyone help please, also can you disable the wysiwyg editor all together some how?

This is the code in the block im trying to disable it from using php 7.8 from this site.

It might not even be the block could be bringing it from the module into the block but anyway its knowcked my site all out of size.

Code:
<?php


/********************************************************/
/* Site Links To Us Module for PHP-Nuke                 */
/* Version 2.0 UNIVERSAL 2-04-05                        */
/* By: Telli (telli@codezwiz.com)                       */
/* http://codezwiz.com/                                 */
/* Copyright © 2002-2005 by Codezwiz Network, LLC.      */
/********************************************************/
if (eregi("block-CZLinks.php",$_SERVER['SCRIPT_NAME'])) {
    Header("Location: ../index.php");
    die();
}
$module_name = "Link_To_Us";
get_lang("$module_name");

      global $prefix, $db, $user, $admin, $czbl, $nukeurl;
      $content = "<center>"._BLOCKTITLE."<br />\n";
      //START OUTPUT
      $content .= "<table border='0' width='100%'><tr><td align='center'>\n";
      global $db, $prefix;
   $czbl = array();
   $sql = "SELECT * FROM ".$prefix."_linktous_config";
   $result = $db->sql_query($sql);
   while(list($config_name, $config_value) = $db->sql_fetchrow($result)){
      $czbl[$config_name] = $config_value;
   }

      if ($czbl['blkscrollml'] > "0") {
          if ($czbl['blkscrollml'] == "1") {
              $startmain = "";
              $start = "<center>";
              $end = "</center>";
              $endmain = "";
              $dir = "up";
              $hr = "<br /><hr width=\"95%\" /><br />";
          } elseif ($czbl['blkscrollml'] == "2") {
              $startmain = "";
              $start = "<center>";
              $end = "</center>";
              $endmain = "";
              $dir = "down";
              $hr = "<br /><hr width=\"95%\" /><br />";
          } elseif ($czbl['blkscrollml'] == "3") {
              $startmain = "<table border='0' width='100%' cellspacing='20'><tr>";
              $start = "<td align='center'>";
              $end = "</td>";
              $endmain = "</tr></table>\n";             
              $dir = "left";
              $hr = "";
          } elseif ($czbl['blkscrollml'] == "4") {
              $startmain = "<table border='0' width='100%' cellspacing='20'><tr>";
              $start = "<td align='center'>";
              $end = "</td>n";
              $endmain = "</tr></table>\n";
              $dir = "right";
              $hr = "";
          }
      $blkscrheightml = $czbl['blkscrheightml'];
      $blkscrdelayml = $czbl['blkscrdelayml'];
     if ($blkscrdelayml == "0") {
      $d = "10";
     } elseif ($blkscrdelayml == "1") {
      $d = "20";
     } elseif ($blkscrdelayml == "2") {
      $d = "30";
     } elseif ($blkscrdelayml == "3") {
      $d = "40";
     } elseif ($blkscrdelayml == "4") {
      $d = "50";
     } elseif ($blkscrdelayml == "5") {
      $d = "60";
     } elseif ($blkscrdelayml == "6") {
      $d = "70";
     } elseif ($blkscrdelayml == "7") {
      $d = "80";
     } elseif ($blkscrdelayml == "8") {
      $d = "90";
     } elseif ($blkscrdelayml == "9") {
      $d = "100";
     }
       
          $scroll = "<MARQUEE behavior='scroll' direction='$dir' height='$blkscrheightml' scrollamount='2' scrolldelay='$d' width='100%' onmouseover='this.stop()' onmouseout='this.start()'>\n";
          $scrollend = "</MARQUEE>\n";
      } else {
          $scroll = "<br />";
          $scrollend = "";
          $hr = "<br /><hr width=\"95%\" />";
      }
      //START SCROLL
      $content .= "$scroll$startmain";

      //GET MYLINKS
      $toshow = $czbl['blktoshowml'];
      if ($czbl['blkorderml'] == "0") {
      $czml = $db->sql_query("SELECT l_id, l_zipurl, l_image, l_mouseover, l_size_width, l_size_height FROM ".$prefix."_linktous WHERE l_status='0' AND l_size_width<130 AND l_linktype='0' ORDER BY l_id ASC LIMIT $toshow");
      } elseif ($czbl['blkorderml'] == "1") {
      $czml = $db->sql_query("SELECT l_id, l_zipurl, l_image, l_mouseover, l_size_width, l_size_height FROM ".$prefix."_linktous WHERE l_status='0' AND l_size_width<130 AND l_linktype='0' ORDER BY l_id DESC LIMIT $toshow");
      } elseif ($czbl['blkorderml'] == "2") {
      $czml = $db->sql_query("SELECT l_id, l_zipurl, l_image, l_mouseover, l_size_width, l_size_height FROM ".$prefix."_linktous WHERE l_status='0' AND l_size_width<130 AND l_linktype='0' ORDER BY rand() LIMIT $toshow");
      }
      while (list($l_id, $l_zipurl, $l_image, $l_mouseover, $l_size_width, $l_size_height) = $db->sql_fetchrow($czml)) {

      $ext = substr($l_image, strrpos($l_image,'.'), 5);
if ($ext != ".swf") {
      if (($czbl['blkziportext'] == "1") && ($ext != ".swf")) {
          $zip = "$start<a href='modules.php?name=$module_name&amp;op=getzip&amp;l_id=$l_id'>";
          $alt = "Click here to download our link!";
          $text = "";
          $flink = "";
      } elseif (($czbl['blkziportext'] == "0") && ($ext != ".swf")) {
          $zip = "$start<a href='$nukeurl'>";
          $alt = "";
          $text = "<br /><br /><textarea rows=3 cols=17><a href=\"$nukeurl\" target=\"_blank\"><img src=\"$nukeurl/$l_image\" border=\"0\" alt=\"$l_mouseover\" width=\"$l_size_width\" height=\"$l_size_height\"></a></textarea>";
          $flink = "";
      } elseif (($ext == ".swf") && ($czbl['blkziportext'] == "1")) {
          $zip = "$start";
          $alt = "";
          $text = "";
          $flink = "<br /><a href='modules.php?name=$module_name&amp;op=getzip&amp;l_id=$l_id'>Download link!</a>";
      } elseif (($ext == ".swf") && ($czbl['blkziportext'] == "0")) {
          $zip = "$start";
          $alt = "";
          $text = "<br /><br /><textarea rows=3 cols=17><EMBED SRC=\"$l_image\" wmode=\"transparent\" WIDTH=\"$l_size_width\" HEIGHT=\"$l_size_height\"><NOEMBED><a href=\"http://www.macromedia.com/go/getflashplayer/\">Get Flash!</a></NOEMBED></EMBED></textarea>";
          $flink = "";
      }

      if (($czbl['blkalphaml'] == "1") && ($ext != ".swf")) {
      $alpha = "onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this)";
      } elseif ($czbl[blkalphaml] == "0") {
      $alpha = "";
      }

      if ($ext == ".swf") {
       $img = "<EMBED SRC=\"$l_image\" wmode=\"transparent\" WIDTH=\"$l_size_width\" HEIGHT=\"$l_size_height\"><NOEMBED><a href=\"http://www.macromedia.com/go/getflashplayer/\">Get Flash!</a></NOEMBED></EMBED>";
      } else {
       $img = "<img $alpha border=\"0\" src=\"$l_image\" alt=\"$alt\" title=\"$alt\"></a>\n";
      }
}//end swf
      //OUTPUT
      $content .= "$zip$img$flink$text$hr$end";
      }//END SQL LOOP 
      $content .= "$endmain$scrollend";
      $content .= "</td>\n</tr>\n</table>\n</center>\n";
      $content .= "<br /><b><center>"._CLICKTOVIEW."</center></b>\n";

      //START RESOURCES
      if ($czbl['blkactiveres'] == "1") {
      $content .= "<br /><br /><b><center>"._BLOCKRESOURCES."</center></b><br />\n";
      $content .= "<table border='0' width='100%'><tr><td align='center'>\n";
      if ($czbl['blkscrollres'] > "0") {
          if ($czbl['blkscrollres'] == "1") {
              $startmainres = "";
              $startres = "<center>";
              $endres = "</center>";
              $endmainres = "";
              $dirres = "up";
              $hrres = "<br /><hr width=\"95%\" /><br />";
          } elseif ($czbl['blkscrollres'] == "2") {
              $startmainres = "";
              $startres = "<center>";
              $endres = "</center>";
              $endmainres = "";
              $dirres = "down";
              $hrres = "<br /><hr width=\"95%\" /><br />";
          } elseif ($czbl['blkscrollres'] == "3") {
              $startmainres = "<table border='0' width='100%' cellspacing='20'><tr>";
              $startres = "<td align='center'>";
              $endres = "</td>";
              $endmainres = "</tr></table>\n";             
              $dirres = "left";
              $hrres = "";
          } elseif ($czbl['blkscrollres'] == "4") {
              $startmainres = "<table border='0' width='100%' cellspacing='20'><tr>";
              $startres = "<td align='center'>";
              $endres = "</td>n";
              $endmainres = "</tr></table>\n";
              $dirres = "right";
              $hrres = "";
          }
     $blkscrheightres = $czbl['blkscrheightres'];
     $blkscrdelayres = $czbl['blkscrdelayres'];
     if ($blkscrdelayres == "0") {
      $dd = "10";
     } elseif ($blkscrdelayres == "1") {
      $dd = "20";
     } elseif ($blkscrdelayres == "2") {
      $dd = "30";
     } elseif ($blkscrdelayres == "3") {
      $dd = "40";
     } elseif ($blkscrdelayres == "4") {
      $dd = "50";
     } elseif ($blkscrdelayres == "5") {
      $dd = "60";
     } elseif ($blkscrdelayres == "6") {
      $dd = "70";
     } elseif ($blkscrdelayres == "7") {
      $dd = "80";
     } elseif ($blkscrdelayres == "8") {
      $dd = "90";
     } elseif ($blkscrdelayres == "9") {
      $dd = "100";
     }
          $scrollres = "<MARQUEE behavior='scroll' direction='$dirres' height='$blkscrheightres' scrollamount='2' scrolldelay='$dd' width='100%' onmouseover='this.stop()' onmouseout='this.start()'>\n";
          $scrollendres = "</MARQUEE>\n";
      } else {
          $scrollres = "";
          $scrollendres = "";
          $hrres = "<br /><hr width=\"95%\" /><br />";
      }
      //START SCROLL
      $content .= "$scrollres$startmainres";

      //GET RESOURCES
      $toshowres = $czbl['blktoshowres'];
      if ($czbl['blkorderres'] == "0") {
      $czres = $db->sql_query("SELECT r_id, r_name, r_url, r_image, r_size_width, r_size_height FROM ".$prefix."_linktous_resources WHERE r_status='0' AND r_size_width<130 ORDER BY r_id ASC LIMIT $toshowres");
      } elseif ($czbl['blkorderres'] == "1") {
      $czres = $db->sql_query("SELECT r_id, r_name, r_url, r_image, r_size_width, r_size_height FROM ".$prefix."_linktous_resources WHERE r_status='0' AND r_size_width<130 ORDER BY r_id DESC LIMIT $toshowres");
      } elseif ($czbl['blkorderres'] == "2") {
      $czres = $db->sql_query("SELECT r_id, r_name, r_url, r_image, r_size_width, r_size_height FROM ".$prefix."_linktous_resources WHERE r_status='0' AND r_size_width<130 ORDER BY rand() LIMIT $toshowres");
      }
      while (list($r_id, $r_name, $r_url, $r_image, $r_size_width, $r_size_height) = $db->sql_fetchrow($czres)) {

      $extres = substr($r_image, strrpos($r_image,'.'), 5);
      if (($czbl['blkalphares'] == "1") && ($extres != ".swf")) {
      $alphares = "onmouseover=high(this) style=\"FILTER: alpha(opacity=30); moz-opacity: 0.3\" onmouseout=low(this)";
      } elseif ($czbl[blkalphares] == "0") {
      $alphares = "";
      }

      if ($extres == ".swf") {
       $imgres = "<EMBED SRC=\"$r_image\" wmode=\"transparent\" WIDTH=\"$r_size_width\" HEIGHT=\"$l_size_height\"><NOEMBED><a href=\"http://www.macromedia.com/go/getflashplayer/\">Get Flash!</a></NOEMBED></EMBED>";
      } else {
       $imgres = "<a href='modules.php?name=$module_name&amp;op=getres&amp;r_id=$r_id' target='_blank'><img $alphares border='0' src='$r_image' height='$r_size_height' width='$r_size_width' alt='$r_name' title='$r_name'></a>\n";
      }
      //OUTPUT
      $content .= "$startres$imgres$hrres$endres";
      }//END SQL LOOP 
      $content .= "$endmainres$scrollendres";
      $content .= "</td>\n</tr>\n</table>\n</center>\n";
      }//END IF ACTIVE
  if (is_admin($admin)) {
      $content .= "<br /><br /><center>[ <a href=\"modules.php?name=Link_To_Us&amp;file=admin\">CZLink Us Admin</a> ]</center>\n";
  }

?>
 
View user's profile Send private message
64bitguy
The Mouse Is Extension Of Arm


Joined: Mar 06, 2004
Posts: 1159
Location: Sanbornton, NH USA

PostPosted: Thu Jun 16, 2005 3:27 pm Reply with quote

The HTML Editor is a default component of PHP-Nuke 7.7 and PHP-Nuke 7.8.

If you don't want to use this non-compliant function of Nuke, you should downgrade to PHP-Nuke 7.6 (at the latest).

See: Only registered users can see links on this board! Get registered or login!

_________________
Steph Benoit Only registered users can see links on this board! Get registered or login!
1CMS, 100% Section 508 and W3C XHTML/CSS Compliant (Truly) 
View user's profile Send private message Visit poster's website
ANTH
PostPosted: Fri Jun 17, 2005 12:28 am Reply with quote

Here check it out im sure theres a way I was reading to define it to be turned off but im not sure how to do it this is what it says in the chnages logbut makes no sense to me i did try and put it in the code but never worked.


- Added a new define('NO_EDITOR') method to remove the wysiwyg editor if you don't want it on a specific area
use it as:
define('NO_EDITOR', 1);


Image
 
64bitguy
PostPosted: Fri Jun 17, 2005 6:54 am Reply with quote

Again...

The core code of Nuke has been changed to accomodate this new HTML Editor.

You can create a function to remove it; however, that doesn't address the 1000 other places where you would need to make modifications for it being gone.

Again, if you do not want the highly insecure HTML Editor function, you need to downgrade to PHP-Nuke 7.6 at the latest version without the HTML Editor.
 
ANTH
PostPosted: Fri Jun 17, 2005 8:08 am Reply with quote

Yes I undrstand but how would I remove it from this block using the define msg. I would like to stick to 7.8 if I could just get rid of it from there thanks for your help.
 
64bitguy
PostPosted: Fri Jun 17, 2005 8:22 am Reply with quote

To answer your question. I don't know, but I will look around and see if anyone does.

I have not tried to disable default functions and to be honest, I don't think it is something that I will be working on.... but again, if I see the answer, I'll post it.
 
ANTH
PostPosted: Fri Jun 17, 2005 8:26 am Reply with quote

Thanks
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> General/Other Stuff

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©