Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Problem with IFRAME in dynamic mode

Quote Reply
Problem with IFRAME in dynamic mode
Hi,

I use the IFRAME in the template with the url something like this <%config.build_static_url%>/images/myads.htm. When the templage get parsed, that url is translated into page.cgi?g=static%2Fimages%2Fmyads.htm;d=1. And that causes an error the 'static' category is not existed.

Is there a way to disable this parsing?

Thanks,

Cheers,

Dat

Scripts installation and plugin creation
Plugins
Quote Reply
Re: [tandat] Problem with IFRAME in dynamic mode In reply to
That shouldn't happen unless your build_static_url is inside of your build_root_url. If it is, you'll have to move it out to stop that from happening.

Adrian
Quote Reply
Re: [brewt] Problem with IFRAME in dynamic mode In reply to
Hi Adrian,

Yes, it's working!

Thanks,

Cheers,

Dat

Scripts installation and plugin creation
Plugins
Quote Reply
Re: [brewt] Problem with IFRAME in dynamic mode In reply to
Hi Adrian,

Sorry to trouble again.

Your suggestion works fine with the build_root_url which is sub-folder of web root. In the case, the build_root_url is at web root(eg http://www.domain.com/) and many sites use this type, where can we put the static folder to avoid this automatic parsing?

Thanks,

Cheers,

Dat

Scripts installation and plugin creation
Plugins
Quote Reply
Re: [tandat] Problem with IFRAME in dynamic mode In reply to
Here's a patch to make Links::clean_output not 'clean' static url's that are inside the root url:
Code:
diff -u -r1.197 Links.pm
--- Links.pm 30 May 2005 22:43:08 -0000 1.197
+++ Links.pm 17 Sep 2005 08:36:22 -0000
@@ -569,10 +569,16 @@
# Fix up any HTML forms, and insert hidden tags.
$$output_ref =~ s!(<form[^>]+>)!$1$form!ig;

-# Fix up the HTML references
+# Fix up the HTML references (but not static url's [in case the static url is in the root url])
$$output_ref =~ s{(<(?:a[^>]+href|i?frame[^>]+src)\s*=\s*["']*)(\Q$CFG->{build_root_url}\E/?[^"'>]*)}{
my ($begin, $url) = ($1, $2);
- $begin . transform_url($url, $query);
+ if ($url =~ m/^\Q$CFG->{build_static_url}\E/) {
+ $begin .= $url;
+ }
+ else {
+ $begin .= transform_url($url, $query);
+ }
+ $begin;
}eig;
}

This will be included in future releases.

Adrian
Quote Reply
Re: [brewt] Problem with IFRAME in dynamic mode In reply to
Thanks for your quick and official fixing on this. That's wonderful!

Cheers,

Cheers,

Dat

Scripts installation and plugin creation
Plugins