[dokuwiki] 2 problems with the renderer concerning plugins

  • From: christian.wenzlick@xxxxxxxxxxxxxxxxxxxxx
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Thu, 1 Feb 2007 13:27:02 +0100 (CET)

Hi,

I am currently working on 2 different plugins and got stuck with the
actual output in the function render. I would be glad if somebody could
help me out there.

In the first plugin I want to create a image link, I got the variable
$nlink , which is defined earlier and assigned a link, eg.
playground:test, and an image in my plugins folder.
In the renderer I tried something like:
$renderer->doc .= '<p class="plugin_thumb"><a href=doku.php?id=$nlink><img
src="'.DOKU_URL.'lib/plugins/thumb/test.GIF'.$conf['plugin_thumbs']['image'].'"
alt="test"/></a></p>';
But this way I am redirected to the page ../doku.php?id=$nlink, when I set
the $nlink in '' I get a parse error, unexpected T_Variable.
I also played around with the internalmedia and internalmedialink
functions but I couldn't assign a link there.
Anybody knows what I did wrong, or another solution for my problem?

In the second plugin I have got a list of links, $link1, $link2,
$link3..., and I want to include them into one page, so I thougt of the
include plugin.
Using
$renderer->doc .= {{page>$link1}};
naturally doesn`t work, because php tries to interpret the "{", escaping
the "{" doesn`t work either, because then dokuwiki ignores them as well.
Is there another possibility which I`m missing?

Thanks in advance
Christian

-- 
DokuWiki mailing list - more info at
http://wiki.splitbrain.org/wiki:mailinglist

Other related posts: