-
Notifications
You must be signed in to change notification settings - Fork 27
/
README.txt
199 lines (130 loc) · 5.07 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
W2: Simple web notes
====================
<http://code.google.com/p/w2wiki/>
Copyright (C) 2007-2009 Steven Frank <http://stevenf.com/> and
contributors
Written with Coda: <http://panic.com/coda/>
Design Goals
------------
1. Extremely compact (only a few PHP files and a CSS file)
2. Minimal execution time, for quickest possible mobile access (iPhone!)
3. Very simple, easy-to-read code
4. Elegant markup syntax for notes, with linking and image support
5. Easily customizable appearance via CSS
6. Storage as plain text files (no database required)
7. Generates clean XHTML output in most cases
Installation
------------
1. Create a directory for W2 somewhere in your web server's document
root path. It doesn't matter where. W2 requires PHP 4 or higher.
2. Upload the W2 files to this directory. When you're done, it should
look something like this:
w2/
config.php
images/
index.css
index.php
markdown.php
pages/
Home.txt
Markdown Syntax.txt
README.txt
3. Make sure that the "images" and "pages" directories are writable by your
web server process.
4. You may or may not need to edit config.php. When you're ready, look in
there for many additional configuration options.
You should now be ready to access your W2 installation.
Basic Usage
-----------
While viewing a page:
[Edit] edits the current page content.
[New] creates a brand new page for you to edit.
[Upload] allows you to upload an image to the images/ directory for later
use with the {{image}} tag. (see "Editing Syntax" below for more info)
[All] shows you a list of all pages.
[Recent] shows you a list of pages, most recently edited first.
[Home] returns you to the Home page.
The search box performs a very simple brute-force search of the contents
of all pages.
Editing Syntax
--------------
Please refer to the Markdown Syntax:
<http://daringfireball.net/projects/markdown/syntax>
Two additional syntax features have been added:
[[Page Name]]
Double square brackets will insert a link to the named page.
{{ImageName.jpg}}
Double curly brackets will insert the named image from the
images/ directory.
Optional Configuration
----------------------
The file config.php contains many options for you to customize your W2 setup.
A few examples:
The following line in config.php may be changed if you do not want the
default page to be named 'Home':
define('DEFAULT_PAGE', 'Home');
The following line in config.php may be changed if you'd like to use a
different CSS stylesheet:
define('CSS_FILE', 'index.css');
The size of the edit textarea is controlled by:
define('EDIT_ROWS', 18);
W2 has the ability to prompt for a password before allowing access to the
site. Two lines in config.php control this:
define('REQUIRE_PASSWORD', false);
define('W2_PASSWORD', 'secret');
Set REQUIRE_PASSWORD to true and set W2_PASSWORD to the password you'd like
to use.
License
-------
You may re-use the source code to W2 for any purpose, as long as you retain
the copyright information from the beginning of this file. Markdown and PHP
Markdown have their own license terms, which must also be observed. You may
not use the names "W2" or "Steven Frank" to endorse or promote your product
without written permission from Steven Frank.
Absolutely no warranty is provided.
Reporting Bugs
--------------
Please send bug reports and feature requests to:
Acknowledgements
----------------
PHP Markdown
Copyright (c) 2004-2007 Michel Fortin
<http://www.michelf.com/projects/php-markdown/>
Original Markdown
Copyright (c) 2004-2006 John Gruber
<http://daringfireball.net/projects/markdown/>
Other Contributions
Craig Hockenberry
Dan Sandler
pcdinh
Victor Rehorst ([email protected])
Abhi Beckert
And others! Thank you!
History
-------
1.1 (May 2008)
- Support for web servers that run PHP as a CGI, rather than a module
- Various other improvements
1.0.2 (September 5, 2007)
- 'All Pages' can now be sorted by title or last modified date (vrehorst)
- Added list of valid upload MIME types and file extensions (abhibeckert)
- Added config settings to change textarea size (vrehorst)
- Added page timestamp display support (vrehorst)
- Added simple authentication mechanism (stevenf, vrehorst)
1.0.1 (July 16, 2007)
- Added style selectors to toolbar links for easier styling
- Added support for "cruftless URLs" (index.php/MyPage instead
of index.php?page=MyPage)
- Separated configuration options into their own file for
easier updating of the main code
- Added implementation of file_put_contents() for PHP 4
- Added cache-overriding and improved viewport headers for
better iPhone support
- Added configuration variable for selecting a different CSS file
- Streamlined sanitize() function and renamed to sanitizeFilename()
to better indicate its purpose
- Upload link now hides if uploading is disabled
- Possibly other small things I forgot about!
1.0 (July 13, 2007)
- Initial release!