optionsMessage = ""; $this->wpdb = $wpdb; add_action( 'init', array($this,'AWM_init_hook' )); add_action( 'admin_init', array($this,'AWM_addmin_hook' )); add_action('admin_menu', array($this,'AWM_add_option_pages')); global $wp_version; if((float)$wp_version>=2.8){ include_once WP_PLUGIN_DIR.'/allwebmenus-wordpress-menu-plugin/widgetClass.php'; add_action('widgets_init', create_function('', 'return register_widget("Widget_AllWebMenus");')); } } /* * Initialization of plugin. */ function AWM_init_hook(){ global $dataArray,$awm_table_name, $awm_total_tabs, $AWM_ver, $dataArray, $awm_is_yarpp_enabled; /* * Load the include files */ include_once WP_PLUGIN_DIR.'/allwebmenus-wordpress-menu-plugin/menu_helper.php'; include_once WP_PLUGIN_DIR.'/allwebmenus-wordpress-menu-plugin/include.php'; $this->awm_table_name = $awm_table_name = $this->wpdb->prefix . "awm"; $this->dataArray = $dataArray = array(); $this->AWM_ver = $AWM_ver = '1.1.15'; $this->awm_total_tabs = $awm_total_tabs = get_option("AWM_total_menus",(int) 0); //if ($_POST["AWM_selected_tab"]=="") $_POST["AWM_selected_tab"]="1"; // set the first time options (if they do not already exist) awm_set_first_time_options(); // add linking code to header.php file if (isset($_GET['theaction']) && $_GET['theaction']=='show_addcode') { update_option("AWM_code_check", 1); } $check = get_option("AWM_code_check",1); if ($check && !awm_add_code()) { $nonce= wp_create_nonce('my-nonce'); $this->optionsMessage = "

Linking code could not be added automatically. You have to add it by yourself. Open the \"header.php\" file (found at \"SITEROOT/wp-content/themes/YourSiteTheme\") and add this code

right after the <body> tag.

"; } // Check if already had the plugin when it was single-tab and convert values awm_convert_from_single_to_multi_tab(); $this->databaseMessage = awm_convert_to_database(); if (!empty($this->databaseMessage)) $this->databaseMessage = "
".$this->databaseMessage."
"; add_genre_column(); $this->awm_total_tabs = $awm_total_tabs; $this->awm_is_yarpp_enabled = $awm_is_yarpp_enabled = in_array('yet-another-related-posts-plugin/yarpp.php', get_option('active_plugins')); $awm_plugin = plugin_basename(__FILE__); add_filter("plugin_action_links_$awm_plugin", array($this, 'awm_wp_settings_link' )); // Check if you need to check for updates if ((get_option('AWM_Checked_Date') <= (date('d') - 15)) || (get_option('AWM_Checked_Date') === '00')) { update_option('AWM_Check_Show', TRUE); } } /* * Adds link to settings page */ function awm_wp_settings_link($awm_links) { $awm_settings_link = 'Settings'; array_unshift($awm_links, $awm_settings_link); $check = get_option("AWM_code_check",1); if (!$check){ $awm_linking_link2 ='Activate linking code check'; $awm_links[] = $awm_linking_link2; } return $awm_links; } /* * Initialization of the admin panel. */ function AWM_addmin_hook() { if (!session_id()) session_start(); /* Register our stylesheet. */ wp_register_script( 'AWMScript', plugins_url('/script.js', __FILE__) ); wp_register_style( 'AWMStylesheet', plugins_url('/stylesheet.css',__FILE__ )); } /* * Add admin panel styles AND scripts */ function AWM_admin_styles() { /* * It will be called only on your plugin admin page, enqueue our stylesheet here */ wp_enqueue_style( 'AWMStylesheet' ); wp_enqueue_script( 'AWMScript' ); } /* * Add options page */ function AWM_add_option_pages() { if (function_exists('add_options_page')) { $page = add_options_page('AllWebMenus WordPress Menu Plugin', 'AllWebMenus-WP-Menu', 8, __FILE__, array($this,'AWM_options_page')); } add_action( 'admin_print_styles-' . $page, array($this,'AWM_admin_styles' )); } /* * Generate options page */ function AWM_options_page() { echo $this->databaseMessage; echo $this->optionsMessage; $locations = array(); if (function_exists('get_registered_nav_menus')) $locations = (array) get_registered_nav_menus(); $myrows = $this->wpdb->get_results( "SELECT * FROM $this->awm_table_name ORDER BY id ASC" ); ?>

AllWebMenus WordPress Menu Plugin vAWM_ver; ?>

Note: The plugin requires the use of the "AllWebMenus" commercial application (version 5.3.884+). Click for more info.

For information and updates, please visit: http://www.likno.com/addins/wordpress-menu.html

Welcome to our WordPress Menu plugin   


This plugin acts as a "bridge" between...

...the AllWebMenus Pro application...
a powerful windows application for
creating any kind of navigation menu

javascript menu / css menu builder

Features   Download   Menu Examples   Menu Themes   Purchase


&

...your WordPress blog



blog

 

How?


1.
Use this plugin to retrieve items from your blog*.
    (such as posts, pages, etc.)

2. Paste these blog items into AllWebMenus and create stylish, feature-rich navigation menus based on them. Fully customize these menus with styles, behaviors, effects, designs of your choice and many more!

3. Use this plugin to upload your menus (multiple menus also supported) to your blog. Done!



*Also add non-wordpress menu items (i.e. your own "external" items, not posts or pages), that use external or internal links, html-rich content, etc.

wordpress javascript menu css menu plugin

"; unset ( $_SESSION['message'] ); } ?>
awm_wp_nav_array[$args->theme_location])) return $items."
 
