i'd like to implant jelmers mod into the wrapper code. but i don't fully understand where to put it.
Here is the code:
# With most gratitude to Jason Murphy (Jason407) for making the Mambo original;)
#
# Wrapper - Etomite v0.6
#
# Adapted for Etomite by: John Maats - john-at-pn.nl
#
# Usage:
# Â Â Set defaults and use [ [Wrapper] ] inside your content
#
# or call it with variables (example):
# Â Â [ [wrapper?wurl=http://etomite.com&wname=Etomite] ]
#
# Variable list:
#  $wurl    = "http://etomite.com";  // What would you like to show?
#  $wname   = "<b>Etomite</b>";      // Name to show
# Â $wshowname = "0"; Â Â Â Â Â Â Â Â Â Â Â // show the name? 1 yes, 0 no
#  $wwidth   = "700";           // width , recommended 100%
#  $wheight  = "600";           // height, recommended 600
#  $wscroll  = "auto";           // auto, yes or no scrollbars visible
#  $wauto   = "1";            // auto resize 1 yes, 0 no
#  $wframe   = "1";            // show 1, hide 0 iframe borders
#  $wlink   = "0";            // show direct link 1 yes, 0 no
#  $wwtext   = "Click here";        // Text for direct link
#
# If variable is not set, snippet will choose following defaults
// your defaults, oh Master!
$durl    = "http://etomite.com";
$dname   = "<b>Etomite</b>";
$dshowname = "0";
$dwidth   = "710";
$dheight  = "600";
$dscroll  = "auto";
$dauto   = "0";
$dframe   = "0";
$dlink   = "0";
$dwtext   = "";
// No need to change stuff underneath...
// set defaults...
$wrapped ="";
if (!isset($wurl)) {$wurl = $durl; }
if (!isset($wheight)) {$wheight = $dheight; }
if (!isset($wwidth)) {$wwidth = $dwidth; }
if (!isset($wscroll)) {$wscroll = $dscroll; }
if (!isset($wframe)) {$wframe = $dframe; }
if (!isset($wname)) {$wname = $dname; }
if (!isset($wshowname)) {$wshowname = $dshowname; }
if (!isset($wlink)) {$wlink = $dlink; }
if (!isset($wwtext)) {$wwtext = $dwtext; }
// check for http:// in url                          ********SOMEWHERE HERE ????***********
                                           ********SOMEWHERE HERE ????***********
if (!(eregi("http://", $wurl) || (eregi("https://",$wurl)))) { Â Â ********SOMEWHERE HERE ????***********
  $wurl = "http://".$wurl;                         ********SOMEWHERE HERE ????***********
}
// need resize?
if ($wauto == "1"){
  $xload = "iFrameHeight()";
  $wrapped .= "<script language=\"JavaScript\">";
  $wrapped .= "function iFrameHeight() {";
  $wrapped .= "  var h = 0;";
  $wrapped .= "  if(document.getElementById && !(document.all))";
  $wrapped .= "  {";
  $wrapped .= "   h = document.getElementById('blockrandom').contentDocument.height;";
  $wrapped .= "   document.getElementById('blockrandom').style.height = h + 60 + 'px';";
  $wrapped .= "  }";
  $wrapped .= "  else if(document.all)";
  $wrapped .= "  {";
  $wrapped .= "   h = document.frames('blockrandom').document.body.scrollHeight;";
  $wrapped .= "   document.all.blockrandom.style.height = h + 20 + 'px';";
  $wrapped .= "  }";
  $wrapped .= "}";
  $wrapped .= "</script>";
} else {
  $xload = "";
}
$wrapped .= "<script language=\"JavaScript\">";
$wrapped .= "function blockError(){return true;}";
$wrapped .= "window.onerror = blockError;";
$wrapped .= "</script>";
$wrapped .= "<IFRAME id=\"blockrandom\"";
$wrapped .= "onLoad=\"".$xload."\"";
$wrapped .= "SRC=\"".$wurl."\"";
$wrapped .= "width=\"".$wwidth."\" height=\"".$wheight."\" align=top scrolling=".$wscroll." frameborder=".$wframe.">Sorry, your Browser does NOT SUPPORT IFRAME.<br>You may want to Upgrade your Browser.<br><a href=\"".$wurl."\" target=\"_blank\">Click Here to see the page that was supposed to load.</a>".$wurl."</IFRAME>";
$wrapped .= "<div align=\"center\">";
// need to show name?
if ($wshowname == "1") {
  $wrapped .= $wname;
}
$wrapped .= "<br>";
// need to show link?
if ($wlink == "1") {
  $wrapped .= "<a href=\"".$wurl."\" target=\"_blank\">[".$wwtext."]</a></div>";
}
return $wrapped;
now where do i have to put his:
$wurl = $_GET['wurl'];
if ($wurl == "") { $wurl = "http://www.mydefaultsite.com"; }
pardon my noob skills...
i'll explain why i want to use it:
i would like to use this url=
http://www.knvb.nl/clubs_comp/?action=team...amDescription=9
with the wrapper. but it won't allow me to. As far as I understood this little Jelmer hack should do the trick, isn't it?
Edited by clubvibe, 15 August 2005 - 12:21 PM.