Extension:BookManager
|
Book Manager Release status: unstable |
|||
|---|---|---|---|
| Implementation | Parser extension, User interface | ||
| Description | Tools for books | ||
| Author(s) | Raylton P. Sousa and Helder.wiki | ||
| Last version | 0.1.x | ||
| MediaWiki | 1.18+ | ||
| License | GPL v3 or Any OSI approved license | ||
| Download | |||
|
|||
| Check usage and version matrix | |||
| Bugs: list open list all report | |||
This extension adds automatic navigation through the pages of a book from its list of pages. In future implementations it should be possible to generate this list automatically (by the prefix), and organize from a special page.
Contents |
Installation [edit]
- Download a snapshot and extract it to your extensions directory. Choose the version that matches your version of MediaWiki.
- Add
to the bottom of LocalSettings.php.require_once( "$IP/extensions/BookManager/BookManager.php" );
- Installation can now be verified through Special:Version of your wiki.
Download from svn [edit]
You can also use the following command in your extensions folder:
# svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/BookManager/
Configuration [edit]
MediaWiki messages [edit]
| Parameter | Default | Explanation |
|---|---|---|
$wgBookManagerPrefixNamespace[1] |
NS_PROJECT |
This variable defines the namespace name which will be used to store the list of chapters of each book (if MediaWiki:coll-community_book_prefix is left blank). Its value is combined with the text of MediaWiki:coll-collections to define the common prefix used for all lists.
Example: If |
$wgBookManagerNavBar |
true | Indicates whether the navigation bar should be added to the chapters of a book or not |
$wgBookManagerNamespaces |
array( NS_MAIN )[2] |
An array of namespaces where the navigation bar can be displayed |
$wgBookManagerVariables |
true | Indicates whether the extension should provide additional #variables for the users |
MediaWiki messages [edit]
| Message | Default | Explanation |
|---|---|---|
| MediaWiki:coll-collections[1] | empty | These messages[3] are used in conjunction with $wgBookManagerPrefixNamespace to determine the common prefix used for all chapter lists. The prefix can be either:
|
| MediaWiki:coll-community_book_prefix[1] | empty |
Usage [edit]
The first step is to create the list of chapters which belongs to a book.
List of chapters [edit]
The syntax and the page used to keep the list are the same used by Extension:Collection (see also Collection Help on Wikibooks):
:[[Book name/chapter name|chapter name]] :[[Book name/another chapter name|another chapter name]] :...
Once the list is created, the extension will provide you some features for your book:
[edit]
It will be possible to navigate through the pages of the book with a navigation bar like the following, which can be customized using CSS or editing the the MediaWiki messages where they are defined:
Variables [edit]
The extension also provides some variables, which can be used along the book chapters:
| Variable | Description |
|---|---|
{{PREVPAGENAME}} |
get the name of previous chapter page from chapter's list |
{{PREVPAGENAMEE}} |
get the encoded name of previous page from chapter's list |
{{NEXTPAGENAME}} |
get the name of next page from chapter's list |
{{NEXTPAGENAMEE}} |
get the encoded name of next page from chapter's list |
{{ROOTPAGENAME}} |
get the name of root page |
{{ROOTPAGENAMEE}} |
get the encoded name of root page |
{{CHAPTERNAME}} |
get the name of current chapter |
{{CHAPTERNAMEE}} |
get encoded name of current chapter |
{{RANDOMCHAPTER}}[4] |
get the name of a random chapter from chapter's list |
{{RANDOMCHAPTERE}}[4] |
get encoded name of a random chapter from chapter's list (it is a random value unlike {{RANDOMCHAPTER}}) |
Automatic print version [edit]
The page Special:PrintVersion of your wiki can be used to get a print version of a book, with all its pages into one only page. If you have a book called "Introduction to Sociology", you can go to
- Special:PrintVersion/Introduction to Sociology
which accepts the url parameter printable=yes to show the page in a form that is suitable for printing. The book name can also be provided by the url parameter book, as in
- http://www.mediawiki.org/wiki/Special:PrintVersion?book=Introduction to Sociology
Future improvements [edit]
- Navigation through categories
- TODO: add better description of this...
- Special pages
- Automatic generation of list of chapters
- Like Special:Book from Extension:Collection? or
- Like Special:Tableofcontents/Book from Bug 15073?
- Automatic generation of list of chapters
- Bug Tracker:
- Current BookManager issues on bugzilla
- Lisf ot current issues
- TODO: Move remaining bugs to bugzilla, as a bloker for bugzilla:28011
Notes [edit]
- ↑ 1.0 1.1 1.2 This component will be obsolete when it was implemented the navigation through categories
- ↑ This should defaults to
$wgContentNamespacesinstead ofarray( NS_MAIN )(Bug 30994) - ↑ In future versions, these messages should be renamed to avoid conflicts with Extension:Collection, and should default to the same value used by that extension (Bug 30995)
- ↑ 4.0 4.1 the magic word will be replaced by a special page(Bug 31003)
See also [edit]
- Unstable extensions
- Parser extensions
- User interface extensions
- Extensions in Wikimedia version control
- BeforePageDisplay extensions
- MagicWordwgVariableIDs extensions
- BaseTemplateToolbox extensions
- ParserAfterTidy extensions
- ParserFirstCallInit extensions
- ParserGetVariableValueSwitch extensions
- All extensions