User:Whiteknight/Book Designer Gadget
Enter the title of the new book to create in the textbox. Click Show and enter the pages used by the new book, in order, one per line. Click Design to design your new book.
- 1 How To Install
- 2 About This Gadget
- 3 To Do
- 4 Version History
How To Install
This script is a Gadget. You can install this script by going to Special:Preferences, going to the "Gadgets" tab, and checking the box labeled Whiteknight's Book Creator.
|Works||Works||Works||Works||Partial||Not Tested||Not Tested|
About This Gadget
This gadget helps in the initial stages of designing a book. You type in the title of the book and you list the pages that will appear in the book's TOC. When you click "Design", the gadget will automatically create the wikitext code for your new book TOC.
To list the pages that are going to be in your new book, click the "Show" button to display the page list window. List the pages that you want to be in your book, one per line. At any time you may press the "Hide" button to hide the page list window, but preserve it's contents. Pressing the "Clear" button will completely remove all pages listed in the window.
Grouping Pages into Sections
To create a section sub-heading in your TOC, type an equal sign (=), followed by the title of the section. For instance, typing the following code:
A =B C D =E
Will produce the following result:
[[My Book/A|A]] === B === [[My Book/C|C]] [[My Book/D|D]] === E ===
Specifying a Preface
To provide a preface for your new book, click "Show" to display the page list edit window. Once the window is open, type a percent sign(%), followed by the text of the preface. Each line specified in this manner will be separated in the preface by two newlines, making it a new paragraph.
Standard templates can be added using the "+" syntax. Prerequisite templates can be added using "&".
You can automatically add your book to certain subjects using "-".
Designing the Book
When you have specified the book name, the page list, and the preface, you may click the "Design" button. The design process generated the wikitext necessary to produce your new book, but does not automatically save it nor display it.
To view the text, along with a series of notes about how to implement it, click the "Display" button. This will show the generated wikitext on the left, and show helpful notes on the right.
To create the new book, click the "Edit" button. This will display a standard edit window where the generated wikitext is already loaded. Modify the text as necessary, and click "Save page". This will create your new book. Note: If you have the categorization extension installed, in the edit window there will appear a drop-down box for categorization. Select the appropriate subject from the drop-down box and click "Categorize" to apply the necessary templates to your book. Once these templates have been properly added, click "Save page" as usual.
The Book Designer Gadget can also be used to design a page-header template, for use on every page in the book. A page header template helps to standardize the "look and feel" of all the pages in the book, along with providing navigation links, and placing book pages into the appropriate categories. The gadget uses pre-made header template from Whiteknight's Book Foundry. There are several options, and the documentation for all templates is available on the respective template pages.
Once you have entered a valid book name and clicked the "Design" button, you are given the option to design a template. Select the appropriate template from the drop-down list, and click the "Template" button. This will display the text of the template, along with some helpful tips. You cannot directly edit or save the template text using the Book Designer Gadget.
Once you have created the template, make sure you include it at the top of every page in your new book, including the TOC.
Saving an Outline
If you are working on an outline, you can save it and continue working on it later. Enter a valid title in the book title box, click Show to show the list box, and click Save. This will display an edit window that will enable you to save your outline into a subpage of your user namespace. For instance, if you are User:JoeUser, and you enter a title "My Book", the outline will be saved at "User:JoeUser/My Book".
When you save an outline, the outline is time-stamped and appended to the bottom of the page. This means that you can save multiple versions of the outline to a single page, and select later which one to use.
Loading an Outline
You can load an outline from another wiki page, such as an outline that has been saved previously by the Book Designer Gadget, or another outline that was created manually. To load an existing outline, click Show to display the list box. Enter the name of the page into the input box in the lower-left corner, and click Load. This will load the complete current wikitext of that page into the list box.
If the page you are loading has multiple saved outlines on it, you will need to delete any outlines that you are not planning to use.
To help remove excess formatting, click the Strip button. This will remove some, but not all formatting from the page. You may still need to remove some formatting manually.
You can leave comments in your outline using two forward slashes:
//this is a comment.
Text in a comment will not appear in your book or in your navigational template. However, comments will be included if you save your outline. This can be useful for making notes to yourself for when you come back to finish the outline.
This version of the gadget is no longer under active development. A new version is being created at User:Whiteknight/Visual Book Designer.
- 2.20 Added rudimentary support for sub-pages and tree-like visualizations. In the future, the entire interface will be based on this visualization interface.
- 2.14 Small upgrades to save functionality.
- 2.13 Updated to core 2.45, more efficient edit window handling.
- 2.12 Improved IE support.
- 2.11 Updated for partial IE support. AJAX routines generally do not work.
- 2.10 Added Tags and Prerequisite tags options, subject options.
- 2.01 Added experimental "Automate" function. uses AJAX page edits to automatically create necessary pages and templates. At the moment, Only I can use this function.
- 2.00 Complete rewrite using new gadgetscore 2.0
- 1.85 Removed "List" button, updated categorization templates, added new book template.
- 1.82 Added labels for text fields
- 1.81 Added // comments.
- 1.80 Added ability to save an outline using "Save".
- 1.76 Added links to /Introduction, /Resources, and /Licensing in template.
- 1.75 Fixed XML translation thing
- 1.74 minor change to template categorization
- 1.73 Updated categorization mechanisms
- 1.72 updated to include gadgetscore framework
- 1.71 Added "Edit Template" button, slight refactor of template mechanism
- 1.70 Major changes. Refactor of several parts. Added "Strip" and "Load" buttons. Added "loading..." status messages for Ajax functions. added error messages on functions requiring bookname. fixed title caps to omit short words.
- 1.62 Forced book title to title caps, fixed issue with global variables, added links to "/Resources" and "/Licensing"
- 1.61 Added ability to specify sub-headings in the TOC using the "=" symbol
- 1.60 rearranged the interface, expanded "template" to show a list of possible templates
- 1.51 Added ability to specify preface in the page list, added documentation
- 1.50 refactored several parts, corrected errors, added "List" button.
- 1.21 Added conditional support for the categorize.js script
- 1.20 Added more descriptive status message for "Design" button, added automatic edit summary for "Edit"
- 1.11 Added an instructive status message to the Template function
- 1.10 Added rudimentary ability to design a page list navigational template with the "Template" button
- 1.00 First stable version, added edit box functionality.
- 0.23 Disabled "display" button when no text is available.
- 0.22 Fixed issues with trailing whitespace
- 0.21 Removed links from display, created "pages to create" sidebar, fixed some functionality
- 0.20 Some functional changes, code refactoring, addition of links in display text.
- 0.10 First test version uploaded