Bogdan,
First, about the < char -- it is now no longer encoded in the source
files (if you look at the text files). Which simplifies several of
BoltWire's processes. But it is always encoded when injected into a
page to prevent malicious scripts from being hacked into your site.
If you want an iframe, you have two options--one is to use <embed
iframe> as Kevin suggested or a custom markup.
To control the content dynamically, remember the code embeds will take
most variables including get variables (and also snippets). So you
could do this:
code.embed.iframe:
<iframe id="gazeta" height="130" width="130" src="{?mysource}"></iframe>
And then on test.iframe put code something like this:
<embed iframe>
[form]
[session mysource "http://www.example.com/some/page.html"]
[session passdata mysource]
[submit]
[form]
Of course you can change the mechanism by which the get variable is
sent to anything you want. And you can also make the height, width,
and id dynamic as well...
To use a custom markup, try adding something like this to your config.php file:
function BOLTFiframe($args, $zone='') {
$src = $args[1];
if ($src == '') return;
$w = 200; $h = 200;
if (isset($args['width'])) $w = $args['width'];
if (isset($args['height'])) $h = $args['height'];
if (isset($args['id'])) $id = "id='$args[id] '";
return "<iframe $id height='$h' width='$w' src='$src'></iframe>";
}
Not only can you dynamically control height and width and id with
this, but you have the nice advantage that the frame only appears when
a src is assigned to it.
To use, modify test.iframe to have this content instead:
[(iframe {?mysource} height=400 width=400)]
[form]
[session mysource "{script}main"]
[session passdata mysource]
[submit]
[form]
Of course change the mysource variable to whatever information you
want. Use pull down menu's, the search function, or even a bunch of
links. Whatever. Ideally, it should go to an an html/text file outside
of BoltWire. :) Or some kind of special streamlined skin so you just
get the page content. I use a special box skin for popups. It should
work for this too. But I'm assuming you are trying to pull in external
content...
Cheers,
Dan
P.S. Someone should put this up as a plugin I suppose... Are there
other features we should add to this? I should note, there are
probably security implications with this. Probably need some way to
filter incoming srcs to an accepted set of options... Not sure how
best to handle this. Would depend your specific situation. A
site.auth.iframe option would be good perhaps...
On Sat, Apr 24, 2010 at 4:23 PM, Bogdan <[email protected]> wrote:
> May be, it could be made auth.iframe to allow iframes on certain
> pages, editable only by the admin.
>
> This is just an idea.
--
You received this message because you are subscribed to the Google Groups
"BoltWire" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/boltwire?hl=en.