Skip to content
Newer
Older
100644 489 lines (446 sloc) 16.2 KB
adc5ebe @Whiteknight initial commit, add files to repo
authored
1 <?php
2 class BookDesigner extends SpecialPage {
3 function __construct() {
4601e4e @Whiteknight Add a 'bookbuilder' permission, and require people editing the outlin…
authored
4 parent::__construct('BookDesigner', 'autoconfirmed');
adc5ebe @Whiteknight initial commit, add files to repo
authored
5 wfLoadExtensionMessages('BookDesigner');
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
6 $this->options = new BookDesignerOptions();
adc5ebe @Whiteknight initial commit, add files to repo
authored
7 }
8
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
9 # set this to true to enable debugging output.
54753f2 @Whiteknight cleanup. Remove old TODO notes. fix a bug in the create leaf pages fu…
authored
10 protected $debug = false;
adc5ebe @Whiteknight initial commit, add files to repo
authored
11
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
12 # Internal values. Don't modify them, they get set at runtime
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
13 protected $options;
4601e4e @Whiteknight Add a 'bookbuilder' permission, and require people editing the outlin…
authored
14 protected $validuser = false;
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
15 protected $namespace = "";
54753f2 @Whiteknight cleanup. Remove old TODO notes. fix a bug in the create leaf pages fu…
authored
16 protected $bookname = "";
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
17
18 function bookName($set = null) {
19 if ($set != null)
20 $this->bookname = $set;
21 return $this->bookname;
22 }
23
24 function bookNamespace($set = null) {
25 if ($set != null)
26 $this->namespace = $set . ":";
27 return $this->namespace;
28 }
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
29
4601e4e @Whiteknight Add a 'bookbuilder' permission, and require people editing the outlin…
authored
30 function validateUser()
31 {
32 global $wgUser;
33 if (!$this->userCanExecute($wgUser)) {
34 $this->displayRestrictionError();
35 return false;
36 }
37 $this->validuser = $wgUser->isAllowed('buildbook');
38 return $this->validuser;
39 }
40
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
41 # Quick and dirty debugging utilities. The value of $this->debug determines
42 # whether we print something. These functions can probably disappear soon
43 # since the parseBookPage parser routine has been mostly tested.
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
44 function _dbg($word) {
adc5ebe @Whiteknight initial commit, add files to repo
authored
45 global $wgOut;
46 if($this->debug)
47 $wgOut->addHTML($word);
48 }
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
49 function _dbgl($word) {
adc5ebe @Whiteknight initial commit, add files to repo
authored
50 $this->_dbg($word . "<br/>");
51 }
52
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
53 function getCreateFlag($isroot) {
54 $create = $this->options->CreateLeaves() || $isroot;
17b9e7a @Whiteknight cleanup i18n messages. Create some new functions to encapsulate vario…
authored
55 return $create;
56 }
57
54753f2 @Whiteknight cleanup. Remove old TODO notes. fix a bug in the create leaf pages fu…
authored
58 function createOnePage($path, $text) {
17b9e7a @Whiteknight cleanup i18n messages. Create some new functions to encapsulate vario…
authored
59 global $wgOut, $wgScriptPath;
60 $title = Title::newFromText($path);
61 $article = new Article($title);
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
62 $article->doEdit($text, "Creating page for book '{$this->bookname}'. " .
63 "Automated page creation by BookDesigner");
64 return $title;
7af443d @Whiteknight several changes: General cleanup. Add option to autogenerate a header…
authored
65 }
66
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
67 # Returns an EXTREMELY basic text string for creating a header template.
68 # TODO: Make this less bare-bones
be93e66 @Whiteknight implement footer templates
authored
69 # TODO: Add Forward/Back links
70 # TODO: Use a message to set the default, instead of hard-coding it here.
71 function getDefaultHeaderTemplateText($bookname) {
72 $text = <<<EOD
73
74 <div style="border: 1px solid #AAAAAA; background-color: #F8F8F8; padding: 5px; margin: auto; width: 95%">
75 <center>
76 <big>'''[[$bookname]]'''</big>
77 </center>
78 </div>
79
80 EOD;
81 return $text;
82 }
83
84 # TODO: Make this less bare-bones
85 # TODO: Add Forward/Back links
86 # TODO: Use a message to set the default, instead of hard-coding it here.
87 function getDefaultFooterTemplateText($bookname) {
7af443d @Whiteknight several changes: General cleanup. Add option to autogenerate a header…
authored
88 $text = <<<EOD
89
90 <div style="border: 1px solid #AAAAAA; background-color: #F8F8F8; padding: 5px; margin: auto; width: 95%">
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
91 <center>
92 <big>'''[[$bookname]]'''</big>
93 </center>
7af443d @Whiteknight several changes: General cleanup. Add option to autogenerate a header…
authored
94 </div>
95
0e440bb @Whiteknight fix some sloppy errors I added. mikemerten++
authored
96 EOD;
7af443d @Whiteknight several changes: General cleanup. Add option to autogenerate a header…
authored
97 return $text;
98 }
99
92d6526 @Whiteknight initial implementation of proper i18n message handling for the PHP-ba…
authored
100 function GetMessage($msgname) {
101 return wfMsg('bookdesigner-' . $msgname);
102 }
103
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
104 # Main function, this is where execution starts
54753f2 @Whiteknight cleanup. Remove old TODO notes. fix a bug in the create leaf pages fu…
authored
105 function execute($par) {
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
106 # TODO: Validate that we are logged in. Also, create an option to
107 # require certain permissions (either admin, or a custom
108 # permission or something)
109 global $wgRequest, $wgOut;
adc5ebe @Whiteknight initial commit, add files to repo
authored
110 $this->setHeaders();
9745683 @Whiteknight a few major changes: Add options to avoid creating leaf nodes, number…
authored
111 $wgOut->setPageTitle("Book Designer");
4601e4e @Whiteknight Add a 'bookbuilder' permission, and require people editing the outlin…
authored
112
113 if (!$this->validateUser()) {
114 $this->showAuthenticationError();
115 return;
116 }
117
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
118 $this->loadJSAndCSS();
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
119 $this->options->getOptions();
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
120
121 $mode = "outline";
122 $title = null;
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
123
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
124 if(isset($par)) {
125 $parts = explode('/', $par, 2);
126 $mode = $parts[0];
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
127 #$title = $parts[1];
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
128 }
129 if($wgRequest->wasPosted()) {
130 if ($mode == 'verify') {
131 $this->verifyPublishOutline();
132 }
133 else if ($mode == 'publish') {
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
134 $this->_dbgl("publish");
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
135 $this->reallyPublishOutline();
136 }
137 else {
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
138 $this->_dbgl("post error");
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
139 $this->unknownModeError('post', $mode, $title);
140 }
141 }
142 else {
143 # TODO: we've specified a book name, load that book into the outline
144 # $mode == 'outline' creates an empty outline with "title"
145 # $mode == 'preload' attempts to load an existing outline
146 if (!isset($mode) || $mode == "" || $mode == "outline" || $mode == "preload") {
147 $this->displayMainOutline($mode, $title);
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
148 return;
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
149 }
150 else {
151 $this->unknownModeError('show', $mode, $title);
152 }
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
153
154 }
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
155 }
156
4601e4e @Whiteknight Add a 'bookbuilder' permission, and require people editing the outlin…
authored
157 function showauthenticationError() {
158 global $wgOut;
159 $text = <<<EOT
160 <div>
161 <p>
162 <span style='color: darkred; font-weight: bold'>Error:</span>
163 You must be logged in and have 'buildbook' permission to created
164 books using this tool.
165 </p>
166 </div>
167 EOT;
168 $wgOut->addHTML($text);
169 }
170
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
171 function unknownModeError($type, $mode, $title) {
172 global $wgOut;
173 $title_extra = "";
174 if (isset($title)) {
175 $title_extra = "with arguments (" . $title . ")";
176 }
177 $text = <<<EOD
178 <p>
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
179 <span style='color: red; font-weight: bold;'>Error:</span>
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
180 Could not {$type} with mode {$mode} $title_extra
181 </p>
182
183 EOD;
184 $wgOut->addHTML($text);
185 }
186
187 function verifyPublishOutline() {
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
188 global $wgRequest;
189 $text = $wgRequest->getText('VBDHiddenTextArea');
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
190 $parser = new BookDesignerParser($this, $this->options);
191 $parser->parse($text);
be93e66 @Whiteknight implement footer templates
authored
192 # TODO: Instead of hard-coding in a list of pages that can be added,
193 # Allow the site to specify a list of standard pages, and supply
194 # a text template to be used on those pages.
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
195 #if ($this->options->useHeader()) {
196 # $this->addPageToList("Template:" . $this->bookname,
197 # "Template:" . $this->bookname,
198 # $this->getDefaultHeaderTemplateText($this->bookname),
199 # true
200 # );
201 #}
202 #if ($this->options->useFooter()) {
203 # $this->addPageToList("Template:" . $this->bookname . "/Footer",
204 # "Template:" . $this->bookname . "/Footer",
205 # $this->getDefaultFooterTemplateText($this->bookname),
206 # true
207 # );
208 #}
209
210 $pagelist = $parser->getPages();
211 $this->showConfirmationPage($this->bookname, $pagelist);
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
212 }
213
214 function showConfirmationPage($bookname, $pagelist) {
54753f2 @Whiteknight cleanup. Remove old TODO notes. fix a bug in the create leaf pages fu…
authored
215 # TODO: detect if any pages already exist. Link to them if they do, and
216 # bring the issue to the attention of the user
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
217 global $wgOut, $wgScriptPath;
218 $jspath = "$wgScriptPath/extensions/BookDesigner";
219 $wgOut->addScriptFile($jspath . "/designer.js");
220 $this->addCSSFile("designer.css");
221 $i = 0;
222 $text = <<<EOT
223 <form action="{$wgScriptPath}/index.php?title=Special:BookDesigner/publish" method="POST">
224 <div>
225 <h2>
226 Confirm Pages for {$bookname}
227 </h2>
228 <p>
229 Below is a list of pages that will be created in your book. You can
230 select which pages to create, and you can modify the page text. You
231 cannot alter the structure of the book otherwise. Click
232 <b>Publish</b> if everything is ready to publish.
233 </p>
234 </div>
235 EOT;
236 $wgOut->addHTML($text);
237 $numpages = count($pagelist);
238 foreach ($pagelist as &$page) {
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
239 $this->showPageSinglePageConfirmation($i, $page);
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
240 $i++;
241 }
242 $text = <<<EOT
243 <input type="submit" value="Publish" />
244 <a href="$wgScriptPath/index.php?title=Special:BookDesigner">
245 Cancel
246 </a>
247 <input type="hidden" name="VBDTotalPageCount" value="{$numpages}" />
248 <input type="hidden" name="VBDBookName" value="{$this->bookname}" />
249 </form>
250 EOT;
251 $wgOut->addHTML($text);
252 }
253
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
254 function showPageSinglePageConfirmation($idx, $page) {
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
255 global $wgOut;
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
256 $path = $page->fullname();
257 $create = $this->options->createLeaves ? true : $page->children() > 0;
258 $text = $page->text();
259
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
260 $checked = $create ? "checked" : "";
261 $text = <<<EOT
262 <div class="VBDConfirmPageDiv">
263 <input type="hidden" name="path_{$idx}" value="{$path}"/>
264 <input type="checkbox" name="confirm_{$idx}" {$checked}>
265 <span style='font-size: larger; font-weight: bold;'>
266 {$path}
267 </span>
268 </input>
269 [<a id="text_toggle_{$idx}"
270 onclick="vbd.ToggleGUIWidget('text_div_{$idx}', 'text_toggle_{$idx}');"><!--
271 -->{$this->GetMessage('show')}<!--
272 --></a>]
273
274 <div class="VBDPageTextDiv" id="text_div_{$idx}" style="display: none;">
275 <textarea name="text_{$idx}" rows="10">{$text}</textarea>
276 </div>
277 </div>
278 EOT;
279 $wgOut->addHTML($text);
280 }
281
282 function reallyPublishOutline() {
283 global $wgRequest, $wgOut;;
284 $numpages = $wgRequest->getInt('VBDTotalPageCount');
285 $this->bookname = $wgRequest->getText('VBDBookName');
286 $wgOut->addHTML("<ul>");
287 for ($i = 0; $i < $numpages; $i++) {
288 $path = $wgRequest->getText("path_{$i}");
289 $create = $wgRequest->getBool("confirm_{$i}");
290 $text = $wgRequest->getText("text_{$i}");
291 if (!$create) {
292 $this->showPageNotCreatedMessage($path);
293 } else {
294 $title = $this->createOnePage($path, $text);
295 $this->showPageCreatedMessage($path, $title);
296 }
297 }
298 $wgOut->addHTML("</ul>");
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
299 # TODO: Show statistics (number of pages created, total time, etc)
300 # here
301 # TODO: Show an "Oops!" delete/undo link here that goes back over
302 # the list of pages and deletes them all again (if the user
303 # is an admin)
304 }
305
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
306 function showPageNotCreatedMessage($path) {
307 global $wgOut;
308 $text = <<<EOT
309 <div class="VBDCreateIgnored">
310 <p>
311 Did not create $path
312 </p>
313 </div>
314 EOT;
315 $wgOut->addHTML($text);
316 }
317
318 function showPageCreatedMessage($path, $title) {
319 global $wgOut;
320 $url = $title->getFullURL();
321 $text = <<<EOT
322 <div class="VBDCreateSuccess">
323 <p>
324 Created <a href="{$url}">$path</a>
325 </p>
326 </div>
327 EOT;
328 $wgOut->addHTML($text);
329 }
330
331 function loadJSAndCSS() {
332 global $wgScriptPath, $wgOut;
9745683 @Whiteknight a few major changes: Add options to avoid creating leaf nodes, number…
authored
333 $jspath = "$wgScriptPath/extensions/BookDesigner";
57962df @Whiteknight some misc cleanups to the php file
authored
334 $wgOut->addScriptFile($jspath . "/bookpage.js");
335 $wgOut->addScriptFile($jspath . "/pagehead.js");
336 $wgOut->addScriptFile($jspath . "/designer.js");
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
337 $this->addCSSFile("designer.css");
338 }
339
74c893b @Whiteknight share version number between server-side and client-side components. …
authored
340 function getVersion() {
341 global $wg_VBDExtensionVersion;
342 return $wg_VBDExtensionVersion;
343 }
344
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
345 function addCSSFile($file) {
346 global $wgScriptPath, $wgOut;
347 $csspath = "$wgScriptPath/extensions/BookDesigner";
c4ad007 @Whiteknight code cleanup, especially in pagehead.js
authored
348 if(method_exists($wgOut, "addExtensionStyle")) {
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
349 $wgOut->addExtensionStyle($csspath . "/" . $file);
c4ad007 @Whiteknight code cleanup, especially in pagehead.js
authored
350 } else {
55b8299 @Whiteknight cleanups. Mostly whitespace
authored
351 # This is a hack for older MediaWiki (1.14 and below?).
352 # addStyle prepends "$wgScriptPath/skins/" to the front,
353 # so we need to navigate to the correct place
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
354 $wgOut->addStyle("../extensions/BookDesigner/" . $file);
c4ad007 @Whiteknight code cleanup, especially in pagehead.js
authored
355 }
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
356 }
357
358 function displayMainOutline() {
359 global $wgOut, $wgScriptPath;
adc5ebe @Whiteknight initial commit, add files to repo
authored
360
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
361 # TODO: Have a hidden field somewhere that we can hold a list of
362 # pages for pre-populating the outline.
363 $text = <<<EOD
adc5ebe @Whiteknight initial commit, add files to repo
authored
364
db22336 @Whiteknight begin massive refactor. I'm sure everything is broken
authored
365 <form action="{$wgScriptPath}/index.php?title=Special:BookDesigner/verify" method="POST">
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
366 <textarea name="VBDHiddenTextArea" id="VBDHiddenTextArea" style="display: none;">
367 </textarea>
9745683 @Whiteknight a few major changes: Add options to avoid creating leaf nodes, number…
authored
368 <div id="VBDWelcomeSpan">
92d6526 @Whiteknight initial implementation of proper i18n message handling for the PHP-ba…
authored
369 {$this->GetMessage('welcome')}
9745683 @Whiteknight a few major changes: Add options to avoid creating leaf nodes, number…
authored
370 </div>
371 <div id="VBDStatSpan"></div>
c4ad007 @Whiteknight code cleanup, especially in pagehead.js
authored
372 <div id="VBDInstructionSpan">
aa57798 @Whiteknight remove more dead code. Fix toggleable UI panes for consistency. Bump …
authored
373 <h2>
374 <span style="float: right; font-size: 67%;">
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
375 [<a id="VBDQuickStartToggle"
376 onclick="vbd.ToggleGUIWidget('VBDQuickStartInternal', 'VBDQuickStartToggle');"><!--
aa57798 @Whiteknight remove more dead code. Fix toggleable UI panes for consistency. Bump …
authored
377 -->{$this->GetMessage('hide')}<!--
378 --></a>]
379 </span>
380 {$this->GetMessage('qsistart')}
381 </h2>
382 <div id="VBDQuickStartInternal">
383 {$this->GetMessage('qsi')}
384 </div>
9745683 @Whiteknight a few major changes: Add options to avoid creating leaf nodes, number…
authored
385 </div>
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
386 {$this->getOptionsWidget()}
74c893b @Whiteknight share version number between server-side and client-side components. …
authored
387 <input type="hidden" id="VBDVersion" value="{$this->getVersion()}"/>
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
388 <div id="VBDOutlineSpan">
389 {$this->GetMessage('jserror')}
390 </div>
391 <!-- TODO: Add another button here to "save" an incomplete outline to a page
392 somewhere in userspace, and maybe a button somewhere to "load" an
393 existing outline. -->
394 <input type="submit" value="{$this->GetMessage('publishbutton')}" /><br>
395 <!-- TODO: This is a temporary addition to aid in debugging. It shows the
396 intermediate code before it's transmitted to the server. This way if
397 there is some kind of a server error, we can save a copy of that
398 intermediate code to a safe place so when we are making a huge outline
399 we don't lose all that work. No i18n for debug stuff.
400 -->
401 <small>
402 <a href="#" onclick="document.getElementById('VBDHiddenTextArea').style.display = 'block';">
403 Show Intermediate Code
404 </a>
405 </small>
406 </form>
407
408 EOD;
409 $wgOut->addHTML($text);
410 }
411
412 function getOptionsWidget() {
413 $text = <<<EOD
414 <div id="VBDOptionsSpan">
17b8da7 @Whiteknight make the options box toggleable with JS magic. Start some code cleanu…
authored
415 <h2>
416 <span style="float: right; font-size: 67%;">
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
417 [<a id="VBDOptionsToggle"
418 onclick="vbd.ToggleGUIWidget('VBDOptionsInternal', 'VBDOptionsToggle');"><!--
aa57798 @Whiteknight remove more dead code. Fix toggleable UI panes for consistency. Bump …
authored
419 -->{$this->GetMessage('show')}<!--
420 --></a>]
17b8da7 @Whiteknight make the options box toggleable with JS magic. Start some code cleanu…
authored
421 </span>
92d6526 @Whiteknight initial implementation of proper i18n message handling for the PHP-ba…
authored
422 {$this->GetMessage('options')}
17b8da7 @Whiteknight make the options box toggleable with JS magic. Start some code cleanu…
authored
423 </h2>
424 <div id="VBDOptionsInternal" style="display: none;">
92d6526 @Whiteknight initial implementation of proper i18n message handling for the PHP-ba…
authored
425 <b>{$this->GetMessage('optsbook')}</b><br>
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
426 <input type="checkbox" name="optUseNamespace" disabled>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
427 {$this->GetMessage('optusenamespace')}:
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
428 </input>
429 <br>
430 <input type="text" style="margin-left: 6em;" name="optNamespace"
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
431 value="{$this->namespace}" disabled>
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
432 <br>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
433 <input type="checkbox" name="optUseUserSpace" disabled>
434 {$this->GetMessage('optuseuserspace')}
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
435 </input>
436 <br>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
437 <b>
438 {$this->GetMessage('optspage')}
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
439 </b>
440 <br>
441 <input type="checkbox" name="optCreateLeaves"
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
442 {$this->options->createLeaves(true)}>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
443 {$this->GetMessage('optcreateleaf')}
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
444 </input>
445 <br>
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
446 <input type="checkbox" name="optNumberPages" disabled>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
447 {$this->GetMessage('optnumberpages')}
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
448 </input>
449 <br>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
450 <b>
451 {$this->GetMessage('optstemplate')}
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
452 </b>
453 <br>
454 <input type="checkbox" name="optHeaderTemplate"
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
455 {$this->options->useHeader(true)}>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
456 {$this->GetMessage('optheadertemplate')}
457 </input>
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
458 <br>
79d0308 @Whiteknight We don't autogenerate templates anymore, so remove those options. Tem…
authored
459 <input type="checkbox" name="optFooterTemplate"
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
460 {$this->options->useFooter(true)}>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
461 {$this->GetMessage('optfootertemplate')}
462 </input>
79d0308 @Whiteknight We don't autogenerate templates anymore, so remove those options. Tem…
authored
463 <br>
464 <b>
465 Formatting Options
466 </b>
467 <br>
468 Chapter Links:
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
469 <input type="text" name="optChapterLinks"
470 value="{$this->options->chapterLinkTemplate()}" disabled/>
79d0308 @Whiteknight We don't autogenerate templates anymore, so remove those options. Tem…
authored
471 <br>
472 Page Links:
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
473 <input type="text" name="optPageLinks"
474 value="{$this->options->pageLinkTemplate()}"/>
79d0308 @Whiteknight We don't autogenerate templates anymore, so remove those options. Tem…
authored
475 <br>
476 Headers:
bd33ef7 @Whiteknight begin another refactor, break the code inot smaller classes and files
authored
477 <input type="text" name="optHeaderStyle"
478 value="{$this->options->sectionHeaderTemplate()}"/>
79d0308 @Whiteknight We don't autogenerate templates anymore, so remove those options. Tem…
authored
479 <br>
c65c926 @Whiteknight break up long lines, especially in comments. Reformat some of the inl…
authored
480 <!-- TODO: Add a <select> item here with a list of auto-generate
481 template styles -->
17b8da7 @Whiteknight make the options box toggleable with JS magic. Start some code cleanu…
authored
482 </div>
9745683 @Whiteknight a few major changes: Add options to avoid creating leaf nodes, number…
authored
483 </div>
adc5ebe @Whiteknight initial commit, add files to repo
authored
484 EOD;
31cbfce @Whiteknight Implement saving pages, and add some color to the results screen. Thi…
authored
485 return $text;
adc5ebe @Whiteknight initial commit, add files to repo
authored
486 }
487 }
488
Something went wrong with that request. Please try again.