Commit Graph

41 Commits

Author SHA1 Message Date
a61966c55d Provide a function to return admin plugin for the page request.
This was previously carried out in three separate places. Refactor
that code to use the new function.

Update tpl_pageTitle test to use a manager level admin plugin.
2015-05-16 19:07:23 +02:00
e3710957c6 more phpdocs and minor check 2014-10-01 17:05:40 +02:00
53204f807b cleanup PHPDocs: DokuWiki_Syntax_Plugin is a DokuWiki_Plugin as well 2014-02-17 23:42:58 +01:00
f2fb3528e1 phpdocs plugins util and controller 2013-10-15 15:09:05 +02:00
143ff0f836 improve visibility and PHPdocs of plugin controller 2013-10-15 13:23:01 +02:00
7521090b08 Move plugin name regex to a constant as suggested by @glensc 2012-09-10 12:40:01 +02:00
98aafb569e Code cleanup documentation before merge
Function get_plugin_components() moved to extantion manager
2011-09-10 10:59:10 +02:00
b838050e58 added new plugins config cascade and added plugin.info.txt 2011-08-20 19:11:52 +05:30
db6f7eaea3 don't load disabled plugins FS#1990 2010-08-29 12:27:41 +02:00
f198658907 moved plugincontroller and event handler creation to init.php 2010-03-26 11:43:35 +01:00
1690534421 first attempt to centralize all include loading
Classes are loaded throug PHP5's class autoloader, all other
includes are just loaded by default. This skips a lot of
require_once calls.

Parser and Plugin stuff isn't handled by the class loader yet.
2010-01-31 19:02:14 +01:00
db959ae307 Coding Standard Cleanup
Ignore-this: 259cb5773c3144c6c706d87298dcf674

darcs-hash:20091020212338-7ad00-6bf1c5c403491f136a1c02af5ecd9f84d7227107.gz
2009-10-20 23:23:38 +02:00
062075650f move Doku_Plugin_Controller class out of pluginutils and into its own file
(this allows it to be include and extended in preload.php)

darcs-hash:20090122065852-f07c6-4e5069f3100174a396627c486561ff079c7a02e1.gz
2009-01-22 07:58:52 +01:00
10e4394945 Major rework of pluginutils
This patch completely reworks pluginutils to:
- reduce the number of file accesses to enumerate and load plugins
- change the way disabled plugins are recorded.
  a disabled plugin will now have ".disabled" added to its directory name
  (this halves the number of file accesses required to enumerate installed plugins)
- place the guts of pluginutils code inside a class, Doku_Plugin_Controller,
  the existing access routines are preserved and no changes are required.
- add two globals, $plugin_controller_class & $plugin_controller
  this allows preload.php to define its own plugin controller class
- update config plugin to support new plugin structure
  config plugin now issues a PLUGIN_CONFIG_PLUGINLIST event before it
  finalizes the list of plugins it will be working with.  Handlers of this
  event can remove plugins from the list.
- update plugin manager plugin to support new plugin structure
  plugin manager now issues a PLUGIN_PLUGINMANAGER_PLUGINLIST event similarly
  to config plugin.
- plugin manager updated to redirect after changes to plugins and to use msg()

Finally, this patch contains a one-shot action plugin which will automatically
convert a plugins directory from the old style disabled file to the new style.

Note for darcs users, the new disabled format will mean a couple of old oneshot
plugins, importoldchangelog and importoldindex, will have their directory names
changed, which could lead to darcs wanting to record the change.

darcs-hash:20090118190143-f07c6-d2e79af546a49a4af5817dd0c5cc27066e67c4d0.gz
2009-01-18 20:01:43 +01:00
94806c6f09 add third parameter to plugin_load(), $new, to allow return of a new plugin object instance
darcs-hash:20080813125929-f07c6-4f20e147334ebc5be006ec9f260331950ac2e4cb.gz
2008-08-13 14:59:29 +02:00
fd661b4860 update plugin component file search to ignore hidden files (files beginning with '.')
darcs-hash:20070627184840-d26fc-4460e02bd480470a5cdbd2b826e12fb4e4bcc4bc.gz
2007-06-27 20:48:40 +02:00
7d992a19dd helper plugin patch
darcs-hash:20070227122635-20862-e10e801a5224585fa32d8dc3401fd5eb98d70930.gz
2007-02-27 13:26:35 +01:00
c327d6c4ca Some renderer plugin updates
The namingscheme for renderer plugins now matches the other types, the plugin
manager now returns info on renderer plugins, too

