autolink2 plugin by Otto Vainio
Register anchors to a page to be (semi)automatcally linked from other pages
Last updated on 2007-03-08. Provides Syntax, Helper.
Compatible with DokuWiki 2006-11-06.
| Version | 2.1a () |
|---|---|
| Download | autolink2.zip |
With this plugin you can define pages the can be (semi)automatically linked to that page. This is a new improved version of my autolink plugin.
On the page you want to link to, set:
{{autolink>some name|anchors|separated by|pipe}}
On the pages you want to put the link in, set:
<autolink> The text on the page. blaa blaa, blaa And of course the text Some Name. Also some name is valid, as well as SOME NAME. |The test can be in a table also| Some Name, **but** there needs to be a space after the leading\|| </autolink>
This will generate dokuwiki code
The text on the page. blaa blaa, blaa And of course the text [[pagewhere:anchor_set|Some Name]]. Also [[pagewhere:anchor set|some name]] is valid, as well as [[pagewhere:anchor set|SOME NAME]]. |The test can be in a table also| [[pagewhere:anchor_set|Some Name]], **but** there needs to be a space after the leading\||
Using Plugin Manager from here
If installing over the old autolink, then the plugin tries to import links from the old data file. Use the admin plugin included to find files still having the old format.
For me this is a very useable plugin. Many many thanks!
But there seems to be a little bug. If I autolink e.g. the word “Wissenschaft” in the text “Philosophie ist die Wissenschaft, die die Grundlagen aller Wissenschaften untersucht …” the text ist rendered to “Philosophie ist die wissenschaft, die die Grundlagen aller wissenschaften untersucht …” In german this is not correct, because “Wissenschaft” is the right spelling. Can the author of this plugin or someone else help me.
Oh yes I get it. I think I have a solution. No I only need to code and test it— Otto Vainio 2007-03-08 19:21
Ok. Got it. Its fixed now. New fixed version updated to zip file — Otto Vainio 2007-03-08 19:56
Many many thanks!!! I will try it. drews.frank@arcor.de
Ouch sorry. One bug left. — Otto Vainio 2007-03-08 20:37Ok now fixed — Otto Vainio 2007-03-08 20:42
This plugin is excellent, but it seems to put a mess in the subpart of the page. If I ask the whole page to be '<autolink>', then, if I edit a part, it doesn't give me the right part to edit, but half up and half down of this (I am not sure to be clear :p). Can you help me ?
If you get the warning
Call-time pass-by-reference has been deprecated; etc. etc.
If you would like to pass it by reference, modify the declaration of [runtime function name]().
change in admin.php line 123
return search_regex(&$data,$base,$file,$reg,$words);
to
return search_regex($data,$base,$file,$reg,$words);
Would it be possible in the future version of the plugin to allow linking to word 'packaged' or linked in syntax symbols ? I mean, if I give as KeyWord 'TATA', and if in the text I have '(TATA is a name)', then the autolink won't works. It is the same for the formatting character/keys… Many Thanks Francois
I made a template that put the following in each file
<autolink>
[enter text here]
{{autolink>page_name|page name}}
</autolink>
It worked at first, but after opening the pages a few times all the text between the <autolink> and </autolink> tags disappeared.
Any ideas?
Brett