1# dokuwiki-plugin-iframeinterwiki 2Plugin dokuwiki for iframe using interwiki 3 4## Overview 5 6The iframeinterwiki plugin allows external URLs to be loaded into an iframe in your DokuWiki page using interwiki URI syntax. This plugin extends the standard iframe functionality by supporting interwiki shortcuts defined in your DokuWiki configuration. 7 8**Compatible with DokuWiki:** 9- 2025-05-14 "Librarian" and later versions 10 11**Plugin Information:** 12- **Author:** Steve Roques 13- **Last Updated:** 2025-08-22 (Bug fixes applied) 14- **License:** GPL 2 15- **Type:** Syntax Plugin 16- **Repository:** [https://www.dokuwiki.org/plugin:iframeinterwiki](https://www.dokuwiki.org/plugin:iframeinterwiki) 17 18## Installation 19 20### Automatic Installation 211. Go to your DokuWiki Admin Panel 222. Navigate to Extension Manager 233. Search for "iframeinterwiki" 244. Click Install 25 26### Manual Installation 271. Download the plugin source 282. Extract to your DokuWiki `lib/plugins/` directory 293. The plugin folder structure should be: 30 ``` 31 lib/plugins/iframeinterwiki/ 32 ├── conf/ 33 │ ├── default.php # Default settings 34 │ └── metadata.php # Configuration metadata 35 ├── lang/ 36 │ └── xx/lang.php # Language files 37 ├── syntax.php # Main plugin script 38 └── plugin.info.txt # Plugin information 39 ``` 40 41## Usage 42 43### Basic Syntax 44```wiki 45{{url>http://www.example.com/somepage.html}} 46``` 47 48### Complete Syntax 49```wiki 50{{url>someurl width,height noscroll noborder alignment|alternate-text}} 51``` 52 53### Using Interwiki 54```wiki 55{{url>personalserver>test.html}} 56``` 57 58Where `personalserver` is defined in your `conf/interwiki.local.conf` file. 59 60### Parameters 61 62**Size Parameters:** 63- `width,height` - Specify dimensions (e.g., `100%,700px` or `800,600`) 64- Units supported: `px`, `%`, `em`, `pt` 65- Default: width=98%, height=400px 66 67**Display Options:** 68- `noscroll` or `noscrollbar` or `noscrolling` - Disable scrollbars 69- `noborder` or `noframeborder` - Remove iframe border 70- `left` or `right` - Float alignment 71 72**Content:** 73- `|alternate-text` - Text shown when iframe cannot load 74 75### Interwiki Integration 76 77The plugin supports interwiki shortcuts using these placeholders: 78- `{NAME}` - Replaced by the page name part 79- `{URL}` - URL-encoded parameter replacement 80 81Example interwiki configuration in `conf/interwiki.local.conf`: 82``` 83personalserver http://myserver.com/{NAME} 84api https://api.example.com/embed?url={URL} 85``` 86 87## Configuration 88 89Access configuration via **Admin Panel → Configuration Settings** 90 91### Available Settings 92 93**JavaScript URLs (`js_ok`)** 94- **Default:** `false` 95- **Description:** Enable JavaScript URLs in iframes 96- **Security Warning:** Never enable this on public wikis - it creates XSS vulnerabilities 97 98## Troubleshooting 99 100### Common Issues 101 102**"Undefined array key" errors:** 103- Update to the latest version (2025-08-22 or later) 104- Ensure proper syntax: specify units for dimensions (`700px` instead of `700`) 105 106**Iframe not loading:** 107- Check if the target URL allows iframe embedding 108- Verify interwiki configuration 109- Ensure JavaScript URLs are properly configured if needed 110 111**Security considerations:** 112- Never enable `js_ok` on public wikis 113- Validate external URLs before embedding 114- Be cautious with user-generated iframe content 115 116## Examples 117 118### Simple iframe 119```wiki 120{{url>https://example.com}} 121``` 122 123### Sized iframe with no scrollbars 124```wiki 125{{url>https://example.com 800px,600px noscroll noborder}} 126``` 127 128### Using interwiki with alternate text 129```wiki 130{{url>docs>api/reference.html 100%,500px|API Documentation}} 131``` 132 133### Responsive iframe 134```wiki 135{{url>app>dashboard.php 100%,80vh noscroll|Application Dashboard}} 136``` 137 138## Support 139 140- **Documentation:** [https://www.dokuwiki.org/plugin:iframeinterwiki](https://www.dokuwiki.org/plugin:iframeinterwiki) 141- **Issues:** Report bugs through the DokuWiki plugin system 142- **Community:** DokuWiki user forums 143 144## License 145 146This plugin is licensed under GPL 2. See the full license text at [http://www.gnu.org/licenses/gpl.html](http://www.gnu.org/licenses/gpl.html) 147 148## Acknowledgments 149 150Special thanks to Christopher Smith for the original iframe plugin that served as the foundation for this interwiki-enabled version. 151