ewiki internals and extension howto =================================== This part of the [README] series describes a bit of the internals of the ewiki script and its plugin system. It lists variables, coding guidelines and a few recommendations. These informations are useful if you'd like to change some of the hardcoded behaviour, fix annoying bugs you've found or to write your own extensions. You do not need to read this, if you just want to setup and use a Wiki. README.programming ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ 1 ewiki_ functions() 2 $GLOBALS pollution ($ewiki_ variables) 3 internal coding explained 3.1 how ewiki operates 3.2 used variables 4 Extension HowTo 4.1 the PlugInterface 4.2 plugin tasks 4.2.1 mpi plugins 4.2.2 authentication/permission plugins 4.3 writing your own plugin 4.4 format_* / rendering plugins 4.4.1 ewiki_format() internals 4.4.2 the format_ plugin hooks 4.4.3 $iii[] and $ooo[] block flags 4.4.4 your own block markup plugin 4.5 xpi plugin system 5 mysql database structure 6 Just using the wiki source transformation -------------------------------------------------------------------- 1 -- ewiki_ functions() ŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻŻ Some of the core functions of ewiki.php can be used separate from the others and some of them were designed to be replaced by different implementations. Btw, all the functions, constants and variables start with "ewiki_" to make it easier to mix it into other projects (reduces function name conflicts and similar problems, that usually arise if you join two or more scripts into one program). ewiki_page($id) --------------- This is the main function which fetches the selected WikiPage (or the one given with $id) via ewiki_database to transform with ewiki_format(). If the requested page does not exist it returns the edit screen. It also includes some virtual pages (InfoAboutThisPage, NewestPages, SearchPage, ReferencesToThisPage, ...). ewiki_page_...() ---------------- These functions were separated out from the main ewiki_page() to make it more readable. Most of them contain code to generate the few special/internal WikiPages (Search, Newest, Info, and the Edit