21 - Iframe Module
nav_first.pngFirst: design:1
1 - Rate Module
Edited: 29 Apr 2012 00:01 by: GoVegan
Comments: 21
Tags:
nav_prev.pngPrevious: design:20
20 - Drive-by Sign-in & Registration
Edited: 11 Nov 2009 16:09 by: Steven Heynderickx
Comments: 9
Tags:
Last: design:32
32 - Parenthood Module
Edited: 11 Nov 2009 21:47 by: Steven Heynderickx
Comments: 7
Tags:
nav_last.png
Next: design:22
22 - ListContributors Module
Edited: 12 Mar 2010 23:50 by: GoVegan
Comments: 3
Tags:
nav_next.png

21 - Iframe Module
Created on 02 Oct 2009 09:43
By James Kanjo

rating: +5+x

This issue has been closed in favour of http://blog.wikidot.com/design:24.

This is a design sketch for a new module, Iframe, which makes it easier for people to embed HTML code in their page.

Background

Throughout the whole of Wikidot, people are putting HTML code into code-blocks, and then iframing the Wikidot-generated HTML page.

Iframing HTML gives a result somewhat like embedding the HTML in the Wikidot page, but is secure. Whereas embedded code comes from the same domain as the page, and can thus use (steal or abuse) security cookies or resources, iframed code comes from a different domain (wdfiles.com) and thus has no access to the wikidot.com resources.

Just about every single day on the Wikidot community forums, we get somebody asking how to embed [x] code on [y] page. And every time we tell them:

[[div style="display : none;"]]
[[code]]

[x] code goes here

[[/code]]
[[/div]]

[[iframe /local--code/THIS_PAGE'S_NAME]]

This becomes problematic when they try to “embed” a set of HTML code on the one page, at which point we need to tell them to append /1 or /x to the iframe URL, depending on the index of the code.

This is information that they don't really understand, and nor should they need to.

Proposed design

The Iframe module does the code embedding and iframing in one step:

[[module Iframe attributes...]]

[x] code goes here

[[/module]]

The attributes are where you specify the attributes of a typical [[iframe … ]]. Whatever code that is placed within the module, will be rendered within an iframe, just as though the user were iframing a code block.

Comments: 18

Add a New Comment