Table of Contents
AdultContent Plugin
Compatible with DokuWiki
- 2020-07-29 "Hogfather" unknown
- 2018-04-22 "Greebo" unknown
- 2017-02-19 "Frusterick Manners" unknown
- 2016-06-26 "Elenor Of Tsort" yes
This simple plugin will check your dokuwiki page before being saved whether it contains given keywords like "sex", "porn", "orgy", etc and puts the "adult" flag in metadata.

I just have a few pages which has medical information about sexually transmitted disease, but Google AdSense does not like them. so I made this plugin.
External requirement: This plugin does nothing except tagging a internal metadata. To have an effect, your template or other plugin must utilize it.
Installation
Search and install the plugin using the Extension Manager. Refer to Plugins on how to install plugins manually.
Examples/Usage
This simple plugin will check your dokuwiki page before being saved whether it contains given keywords like “sex”, “porn”, “orgy”, etc and puts the “adult” flag in metadata.
You can retrieve this flag in your template and might control your contents like Google AdSense.
<?php if (!p_get_metadata($ID,"adult")) {?> ... Your Google AdSense code... ... <?php } ?>
See the plugin in action here (Korean).
Configuration and Settings
You can set your keywords in configuration (regex style).