Jump to content


Wrapper


76 replies to this topic

#41 Guest_clubvibe_*

  • Guests

Posted 15 August 2005 - 08:38 PM

ok... but if I do so I can only use 1 page like the KNVB site (the default one).
----let me check----

As i tought everything work fine, but i can only use one KNVB site..

this is very weird... if I set the knvb site to the default it loads, but if I set it as a variable it won't work :S

Isn't there any solution?

I figured out why wrapper fails.. in the url: www.knvb.nl/clubs_comp/?action=teamDetails&ClubName=Zoetermeer,%20FC&NotationDescription=Mannen%20beker%20reserve%20zondag%20poule&LevelDescription=Groep%207&CompetitionType=B1600&ClassLevel=27&RegionCode=KNVB-DISTRICT-WEST2&Pool=10&TeamDescription

wrapper tries to read the questionmark (for more variables) isn't there anywhy to get round the questionmark? like a code that ignores the questionmark in the wurl? or only apply to 1 question mark (the first one) in the whole wrapper-request?

Edited by clubvibe, 15 August 2005 - 09:00 PM.


#42 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 15 August 2005 - 09:08 PM

It won't work as a variable because the URL is a dynamic URL itself I think. There's no way you can pass this URL along to a script.

Anyone's :2c: ?

#43 Guest_clubvibe_*

  • Guests

Posted 15 August 2005 - 09:16 PM

i kind a solved it by making an iframe manualy. without wrapper that is. Works just fine... i think i just use this till wrapper has a 'support- dynamic-url-feature'.

just for the record, the manual code:
<script language="JavaScript">
function blockError(){return true;}
window.onerror = blockError; 
</script><iframe align="top" src="http://www.knvb.nl/clubs_comp/?action=teamDetails&ClubName=Zoetermeer,%20FC&NotationDescription=Mannen%20beker%20reserve%20zondag%20poule&LevelDescription=Groep%207&CompetitionType=B1600&ClassLevel=27&RegionCode=KNVB-DISTRICT-WEST2&Pool=10&TeamDescription" frameborder="no" width="600" height="600" />

Edited by clubvibe, 15 August 2005 - 09:19 PM.


#44 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 15 August 2005 - 10:42 PM

Ok now for something completely different.

Since my site is almost finished I'm currently trying to make it XHTML1.1 compliant. I'll all work out, but the Wrapper snippet is a nightmare.

One of the things is dat it doesn't recognize the <iframe > tag nor any of it's attributes src, id etc etc. What's wrong with this code?

If anyone has made the entire snippet XHTML1.1 compliant I'd love to have it.

Regards.

Edit: Never mind, I threw out everything I didn't need, validates now...

Edited by Jelmer, 15 August 2005 - 10:51 PM.


#45 mark301

    Etomite Forum Newbie

  • Member
  • 34 posts

Posted 16 August 2005 - 01:46 AM

Just FYI, instead of <iframe>, XHTML 1.1 uses <object...>, just be sure to set the content type to "text/html". Look up the syntax for how to do it, it works well, though, in IE & FF. I just finished moving my site to XHTML 1.1 & updating all the snippets I use.

<object type="text/html" data="pagetobeiframed.htm">Sorry, your browser does not support Object elements.  Please use the link above to open it in a separate window</object>


#46 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 19 August 2005 - 02:51 PM

Hi,

This wrapper snippet works great. The only problem i have is that jou have to set the height, or scrollbars appear (or not but then a part is missing)
Isn't there an other way to include? The onlything (sofar:-) i use it 4 is to include a poll/survey, since there is no snippet available for this.

You can see what i mean on My Webpage


...and Safari for ex. doesn't support iFrames

Greets
Koen

edit: link removed by dean

Edited by Dean, 19 August 2005 - 03:44 PM.


#47 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 19 August 2005 - 03:34 PM

Koen, some people on this forum could be offended by the sort of poll you're showing on your site. I don't think it's a wise choice putting it here...

#48 Dean

    Loves Etomite Forums!

  • Admin
  • 4,746 posts
  • Gender:Male

Posted 19 August 2005 - 03:44 PM

I agree - link removed.

