=== Indizar === Contributors: sebaxtian Tags: chapters Requires at least: 2.4 Tested up to: 2.8.5 Stable tag: 0.6 A plugin to index posts and pages using chapters. == Description == The _nextpage_ tag in Wordpress gives a simple indexing system, but sometimes we need a better solution. Indizar creates chapters with titles and gives a function to retrieve those names. Also it has a tool to put an index whereas the user wants in the post, or a tag to define a default configuration for the boxes. To add a chapter use [chapter:Title] at the beginning of the chapter. The title would be write as a _header_, and you can define the apparance with the CSS file. The first chapter would have the name of the post, and wouldn't be shown at the beggining of the content. The first occurrence of [chapter: ****] would be the second item in the chapters list. If you need another name for the first chapter you can use [firstchapter:Title] to create a header. It doesn't have to be at the beginning of the page. With this you can have an introduction and the first chapter in the same page. To add the index use [chapters:size,left|right] where size is the width of the context box, left | right is the float position for the box. Those values are optional and you can use just [chapters]. The index box is hidden in the index and search pages, it will be shown in each 'single page'. Use the configuration tag instead this if you want to show a box in every page at the same place. To add a global configuration use [indizar:#conf,#box\_size,[left|right|none],{preface\_title}], where the #conf is 0) to not show a numbered list, 1) to show it at the begin of the post, 2) to show it at the end, and 3) tho show it both sides. The size box and the float position declares the general behavior. If the float value is ´right´ or ´left´ the plugin creates a box after every chapter title in the post, if it is ´none´ the plugin will let you define the chapters box manually with the tag [chapters]. If there is a [chapters] tag in a page the plugin will use this position instead the one declared in the ´configuration´ tag. The ´preface\_title´ is optional and if declared the first chapter would be numbered as __0__ and the text you use will be the title in the numbered list. Why use a preface? Maybe the first chapter of your post is really the second page, and when you look at the URL the fisrt chapter is named ´post/chapter/2´. This sets correctly the url to show your first chapter as ´post/chapter/1´. There is a button in the RichText Editor to add __chapters__, __chapters box__ and the __configuration__ tag to your post. If you want Indizar to have a default configuration you can declare it in your __wp-config__ file. This is my personal configuration, modify it as you require it. * define("INDIZAR\_TOP", false); * define("INDIZAR\_BOTTOM", true); * define("INDIZAR\_BOX", true); * define("INDIZAR\_BOX\_SIZE", 200); * define("INDIZAR\_BOX\_FLOAT", "right"); * define("INDIZAR\_USE\_PREFACE", false); * define("INDIZAR\_PREFACE\_TITLE", "Prefacio"); To get the list of chapters use chap\_list(). This function returns the array with the chapters, or false if there are no chapters. It __has__ to be used after the function the\_post(). I use it in single.php in my personal theme. Screenshots are in spanish because it's my native language. As you should know yet I __spe'k__ english, and the plugin use it by default. == Installation == 1. Decompress indizar.zip and upload `/indizar/` to the `/wp-content/plugins/` directory. 2. Activate the plugin through the __Plugins__ menu in WordPress 3. If you are using permalinks, go to Options -> Permalinks and __Save Changes__. This would recreate your permalinks cache with the __chapter__ tag. 4. You can use indizar.css to create your own style. 5. If you want a default configuration define it in your __wp-config.php__ file. == Frequently Asked Questions == = Is this plugin bug free? = I don't think so. So far it works with my permalinks, but I didn't test it with other configurations. Feedbacks would be appreciated. = Permalinks doesn't work!!!!!! = Did you __recreate__ permalinks rules? Go to Options -> Permalinks and __Save Changes__. = Can I set my own CSS? = Yes. Copy the file indizar.css to your theme folder. The plugin will check for it. == Screenshots == 1. Add one chapter 2. Add an index box 3. Configuration tag 4. Editor example using the ´chapters´ tag 5. First chapter example 6. Editor example using the ´configuration´ tag 7. Last chapter example using 'configuration' tag, see the top numbered list == Changelog == = 0.6 = * Stable release = 0.5.4 = * Solved a bug with multiple blog posts (patch by Christian) = 0.5.3.1 = * The code has been indented, documented and standardised. * Enhaced the tinyMCE editor usability in the chapter tag. * Solved a bug when tinyMCE editor in full window. = 0.5.3 = * Now you can set your own css file (see FAQ). = 0.5.2 = * Now Indizar can be used in pages. Remember to recreate the permalinks (see the FAQ). * Added i18n for Polish = 0.5.1 = * Defined special variables to use in wp-config and set a default behavior. * Added i18n for Russian = 0.5 = * First version using a special tag to configure the behavior of indizar in a post.