This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
zref:wiki:pluginsyntax:iframe [2025/04/22 13:44] – removed - external edit (Unknown date) 127.0.0.1 | zref:wiki:pluginsyntax:iframe [2025/04/22 13:44] (current) – ↷ Page moved from wiki:pluginsyntax:iframe to zref:wiki:pluginsyntax:iframe Alan Shea | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== iframe Plugin ====== | ||
+ | < | ||
+ | ---- plugin ---- | ||
+ | description: | ||
+ | author | ||
+ | email : chris@jalakai.co.uk | ||
+ | type : syntax | ||
+ | lastupdate : 2023-08-17 | ||
+ | compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo, Hogfather, Igor | ||
+ | depends | ||
+ | conflicts | ||
+ | similar | ||
+ | tags : embed, include | ||
+ | </ | ||
+ | * downloadurl: | ||
+ | * sourcerepo : https:// | ||
+ | * bugtracker : https:// | ||
+ | |||
+ | ---- | ||
+ | |||
+ | This plugin allows you to embed other web sites in a DokuWiki page using an iframe. | ||
+ | |||
+ | |||
+ | ===== Download and Installation ===== | ||
+ | |||
+ | Search and install the plugin using the [[doku> | ||
+ | |||
+ | |||
+ | ==== Revision History ==== | ||
+ | |||
+ | For more recent revisions please check [[https:// | ||
+ | |||
+ | * 2023-08-17 | ||
+ | * fix PHP8 warnings | ||
+ | * add ' | ||
+ | * 2016-02-02 | ||
+ | * fix method signatures to match those of parent class | ||
+ | * 2015-08-09/ | ||
+ | * put plugin information into plug.info.txt | ||
+ | * add translation strings for French, German & Dutch | ||
+ | * 2015-07-31 | ||
+ | * move code into github | ||
+ | * 2008-10-13 | ||
+ | * more relaxed syntax | ||
+ | * new parameters | ||
+ | * 2006-12-17 | ||
+ | * update for stricter type/error checking in php 5 (thanks Ilya) | ||
+ | * add support for controlling settings through config plugin | ||
+ | * 2006-05-01 --- (darcs version only, others to follow) settings moved to use [[doku> | ||
+ | * 2005-10-17 --- Released. | ||
+ | |||
+ | |||
+ | ==== Manual Installation ==== | ||
+ | |||
+ | To install the plugin manually, download the source to your plugin folder, '' | ||
+ | |||
+ | The folder will contain: | ||
+ | |||
+ | conf/ | ||
+ | conf/ | ||
+ | lang/ | ||
+ | syntax.php | ||
+ | |||
+ | |||
+ | ===== Syntax and Usage ===== | ||
+ | |||
+ | Simple: | ||
+ | |||
+ | {{url> | ||
+ | |||
+ | Complete Syntax: | ||
+ | |||
+ | {{url> | ||
+ | |||
+ | That is an URL to embed, followed by several optional parameters. The following parameters are recognized: | ||
+ | |||
+ | * //width// and //height// are optional. When only one value is given it is assumed to be the height. Otherwise the first value is width and the second value is height. You can give the values in '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * Optionally an // | ||
+ | * '' | ||
+ | * An //alternate text// is optional. If not specified an empty string will be used. | ||
+ | |||
+ | See the plugin in action: | ||
+ | |||
+ | {{url> | ||
+ | |||
+ | ===== Configuration ===== | ||
+ | |||
+ | The plugin has one configuration setting, which can be set via the admin/ | ||
+ | |||
+ | * $js_ok --- default value - '' | ||
+ | |||
+ | :!: This should never be enabled in public wikis as it opens a XSS security hole. | ||
+ | |||
+ | |||
+ | ===== Acknowledgments ===== | ||
+ | |||
+ | The plugin was created in response to an idea mentioned by [[styno@hotmail.com|Styno]]. | ||
+ | |||
+ | This plugin was used as a basis for [[plugin: | ||
+ | |||
+ | |||
+ | ====== Known Problems ====== | ||
+ | |||
+ | ===== Mixed Content (HTTPS vs. HTTP) ===== | ||
+ | |||
+ | Modern web browsers will by default NOT embed stuff from " | ||
+ | |||
+ | |||
+ | ====== Discussion ====== | ||
+ | |||
+ | This used to be the right spot for this, but maybe not these days? | ||
+ | |||
+ | First a big thanks to Christopher for this plugins, it's because I want to use it a lot more in my newest wiki that I took the time to figure out why it was broken(it' | ||
+ | |||
+ | Some one (like me) upgrading their DokuWiki from the 2008-05-05 release using the older release of this plugin (2006-12-17) will think its broken. | ||
+ | |||
+ | I know I did, but after studying the source code and doing some experiments I realized what is really wrong is that the syntax changed, (a lot) between then and now. The old 2006 release **requires** brackets for its arguments, the 2008 release chokes on brackets and creates bad URL' | ||
+ | |||
+ | ^ Iframe release \\ year ^ | ||
+ | | 2006-12-17 | ||
+ | | 2008-10-31 | ||
+ | | 2008-10-31 | ||
+ | | 2006-12-17 | ||
+ | |||
+ | Notice how if no arguments are given, then the same syntax works fine for both releases. | ||
+ | plugin is tagged as ' | ||
+ | New version supports floats, and invisible borders. (which I think is really cool) | ||
+ | |||
+ | Regardless, it's a great plugin, thank you Christopher Smith for your work then and now. | ||
+ | |||
+ | PS. Yes I know doc above says the same thing, but sometimes you have to hit people over the head before they listen. | ||
+ | |||
+ | ====== Tip to use together with survey-tool ====== | ||
+ | |||
+ | The iFrame is a great means to link your Wiki to for example Survey-tools like SurveyGizmo. In wiki's with registered users you can even use the username as a key to string together the two environments, | ||
+ | |||
+ | To achieve this, a very small addition to iFrame is needed so that it accepts @USER@ as a variable. In syntax.php, line 96 simply replace: | ||
+ | |||
+ | < | ||
+ | |||
+ | with | ||
+ | |||
+ | < | ||
+ | |||
+ | That's all. | ||
+ | |||
+ | Independent from this: A useful extension of this plugin to avoid security problems would be, to restrict the possible URL's through a list in the configuration. | ||
+ | |||
+ | --- [[user> | ||
+ | |||
+ | |||