WordPress.org

Plugin Directory

Changeset 469734


Ignore:
Timestamp:
12/01/11 02:05:21 (2 years ago)
Author:
mbijon
Message:

Update to v0.6.1 (tag already created):

  • Add detailed Help menu (including 3.3 Help Tabs, & fallback for older Contextual Help)
  • Typo update in URL
  • Update Upgrade Notice
Location:
hosting-monitor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hosting-monitor/trunk/hosting-monitor.php

    r466346 r469734  
    55Description: Displays server resources used by WordPress in a metabox on the WordPress Dashboard. 
    66Author: Alive Media Web Development 
    7 Version: 0.5.5 
     7Version: 0.6.1 
    88Author URI: http://www.alivemediadev.com 
    99License: GPLv2 or later  
     
    1212 
    1313/* 
    14 Copyright 2011 by Mike Bijon (email: mike@etchsoftware.com) and Ryan Dawson (email: ryan@alivemediadev.com), shared equal-rights 
    15 This is Version 0.5.5 as of 11/23/2011 
     14Copyright 2011 by Mike Bijon (email: mike@etchsoftware.com) and Ryan Dawson (email: ryan@alivemediadev.com), sharing equal-rights 
     15 
     16This is Version 0.6.1 as of 11/30/2011 
    1617 
    1718    'Hosting Monitor' plugin for WordPress is free software; you can 
     
    5051// Add our submenu under Dashboard item in WP-Admin 
    5152function hostm_pages() { 
    52     add_management_page('Hosting Monitor', 'Hosting Monitor', 'manage_options', 'hosting-monitor-admin', 'hosting_monitor'); 
     53    global $hostm_admin_page; 
     54    $hostm_admin_page = add_management_page('Hosting Monitor', 'Hosting Monitor', 'manage_options', 'hosting-monitor-admin', 'hosting_monitor'); 
     55     
     56    // Add contextual help menu in wp-admin 
     57    add_action("load-$hostm_admin_page", 'hostm_add_help_menu'); 
    5358} 
    5459 
     
    117122    // Check that the user has the required capability  
    118123    if ( !current_user_can('manage_options') ) { 
    119         wp_die( __('You do not have sufficient permissions to access this page.') ); 
     124        wp_die( __('You do not have sufficient permissions to access this page.', 'hostm_plugin') ); 
    120125    } 
    121126     
     
    125130        $update_confirm = update_hosting_monitor_options(); 
    126131    } elseif ( !empty($_POST) ) { 
    127         wp_die( __('Invalid action performed. Please check your login and try again.') ); 
     132        wp_die( __('Invalid action performed. Please check your login and try again.', 'hostm_plugin') ); 
    128133    } 
    129134     
     
    179184    if ( $update_confirm === true ) { 
    180185        // Success message 
    181         _e('<div class="updated"><p><strong>Your settings have been saved.</strong></p></div>', 'guruspace-menu'); 
     186        _e('<div class="updated"><p><strong>Your settings have been saved.</strong></p></div>', 'hostm_plugin'); 
    182187    } 
    183188     
     
    186191     
    187192    // Settings screen title 
    188     echo "<h2>" . __( 'Hosting Monitor', 'guruspace-menu' ) . "</h2>"; 
     193    echo "<h2>" . __( 'Hosting Monitor', 'hostm_plugin' ) . "</h2>"; 
    189194     
    190195    // Render Settings form 
     
    193198    <form name="hosting_monitor_form" method="post" action=""> 
    194199        <p> 
    195             <?php _e("Disk space:", 'guruspace-menu' ); ?>  
     200            <?php _e("Disk space:", 'hostm_plugin' ); ?>  
    196201            <input type="text" name="<?php echo $data_field_name; ?>" value="<?php echo $opt_val; ?>" size="5"> 
    197202            &nbsp; 
     
    205210        </p> 
    206211        <p> 
    207             <?php _e("Database space:", 'guruspace-menu' ); ?>  
     212            <?php _e("Database space:", 'hostm_plugin' ); ?>  
    208213            <input type="text" name="<?php echo $data_field_name_db; ?>" value="<?php echo $opt_val_db; ?>" size="5"> 
    209214            &nbsp; 
     
    334339    <!-- Begin old %%DSPC code --> 
    335340    <p> 
    336         This plugin produced by: <a href="http://www.alivemediadev.net/">Alive Media Web Development</a> and <a href="http://www.etchsoftware.com/">Etch Software</a> 
     341        This plugin produced by: <a href="http://www.alivemediadev.com/">Alive Media Web Development</a> and <a href="http://www.etchsoftware.com/">Mike Bijon</a> 
    337342    </p> 
    338343    <p> 
     
    609614 
    610615    } 
     616     
     617    /* 
     618     * Add contextual help menu 
     619     * 
     620     * Using WP v3.3 menus 
     621     *  
     622     */ 
     623    function hostm_add_help_menu() { 
     624        global $hostm_admin_page; 
     625        $screen = get_current_screen(); 
     626         
     627        // Do not add help menu if not on our own admin page 
     628        if ( $screen -> id != $hostm_admin_page ) 
     629            return; 
     630         
     631        $help_content_faq = __(" 
     632            <h2>Frequently Asked Questions</h2> 
     633             
     634            <h4>Does this Plugin run on Windows web servers?</h4> 
     635                <p>Not entirely. It works on Windows Apache, but has errors on Windows IIS.</p> 
     636             
     637            <h4>I've noticed my Dashboard is slow. What gives?</h4> 
     638                <p>The used disk space is calculated when the Dashboard is loaded. It can be slow because the server counts every file, every time. On slow servers this can take some time. We agree that it's annoying and plan to fix it.</p> 
     639                <p>To prevent this, close the dahsboard window using the little arrow in the top-right corner. Alternatively, click on Screen Options and disable the widget.</p> 
     640             
     641            <h4>Are you going to fix {bug X}?</h4> 
     642                <p>Yes, as quickly as we can. The problems in version 0.5 and some we inherited from a previous plugin should be fixable. We can probably make this work correctly on Windows servers. And, we should be able to cache the disk space stats so the dashboard is not so slow.</p> 
     643             
     644            <h4>= Where did this come from, and will you keep updating it?</h4> 
     645                <p>Hosting Monitor is produced by: <a href=\"http://www.alivemediadev.com\">Alive Media Web Development</a>, and developed by: <a href=\"http://www.etchsoftware.com\">Mike Bijon</a>.</p> 
     646                <p>This plugin is installed on many of our customer sites. We plan to keep it updated _and_ to add new features as often as time allows. It is more than just a hobby, since it must be updated for new versions of WordPress.</p> 
     647        ", 'hostm_plugin'); 
     648         
     649        $help_content_setup = __(" 
     650            <h2>Setup Instructions</h2> 
     651                <ol> 
     652                    <li>Go to Tools &gt; Hosting Monitor in WordPress Admin</li> 
     653                    <li>Set the maximum disk space allowed by your hosting company & press &ldquo;Save Changes&rdquo;</li> 
     654                </ol> 
     655                <p><strong>Why?</strong> Every host is different, so Hosting Monitor can&#039;t automatically tell how much space you&#039;re *allowed* to use by your host.</p> 
     656        ", 'hostm_plugin'); 
     657         
     658        if ( method_exists( $screen, 'add_help_tab' ) ) { // Check if this is WP 3.3 
     659            // Do this if we are on own admin page 
     660            $screen->add_help_tab( array( 
     661                'id'      => 'hostm_help_faq', 
     662                'title'   => __('Help & FAQ', 'hostm_plugin'), 
     663                'content' => $help_content_faq, 
     664            )); 
     665            $screen->add_help_tab( array( 
     666                'id'      => 'hostm_help_setup', 
     667                'title'   => __('Setup Help', 'hostm_plugin'), 
     668                'content' => $help_content_setup, 
     669            )); 
     670        } else { // Earlier than 3.3, use old add_contextual_help 
     671            add_contextual_help( $hostm_admin_page, $help_content_faq . $help_content_setup ); 
     672        } 
     673    } 
     674     
    611675 
    612676    /* 
  • hosting-monitor/trunk/readme.txt

    r466346 r469734  
    44Requires at least: 3.0 
    55Tested up to: 3.3 
    6 Stable tag: 0.5.5 
     6Stable tag: 0.6.1 
    77 
    88Track how much disk and database space WordPress is using. 
     
    5656= Where did this come from, and will you keep updating it? = 
    5757 
    58 Hosting Monitor is produced by: www.ProjectCMS.net, and developed by: www.EtchSoftware.com. It is built with code from Disk Space Pie Chart by Jay Versluis and the Pie Chart Script by Rasmus Peters. 
     58Hosting Monitor is produced by: www.ProjectCMS.com, and developed by: www.EtchSoftware.com. It is built with code from Disk Space Pie Chart by Jay Versluis and the Pie Chart Script by Rasmus Peters. 
    5959 
    6060This plugin is installed on many of our customer sites. We plan to keep it updated _and_ to add new features as often as time allows. It is more than just a hobby, since it must be updated for new versions of WordPress. 
     
    7171== Upgrade Notice == 
    7272 
    73 = 0.5.5 = 
    74 Smooth upgrade from 0.5 - 0.5.1. Just backup & use WordPress update 
     73= 0.6.1 = 
     74Smooth upgrade from 0.5.x versions. Just backup & use WordPress update 
    7575 
    7676 
    7777== Changelog == 
     78 
     79= 0.6.1 = 
     80* Update Upgrade Notice with correct rev 
     81 
     82= 0.6 = 
     83* Add detailed Help menu (including 3.3 Help Tabs, & fallback for older Contextual Help) 
     84* Typo update in URL 
    7885 
    7986= 0.5.5 = 
Note: See TracChangeset for help on using the changeset viewer.