Plugin Directory

Changeset 435767


Ignore:
Timestamp:
09/09/2011 04:01:06 PM (15 years ago)
Author:
BenIrvin
Message:
 
Location:
admin-dashboard-site-notes/branches/1.2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • admin-dashboard-site-notes/branches/1.2/admin-styles.css

    r435307 r435767  
    6969    margin-bottom:1em;
    7070}
    71 #dsn_instructions .site_note li,
    72 #dsn_dashboard .site_note li {
     71#dsn_instructions .site_note li.site_note,
     72#dsn_dashboard .site_note li.site_note {
    7373    margin-left:1em;
    7474    padding-top:0.5em;
     
    7676}
    7777
    78 #dsn_instructions .index ol,
    79 #dsn_instructions .index ul,
    80 #dsn_instructions .index li,
     78#dsn_instructions .index ol.notes,
     79#dsn_instructions .index ul.notes,
     80#dsn_instructions .index li.site_note,
    8181#dsn_instructions .index h4 {
    8282    margin:0;
    8383    padding:0;
    8484}
    85 #dsn_instructions ul.index li {
     85#dsn_instructions ul.index li.site_note {
    8686    margin-top:0.1em;
    8787    margin-left:1em;
  • admin-dashboard-site-notes/branches/1.2/dashboard-site-notes.php

    r435307 r435767  
    2222* expirations/time ranges - use http://wordpress.org/extend/plugins/automatic-page-publish-expire/
    2323* notes appear outside of admin - use http://wordpress.org/extend/plugins/wp-announcements/
    24 * tweetmemebutton conflict - appears to be abandoned, uses deprecated functions, and appears to be broken for most people in general
    25 
    26 == Changelog ==
    27 = 1.1 =
    28 * css changes to make everything prettier and hopefully more usable
    29 * added config option for choosing which roles can create notes
    30 * added note option for hiding the title
    31 * added config option for enabling application of content filters on notes
    32 * added config option for enabling use of excerpts
    33 * added config option for title of dashboard widget and instruction manual
    34 * added config option for grouping notes
    35 * added options page
    36 * fixed bug where content_filters were being applied twice
    37 * notes sorted by 'menu_order' ascending, then 'post_title' alphabetically
    38 
    39 = 1.0.1 =
    40 * fixed bug that was adding extra meta fields to wrong content types
    41 
    42 = 1.0 =
    43 * added instruction manual
    44 
    45 = 0.9.2.1 =
    46 * fixed fatal error bug and display bug
    47 * fixed incorrect screenshots
    48 
    49 = 0.9.2 =
    50 * added translation support and English .pot file
    51 * added donate links
    52 * hierarchy now takes effect on notes on dashboard
    53 * if excerpt is available, use that in notices/dashboard, with full text appearing only in manual
    54 * major optimization by changing note querying method and removing other stupidity
    55 * stored 'everywhere' checkboxes server-side so they work without javascript enabled
    56 * added GPLv3 license document
    57 * improved auto ("everywhere") checkbox functionality
    58 
    59 = 0.9.1 =
    60 * notes can be set to display only for certain user roles
    61 
    62 = 0.9 =
    63 * added post type notes by action
    64 * added dashboard notes
     24* tweetmemebutton conflict - appears to be abandoned, uses deprecated functions, and appears to be broken in general for a lot of people
    6525
    6626*/
     
    11676       
    11777        // create the site note content type
    118         self::add_content_type();
     78        if(!defined('DSN_DISABLE_CHANGES')) {
     79            self::add_content_type();
     80        }
    11981       
    12082        // add hooks
     
    139101        // add the options page if this user can manage the options
    140102        if(self::user_has_admin()) {
    141             add_action('admin_menu', array($this,'add_config_menu'));
    142             add_action('admin_init', array($this,'register_settings'));
     103            if(!defined('DSN_DISABLE_CHANGES')) {
     104                add_action('admin_menu', array($this,'add_config_menu'));
     105                add_action('admin_init', array($this,'register_settings'));
     106            }
    143107        }
    144108    }
     
    410374    // apply our internal options to content and return what we actually want
    411375    public static function get_content($post,$full_post=false) {
    412         $c = $post->post_content; // content filters and excerpts are already handled by get_notes()$c = '';
     376        $c = '';
    413377        if(self::$options['support_excerpt']) {
    414378            $c = $post->post_excerpt;
     
    419383        if(!strlen(trim($c)) || $full_post) {
    420384            $c = $post->post_content;
    421         }
    422         if(self::$options['use_content_filter']) {
    423             $c = apply_filters('the_content', $c);
     385            if(self::$options['use_content_filter']) {
     386                $c = apply_filters('the_content', $c);
     387            }
    424388        }
    425389        return $c;
     
    668632            $defaults['role_'.$role] = false;
    669633            if($role=='administrator') {
    670                 $defaults['role_'.$role] = true;
     634                $defaults['role_administrator'] = true;
     635                // if role_administrator has never been set before, add capabilities
     636                // for using the post type.
     637                if(!isset($options['role_administrator'])) {
     638                    global $wp_roles;
     639                    $wp_roles->add_cap($role, self::$post_type_name_cap,true);
     640                    foreach(self::$capabilities as $c=>$val) {
     641                        $wp_roles->add_cap($role, $val, true);
     642                    }
     643                }
    671644            }
    672645        }
  • admin-dashboard-site-notes/branches/1.2/readme.txt

    r435307 r435767  
    1313Add notes about the site to various admin locations, as well as compile them into an instruction manual.
    1414
     15This is intended to build instructions into a site for clients, so it is focused on providing abilities only
     16to the highest role of user available on a site, although it can be configured as a general purpose tool
     17to leave temporary notes to any group on your site that has admin access.
     18
    1519== Installation ==
    1620
     
    2529define('DSN_ADMIN_CONFIG',true);
    2630
    27 If you aren't using multisite but still don't see site notes, they're probably disabled. Go to Settings->Site Notes and make sure the box next to Administrator is checked.
     31If you aren't using multisite but still don't see site notes, they're probably disabled. Try Settings->Site Notes and make sure the box next to Administrator is checked.
    2832
    2933= I've added my notes but now I want to hide the Site Notes from other admins. =
    3034Go to Settings->Site Notes and uncheck the box next to Administrator and they will no longer be editable.  To re-enable them, just come back to this page and turn it back on.
     35You can also define('DSN_DISABLE_CHANGES',true); in your functions.php to disable all changes completely, but note that if you do that, NOBODY will be able to make any changes whatsoever until you remove that line.
    3136
    3237= Why isn't one of my notes showing up in the dashboard/instructions? =
     
    3439
    3540= Why is one of my notes showing up with empty text? =
    36 Make sure that the excerpt field for your note is either empty or contains the short content you want to include.
     41Make sure that the excerpt field for your note is empty or contains the short content you want to include.  If it's still not showing up, trying disabling excerpt, excerpt filters, and/or content filters on the settings page.
    3742
    3843== Screenshots ==
     
    4651== Changelog ==
    4752= 1.1 =
     53* added constant for allowing normal admins to edit config on multisite
     54* added constant for disabling all changes
    4855* css changes to make everything prettier and hopefully more usable
     56* added config option for choosing which roles can create notes
    4957* added note option for hiding the title
    5058* added config option for enabling application of content filters on notes
     
    5361* added config option for grouping notes
    5462* added options page
    55 * fixed bug where content_filters were being applied twice
    5663* notes sorted by 'menu_order' ascending, then 'post_title' alphabetically
    5764
     
    6067
    6168= 1.0 =
    62 * added instruction manual page
     69* added instruction manual
    6370
    6471= 0.9.2.1 =
     
    6875= 0.9.2 =
    6976* added translation support and English .pot file
     77* added donate links
    7078* hierarchy now takes effect on notes on dashboard
    7179* if excerpt is available, use that in notices/dashboard, with full text appearing only in manual
    7280* major optimization by changing note querying method and removing other stupidity
    7381* stored 'everywhere' checkboxes server-side so they work without javascript enabled
     82* added GPLv3 license document
    7483* improved auto ("everywhere") checkbox functionality
    7584
     
    8594= 1.1 =
    8695Added a bunch of configuration options, permissions options, a bit of css, and some minor bug fixes.
    87 MULTISITE NOTE: this will probably add permission for normal admins (not just super-admins) to create site notes unless you go to Site Notes Config and disable the administrator permission.
     96MULTISITE USERS: this will add permission for normal admins (not just super-admins) to create site notes unless you go to Site Notes Config and disable the administrator permission.
Note: See TracChangeset for help on using the changeset viewer.