plugin:hiddenheader
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
plugin:hiddenheader [2015-06-24 14:06] – 130.112.1.3 | plugin:hiddenheader [2024-02-11 03:40] (current) – zioth | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== hiddenheader Plugin ====== | ====== hiddenheader Plugin ====== | ||
- | |||
---- plugin ---- | ---- plugin ---- | ||
description: | description: | ||
author | author | ||
- | email : | + | email : elifenton@this_is_not_a_real_email.fake |
type : action | type : action | ||
- | lastupdate : 2013-05-22 | + | lastupdate : 2024-02-10 |
- | compatible : angua, rincewind, weatherwax | + | compatible : angua, rincewind, weatherwax, binky, ponder stibbons, hrun, detritus, Frusterick Manners, greebo, Hogfather, Igor, Jack Jackrum, Kaos |
depends | depends | ||
conflicts | conflicts | ||
Line 14: | Line 13: | ||
tags : section, header, include, title | tags : section, header, include, title | ||
- | downloadurl: | + | downloadurl: |
- | bugtracker : # eg. http:// | + | bugtracker : https:// |
- | sourcerepo : # eg. http:// | + | sourcerepo : https:// |
donationurl: | donationurl: | ||
---- | ---- | ||
Line 23: | Line 22: | ||
I made this as a companion to the [[plugin: | I made this as a companion to the [[plugin: | ||
- | |||
- | |||
- | ===== Installation ===== | ||
- | |||
- | I haven' | ||
- | |||
- | <code php lib/ | ||
- | <?php | ||
- | /** | ||
- | * hiddenheader Plugin for DokuWiki / action.php | ||
- | * | ||
- | * @license GPL - http:// | ||
- | * @author | ||
- | */ | ||
- | |||
- | if (!defined(' | ||
- | if (!defined(' | ||
- | require_once DOKU_PLUGIN . ' | ||
- | |||
- | class action_plugin_hiddenheader extends DokuWiki_Action_Plugin { | ||
- | function getInfo() {return array(' | ||
- | |||
- | function register(Doku_Event_Handler $controller) { | ||
- | $controller-> | ||
- | $controller-> | ||
- | $controller-> | ||
- | } | ||
- | |||
- | function handlePreprocess(& | ||
- | // should accumulate in hash | ||
- | if ($this-> | ||
- | return; | ||
- | preg_match_all('/ | ||
- | $this-> | ||
- | |||
- | if ($this-> | ||
- | $event-> | ||
- | } | ||
- | |||
- | function handlePostProcess(& | ||
- | if ($this-> | ||
- | foreach ($this-> | ||
- | $event-> | ||
- | } | ||
- | } | ||
- | |||
- | function handleToc(& | ||
- | if ($this-> | ||
- | $map = array(); | ||
- | foreach ($this-> | ||
- | $map[trim($h)] = 1; | ||
- | $newdata = array(); | ||
- | foreach ($event-> | ||
- | if (!$map[$d[' | ||
- | $newdata[] = $d; | ||
- | } | ||
- | // I don't know what's special about the number " | ||
- | $event-> | ||
- | } | ||
- | } | ||
- | |||
- | var $hidden; | ||
- | } | ||
- | </ | ||
Line 126: | Line 61: | ||
==Change Log== | ==Change Log== | ||
+ | * 2018-12-31: Fixed some long-standing bugs. | ||
* 2013-05-22: Updated for Weatherwax. The new DokuWiki doesn' | * 2013-05-22: Updated for Weatherwax. The new DokuWiki doesn' | ||
* 2012-03-29: I just ran into a case where the preprocess command could be called twice by dokuwiki. This might be a bug in Angua. The new code works around this problem. | * 2012-03-29: I just ran into a case where the preprocess command could be called twice by dokuwiki. This might be a bug in Angua. The new code works around this problem. | ||
Line 132: | Line 68: | ||
===== Discussion ===== | ===== Discussion ===== | ||
+ | |||
+ | Thanks, but I have a little problem (Mar2017, Frusterick). |
plugin/hiddenheader.1435147566.txt.gz · Last modified: 2015-06-24 14:06 by 130.112.1.3