arsava / dokuwiki-template-vector

"vector" brings you the MediaWiki/Wikipedia 2010 look and feel for DokuWiki.
http://www.dokuwiki.org/template:vector
GNU General Public License v2.0
40 stars 10 forks source link

[Hack] Custom plugin tabs #65

Closed eduardomozart closed 3 years ago

eduardomozart commented 3 years ago

The vector template doesn't handle MENU_ITEMS_ASSEMBLY event, so plugins that relies on this event to add buttons to menus (like deletepagebutton and bookcreator plugins) doesn't show up it's icon/link (button). But we can foreach each PageMenu item and add it's icon/link manually. The ideal would be handle this event so the template can properly handle plugins addons (icons/buttons), because this hack is not fail-prof: plugins that embeds javascript into the page may not load because it's functionality requires a JS file that is appended to the page by MENU_ITEMS_ASSEMBLY event. There's even a hack to properly load the "Move" plugin. It would not be necessary if MENU_ITEMS_ASSEMBLY event could be handled by the template.