#49 koeniman

    Likes Etomite Forums!

  • Member
  • PipPip
  • 215 posts

Posted 19 August 2005 - 04:18 PM

Hey guys, prob. right but... it was for testing purposes.

so anyway, made it a bit less r&r and more heu ... (nerdisch? :-)
Here is the url: My Censored Webpage

Now that's seatled: Can anybody help me on this? Inlude diffrently or having wrapper to work without the iFrame (not supported by all browsers incl. Safari)

Greets
Koen

#50 mark301

    Etomite Forum Newbie

  • Member
  • 34 posts

Posted 19 August 2005 - 07:18 PM

Here's my XHTML 1.1 valid version, with 2 modifications:
-I commented out the following 2 lines as I don't need them & didn't want to fix them:
// check for http:// in url
/*if (!(eregi("http://", $wurl) || (eregi("https://",$wurl)))) {
  $wurl = "http://".$wurl;
}*/
//$wrapped .= "onLoad='".$xload."' ";


Here's the goods:
#
# Wrapper - Etomite v0.6
#
# Adapted for Etomite by: John Maats - john-at-pn.nl
# Upgraded to XHTML 1.1 compliance by Mark301
#
# 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 = "1";                       // show the name? 1 yes, 0 no
#  $wwidth    = "100%";                    // 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    = "thin black inset";        // css styling for the border
#  $wlink     = "1";                       // 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     = "";
$dshowname = "1";
$dwidth    = "100%";
$dheight   = "600px";
$dscroll   = "auto";
$dauto     = "1";
$dframe    = "1";
$dlink     = "1";
$dwtext    = "Click here to open in new window!";

// No need to change stuff underneath...
// set defaults...
$wrapped ="";
if (!isset($wurl)) {$wurl = $durl; }
if(isset($_SESSION['wrapthisurl'])){$wurl=$_SESSION['wrapthisurl'];}
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
/*if (!(eregi("http://", $wurl) || (eregi("https://",$wurl)))) {
  $wurl = "http://".$wurl;
}*/

// need resize?
if ($wauto == "1"){
  $xload = "iFrameHeight()";
  $wrapped .= "<script type='text/javascript'>\n";
  $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>\n";
} else {
  $xload = "";
}
$wrapped .= "<script type='text/javascript'>\n";
$wrapped .= "function blockError(){return true;}";
$wrapped .= "window.onerror = blockError;";
$wrapped .= "</script>\n";
$wrapped .= "<object class='blockrandom' type='text/html' ";
//$wrapped .= "onLoad='".$xload."' ";
$wrapped .= "data='".$wurl."' ";
$wrapped .= "style='width:" . $wwidth . "; height:" . $wheight . "; vertical-align:top; overflow:".$wscroll."; border:" . $wframe . ";'>\nSorry, your Browser does NOT SUPPORT IFRAME.<br/>\nYou may want to Upgrade your Browser.<br/>\n<a href='".$wurl."' {{targetBlank}}>Click Here to see the page that was supposed to load.</a>\n</object>\n";
$wrapped .= "<div style='text-align:center;'>\n";

// need to show name?
if ($wshowname == "1") {
  $wrapped .= $wname;
}
$wrapped .= "<br/>\n";
// need to show link?
if ($wlink == "1") {
  $wrapped .= "<a href='".$wurl."' {{targetBlank}}>[".$wwtext."]</a>\n</div>\n";
}
return $wrapped;


#51 elsinga

    Etomite Forum Newbie

  • Member
  • 43 posts

Posted 20 August 2005 - 07:03 PM

I use the Wrapper snippet on my site for a gallery, but the gallery (www.fotopic.net) is now injecting Google Ads into the page. This is plain ugly... and I'm currently working on converting that gallery to one on my own site (Coppermine), but that needs time... and I want result now. ;)

So, since the snipped is all PHP, I thought of replacing the googlesyndication.com hostname with a fake one and thus killing the ads. This didn;t work however... because the Wrapper snippet doesn't actually read the wrapped page to output it again but it only puts it in an IFrame.

Is there any way to alter the snippet to replace some text on the wrapped page to something else?

Edited by elsinga, 20 August 2005 - 07:05 PM.


#52 daveatwinterpegca

    Etomite Forum Newbie

  • Member
  • 16 posts

