DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:embed

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
plugin:embed [2009-10-21 10:40] 194.167.50.193plugin:embed [2017-02-18 23:32] – ticket 79.121.122.71
Line 1: Line 1:
-====== DokuWiki Plugin: embed ======+====== Embed Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 12: Line 12:
 similar    : include similar    : include
 tags       : include, embed tags       : include, embed
 +
 +downloadurl: http://pb.wh4f.de/dokuwiki/embed.zip
 ---- ----
- 
- 
- 
  
 ===== The idea ===== ===== The idea =====
Line 27: Line 26:
 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 213: Line 212:
  
  // avoid circular references  // avoid circular references
- if (! (array_search($id,$embedded_pages_by_plugin_embed) === false)) + if (in_array($id,$embedded_pages_by_plugin_embed)) 
- return false;+ return false;
  
  array_push($embedded_pages_by_plugin_embed,$id);  array_push($embedded_pages_by_plugin_embed,$id);
Line 292: Line 291:
  
  //check if interwiki or email:  //check if interwiki or email:
- if ((! strpos('>',$link) === false|| (! strpos('@',$link) === false))+ if (strpos('>',$link) !== false || strpos('@',$link) !== false)
  return $link;  return $link;
  
Line 352: Line 351:
  
 >>>I started with this plugin, but since it works not on the text, but on the node representation of wikisource, the substitution of elements (via label) was incompatible with the list rendering (and therefore not acceptable) >>>I started with this plugin, but since it works not on the text, but on the node representation of wikisource, the substitution of elements (via label) was incompatible with the list rendering (and therefore not acceptable)
 +
 +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, ':') === false){
 +to
 +  } elseif (strpos($link, ':')){
 +  
 +===== Stopped working =====
 +
 +I wanted to make a "dynamic mediawiki style infobox" and this was the best plugin for it, until a day it stopped working.
plugin/embed.txt · Last modified: 2024-02-02 08:05 by Aleksandr

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki