|
|
$GLOBALS pollution ($ewiki_ variables)At least the ewiki_page() function produces variables in the global namespace. Of course they also were named to not interfere with anything from yoursite.php: $ewiki_id - Contains the current page name, after ewiki_page() was called. $ewiki_action - Contains the $action/ForTheCurrentPage+. $ewiki_title - Will be set after the first call to ewiki_page(), it is most useful to be printed inside the <TITLE> tags inside <HEAD>. So if you want to use it you should call ewiki_page() very early, but save its output into a variable for later use. This way you can make the current wiki pages` title available (the _title may be different from the pages _id). $ewiki_data - Contains the page data hash as retrieved from the database, but that {content} has been removed. $ewiki_errmsg - Sometimes used to pass error notices back (ewiki_auth does so for example). $ewiki_links - Is an array produced by ewiki_format() that associates all found WikiPageNames+ with a value of 0 or 1, depending on if the referred page exists in the database. $ewiki_author - The content of this variable is saved in the author field of newly created wiki pages (it will be filled with IP:PORT if not set from outside). This is only an informational setting, and does not directly correspond to the _PROTECTED_MODE. You should set it, whenever yoursite.php notes a logged in user (so his login gets saved in the wiki pages 'author' column). But you should REALLY NOT SPAM IT with your own name or ad words. $ewiki_auth_user - Is set by ewiki_auth_user() whenever it successfully authenticates a user in _PROTECTED_MODE. This variable is then used as reliable state setting, which affects permission granting. $ewiki_ring - Holds the permission level ('ring') of the currently authenticated user (or else will be unset). This value tells only about the user, many plugin functions have built-in requirements which will be compared against this value (no value or zero means full permissions). While this is the built-in way to grant permissions and often also suits the needs to do it, the _auth() plugin interface allows to work at a much finer degree of access granting. values: 0=administrator, 1=moderator, 2=editor, 3=guest See also plugins/auth/README.auth for more informations. $ewiki_plugins - Is an array which connects task names (say "database" or "image_resize" for example) to function names. You can utilize this if you decide to extend ewiki. There is an own chapter on this. $ewiki_config - Imports some configuration settings from older constants, and introduces newer ones, which can then be overridden at runtime. Also holds some work and markup transform data. $ewiki_t - Text definitions and translations for all possible messages. -------------------------------------------------------------------- 3 --prev << "$GLOBALS pollution ($ewiki_ variables)" next >> "internal coding explained" 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. |