Table of Contents

Ad Hominem Template

A simple and lightweight template, based on the standard DokuWiki template, but with many additional, modern features.

A short overview of the main features of this template:

These features are explained in more detail below:

Search field

One of the strengths of DokuWiki is the well-integrated and powerful search function. The search field brings all these functions together:

Ad-Hominem: Search field with expanded results list

Search field with expanded results list

Collapsible sidebar and table of contents

Also the sidebar is a core function in DokuWiki1). This template therefore has two different approaches so that it does not get in the way of the user so much:

On desktop screen sizes, there is an inconspicuous button to fold the sidebar to the edge. In this state the main content area is enlarged. The sidebar also collapses automatically in the admin vor edit view.

On mobile phone screen sizes, the sidebar will behidden and instead a “hamburger” menu is shown in its place. A click on this icon will show the sidebar as a floating menu.

The Table of Contents is by default collapsed to a “hamburger” menu in the top right corner of the main area (top-left on right-to-left languages). A click on this icon expands the TOC.

The template comes with a built-in system for link-previews. They work in a way that when a mouse pointer is hovered over certain links, a preview text is loaded into the title attribute, making the text available as a tooltip, as in the following screenshot:

Ad-Hominem: Link preview as tooltip

Link preview as tooltip

This function is available for internal links (i.e. the green links in your wikitext) as well as for Wikipedia links for the language versions: English, French, German, Spanish, Polish and Russian. In addition, interwiki links to Fallacies Online and Denkfehler Online are also included, these need to be added to the interwiki.local.conf file2) with the shortcuts named fo and dfo respectively.

Give it a try on the links in the previous paragraph: just hover your mouse over any of the links!

To reduce overhead, the preview text is only loaded when the mouse pointer is actually over the link. This may cause a slight delay in showing the preview, but reduces the overall network load.

Unfortunately, this only works on devices that actually have a mouse pointer (i.e. not on tablets and smartphones). An alternative solution for these devices as well as a mechanism to add other web sites is planned.

To make the best of this function, it is a good practice to always start each article with a main headline (level 1), followed by a short plain text paragraph with a synopsis of the article. This is also the most user-friendly way to begin your wiki-articles (I wished the Wikipedia authors would also take the “short” aspect a bit more seriously).

The template has a built-in cookie-banner to fulfil the requirements of EU-based wikis. It looks as follows:

Ad-Hominem: Cookie banner

𝖢ookie banner

The template’s configuration settings contain three options to modify the cookie banner:

  1. Display the Cookie message banner: Disable or change the position of the cookies banner:
    • Don’t show: No cookie banner is shown to the visitor.
    • Show on bottom of page: The cookie banner is shown on the bottom of the screen (default).
    • Show on top of page: The cookie banner is shown on the top of the screen.
       
  2. The message to display on the Cookie banner: This is a free-text field that allows to enter the text that is displayed in the banner. This may even contain HTML tags as it will be copied “as is” into the page code.
     
  3. Link to the “More information” page: this can be an internal or external address that will be linked via the “more information” button.

Clicking on the “OK”-button will close the banner and set a 1-year cookie named “cookielaw” with the value “1”. When this cookie is set, the banner will not be shown again for this web site.

Note that for technical reasons, the cookie banner can not actually prevent DokuWiki from setting any cookies. However, all standard DokuWiki cookies, as well as the cookielaw-cookie fall into the categorie of “technical cookies”, which do not require permission from the user.

Also keep in mind that the linked “More information” page should give detailled information on the cookies and data collection practices.

1)
See also the article: How do I add a sidebar?
2)
For more information on this file, please see the page Interwiki in the DokuWiki documentation.