[StatPress-1.4.1] Enhencement and fix, check it out
-
This is a nice plugin, but from a long time there isn’t any update release. The admin menu is not in compatible with WP 3.0 and the annoying thing – /?/ in the Spy menu item. Following are the fixes and working fine!
#1 - StatPress Admin menu is not WP 3.0 compitable Thats why currently active menu item is not highlighted properly task: 1.1 File: wp-content/plugins/statpress/statpress.php Replace these add_menu_page('StatPress', 'StatPress', $mincap, __FILE__, 'iriStatPress'); add_submenu_page(__FILE__, __('Overview','statpress'), __('Overview','statpress'), $mincap, __FILE__, 'iriStatPress'); add_submenu_page(__FILE__, __('Details','statpress'), __('Details','statpress'), $mincap, __FILE__ . '&statpress_action=details', 'iriStatPress'); add_submenu_page(__FILE__, __('Spy','statpress'), __('Spy','statpress'), $mincap, __FILE__ . '&statpress_action=spy', 'iriStatPress'); add_submenu_page(__FILE__, __('Search','statpress'), __('Search','statpress'), $mincap, __FILE__ . '&statpress_action=search', 'iriStatPress'); add_submenu_page(__FILE__, __('Export','statpress'), __('Export','statpress'), $mincap, __FILE__ . '&statpress_action=export', 'iriStatPress'); add_submenu_page(__FILE__, __('Options','statpress'), __('Options','statpress'), $mincap, __FILE__ . '&statpress_action=options', 'iriStatPress'); add_submenu_page(__FILE__, __('StatPressUpdate','statpress'), __('StatPressUpdate','statpress'), $mincap, __FILE__ . '&statpress_action=up', 'iriStatPress'); add_submenu_page(__FILE__, __('Statpress blog','statpress'), __('Statpress blog','statpress'), $mincap, 'http://www.statpress.org'); With these add_menu_page('StatPress', 'StatPress', $mincap, 'statpress', 'iriStatPressMain'); add_submenu_page('statpress', 'StatPress: Overview', 'Overview', $mincap, 'statpress/details', 'iriStatPressDetails'); add_submenu_page('statpress', 'StatPress: Spy', 'Spy', $mincap, 'statpress/spy', 'iriStatPressSpy'); add_submenu_page('statpress', 'StatPress: Search', 'Search', $mincap, 'statpress/search', 'iriStatPressSearch'); add_submenu_page('statpress', 'StatPress: Export', 'Export', $mincap, 'statpress/export', 'iriStatPressExport'); add_submenu_page('statpress', 'StatPress: Options', 'Options', $mincap, 'statpress/options', 'iriStatPressOptions'); add_submenu_page('statpress', 'StatPress: Update', 'StatPressUpdate', $mincap, 'statpress/up', 'iriStatPressUpdate'); add_submenu_page('statpress', 'Statpress blog', 'Statpress blog', $mincap, 'http://www.statpress.org'); task: 1.2 File: wp-content/plugins/statpress/statpress.php Aslo remove these part of codes no longer reqd by the 3.0 menu system /* function iriStatPress() { ?> <?php if ($_GET['statpress_action'] == 'export') { iriStatPressExport(); } elseif ($_GET['statpress_action'] == 'up') { iriStatPressUpdate(); } elseif ($_GET['statpress_action'] == 'spy') { iriStatPressSpy(); } elseif ($_GET['statpress_action'] == 'search') { iriStatPressSearch(); } elseif ($_GET['statpress_action'] == 'details') { iriStatPressDetails(); } elseif ($_GET['statpress_action'] == 'options') { iriStatPressOptions(); } elseif(1) { iriStatPressMain(); } } */ #2 - When view StatPress/Spy item, displaying the anyoing thing /?/ for the query part regardless of permalink setting task: 2.1 File: wp-content/plugins/statpress/statpress.php Replace this line (@line: 770) print "<td><div><a href='".get_bloginfo('url')."/?".$details->urlrequested."' target='_blank'>".iri_StatPress_Decode($details->urlrequested)."</a>"; With these if ( get_option('permalink_structure') != '' ) { print "<td><div><a href='".get_bloginfo('url').$details->urlrequested."' target='_blank'>".iri_StatPress_Decode($details->urlrequested)."</a>"; } else { print "<td><div><a href='".get_bloginfo('url')."?".$details->urlrequested."' target='_blank'>".iri_StatPress_Decode($details->urlrequested)."</a>"; }
This will help the plugin uers to fix it. Also hope that the author should fix these issues in the upcoming version. Suggestions and comments are welcome to make it better bug free!
thanks!
- The topic ‘[StatPress-1.4.1] Enhencement and fix, check it out’ is closed to new replies.