[dokuwiki] Re: Links: various questions

  • From: Dmitry Katsubo <dma_k@xxxxxxx>
  • To: dokuwiki@xxxxxxxxxxxxx
  • Date: Tue, 07 Oct 2008 00:10:06 +0200

Dear Andreas! Dear maillist members!

I hope someone will help me in finding answers to the questions I've got.

>> I would like to create a link like following:
>>
>> [[Apache>spamassassin/SingleUserUnixInstall#head-bea6b8dc4f219edd3b9976e8f922a8f1c0603125|here]]
>>
>> but "/" and "#" characters get escaped and link does not work. How can I
>> avoid this?
> 
> You asked this in the forum already. And I answered already.
> http://forum.dokuwiki.org/thread/2656

That worked! Just curios: why {NAME} by default is not used in
interwiki.conf, e.g.

wp        http://en.wikipedia.org/wiki/{NAME}

I think, a lot of users want to benefit from using page anchors, without
this hint it's difficult to trick it. Though what you've said is also
written in the top of interwiki.conf, I really overlooked it and never
paid attention to.

>> How is it possible to enable extended formatting in alternative text for
>> links? For example:
>>
>> [[http://google.com|//Very// nice **site**]]
> 
> Not possible in DokuWiki.

Well, is it absolutely not possible by design, or I can still try to
play with it? I think, processing of this instruction should be done the
same way like plugins work. Is it possible to apply the advise you
mentioned for plugins also for this case?

>> Also relative topic: how to enable formatting for some media content
>> reference:
>>
>> {{:wiki:my_image.png|__here__}}
> 
> Again, you can't. BTW where would you expect to show this up? Tooltips
> do not support any formating AFAIK.

I agree with you. Not necessary. But that depends finally on how they
will be rendered. Time are changing, maybe one day we'll get full html
in tooltips.

>> {{googlecal[id=3838193]|''cool''}}
> 
> Only if the plugin supports it.
> 
> You need to have opening and closing patterns and allow other syntax
> within your patterns. http://www.dokuwiki.org/devel:syntax_plugins is
> a bit messy but should explain it. Have a look at the color example.

I got the idea. Are entry/exit patterns used after spacial pattern
successfully matched, and executed against the same input text rage that
spacial pattern matched before?

I also have the following questions when I played a bit with plugin
development for docuwiki:

- What plugin can be a good example of error reporting? I mean, when
something happens during handle() stage so there should be some reaction
on render() stage.

- Why the following instruction works:
$this->Lexer->addSpecialPattern('{{myplugin>.+}}', $mode, ...
and the following does not:
$this->Lexer->addSpecialPattern('{{myplugin>(.+)}}', $mode, ...

Was this limitation introduced on purpose?

Finally can somebody from gurus have a look at my first attempt (see
http://www.dokuwiki.org/plugin:google_maps#syntax.php). Any
critics/suggestions are welcomed.

Thanks!


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

Other related posts: