Table of Contents
Dokuwiki modifications and improvements
If I feel a modification to tweak the look and feel or functionality is worth documenting it will end up here.
Customize interwiki-links to pep up links to Twitter, Youtube, Facebook, ...
Have you ever tried to link to a well known site, e.g. Twitter, Youtube, Facebook or whatever and wanted to add the sites icon to that link? With dokuwiki, this would end in quite an ugly look: you'll have to insert the icon as an image what inevitably tends to end up with a badly aligned icon. Additionally, your link will have the world-icon for external links attached by default. Not really satisfying.
The solution is to use interwiki links. When I came across this feature I immediately thought this would be a cool way to link to my Twitter profile in a way that looks quite good. You can use interwiki links to pep up any sort of links - all you have to do is edit the config and upload a suitable icon for the link. But that makes only sense for a rather small amount of links, probably only the most important ones you want to make stand out.
So here's how the dokuwiki syntax for the special Twitter interwiki-link looks like:
and that's the result:
@twitter with a link to https://twitter.com/twitter
Before you can use the syntax above we'll have to do a few customizations.
You will find all the fine information at https://www.dokuwiki.org/interwiki - I'll just compress this information here:
- create or modify interwiki.local.conf
- upload your icon(s) to the right place
- use your new interwiki-link on any page within your dokuwiki
- make sure there are no caching issues
In more detail:
- To prevent losing your added InterWiki shortcuts after an upgrade, you should add new ones to interwiki.local.conf (create this file in your conf directory if it doesn't exist already)
- Interwiki icons should have a size of 16×16 pixels, be in PNG or GIF format, and be named after the shortcut. So your next step is to fetch a icon from somewhere or create your own.
- Then copy your icon (named
twitter.pngin this case) to the following directory:
- If your icon does not show up after adding your first interwiki link this usually has to do with caching. It may actually be enough to invalidate the CSS caching by re-saving in the config manager ('re-saving' is pressing the save button of config manager without need to changing any config setting). If this doesn't work visit the original dokuwiki page to investigate further.
I want any access to the mediamanager limited to registered users.
To achieve that goal I had to change to following lines for the Arctic Template: