$Id: README,v 1.3 2000-11-08 16:19:01 ahollosi Exp $ PhpWiki distinguishes between four 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 editing references (default: editlinks.html) This template is used when users edit references of a page by clicking on the EditLinks link on the EditText page. - 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. ###ALLOWEDPROTOCOLS### Protocols allowed for external links and references. Default: http|https|mailto|ftp|news|gopher 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: COPY If page has a copy in the archive. Usually used to display/omit the EditCopy link in the editpage template. ADMIN If the current user is an admin. Used in e.g. browse template to display admin buttons at the top. LOCK If current page is locked and thus cannot be edited. 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. Only for EditLinks: ###1###, ###2###, .... Placeholder for references. Up to NUM_LINKS placeholders will be substituted. NUM_LINKS is defined in lib/config.php Examples: the entry (default) page the current page the FindPage page PhpWiki Page: ###PAGE### See the default templates for more examples.