It's better when it's simple

User Tools

Site Tools


chiplink Plugin

Compatible with DokuWiki


plugin Provides automatic links to HTML reports on your server, by searching the wikitext

Last updated on

This extension has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues.

Similar to rtlink

Tagged with documentation, links, reports


This plugin will automatically convert chip names in the wiki text into links pointing to HTML reports located on your wiki server. It is easy to adapt the plugin for similar automatic linking to HTML documents from labels in your wiki text. This might be part numbers, legal document paragraphs etc.

As the generated links are relative to the server name, it works fine also when used with VPN (virtual private networks).


Just type the chip number in plain text as SW123p45 to activate the link:


This will convert the text into a link pointing to the report SW123.htm (and the bookmark #p45) located on your server in /reportfolder/

This HTML code will be inserted:

<a href="/reportfolder/SW123.htm#p45">SW123p45</a>.


The matched pattern is SWxxxxxpxxxxx where x are digits. See below how to adapt it for your needs.


Search and install the plugin using the Extension Manager.

If installing it manually, download the compressed file using the link above. Decompress it, and rename the folder inside to chiplink (it was something like pyhys-dokuwiki_plugin_chiplink-###). Move this folder to lib/plugins/ below your DokuWiki installation. Make sure a folder lib/plugins/chiplink/ now is available, and it should have at least the syntax.php file and the subfolder conf.

Refer to Plugins for more details on how to install plugins manually.

Adapting the plugin to your needs

This plugin can easily be modified to fit your needs for automatic linking to HTML reports. The foldername for the reports ($relativelocation) can be set in the configuration manager.

The matching pattern to look for in the wiki text, and the resulting link target can be changed in the file lib/plugins/chiplink/syntax.php. These are the parts to change:

Description Code lines to change
Wiki text matching pattern
// Match for example 'SW1613p8'
$this->Lexer->addSpecialPattern('[sS][wW][0-9]+[pP][0-9]+', $mode, 'plugin_chiplink'); 
Data extraction
$stripped = substr($match, 2); // Remove initial 'SW'
$splitted = preg_split("/[pP]/", $stripped); // Split '1613p8' into '1613' and '8'.
list($wafer, $chip) = $splitted;
Report link generation
$url = "/".$relativelocation."/"."SW".$wafer.".htm#p".$chip;
$description = "SW".$wafer."p".$chip;


Thanks to Gregg Berkholtz for the rtlink plugin, on which this plugin is based.

Trouble shooting

When changing the plugin PHP code, make sure to add this to the URL to purge the cache:


Otherwise the changes will not take effect immediately.

Make sure that the plugin is installed properly. It should appear in the Plugin Manager, and 'Chiplink Plugin Settings' should appear in the Configuration Manager.

First try with the original wiki text pattern (SWxxxxxpxxxx) and the regular expression provided, and make sure some link is created. Then make necessary adjustments in the regular expressions.

Right-click on the generated web page, and select 'View Page Source'. Look exactly how the link ended up. Make appropriate adjustmnents in the configuration settings or the sourcecode.

If it looks OK but still does not work, make a dummy HTML document with a link to your target (to make sure the target is on the correct location).


plugin/chiplink.txt · Last modified: 2020-02-26 07:01 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