darcs-hash:20070120002731-7ad00-fcea93a6a6da807103b6aa82d6472196125cb3ec.gz
2007-01-20 01:27:31 +01:00
173f278305 fix bug#956 (also sp. in pluginutils)
darcs-hash:20061027004117-9b6ab-b7eda08e246e942a1ca4841b94abeda4c2ed722c.gz
2006-10-27 02:41:17 +02:00
d818621633 suppress boring errors
Suppress any errors from set_time_limit,
unlink, and file_exists functions.
see: http://www.freelists.org/archives/dokuwiki/09-2006/msg00004.html

darcs-hash:20060908193433-05dcb-013617431870ab5bfb2ce8c6e99ba5af13493228.gz
2006-09-08 21:34:33 +02:00
03c4aec3c8 unittest fixes
darcs-hash:20060804142243-9b6ab-d208f7f1a67a9958fda05c519c8407ad5e733cea.gz
2006-08-04 16:22:43 +02:00
f65bfee195 action plugins
This patch adds events and a third plugin type, "action" plugins, to DokuWiki.

The patch doesn't include any event signalling, that will be added in later patches.

Action plugins are loaded before most Dokuwiki processing takes place and at the
same time are given the opportunity to register handlers (or hooks) to receive
specific dokuwiki events.

Other parts of Dokuwiki (e.g. templates and syntax plugins) can also register
handlers to receive events.

Any part of Dokuwiki can create and signal events, including templates and plugins.

This patch also revises the admin plugin class by making it an extension of a
new class, DokuWiki_Plugin. The DokuWiki_Plugin_Action class also extends this
new class.

Further details of events, their signalling and handling, and of action plugins will
be added to wiki.splitbrain.org in due course :-)

