plugin:embed
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:embed [2009-10-21 10:40] – 194.167.50.193 | plugin:embed [2024-02-02 08:05] (current) – Aleksandr | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
---- plugin ---- | ---- plugin ---- | ||
- | description: | + | description: |
author | author | ||
email : bihler@iai.uni-bonn.de | email : bihler@iai.uni-bonn.de | ||
Line 12: | Line 12: | ||
similar | similar | ||
tags : include, embed | tags : include, embed | ||
+ | |||
+ | downloadurl: | ||
---- | ---- | ||
- | |||
- | |||
- | |||
===== The idea ===== | ===== The idea ===== | ||
Sometimes you are required to include a wikipage while replacing parts of it, e.g. if building up hierarchical menus with the [[: | Sometimes you are required to include a wikipage while replacing parts of it, e.g. if building up hierarchical menus with the [[: | ||
- | |||
- | |||
===== Requirements ===== | ===== Requirements ===== | ||
I've developed the plugin under the DokuWiki version of 2006-11-06 and seems to work with version 2007-06-26 as well. | I've developed the plugin under the DokuWiki version of 2006-11-06 and seems to work with version 2007-06-26 as well. | ||
- | |||
- | OH yeah ! | ||
===== Download / Installation ===== | ===== Download / Installation ===== | ||
Line 35: | Line 30: | ||
===== Shortcomings ===== | ===== Shortcomings ===== | ||
- | To assure proper use of ACLs, this plugin inhibits caching on pages which make use of the <embed ...> tag. | + | To assure proper use of [[:acl|ACLs]], this plugin inhibits caching on pages which make use of the '' |
===== Syntax ===== | ===== Syntax ===== | ||
Line 50: | Line 45: | ||
</ | </ | ||
</ | </ | ||
- | |||
===== Use Case ===== | ===== Use Case ===== | ||
Line 113: | Line 107: | ||
* [[.:labs:]] | * [[.:labs:]] | ||
* [[: | * [[: | ||
- | |||
- | |||
===== Code ===== | ===== Code ===== | ||
Line 161: | Line 153: | ||
' | ' | ||
' | ' | ||
- | ' | + | ' |
); | ); | ||
} | } | ||
Line 213: | Line 205: | ||
// avoid circular references | // avoid circular references | ||
- | if (! (array_search($id, | + | if (in_array($id, |
- | return false; | + | return false; |
array_push($embedded_pages_by_plugin_embed, | array_push($embedded_pages_by_plugin_embed, | ||
Line 292: | Line 284: | ||
//check if interwiki or email: | //check if interwiki or email: | ||
- | if ((! strpos('>', | + | if (strpos('>', |
return $link; | return $link; | ||
Line 352: | Line 344: | ||
>>> | >>> | ||
+ | |||
+ | Embeds with absolute internal links go wrong; they come out as ns:ns:page instead of just ns:page. | ||
+ | fixed by change line 184 from | ||
+ | } elseif (strpos($link, | ||
+ | to | ||
+ | } elseif (strpos($link, | ||
+ | | ||
+ | ===== Stopped working ===== | ||
+ | |||
+ | I wanted to make a " |
plugin/embed.txt · Last modified: 2024-02-02 08:05 by Aleksandr