"; else return $items; } function awm_print_menu_position($args) { $myrows = $this->wpdb->get_results("SELECT name FROM $this->awm_table_name WHERE position LIKE '". $args['theme_location']."' && active = 1 ORDER BY id ASC" ); foreach ($myrows as $myrow) echo "
name."> 
"; } function awm_menu_args($args) { $args = (object) $args; $args->fallback_cb = 'AWM_print_menu_position'; return $args; } /* * Generate Linking Code */ function AWM_generate_linking_code() { $i=0; $filter_flag = false; $myrows = $this->wpdb->get_results( "SELECT * FROM $this->awm_table_name WHERE active=1 order by id ASC" ); for ($awm_t=0; $awm_tmenu_genre; $tp = $myrows[$awm_t]->type; if ( $myrows[$awm_t]->position != "0" && $myrows[$awm_t]->position != "awm_widget") { $this->awm_wp_nav_array[$myrows[$awm_t]->position] = "awmAnchor-".$myrows[$awm_t]->name; $filter_flag = true; } $awm_name = $myrows[$awm_t]->name; echo "\n"; if ($gnr=="JS" || $gnr=="ULLI") { echo "\n"; echo "\n"; echo "\n"; } elseif ($gnr=="CSS") { echo "\n"; echo "\n"; } if ($gnr=="JS") { if ($tp=='Dynamic') { AWM_create_dynamic_menu($myrows[$awm_t],false); } elseif ($tp=='Mixed') { AWM_create_dynamic_menu($myrows[$awm_t],true); } $awm_parentgroup = "wpgroup"; } elseif ($gnr=="ULLI" || $gnr=="CSS") { $dyn_code = ""; if ($tp=='Dynamic' || $tp=='Mixed') $dyn_code = AWM_create_ULLI_dynamic_menu($myrows[$awm_t]); // echo $myrows[$awm_t]->menu_structure; echo str_replace("",$dyn_code,$myrows[$awm_t]->menu_structure); } if ($gnr=="JS") { // only if we are viewing a single post & want related (and not custom menu) if ($this->awm_is_yarpp_enabled && $myrows[$awm_t]->related && is_single() && !$myrows[$awm_t]->custom_menu) { // convert quotes to add code to item's property $awm_related = related_posts(array('before_related'=> '

'.$myrows[$awm_t]->related_name.'

    ' ), false); $awm_related = str_replace('"', "'", $awm_related); $awm_related = str_replace("'", "\'", $awm_related); $awm_related = str_replace(chr(10), "", $awm_related); $awm_related = str_replace(chr(13), "", $awm_related); $awm_related = str_replace('\n', '', $awm_related); $awm_related = str_replace('\r', '', $awm_related); $awm_related = trim($awm_related); echo "IRP=$awm_parentgroup.newItem('style=". $awm_name ."_'+(wplevel==0?'main_item_style':'sub_item_style')+';visible=0');\n"; echo "IRP.visible=1; IRP.text0='".$myrows[$awm_t]->related_name."'; IRP.text1='".$myrows[$awm_t]->related_name."'; IRP.text2='".$myrows[$awm_t]->related_name."';\n"; echo "IRP1=IRP.newGroup('style=". $awm_name ."_'+(wplevel==0?'sub_group_style':'sub_group_plus_style'));\n"; echo "IRP2=IRP1.newItem('style=". $awm_name ."_'+(wplevel==0?'sub_item_style':'sub_item_plus_style')+';text0=" . $awm_related . ";htmlMode=1;');\n"; } echo "if (typeof(" . $awm_name . ")!='undefined') ProduceMenu(" . $awm_name . ");\n"; echo "\n"; } echo "\n\n"; } if ($filter_flag) { add_filter('wp_nav_menu', array($this,'awm_menu_position'), 10, 2); add_filter('wp_nav_menu_args',array($this,'awm_menu_args'), 10 ,1); } } /* * Initialize query var for sitemap permalinks */ function AWM_query_vars ( $awm_vars ) { $awm_vars[] = "pg"; return $awm_vars; } //add_filter('query_vars', 'AWM_query_vars'); } // END of Class AWM_Plugin //this functions calls the object's generate linking code function AWM_generate_linking_code(){ global $awmPluginInstance; $awmPluginInstance->AWM_generate_linking_code(); } //this functions is the callback function that calls the function that prints the div at the Menu Position function AWM_print_menu_position($args){ global $awmPluginInstance; $awmPluginInstance->awm_print_menu_position($args); } ?>