|
|
the PlugInterfaceThe $ewiki_plugins array holds an array of "task names" connected to function names (that of course should do something senseful). As an example: $ewiki_plugins["image_resize"]0+ = "ewiki_binary_image_resize_gd"; connects the task name "image_resize" to function already inside ewiki.php, and the task "image_resize" will be called for every uploaded or to be cached image. The function name here does not say anything about the parameters the function will be called with later. You have to look up the original function implementation in ewiki.php to see which parameters will be passed; so you could write your own task plugin. The 0+ in the example above shows that this is the very first registered function for the task "image_resize", there could be others as well. So if you write a plugin you should take care to add your function name using $ewiki_plugins["task"][] = "my_func" so you won't overwrite a previous function name registration. There are of course tasks like ["database"] where only one of the plugin functions will be called, in this case you should of course overwrite 0+. Two special case "tasks" are ["page"] and ["action"], because they aren't counted with numerical indices, but instead carry WikiPageNames+ or other idf strings as array/hash index.prev << "the PlugInterface" next >> "plugin tasks" You cannot modify the INTERNALS file, but anyhow any ideas or suggestion should as usually get filed on BugReports, UserSuggestions or even better the INTERNALS.Discussion. |