X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/43abdd87bf3da7c26e52fdf42664f00824c1e8bf..86e73e42e835821984fdf6dc5671dae06cec5f90:/doc/plugins/write/external.mdwn?ds=inline diff --git a/doc/plugins/write/external.mdwn b/doc/plugins/write/external.mdwn index cffbed86c..e30bf2ff3 100644 --- a/doc/plugins/write/external.mdwn +++ b/doc/plugins/write/external.mdwn @@ -96,14 +96,13 @@ the sentinal. ## Function injection -Some parts of ikiwiki are extensible by adding functions. For example, the -RCS interface relies on plugins providing several IkiWiki::rcs_* functions. +Some parts of ikiwiki are extensible by adding or overriding functions. It's actually possible to do this from an external plugin too. -To make your external plugin provide an `IkiWiki::rcs_update` function, for +To make your external plugin override the `IkiWiki::formattime` function, for example, make an RPC call to `inject`. Pass it named parameters "name" and "call", where "name" is the name of the function to inject into perl (here -"Ikiwiki::rcs_update" and "call" is the RPC call ikiwiki will make whenever +"Ikiwiki::formattime" and "call" is the RPC call ikiwiki will make whenever that function is run. If the RPC call is memoizable, you can also pass a "memoize" parameter, set @@ -134,7 +133,7 @@ large quantity of data conversion going on. In contrast, `preprocess` hooks are called generally rarely, and pass around minimal data. External plugins should avoid making RPC calls unnecessarily (ie, in a loop). -Memorizing the results of appropriate RPC calls is one good way to minimize the +Memoizing the results of appropriate RPC calls is one good way to minimize the number of calls. Injecting a replacement for a commonly called ikiwiki function