1 $Id: README,v 1.1 2002-01-17 20:57:41 dairiki Exp $
3 PhpWiki distinguishes between three 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 plain messages from PhpWiki (default: message.html)
13 This template is used when displaying search results, or when
14 displaying error messages.
17 The location of the template files is defined in lib/config.php
18 The specification is relative to the index.php script.
22 Tue Sep 18 12:00:12 PDT 2001 Jeff Dairiki <dairiki@dairiki.org>
24 The rest of this file is currently obsolete, and should be ignored.
25 The template situation is in a state of flux, and will probably be
26 changed again very soon. See lib/Template.php for more, but mostly
27 just "stay tuned" for details.
31 Template files are regular HTML files, which contain special
32 placeholders. Placeholders are surrounded by '###'.
33 You must not use '###' for other purposes.
36 Following placeholders are provided by PhpWiki:
39 This is the URL of the main PhpWiki script.
40 All URL's referring to the Wiki itself should use this placeholder.
43 The page title. Any special HTML characters are replaced by their
44 entities. Do not use this placeholder in links. Use ###PAGEURL###
48 The actual page content. This is either the Wikipage itself,
49 the search result, or a message text.
52 The userid of the current users. For non-authenticated users,
53 the userid is the host name or IP number of the user.
56 URL of the phpwiki logo image.
59 The RCS ids of the php source files which contributed to the current
63 The URL to use to browse the current page.
66 The leading part of the URL for performing an action on the current page.
67 Eg. <a href="###ACTION###edit">Edit this page</a>.
70 The leading part of the URL for browsing to another page.
71 Eg. <a href="###BROWSE###FindPage">Edit this page</a>.
74 The base URL for the current page.
76 Conditional placeholders:
78 Placeholders that test a condition and depending on it include/omit
79 certain HTML. These placeholders may be nested. The general syntax
84 If condition 'xxx' is false, this line is omitted.
86 If condition 'xxx' is true, this line is omitted.
88 ###IF:xxx### .... ###ENDIF:xxx###
89 If condition 'xxx' is false, then everything between the start
90 and end placeholder is omitted.
91 ###IF:!xxx### .... ###ENDIF:!xxx###
92 If condition 'xxx' is true, then everything between the start
93 and end placeholder is omitted.
97 ADMIN If the current user is an admin. Used in e.g. browse template
98 to display admin buttons at the top.
101 If the current user is not authenticated.
103 COPY If page has a copy in the archive. Usually used to display/omit
104 the EditCopy link in the editpage template.
106 LOCK If current page is locked and thus cannot be edited.
109 If the current user is the same as the last editor of this
110 page, this will contain the complete HTML for a checkbox,
111 which, when checked will prevent a backup copy from being made.
113 If the current user is different than the last editor,
114 MINOR_EDIT_CHECKBOX will be blank.
116 For examples see browse.html and editpage.html
120 The following placeholders are not available for the 'MESSAGE' template:
123 Page title encoded for use in URLs.
126 Date when the page was last modified.
129 Author of latest modification. Usually this is the hostname or
133 Revision number of the page.
134 Note: this is also used for detecting concurrent updates to a page.
135 See hidden input field in EDITPAGE template for how to use it.
138 The hit count of the current page.
141 The related pages list for the current page.
145 <A HREF="###BROWSE###HomePage">the entry (default) page</A>
146 <A HREF="###BROWSE_PAGE###">the current page</A>
147 <A HREF="###BROWSE###FindPage">the FindPage page</A>
148 <head><title>PhpWiki Page: ###PAGE###</title></head>
150 See the default templates for more examples.