=== WordPress Navigation Tool (NAVT) === Contributors: gbellucci, et_ux Donate link: http://www.gbellucci.us/ Tags: menu, navigation, lists, pages, categories, links, navbar, widget, dropdown, users, authors, hierarchy, avatars, graphic links Requires at least: 2.2 Tested up to: 2.3.2 Stable tag: 95.47.2 Create, organize and manage your WordPress menus and navigation lists by logically grouping your pages, categories, users via a drag'n drop interface. == Description == = About the Plugin = The __WordPress Navigation Tool (NAVT)__ plugin is designed to provide you with complete control over the contents of your navigation links. The plugin gives you the ability to create unique navigation lists using a Drag 'n Drop Interface; arrange the navigation items within a list in any arbitrary order. Navigation lists can be composed of any combination of pages, categories, Authors, Editors, Contributors, etc., internal/external links and list dividers. * NAVT options are integrated with WordPress Page, Category and User Profile create/edit screens. * Privacy settings for all navigation items to allow/disallow access based on whether or not the user has signed in. * List item names (called a menu alias) can be set to a name that differs from the name used as the page title or the category name. * Creates navigation lists in several formats: Un-numbered HTML or single/multiple dropdown (select) style menus, text only, text with accompanying graphic or graphic only. * Multiple dropdown menus can be created from a single navigation list using dividers. * Navigation groups can be embedded within posts or pages. * Navigation lists are 'theme independent' and reusable. * Ample css classes provided for list and graphic link styling. * Single interface function call. * Comes with a companion sidebar module if you use the Sidebar Module plugin (SBM) * Comes with a builtin on sidebar widget for WordPress Widget users - supports up to 5 individual NAVT widgets. * Drag and drop interface for easy visualization of your menus and quick changes. * Built-in help tips. * Compatible with the Word Press 2.2.2+, WordPress-mµ 1.2.4+, [SideBar Module Plugin](http://nybblelabs.org.uk/ "Plugin Homepage") V1.0+, [SideBar Widgets Plugin](http://automattic.com/code/widgets/" Plugin Homepage") for WordPress 2.1, WordPress 2.2.1 with built-in widget support. * Compatibility tested with IE6/IE7, Firefox 2.0.0.3+, Opera 9.10/9.20 (not supported in Opera 9.23) (_all pc browsers only_) = Interface = The plugin provides a __drag 'n drop__ interface minimizing the need to use your keyboard. Navigation lists can be created and edited using your mouse along with a few keystrokes. Navigiation options are also integrated with WordPress Manage Page, Category and User Profile screens. Using this plugin with the companion sidebar module or sidebar widget provides you with the ability to __reorder and change your navigation lists on your web site without changing one line of code in your theme__. It also means that you can change themes and still retain your site navigation. = Built-in User Tips = The plugin provides an extensive built-in user help tips that provide option definitions. == Installation == _Classic WordPress and WordPress MU Plugin directory_ 1. Download the plugin. 1. Unzip the file in the WordPress directory: `/wp-content/plugins/` - The plugin resides in its own directory. 1. Activate the NAVT plugin from the Word Press plugin page. 1. After activating the plugin, go to the `Manage` menu and select the menu tab: __NAVT Lists__ to use the plugin. 1. For WordPress 2.2.2+ with a widgetized theme, 5 NAVT Widgets can be found on the Widgets page. 1. NAVT requires the use of JavaScript (_it must be turned on in your browser_). The `doc` directory contains a single page manual explaining the PHP interface function call syntax. The `modules` directory contains a document explaining how to install the sidebar module. The sidebar widget is automatically available on the widgets page. = Release Notes = *__.95.47.2__ _(Jan 22, 2008)_ _Sorry for the back-to-back releases_ I _promise_ this _should_ be the last one for awhile. * Plugin conflicts (_which, in this case is a misnomer_) have forced me to raise the priority of the WordPress hook that the loads the prototype.js framework for the NAVT List page to ensure that prototype.js is always loaded before jQuery. There are WordPress plugins (_not written by me and not mentioned here_) that unnecessarily load their plugin scripts and required frameworks on each and every WordPress back-end administration page; including the NAVT List page. I consider this very _bad behavior_. __Plugin authors should load their scripts and required java script frameworks ONLY on the back-end pages that require them; not on the back-end pages of other plugins!. Doing so may render that plugin unusable!__ __How?__ By arbitrarily loading jQuery.js __BEFORE__ prototype.js and not using _jQuery NoConflict_. jQuery.js and prototype.js use the same $ shortcut. If jQuery.js is loaded before prototype.js, __prototype.js fails to execute__ and if this occurs on the back-end page of another plugin that is dependant on prototype.js, __it too will fail__. * By request, I've added two new classes to the unnumbered list created by NAVT. 1. All <li> tags which have descendents are given the css class `item_parent`. 1. If the `current_page_item` is a descendent of a `parent_item` that parent is provided the css class `current_item_parent` . 1. The anchor tag of the `current_page_item` is now given the css class `current_item`. * Corrections to .95.47.1 For a more in-depth explaination of the changes to NAVT please go to [this page](http://gbellucci.us/forums/topic.php?id=108 "Forum Announcement") *__.95.47.1__ _(Jan 21, 2008)_ 1. Fix: NAVT user_delete hook. A misplaced ')' caused plugin.php to complain about receiving the incorrect number of parameters for the callback hook when deleting users. *__.95.47__ _(Jan 20, 2008)_ 1. Corrected a missing quotation in navt_display.php 2. Added the class `current_item_parent` to the parent item of the decendant list item that is the `current_page_item`. This provides better css control for user's that want to use cascading dropdown menus. _This only applies to nested lists._ 3. When viewing category articles, NAVT will apply the class `current_page_item` to the category navigation item the article belongs to. There is a catch... If the article belongs to more than one category, __only the first category__ returned by the Word Press function `get_category()` will be given the `current_page_item` class. *__.95.46.5__ _(Jan 9, 2008)_ 1. Corrected a commented line in nsvt.js.php - in php5 installations the commented line is not ignored. *__.95.46.4__ _(Nov 6, 2007)_ 1. Bug fixes in user options - option settings and user alias not updating correctly. *__.95.46.3__ _(Nov 3, 2007)_ 1. Change to the forum URL - no change to the codebase *__.95.46.2__ _(Nov 1, 2007)_ 1. Bug fix: user profile page not updated correctly causing an undefined group and item to be added to the NAVT List page 1. Bug fix: HTML select menus were not begin constructed due to changes from .95.46.1 1. Bug fix: location of plugins directory incorrecly determined - wp installations in a directory under the root directory would result in 404 errors for NAVT backend files. _Sorry for the back-to-back releases_ *__.95.46.1__ _(Oct 31, 2007)_ 1. Minor correction for external links - removed extra backets in the output. *__.95.46__ _(Oct 30, 2007)_ >_What's Changed_ 1. Fixes for nested unnumbered-lists. _Thanks again to Rico Neitzel for his kind assistance_ *__.95.45__ _(Oct 26, 2007)_ >_What's Changed_ 1. Another BIG fix that I don't want to sit on - this one fixes the incorrect reporting of 404 errors by WordPress after the plugin has completed updating the database via an ajax call. This probably occurred if your blog uses 'pretty permalinks'. In some instances the data would have been successfully changed but the plugin would report that an error occurred. _Special thanks to Rico Neitzel for helping me debug the problem_ *__.95.44__ _(Oct 25, 2007)_ >_What's Changed_ 1. Changed the XML target encoding from ISO-8859-1 (the default) to UTF-8. People experiencing 'demoted' character translations should no longer see characters in menu alias names replaced with question marks. 1. A minor change in the backup routine. *__.95.43__ _(Oct 23, 2007)_ >_What's Changed_ 1. Fixed   missing the final semicolon in a few places.... *__.95.42__ _(Oct 23, 2007)_ >_What's Changed_ 1. Fixed problems with International character sets transferred to the server from the browser (UTF-8/unicode issues). 1. Corrections made for separators appearing as the first item in a SELECT style menu. 1. Fixed problems with navigation group names having the same selector ID as items in WordPress themes. 1. Fixed issues with nested ULs and class information. 1. Bug fixes in the Java Script for handling group name updates. 1. Added rel=nofollow to all link items (including internal pages/categories/users). 1. Navigation Groups can be 'rolled-up' to make more space on the NAVT List page screen. 1. Login navigation item can now produce an alternative login with a form instead of a link. Options include after-login url redirection. 1. Added a new group menu item that will produce a 'naked list' (all NAVT generated classes are stripped from the HTML). 1. Added backup and restore facility to the NAVT List sidebar. Navigation lists can be saved/restored to/from your local hard drive. >_Other Changes_ 1. Faster administration screen load time. However, IE loads becomes slow when the number of navigation items reaches 60+ navigation items. (rewrite planned) 1. Removed version upgrade notice for Word Press 2.3 installations (built-in). 1. Removed WPMU install file for the mu-plugins directory. NAVT cannot be used from the mu plugins directory due to cross-domain XMLHttpRequest that fail (without a Web Proxy). The plugin works only from the WPMU Plugins directory. >_Notes_ 1. __NAVT does not work correctly with the latest Opera Browser version 9.23__ *__.95.41__ _(Sept 24, 2007)_ >_What's Changed_ 1. Added automatic conversion of group navigation data from previous versions of the plugin. The plugin will convert navigation group information from prior versions to the new data format. 1. Last minute operational checks against WordPress 2.3 __Changes previous to .95.41 are documented in app/changelog.txt__ == Frequently Asked Questions == = Does the Sidebar Module work with the WordPress Widgets Plugin? = __Yes.__ The NAVT sidebar module was written to work with both the [SideBar Module Plugin (SBM)](http://nybblelabs.org.uk/ "Plugin Homepage") written by Ben Sherratt and the [SideBar Widgets Plugin](http://automattic.com/code/widgets/" Plugin Homepage") for WordPress 2.1. The SBM plugin allows multiple copies of a widget to be used in a theme. The sidebar Widget Plugin provides up to five NAVT widgets. = I changed a page title and a category name but the menu entry on my web site was not changed. = Menu tab titles or items that appear in your list names are not directly linked to your page titles and category names. Instead, the name that appears in your tabbed menus or lists is an alias and is changed by modifying the menu alias for the item in the NAVT plugin. Initially, the menu alias is taken from the page title or category name. However, if you change the page title or category name via __`Manage` � `Pages`__ or __`Manage` � `Categories`__, the menu tab or list entry __will remain unchanged__ until you change the menu alias. The inverse is also true. Changing the menu alias will not affect the actual page title or category name as it is stored in the database. = Oh No Mr. Bill! Some of my categories are not showing up in my category list. = I'm assuming that the categories that are _missing_ are used in a menu or list you created using the NAVT plugin. Categories that appear as part of a navigation list created using the NAVT plugin are, by default, __excluded__ from the normal list of categories displayed by your WordPress template. _This is by design._ In addition, if a category contains sub-category entries, the sub-categories will also be excluded from your category list. Because the parent category appears as part of another navigation list on the web site, including the category in the normal category navigation list can appear 'confusing' to visitors. _If you want categories to be included in your list of categories:_ 1. Click on the name of the category menu item, a box will open to reveal the menu item options. 1. Select the checkbox: __Show in category list__. 1. Click the __ok__ button. The category will now appear in __both__ locations. = WordPress can display the number of posts in a category by appending the count to the end of the name. Can I do that with this plugin? = __Yes.__ One of the menu item options enables this feature: 1. Click on the name of the category menu item, a box will open to reveal the menu item options. 1. Select the checkbox: __Append post count__. 1. Click the __ok__ button. It is also possible to style the count independently of the category list item. Add the class 'catcount' to your theme's style sheet. = I can't fit all of my menu items across the top of the page. I have to rename my categories and pages to make my menu look right. = Using this plugin makes it possible to leave the names of your categories and the titles of your pages intact and change only the names that are displayed in your menu. How? Change the menu item alias for the menu item. The menu item alias is initially the name you've given a category or page but you can change the alias and not affect the actual category or page title. 1. Click on the name of the category menu item, a box will open to reveal the menu item options. 1. Type in the new name in the textbox provided. (_No spaces, alphanumeric only at least 2 characters in length_). 1. Click the __ok__ button. Your menu tab will contain the new name. = How do I create a menu on the top of my web site and one on the sidebar? = 1. Begin by creating a navigation list called _navbar_ from the __NAVT Lists__ page. Drag the page or categories from the _unassigned_ group and drop them into the _navbar_ group. Put them in the order you want them to appear on the page. __Apply__ your changes when you're done. 1. Create a second navigation group called _sidebar_. Drag the pages or categories from the _unassigned_ group and drop them into the _sidebar_ group. __Apply__ your changes. 1. __If you are not using the companion sidebar module__ : * add the function call `navt_getlist('navbar');` to the location in your Word Press template (_usually header.php_) where the navbar is to be displayed. * add the function call `navt_getlist('sidebar');` to the location in your template (_usually sidebar.php_) where the sidebar navigation list is to be displayed. 1. __If you are using the companion sidebar widget__: _(New for .95.1)_ * Go to the Presentation Menu and select the 'Sidebar Widgets' menu tab. * Look for one of the five widgets named: `NAVT WP Widget` located under Available Widgets * Using the mouse, move the widget into the dynamic location used for your theme's navbar. * Open the widget by clicking the icon in the right top corner of the widget. * If you have created Navigation Groups using the NAVT Plugin, the available groups will appear in the dropdown box * Select the navigation group to be used. * Close the widget * Click __Save__. 1. __If you are using the companion sidebar module__: * Locate the `NAVT Companion Sidebar Module` in the list of available modules on your __SBM plugin administration page__. * Add the `navt module` to the dynamic sidebar column that will be used for your _navbar_ menu. * Click the newly added `navt module` and configure it to use the _navbar_ navigation group by selecting _navbar_ from the __dropdown list__. * Turn __off__ the display __title__ option and click __Save__. * Add another copy of the `navt module` to a dynamic sidebar to be used for your _sidebar_ menu - provide it with a meaningful name (title). * Configure the second `navt module` to use the _sidebar_ navigation list using the dropdown list. * Leave the title __on__ . * Click __Save__. Add the necessary menu styles to your template stylesheet. Styling information is provided in [style notes](http://wordpress.org/extend/plugins/wordpress-navigation-list-plugin-navt/other_notes) = My K2 theme 'loves me like a kitten'. How can I use this plugin to display a navbar at the top of my K2 theme? = K2 is a popular theme so I'm using it here only as a demonstration. The NAVT plugin can be used in any WordPress theme. The following code snippet is from the __K2-095rc1__ source code. The statements shown here begin on __line 75 of the K2 header.php file__
');
__Be very careful when creating the HTML that will be displayed above the navigation group. Incorrect HTML or HML tags that are not properly closed will likely "break" your theme layout.__
= How do I tell the plugin to use paragraph HTML tags and not use an unnumbered list?
The NAVT plugin interface function call is extremely flexible when it comes to constructing navigation groups to work with your stylesheet. The function call takes arguments for specifiying the tags you wish to use when it builds the navigation group. The function call syntx is:
navt_getlist( $sNavGroupName, $bEcho=true, $sTitle='', $sBefore='ul', $sAfter='/ul', $sBeforeItem='li', $sAfterItem='/li' )
__where:__
$sBefore and $sAfter arguments specify the tags used before and after the navigation group is constructed.
$sBeforeItem and $sAfterItem are the tags used before and after each navigation item.
________
Notice that the tags are specified _without_ the starting and ending angle brackets (< and > symbols). To use paragraph tags, you could wrap the entire navigation list inside another `div`. This example will build the navigation group with the name 'sidebar' :
navt_getlist( 'sidebar', true, '', 'div', '/div', 'p', '/p' );
__would produce a navigation group that looked like:__
________
__To add a class to the inner `div`:__
navt_getlist( 'sidebar', true, '', 'div class="inner_div_class"', '/div', 'p', '/p' );
__will produce:__
________
__More complicated HTML tag combinations can be constructed as in:__
navt_getlist( 'sidebar', true, '', 'div class="inner_div_class">