darcs-hash:20060414193737-9b6ab-f23d3d9b93e4c50a3ad97ced03eabc6c0363650b.gz
2006-04-14 21:37:37 +02:00
087b3a7fd4 plugin manager upate: protect default plugins, add enable/disable functionality
darcs-hash:20060311192655-9b6ab-c54d280d35b121730e2f8d50b15fe647d986574c.gz
2006-03-11 20:26:55 +01:00
98c868589e file cleanups
This patch cleans up the source code to satisfy the coding guidelines (see
http://wiki.splitbrain.org/wiki:development#coding_style)

It converts files to UNIX lineendings and removes tabs and trailing
whitespace. Not all files were cleaned yet.

darcs-hash:20060217222040-7ad00-bba3d2bee3b5aa7cbb5184258abd50805cd071bf.gz
2006-02-17 23:20:40 +01:00
20e7ccb0f1 config plugin update & removal of $conf['pluginmanager'] option
darcs-hash:20060126011342-9b6ab-40d04573bef34fa4012edac74186355b9a7ff0d9.gz
2006-01-26 02:13:42 +01:00
4beabca98b better_xhtml_compliance_1.patch
darcs-hash:20060114163558-d5083-0d8e27162de2b0bfe9783e31cf4ca45a99006dd5.gz
2006-01-14 17:35:58 +01:00
78a6aeb15a More work on Javascript and CSS dispatchers
darcs-hash:20051029185222-7ad00-c184ab3496539f3027407c7d17e8770a1849546a.gz
2005-10-29 20:52:22 +02:00
4f069ddeed pluginutils update avoid missing aggregate files before plugin manager has created them
darcs-hash:20050908000531-50fdc-f4542a4c6b597ffeaa8c81afd35a41e667f5fa52.gz
2005-09-08 02:05:31 +02:00
da682d4efe error reporting for plugins turned on once again; checks if file exists
darcs-hash:20050902145953-283c4-d03ea404000d8b307d91b678f3ed3fc1a0ebac15.gz
2005-09-02 16:59:53 +02:00
521f0997dc correction to non-intrusive plugin manager patch - now uses correct $conf setting name.
darcs-hash:20050825004756-50fdc-e7d1dfffb9a53c6b8dba757e181f83bdf0809ed8.gz
2005-08-25 02:47:56 +02:00
d66e3ddfed non-intrusive changes to support plugin manager
darcs-hash:20050824231545-50fdc-2d0fc2e9efba6c6d740f00c9113d07eabc3963ce.gz
2005-08-25 01:15:45 +02:00
c90b2fb183 minor plugin fixes to protect against invalid/malformed plugins
darcs-hash:20050804235036-50fdc-1881a40da689bc5abbe608a2ce96a1ed192a43a4.gz
2005-08-05 01:50:36 +02:00
4f32716ed3 plugin tweaks, info plugin fixes
darcs-hash:20050803180226-7ad00-7bce1982ed6589511ce38e2e4e5e4cdf8640a0ae.gz
2005-08-03 20:02:26 +02:00
6446f4865b fix for closing plugindir
darcs-hash:20050803172402-283c4-7c735ba09b53950d122b319c92fd121192bc5a79.gz
2005-08-03 19:24:02 +02:00
7fb56887db support for plugin subfolders added - plugins/[name]/[type]/[file].php
darcs-hash:20050802191421-50fdc-abf82fcb52dfabd74b7119f2e6a53ea590bb1d90.gz
2005-08-02 21:14:21 +02:00
e2e0a40f4e plugin javascript load fix: print.css -> script.js
darcs-hash:20050802084121-50fdc-9a4bf03b72365ac5218c0ba7b6ad6dc971e29676.gz
2005-08-02 10:41:21 +02:00
3600bd520d Load plugin javascript
Javascript files from plugins called script.js are loaded automatically

darcs-hash:20050801182242-7ad00-2bc839c92c54e641347ed1cbeadf8bba3ef6a7a8.gz
2005-08-01 20:22:42 +02:00
4b15e09d7f Plugins can add their own CSS now
Plugins can use their own styleheets now. They are loaded in the tpl_metaheader
function.

The following files are used if existing in the plugin's directory:

style.css  - overall style used always
screen.css - only used in normal view (media

darcs-hash:20050731073521-7ad00-dcece7a255d3b08a1d2da9f2444b31e628ee76ea.gz
2005-07-31 09:35:21 +02:00
a46d0d658b Changed pluginloading to use references
This patch allows the use of $this in syntax plugins to set internal variables
and let them remain between handle and render calls. Even when it is possible
now to use this method you should exchange data betwenn handler and render calls
by using the $data array only.

darcs-hash:20050730215156-7ad00-69ea79859360d9902533633395de3e1b677f6e46.gz
2005-07-30 23:51:56 +02:00
107b01d603 sorting support for syntax plugins, info plugin now actually does something
Syntax plugins now need to implement getSort() which should return a number.
This number is used to add all syntax modes in the correct order. To see a
list in which order current modes are loaded you can use the info plugin like
this:

~~INFO:syntaxmodes~~ lists all known modes (includes existing plugins) with
their sorting score

~~INFO:syntaxtypes~~ lists all syntax types and their registered modes (useful
for implementing the getType() function.

darcs-hash:20050521210430-9977f-2baaf6043afc6ea3fed41cdca97564218fb519c2.gz
2005-05-21 23:04:30 +02:00
ee20e7d166 first attempt of syntax plugins
The first version of the new plugin system. Syntax plugins only yet. A very simple
example plugin called info (doing nothig useful yet) is included.

Missing Features

  - Doku_Block_Handler needs work (doesn't honur plugins yet)
  - there is no way to specify the order of plugins and other modes yet
  - useful output from the info plugin
  - bug testing and fixing
  - code cleanup
  - documentation

darcs-hash:20050519201009-9977f-f793dbfc6a39d8a9643b610927d93cd3288bdd6b.gz
2005-05-19 22:10:09 +02:00