Posted 20 September 2005 - 02:43 AM

this wrapper works great yet creates a transparent border around everything. is there a way to get it to not add the extra space on the top bottom and side?

#53 M-a-d-m-a-n

    Etomite Forum Fan

  • Member
  • Pip
  • 58 posts

Posted 19 October 2005 - 07:30 AM

Hi guys, great work on the Wrapper, it works perfect (well, almost).

But when I want to link to this page: http://www.epitaph.com/toursevents/index.php?bid=56 it stops at the question mark, so I get a Page not Found. I tried using quotes and double quotes, but it doesn't seem to work.

I use this link to the Wrapper: [[Wrapper?wurl=http://www.epitaph.com/toursevents/index.php?bid=56&wname=Tourdates&wframe=0]]

Anyone?

#54 Jelmer

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,173 posts

Posted 19 October 2005 - 07:36 AM

The way the wrapper snippet is currently designed, it's not gonna fly.

You could try making your desired page the default URL inside the wrapper snippet. That should work!

Edit: @#$ typo :)

Edited by Jelmer, 19 October 2005 - 09:45 AM.


#55 M-a-d-m-a-n

    Etomite Forum Fan

  • Member
  • Pip
  • 58 posts

Posted 19 October 2005 - 09:08 AM

I get it.. Okay, thanks!!

#56 fern

    Etomite Forum Fan

  • Member
  • Pip
  • 89 posts

Posted 24 October 2005 - 04:29 PM

Is there a way to Wrapper a page that requires posting input from a form? So, say you've got a Paypal "buy now" or "add to cart" type button, and you'd like their very dull page to show up in your template? Is that possible? Would that make it insecure?

This is the normal code used to call Paypal.
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" value="$business">
<input type="image" src="https://www.paypal.com/en_US/i/btn/view_cart.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<input type="hidden" name="display" value="1"></form>

could you just make it action="[[Wrapper?https://www.paypal.com/cgi-bin/webscr]]" or something similar?

#57 mikef

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,551 posts

Posted 24 October 2005 - 04:50 PM

Is there a reason for not just putting the html code in a chunk?
That's what I did for the 'donate' button on some of the lowermosswood pages.

plus there's a Paypal snippet (that I haven't used) as an example for more complicated requirements - see http://www.etomite.com/index.php?showtopic=2690

Edited by mikef, 24 October 2005 - 04:59 PM.


#58 fern

    Etomite Forum Fan

  • Member
  • Pip
  • 89 posts

Posted 24 October 2005 - 05:21 PM

mikef, on Oct 24 2005, 12:50 PM, said:

Is there a reason for not just putting the html code in a chunk?
That's what I did for the 'donate' button on some of the lowermosswood pages.

plus there's a Paypal snippet (that I haven't used) as an example for more complicated requirements - see http://www.etomite.com/index.php?showtopic=2690

My code is in a chunk, I just edited the business name here. But, the reason I ask is to get the etomite look & feel around the Paypal shopping cart itself. The basic snippet does not do that. From what I can see, it puts the form into etomite (which yes a straight chunk would do), but not the resulting webpage.

I'm asking about wrapping the resulting webpage, not the form itself. Is that possible? While sending all the right variables to the paypal page?

Edited by fern, 24 October 2005 - 05:22 PM.


#59 Dean

    Loves Etomite Forums!

  • Admin
  • 4,746 posts
  • Gender:Male

Posted 24 October 2005 - 08:59 PM

The wrapper is just an iFrame - it cannot have page-specific variables in the call - you would need to wrap the paypal cart from the beginning... to the end

#60 jaredc

    Loves Etomite Forums!

  • Member
  • PipPipPipPip
  • 1,193 posts

Posted 25 October 2005 - 12:44 PM

One thing to be careful about however, is that most browsers will throw warnings if a secure page is encapsulated in a non-secure page (via frame, iframe etc.). This is a good thing really as it keeps pages with invisible frames from stealing your personal info. So results may vary.

I too am about to embark on a PayPal journey (if my client bites and signs the contract...). I'm looking for a solution to this too and think it will probably involve some long nights and creative solutions... and more custom snippetry.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users