$Id: README,v 1.5 2001-03-02 00:42:50 wainstead Exp $ PhpWiki distinguishes between three different templates: - template for browsing pages (default: browse.html) This template is used when viewing Wiki pages. - template for editing pages (default: editpage.html) This template is used when users edit a page by clicking on the EditText link. - template for plain messages from PhpWiki (default: message.html) This template is used when displaying search results, or when displaying error messages. The location of the template files is defined in lib/config.php The specification is relative to the index.php script. Template files are regular HTML files, which contain special placeholders. Placeholders are surrounded by '###'. You must not use '###' for other purposes. Following placeholders are provided by PhpWiki: ###SCRIPTURL### This is the URL of the main PhpWiki script. All URL's referring to the Wiki itself should use this placeholder. ###PAGE### The page title. Any special HTML characters are replaced by their entities. Do not use this placeholder in links. Use ###PAGEURL### instead. ###CONTENT### The actual page content. This is either the Wikipage itself, the search result, or a message text. ###USERID### The userid of the current users. For non-authenticated users, the userid is the host name or IP number of the user. ###LOGO### URL of the phpwiki logo image. ###RCS_IDS### The RCS ids of the php source files which contributed to the current page. ###BROWSE_PAGE### The URL to use to browse the current page. ###ACTION### The leading part of the URL for performing an action on the current page. Eg. Edit this page. ###BROWSE### The leading part of the URL for browsing to another page. Eg. Edit this page. ###BASE_URL### The base URL for the current page. Conditional placeholders: Placeholders that test a condition and depending on it include/omit certain HTML. These placeholders may be nested. The general syntax looks like this: Line by line: ###IF xxx### If condition 'xxx' is false, this line is omitted. ###IF !xxx### If condition 'xxx' is true, this line is omitted. Block: ###IF:xxx### .... ###ENDIF:xxx### If condition 'xxx' is false, then everything between the start and end placeholder is omitted. ###IF:!xxx### .... ###ENDIF:!xxx### If condition 'xxx' is true, then everything between the start and end placeholder is omitted. Conditions to test: ADMIN If the current user is an admin. Used in e.g. browse template to display admin buttons at the top. ANONYMOUS If the current user is not authenticated. COPY If page has a copy in the archive. Usually used to display/omit the EditCopy link in the editpage template. LOCK If current page is locked and thus cannot be edited. MINOR_EDIT_CHECKBOX If the current user is the same as the last editor of this page, this will contain the complete HTML for a checkbox, which, when checked will prevent a backup copy from being made. If the current user is different than the last editor, MINOR_EDIT_CHECKBOX will be blank. For examples see browse.html and editpage.html The following placeholders are not available for the 'MESSAGE' template: ###PAGEURL### Page title encoded for use in URLs. ###LASTMODIFIED### Date when the page was last modified. ###LASTAUTHOR### Author of latest modification. Usually this is the hostname or the IP address. ###VERSION### Revision number of the page. Note: this is also used for detecting concurrent updates to a page. See hidden input field in EDITPAGE template for how to use it. ###HITS### The hit count of the current page. ###RELATEDPAGES### The related pages list for the current page. Examples: the entry (default) page the current page the FindPage page PhpWiki Page: ###PAGE### See the default templates for more examples.