" . __("The NAVT asset panel gives you the ability to create navigation items from the various resources you've created in Word Press. NAVT refers to your pages, categories, user's and other items as assets. The panel places each resource into the appropriate asset group. Groups are identified by type.", 'navt_domain')."
".__("The location where unassigned assets are created. This area is typically grayed out until one or more navigation items are created. All newly created items will appear in this section.", 'navt_domain')."
".__("Icons indicate the type of resource contained in the listbox below it. Icons and listboxes exist for Pages, Categories, User's and Other items.", 'navt_comain')."
".__('The list of assets of the type indicated. Clicking an item within the listbox will create a copy of the item and place it in the unassigned area at the top.', 'navt_domain')."
";
// page 2
$p2 = "
".__('Creating Assets', 'navt_domain')."
".__('This example illustrates what happened when the About page entry was selected.', 'navt_domain')."
".__('About Page selected by clicking the name in the listbox.', 'navt_domain')."
".__('A copy of the About Page navigation item is created.', 'navt_domain')."
".__('The navigation item appears in the unassigned area.', 'navt_domain')."
".__("The About Page navigation item can be deleted by clicking the item's delete button.", 'navt_domain')."
".__('The navigation item can be dragged and dropped to a navigation group by moving the item from the unassigned group.', 'navt_domain')."
".__('Any number of the same navigation items may be created and placed into different navigation groups. Each item (even if they represent identicle items) have separately configurable options. Item option setting for one item will not effect the option settings for another.', 'navt_domain')."
".__("NAVT groups are a simple collection of navigation items composed from the pages, categories, users and other items that you've created in your WordPress blog. All available items are shown in the assets panel on the left side of the screen (see asset help). Items are divided into types and appear within separate lists.", 'navt_domain')."
".__('Creating Groups', 'navt_domain')."
".__("Navigation groups are created by entering a group name into the group name textbox in the NAVT toolbar at the top of the screen. After entering the name, click the create button. The group name you enter must begin with an alphabetic character and it cannot contain spaces. Group names are limited in size to no more than 10 characters. All group names must be unique. After creating the group, a new (and empty) group container will appear to the right of the assets panel. The group name will appear at the top of the group container.", 'navt_domain')."
".__('Group Toolbar', 'navt_domain')."
".__('The group toolbar (shown on the right) contains three icons in addition to the area for the group name:', 'navt_domain')."
".__('A lock icon - used to prevent group changes.', 'navt_domain')."
".__('The name of the navigation group.', 'navt_domain')."
".__('A trashcan - used to delete the entire group.', 'navt_domain')."
".__('A gear icon - used for setting group options.', 'navt_domain')."
";
// page 2
$p2 = "
".__('Creating Items', 'navt_domain')."
".__("Navigation items are created by clicking on the name of an item listed in the Pages, Categories, User's and Others listboxes in the assets panel. When you select and item, a copy of the item will appear in unassigned section at the top of the assets panel. The item may then be dragged and dropped into any one of the group containers you previously created.", 'navt_domain')."
".__("More than one of the same item may be created and placed into the same or into a different group. Every item (even the same items) may be configured to have different options.", 'navt_domain')."
".__('Item Tools', 'navt_domain')."
".__('Each item contains a number of management tools.', 'navt_domain')."
".__("The item alias - the name of the item as it will appear in the navigation list. Click the item alias to open the item's option box.", 'navt_domain')."
".__('The item icon - represents the type of item (page, category, user or other). The icon is used to move the item from group to group.', 'navt_domain')."
".__('Connect/Disconnect icon - disconnecting the item means that the item remains in the group, however, the item will not be included in the output navigation list created for the web site. Connecting the item means that the item will be included in the output navigation list. This feature is used for temporarily eliminating an item without removing it from the group.', 'navt_domain')."
".__('Item removal icon - this icon is used to delete the item from the group.', 'navt_domain')."
".__('Hierarchical control arrows - used for moving the item to the left or right to indicate parent/child relationships.', 'navt_domain')."
".__("This section enables you to integrate navigation groups into a Word Press theme by combining an xpath expression with one of the actions from the action list. For example, if you wanted to insert the navigation group above a division in your theme where the id of the division were named header then you would enter: #header into the xpath textbox. A hash character must proceed an id to indicate that the xpath contains a selector id. The navigation group can be inserted above, below, at the top or at the bottom of the location expressed in the xpath text box.
The navigation group can be preceeded by any number of additional HTML tags. HTML tags can contain an id and/or CSS classes. Id and class names must be enclosed within double quotes. Ending tags must be entered if beginning tags are used.", 'navt_domain')."
" .
"
".__('CSS Styles', 'navt_domain')."
".__("NAVT provides several CSS classes to the HTML it creates for your web site. Classes are used to assist you in styling your navigation groups. In addition, you have the choice of either applying native Word Press styles or not using any styles at all. Your own styles can exclusively used by selecting 'Do not apply CSS classes' and adding 'Apply the CSS information below to this navigation group", 'navt_domain')."
".__('User Styles', 'navt_domain')."
".__('By default, NAVT constructs navigation groups for your web site by building one or more unordered lists from the contents of the group. The number of unordered tag groups is dependent on whether or not parent/child relationships exist amoung the various navigation items in the list. Lists begin with a standard UL tag followed by one or more LI tags or nested UL tags contained within an LI tag.', 'navt_domain')."
".__('To add CSS classes, enter the class names in the textboxes provided. Multiple class names can be entered (per tag) by separating each class name with a space. No more than one selector name can be entered into the UL Selector ID textbox.', 'navt_domain')."
".__('UL selector ID - The selector ID given to the parent UL tag.', 'navt_domain')."
".__('UL tag CSS class - The class applied to the parent UL tag.', 'navt_domain')."
".__('LI tag CSS class - The class applied to all LI tags.', 'navt_domain')."
".__('LI active page CSS class - The class applied to the active LI tag.', 'navt_domain')."
".__('LI tag parent container - The class applied to the LI parent of a nested UL tag.', 'navt_domain')."
".__('LI tag parent container (active) - The class applied to the parent container of the active LI tag.', 'navt_domain')."
";
// page 2
$p2 = "
".__('Show only top-level anchors on page', 'navt_domain')."
".__("When checked, the option Show only top-level anchors on page (hide hierarchy) will display only the links to the child pages of the current page. If a child page contains children of it's own, those anchors will only be shown when the child page is viewed. For example, if you created the following navigation group:", 'navt_domain')."
".__('Item 1', 'navt_domain')."
".__('Item 1a', 'navt_domain')."
".__('Item 1b', 'navt_domain')."
".__('Item 2', 'navt_domain')."
".__('Item 2a', 'navt_domain')."
".__('The Home Page would only display a navigation list containing Item 1 and Item 2. Their respective child links would not be visible. If you clicked Item 1, the newly displayed blog page would show the navigation links for Item 1a and Item 1b. The navigation list shown for Item 2 would contain only Item 2a.', 'navt_domain')."
".__('The option has an additional feature: Add page return to list. If this is checked, NAVT will add an additional link to the child navigation list allowing the user to return to the parent page.', 'navt_domain')."
".__('Selecting this option will cause NAVT to add a breadcrumb path to the currently displayed page above the navigation list. For example, a user currently viewing blog page Item 1a would see the breadcrumb trail Home » Item 1 » Item 1a. Selecting a link in the breadcrumb trail will take the user to the previously viewed blog page. The path can be easily styled (using CSS) to appear anywhere on the page using absolute positioning.', 'navt_domain')."
";
// page 3
$p3 = "
".__('Create navigation list using HTML select', 'navt_domain')."
".__("Selecting this option will turn your navigation list into a Drop Down list of navigation items constructed using a HTML SELECT statement. This should not be confused with Drop Down lists produced by CSS. A typical Drop Down would appear as:", 'navt_domain')."
".__("This option has the additional feature: Display: 'N' item(s) in list. This is used to force the SELECT to show a maximum number of entries. The default is 1. For example, entering the number 3 in the box will cause the Drop Down to appear as:", 'navt_domain')."
".__('Here we can see the first three available selections. In this case, the box contains more than three items so the browser adds a scrollbar on the right. This Drop Down box does not support multiple selections.', 'navt_domain')."
".__('Set navigation group to private', 'navt_domain')."
".__('This option enables you to hide all navigation items from casual viewing if the viewer is not signed into your web site. Hiding the members of navigation lists can also be done by selecting the individual privacy option for each of the navigation items. Selecting this option will also change the color of the group heading (only in the NAVT List Page) to indicate the group is set to private.', 'navt_domain')."
".__('Controlling Where Navigation Groups are Displayed', 'navt_domain')."
".__('The display of any Navigation group can be controlled by specifying the page types where the navigation group should appear. The Show navigation group on... area allows you to indicate whether or not the navigation group is to appear on:', 'navt_domain')."
".__('The Home Page', 'navt_domain')."
".__('A Static Front Page (if configured)', 'navt_domain')."
".__('An archive page (categories, user pages, date pages, etc)', 'navt_domain')."
".__('The search results page', 'navt_domain')."
".__("The 'page not found' page (404 errors)", 'navt_domain')."
".__('Settings for Available Posts/Pages', 'navt_domain')."
".__('Navigation groups can also be displayed (or not displayed) on all or on individually selected posts and/or pages. To display a navigation group on one or more selected posts or pages:', 'navt_domain')."
".__('Check Settings for available posts and/or Settings for available pages. If these options are not checked, the navigation group will be displayed on all single pages and single post pages.', 'navt_domain')."
".__('Select Display this navigation group only on selected posts (or pages) or Do Not Display this navigation group only on selected posts (or pages). Selecting one of these radio buttons determines whether or not the Navigation group is to be shown on or not shown on the posts or pages that you select in the relevant list box.', 'navt_domain')."
".__('Pages and posts are listed by their respective titles.', 'navt_domain')."
".__("The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. The alias may differ from the title of a page. In the diagram, A points to the item alias and B points to the item's title. The title is the name you gave the page when it was created. Changing the title will not change the alias you assigned nor will changing the alias change the page title. Item C is the icon used to signify a page.", 'navt_domain')."
".__("The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. The alias may differ from the category name. In the diagram, A points to the item alias and B points to the item's title. The title is the name you gave the category when it was created. Changing the title will not change the alias you assigned nor will changing the alias change the category title. Item C is the icon used to signify a category.", 'navt_domain')."
".__('Options for Categories', 'navt_domain')."
@aliasInfo@
@anchorInfo@
@cssClassInfo@
".__('Show in WP category list. By default NAVT will prevent a category that has been used in a NAVT navigation list from also appearing in a category list generated by Word Press. Check this option if you want the category displayed in both locations.', 'navt_domain')."
".__('Append post count - NAVT appends the number of posts contained in the category to the category name.', 'navt_domain')."
".__("Show if Empty - causes the category link to appear even if it doesn't contain any posts.", 'navt_domain')."
".__('Use description as tooltip - Uses the description of the category as the mouse hover tooltip.', 'navt_domain')."
".__('The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. The alias may differ from the Home title. In the diagram, A points to the item alias and B points to the Home title. Item C is the icon used to signify the Home navigation item.', 'navt_domain')."
".__('This item is equivalent to the Word Press sign-on/register anchors as part of the Word Press meta data. The anchor presented depends on whether or not the user has signed into the web site. When signed in, the anchor allows them to sign out; if not signed in and the Word Press Membership option: anyone can register is checked, the anchor will allow the user to register or sign in.', 'navt_domain')."
".__('Item Alias', 'navt_domain')."
".__('The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. The alias may differ from the sign-in title. In the diagram, A points to the item alias and B points to the sign-in title. Item C is the icon used to signify the sign-in administration item.', 'navt_domain')."
".__('Options for Site Administration', 'navt_domain')."
@aliasInfo@
@anchorInfo@
@cssClassInfo@
".__('Create sign-in form - selecting this will create a small sign-in form on the web site.', 'navt_domain')."
".__('Use referral page redirect - After signing in, the user remains on the page where they signed in.', 'navt_domain')."
".__('Use URL redirect - When checked, the user is redirected to the URL that is contained in the redirect URL textbox.', 'navt_domain')."
".__('Redirect URL text box - enables you to send the signed in user to another page on your web site. Enter a complete URL in this box.', 'navt_domain')."
".__("A divider is primarily designed to separate navigation lists into groups of related items. A divider can be inserted between elements to provide an empty space, a horizontal line or a plain text title. The menu item alias serves as the title when the divider type is set to 'plain text'.", 'navt_domain')."
".__('Item Alias', 'navt_domain')."
".__('The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. The alias is used as a title or header when the divider type is set to plain text. No alias is displayed when the divider type is set to either empty space horizontal rule. In the diagram, A points to the item alias and B points to the List Divider title. Item C is the icon used to signify the dvider navigation item.', 'navt_domain')."
".__('Divider Options', 'navt_domain')."
@aliasInfo@
@anchorInfo@
@cssClassInfo@
".__('Divider type - the type of divider to create.', 'navt_domain')."
".__("A Uniform Resource Identifier (URI), is a compact string of characters used to identify or name a resource. The main purpose of this identification is to enable interaction with representations of the resource over a network, typically the World Wide Web, using specific protocols. URIs are defined in schemes defining a specific syntax and associated protocols. URI's supported by NAVT are limited to: http:// for identifying both internal or extern web site pages and mailto: for providing an anchor for sending email.", 'navt_domain')."
".__('Item Alias', 'navt_domain')."
".__("The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. In the diagram, A points to the item alias and B points to the item's title. The title will always be User defined URI. Item C is the icon used to signify a URI item.", 'navt_domain')."
".__('URI Options','navt_domain')."
@aliasInfo@
@anchorInfo@
@cssClassInfo@
".__('URL text box - a complete resource identifier (i.e. http:// or mailto:)', 'navt_domain')."
".__('Open in same window - Opens in the same window, otherwise opens the resource in a new window.','navt_domain')."
".__("The label that is given to a link is called a menu item alias. The alias is what the user sees in the navigation list on the web page. The alias may differ from the user display name. In the diagram, A points to the item alias and B points to the user's signin name. Changing the user's display name will not change the alias you assigned nor will changing the alias change the display name. Item C is the icon used to signify a registered user. ", 'navt_domain')."
".__('Options for Users','navt_domain')."
@aliasInfo@
".__('Show avatar - select this to place an avatar next to the user name','navt_domain')."
".__('Use default avatar - allows you to use one of the default avatars in the drop down list.','navt_domain')."
".__('A list of default avatars to choose from. The selected avatar is displayed above the drop down box.','navt_domain')."
".__('User avatar URI - this is active only if use default avatar is not checked. Enter a qualified URI for the avatar to be used for this user.', 'navt_domain')."
".__('Show if no posts - When selected, NAVT will show this user if the user has not posted on the web site.','navt_domain')."
".__('Append author post count - Appends the number of posts to the users anchor.','navt_domain')."
".__("Include web site - If you have entered a web site address to the user's profile, it will be included as an anchor.",'navt_domain')."
".__('Include user bio - If you have entered a bio for this user, the text will be included.','navt_domain')."
".__("Include user email - selecting this will add the user's email address (mailto:) format.", 'navt_domain')."
".__('Hide link text - Available only if you are using an avatar. Selecting this will hide all user anchor text.','navt_domain')."
";
}
}
/**
* Complete the page
*/
$html = str_replace('@content-p1@', $p1, $html);
$html = str_replace('@content-p2@', $p2, $html);
$html = str_replace('@content-p3@', $p3, $html);
$html = str_replace('@content-p4@', $p4, $html);
$html = str_replace('@content-p5@', $p5, $html);
$html = str_replace('@content-p6@', $p6, $html);
$html = str_replace('@path@', NAVT::get_url(), $html);
/**
* Substitutions for common options
*/
$html = str_replace('@aliasInfo@',
__("The item alias edit box. Use this to change the name that appears in the navigation menu.", 'navt_domain'), $html);
$html = str_replace('@anchorInfo@',
__("Anchor type - Choose the type of link you want to appear on the web page. The choices are:", 'navt_domain')."
".__('Standard Text Link - a link that only contains text.','navt_domain')."
".__('Text over Graphic - a link that contains text over a graphic background.','navt_domain')."
".__('Text with Side Graphic - a link that is accompanied by a graphic. Usually used with icons.','navt_domain')."
".__('Graphic link - a link that is represented by a graphic (no text). Usually used for creating buttons.','navt_domain')."
".__('All links that contain graphics require a CSS class that will be applied to the graphic container.', 'navt_domain'), $html);
$html = str_replace('@cssClassInfo@',
__("CSS class for graphic - used only with anchors that use graphics. Enter the name of the class to be used.", 'navt_domain'), $html);
$html = str_replace('@noFollowInfo@',
__("Add rel=nofollow - nofollow is a non-standard HTML attribute value used to instruct search engines that a hyperlink should not influence the link target's ranking in the search engine's index.", 'navt_domain')." ".__('see definition', 'navt_domain')."", $html);
$html = str_replace('@privateInfo@',
__("Set to private - if checked, the anchor is visible only to those that are signed into your web site.", 'navt_domain'), $html);
}
navt_write_debug(NAVT_AJX, sprintf("%s::%s %s\n", __CLASS__, __FUNCTION__, $html));
// open a window
return( NAVTAJX::mk_json_str(array('rc' => $c, 'width' => $w, 'height' => $h, 'title' => $title, 'html' => $html)) );
}
/**
* Add a new group
*
* @param string $group_name
* @return string (json)
* @since .96
*/
function add_new_group($group_name) {
navt_write_debug(NAVT_AJX, sprintf("%s::%s group %s\n", __CLASS__, __FUNCTION__, $group_name));
global $icfg, $gcfg;
$text = __('add group error', 'navt_domain');
$rc = NAVTAJX::mk_json_str(array('rc' => 'error', 'type' => 'group_add', 'msg' => $text));
// sanitize the name
$group_name = NAVT::clean_group_name($group_name);
if('' == $group_name ) {
$text = __('invalid name', 'navt_domain');
$rc = '{"rc":"error", "type":"name", "msg":"'.$text.'"}';
}
else {
//first letter can't be numeric
$c = substr($group_name, 0, 1);
if(is_numeric($c)) {
$text = __('invalid name', 'navt_domain');
$rc = '{"rc":"error", "type":"name", "msg":"'.$text.'"}';
}
else {
// check for a duplicate
if( NAVTAJX::check_for_duplicate_group($group_name) ) {
$text = __('duplicate name', 'navt_domain');
$rc = NAVTAJX::mk_json_str(array('rc' => 'error', 'type' => 'name', 'msg' => $text));
}
else {
$groups = $icfg;
$n_icfg = array();
if(is_array($groups)) {
foreach( $groups as $group => $members ) {
$n_icfg[$group] = $members;
}
$scheme = NAVT::get_option(SCHEME);
$scheme = ($scheme + 1 > 6) ? 1: $scheme + 1;
$gcfg[$group_name] = NAVT::mk_group_config();
$n_icfg[$group_name] = array();
NAVT::update_option(SCHEME, $scheme);
NAVT::update_option(ICONFIG, $n_icfg);
NAVT::update_option(GCONFIG, $gcfg);
$rc = NAVTAJX::mk_json_str(array('rc' => 'ok', 'name' => $group_name, 'scheme' => $scheme));
}
}
}
}
navt_write_debug(NAVT_AJX, sprintf("%s::%s rc=%s\n", __CLASS__, __FUNCTION__, $rc));
return($rc);
}
/**
* Rename a group
*
* @param string $target_group
* @param string $new_name
* @return string (json)
* @since .96
*/
function rename_group($target_group, $new_name) {
navt_write_debug(NAVT_AJX, sprintf("%s::%s old %s, new %s\n", __CLASS__, __FUNCTION__, $target_group, $new_name));
global $icfg, $gcfg;
$n_gcfg = $n_icfg = array();
$text = __("Problem renaming group");
$rc = NAVTAJX::mk_json_str(array('rc' => 'error', 'type' => 'rename', 'msg' => $text));
// sanitize the name
$new_name = NAVT::clean_group_name($new_name);
if('' == $new_name ) {
$text = __('invalid name', 'navt_domain');
$rc = '{"rc":"error", "type":"rename", "msg":"'.$text.'"}';
}
else {
// check for a duplicate
if( NAVTAJX::check_for_duplicate_group($new_name) ) {
$text = __('duplicate name', 'navt_domain');
$rc = NAVTAJX::mk_json_str(array('rc' => 'error', 'type' => 'rename', 'msg' => $text, 'name' => $target_group));
}
else {
if(is_array($icfg)) {
$rc = NAVTAJX::mk_json_str(array('rc' => 'ok', 'old_name' => $target_group, 'new_name' => $new_name));
foreach( $icfg as $group => $members ) {
if( $group != $target_group ) {
$n_icfg[$group] = $members;
}
else {
foreach($members as $id => $member) {
$member[GRP] = $new_name;
$n_icfg[$new_name][$id] = $member;
}
}
}
foreach( $gcfg as $key => $group_data ) {
if( $key != $target_group ) {
$n_gcfg[$key] = $group_data;
}
else {
$n_gcfg[$new_name] = $group_data;
}
}
if( count($n_icfg) > 0 ) {
NAVT::update_option(ICONFIG, $n_icfg);
NAVT::update_option(GCONFIG, $n_gcfg);
}
}
}
}
navt_write_debug(NAVT_AJX, sprintf("%s::%s rc=%s\n", __CLASS__, __FUNCTION__, $rc));
return($rc);
}
/**
* Ask to remove a group - returns a prompt for display
*
* @param string $group
* @return string (json)
* @since .96
*/
function ask_remove_group($group) {
navt_write_debug(NAVT_AJX, sprintf("%s::%s group %s\n", __CLASS__, __FUNCTION__, $group));
global $navt_blank;
$name = strtolower($group);
$title = __('Delete this group?', 'navt_domain');
$html =
"
".__("Select Ok to remove group '$name'.", 'navt_domain')."