1 $Id: README,v 1.3 2000-11-08 16:19:01 ahollosi Exp $
3 PhpWiki distinguishes between four different templates:
5 - template for browsing pages (default: browse.html)
6 This template is used when viewing Wiki pages.
8 - template for editing pages (default: editpage.html)
9 This template is used when users edit a page by clicking on
12 - template for editing references (default: editlinks.html)
13 This template is used when users edit references of a page
14 by clicking on the EditLinks link on the EditText page.
16 - template for plain messages from PhpWiki (default: message.html)
17 This template is used when displaying search results, or when
18 displaying error messages.
21 The location of the template files is defined in lib/config.php
22 The specification is relative to the index.php script.
24 Template files are regular HTML files, which contain special
25 placeholders. Placeholders are surrounded by '###'.
26 You must not use '###' for other purposes.
29 Following placeholders are provided by PhpWiki:
32 This is the URL of the main PhpWiki script.
33 All URL's referring to the Wiki itself should use this placeholder.
36 The page title. Any special HTML characters are replaced by their
37 entities. Do not use this placeholder in links. Use ###PAGEURL###
41 The actual page content. This is either the Wikipage itself,
42 the search result, or a message text.
44 ###ALLOWEDPROTOCOLS###
45 Protocols allowed for external links and references.
46 Default: http|https|mailto|ftp|news|gopher
49 Conditional placeholders:
51 Placeholders that test a condition and depending on it include/omit
52 certain HTML. These placeholders may be nested. The general syntax
57 If condition 'xxx' is false, this line is omitted.
59 If condition 'xxx' is true, this line is omitted.
61 ###IF:xxx### .... ###ENDIF:xxx###
62 If condition 'xxx' is false, then everything between the start
63 and end placeholder is omitted.
64 ###IF:!xxx### .... ###ENDIF:!xxx###
65 If condition 'xxx' is true, then everything between the start
66 and end placeholder is omitted.
70 COPY If page has a copy in the archive. Usually used to display/omit
71 the EditCopy link in the editpage template.
73 ADMIN If the current user is an admin. Used in e.g. browse template
74 to display admin buttons at the top.
76 LOCK If current page is locked and thus cannot be edited.
78 For examples see browse.html and editpage.html
82 The following placeholders are not available for the 'MESSAGE' template:
85 Page title encoded for use in URLs.
88 Date when the page was last modified.
91 Author of latest modification. Usually this is the hostname or
95 Revision number of the page.
96 Note: this is also used for detecting concurrent updates to a page.
97 See hidden input field in EDITPAGE template for how to use it.
102 ###1###, ###2###, ....
103 Placeholder for references. Up to NUM_LINKS placeholders will be
104 substituted. NUM_LINKS is defined in lib/config.php
110 <A HREF="###SCRIPTURL###">the entry (default) page</A>
111 <A HREF="###SCRIPTURL###?###PAGEURL###">the current page</A>
112 <A HREF="###SCRIPTURL###?FindPage">the FindPage page</A>
113 <head><title>PhpWiki Page: ###PAGE###</title></head>
115 See the default templates for more examples.