Skip to:
Content

bbPress.org

Changeset 3119


Ignore:
Timestamp:
05/08/2011 09:05:44 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Add contextual help to forums, topics, replies, and settings. Fixes #1510. Props ryanimel for original patch.

Location:
branches/plugin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/plugin/bbp-admin/bbp-forums.php

    r3097 r3119  
    5353        $this->_setup_globals();
    5454        $this->_setup_actions();
     55        $this->_setup_help();
    5556    }
    5657
     
    7071
    7172        // Add some general styling to the admin area
    72         add_action( 'admin_head',            array( $this, 'admin_head'              ) );
     73        add_action( 'admin_head',            array( $this, 'admin_head'       ) );
    7374
    7475        // Messages
    75         add_filter( 'post_updated_messages', array( $this, 'updated_messages'        ) );
     76        add_filter( 'post_updated_messages', array( $this, 'updated_messages' ) );
    7677
    7778        // Metabox actions
     
    9798        // Setup the post type for this admin component
    9899        $this->post_type = bbp_get_forum_post_type();
     100    }
     101
     102    /**
     103     * Contextual help for forums
     104     *
     105     * @since bbPress (r3119)
     106     * @access private
     107     */
     108    function _setup_help() {
     109
     110        // Prevent debug notices
     111        $contextual_help = '';
     112
     113        /** New/Edit **********************************************************/
     114
     115        $bbp_contextual_help[] = __( 'The forum title field and the big forum editing area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of the box. Use the Screen Options tab to unhide more boxes (like Slug) or to choose a 1- or 2-column layout for this screen.', 'bbpress' );
     116        $bbp_contextual_help[] = __( '<strong>Title</strong> - Enter a title for your forum. After you enter a title, you will see the permalink appear below it, which is fully editable.', 'bbpress' );
     117        $bbp_contextual_help[] = __( '<strong>Post editor</strong> - Enter the description for your forum. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The screen icon just before that allows you to expand the edit box to full screen. The HTML mode allows you to enter raw HTML along with your forum text. You can insert media files by clicking the icons above the post editor and following the directions.', 'bbpress' );
     118        $bbp_contextual_help[] = __( '<strong>Forum Attributes</strong> - Select the various attributes that your forum should have:', 'bbpress' );
     119        $bbp_contextual_help[] =
     120            '<ul>' .
     121                '<li>' . __( 'Forum Type determines whether it is a Forum (by default) or a Category, which means no new topics (only other forums) can be created within it.', 'bbpress' ) . '</li>' .
     122                '<li>' . __( 'Forum Status controls whether it is open (and thus can be posted to) or closed (thus not able to be posted to).',                                 'bbpress' ) . '</li>' .
     123                '<li>' . __( 'Visibility can be set to either Public (by default, seen by everyone), Private (seen only by chosen users), and Hidden (hidden from all users).', 'bbpress' ) . '</li>' .
     124                '<li>' . __( 'Parent turns the forum into a child forum of the selected forum/category in the dropdown.',                                                       'bbpress' ) . '</li>' .
     125                '<li>' . __( 'Order determines the order that forums in the given hierarchy are displayed (lower numbers first, higher numbers last).',                         'bbpress' ) . '</li>' .
     126            '</ul>';
     127
     128        $bbp_contextual_help[] = __( '<strong>Publish</strong> - The Publish box will allow you to Preview your forum before it is published, Publish your forum to your site, or Move to Trash will move your forum to the trash.', 'bbpress' );
     129        $bbp_contextual_help[] = __( '<strong>Revisions</strong> - Revisions show past versions of the saved forum. Each revision can be compared to the current version, or another revision. Revisions can also be restored to the current version.', 'bbpress' );
     130        $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     131        $bbp_contextual_help[] =
     132            '<ul>' .
     133                '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     134                '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>',       'bbpress' ) . '</li>' .
     135            '</ul>';
     136
     137        // Wrap each help item in paragraph tags
     138        foreach( $bbp_contextual_help as $paragraph )
     139            $contextual_help .= '<p>' . $paragraph . '</p>';
     140
     141        // Add help
     142        add_contextual_help( bbp_get_forum_post_type(), $contextual_help );
     143
     144        // Reset
     145        $contextual_help = $bbp_contextual_help = '';
     146
     147        /** Post Rows *********************************************************/
     148
     149        $bbp_contextual_help[] = __( 'This screen displays the forums available on your site.',           'bbpress' );
     150        $bbp_contextual_help[] = __( 'You can customize the display of this screen in a number of ways:', 'bbpress' );
     151        $bbp_contextual_help[] =
     152            '<ul>' .
     153                '<li>' . __( 'You can hide/display columns based on your needs and decide how many forums to list per screen using the Screen Options tab.',                                                                                                                                'bbpress' ) . '</li>' .
     154                '<li>' . __( 'You can filter the list of forums by forum status using the text links in the upper left to show All, Published, or Trashed forums. The default view is to show all forums.',                                                                                 'bbpress' ) . '</li>' .
     155                '<li>' . __( 'You can refine the list to show only forums from a specific month by using the dropdown menus above the forums list. Click the Filter button after making your selection. You also can refine the list by clicking on the forum creator in the forums list.', 'bbpress' ) . '</li>' .
     156            '</ul>';
     157
     158        $bbp_contextual_help[] = __( 'Hovering over a row in the forums list will display action links that allow you to manage your forum. You can perform the following actions:', 'bbpress' );
     159        $bbp_contextual_help[] =
     160            '<ul>' .
     161                '<li>' . __( 'Edit takes you to the editing screen for that forum. You can also reach that screen by clicking on the forum title.', 'bbpress' ) . '</li>' .
     162                '<li>' . __( 'Trash removes your forum from this list and places it in the trash, from which you can permanently delete it.',       'bbpress' ) . '</li>' .
     163                '<li>' . __( 'View will take you to your live forum to view the forum.',                                                            'bbpress' ) . '</li>' .
     164            '</ul>';
     165
     166        $bbp_contextual_help[] = __( 'You can also edit multiple forums at once. Select the forums you want to edit using the checkboxes, select Edit from the Bulk Actions menu and click Apply. You will be able to change the metadata for all selected forums at once. To remove a forum from the grouping, just click the x next to its name in the Bulk Edit area that appears.', 'bbpress' );
     167        $bbp_contextual_help[] = __( 'The Bulk Actions menu may also be used to delete multiple forums at once. Select Delete from the dropdown after making your selection.', 'bbpress' );
     168        $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     169        $bbp_contextual_help[] =
     170            '<ul>' .
     171                '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     172                '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>',       'bbpress' ) . '</li>' .
     173            '</ul>';
     174
     175        // Wrap each help item in paragraph tags
     176        foreach( $bbp_contextual_help as $paragraph )
     177            $contextual_help .= '<p>' . $paragraph . '</p>';
     178
     179        // Add help
     180        add_contextual_help( 'edit-' . bbp_get_forum_post_type(), $contextual_help );
    99181    }
    100182
  • branches/plugin/bbp-admin/bbp-replies.php

    r3097 r3119  
    5353        $this->_setup_globals();
    5454        $this->_setup_actions();
     55        $this->_setup_help();
    5556    }
    5657
     
    109110        // Setup the post type for this admin component
    110111        $this->post_type = bbp_get_reply_post_type();
     112    }
     113
     114    /**
     115     * Contextual help for replies
     116     *
     117     * @since bbPress (r3119)
     118     * @access private
     119     */
     120    function _setup_help() {
     121
     122        // Prevent debug notices
     123        $contextual_help = '';
     124
     125        /** New/Edit **********************************************************/
     126
     127        $bbp_contextual_help[] = __( 'The reply title field and the big reply editing area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of the box. Use the Screen Options tab to unhide more boxes (Reply Attributes, Slug) or to choose a 1- or 2-column layout for this screen.', 'bbpress' );
     128        $bbp_contextual_help[] = __( '<strong>Title</strong> - Enter a title for your reply. After you enter a title, you will see the permalink below, which you can edit.', 'bbpress' );
     129        $bbp_contextual_help[] = __( '<strong>Post editor</strong> - Enter the text for your reply. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The screen icon just before that allows you to expand the edit box to full screen. The HTML mode allows you to enter raw HTML along with your forum text. You can insert media files by clicking the icons above the post editor and following the directions.', 'bbpress' );
     130        $bbp_contextual_help[] = __( '<strong>Reply Attributes</strong> - Select the attributes that your reply should have. The Parent Topic dropdown determines the parent topic that the reply belongs to.', 'bbpress' );
     131        $bbp_contextual_help[] = __( '<strong>Publish</strong> - The Publish box will allow you to save your reply as Draft or Pending Review. You may Preview your reply before it is published as well. The Visibility will determine whether the reply is Public, Password protected (requiring a password on the site to view) or Private (only the author will have access to it). Replies may be published immediately by clicking the dropdown, or at a specific date and time by clicking the Edit link.', 'bbpress' );
     132        $bbp_contextual_help[] = __( '<strong>Revisions</strong> - Revisions show past versions of the saved reply. Each revision can be compared to the current version, or another revision. Revisions can also be restored to the current version.', 'bbpress' );
     133        $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     134        $bbp_contextual_help[] =
     135            '<ul>' .
     136                '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     137                '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>', 'bbpress' ) . '</li>' .
     138            '</ul>' ;
     139
     140        // Wrap each help item in paragraph tags
     141        foreach( $bbp_contextual_help as $paragraph )
     142            $contextual_help .= '<p>' . $paragraph . '</p>';
     143
     144        // Add help
     145        add_contextual_help( bbp_get_reply_post_type(), $contextual_help );
     146
     147        // Reset
     148        $contextual_help = $bbp_contextual_help = '';
     149
     150        /** Post Rows *********************************************************/
     151
     152        $bbp_contextual_help[] = __( 'This screen displays the replies created on your site.', 'bbpress' );
     153        $bbp_contextual_help[] = __( 'You can customize the display of this screen in a number of ways:', 'bbpress' );
     154        $bbp_contextual_help[] =
     155            '<ul>' .
     156                '<li>' . __( 'You can hide/display columns based on your needs (Forum, Topic, Author, and Created) and decide how many replies to list per screen using the Screen Options tab.') . '</li>' .
     157                '<li>' . __( 'You can filter the list of replies by reply status using the text links in the upper left to show All, Published, Pending Review, Draft, or Trashed topics. The default view is to show all replies.') . '</li>' .
     158                '<li>' . __( 'You can view replies in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.') . '</li>' .
     159                '<li>' . __( 'You can refine the list to show only replies from a specific month by using the dropdown menus above the replies list. Click the Filter button after making your selection.') . '</li>' .
     160                '<li>' . __( 'You can also show only replies from a specific parent forum by using the parent forum dropdown above the replies list and selecting the parent forum. Click the Filter button after making your selection.') . '</li>' .
     161            '</ul>';
     162
     163        $bbp_contextual_help[] = __( 'Hovering over a row in the replies list will display action links that allow you to manage your reply. You can perform the following actions:', 'bbpress' );
     164        $bbp_contextual_help[] =
     165            '<ul>' .
     166                '<li>' . __( 'Edit takes you to the editing screen for that reply. You can also reach that screen by clicking on the reply title.', 'bbpress' ) . '</li>' .
     167                '<li>' . __( 'Trash removes your reply from this list and places it in the trash, from which you can permanently delete it.', 'bbpress' ) . '</li>' .
     168                '<li>' . __( 'View will take you to your live reply to view the reply.', 'bbpress' ) . '</li>' .
     169                '<li>' . __( 'Spam will mark the topic as spam, preventing further replies to it and removing it from the site&rsquo;s public view.', 'bbpress' ) . '</li>' .
     170            '</ul>';
     171
     172        $bbp_contextual_help[] = __( 'You can also edit multiple replies at once. Select the replies you want to edit using the checkboxes, select Edit from the Bulk Actions menu and click Apply. You will be able to change the metadata for all selected replies at once. To remove a reply from the grouping, just click the x next to its name in the Bulk Edit area that appears.', 'bbpress' );
     173        $bbp_contextual_help[] = __( 'The Bulk Actions menu may also be used to delete multiple replies at once. Select Delete from the dropdown after making your selection.', 'bbpress' );
     174        $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     175        $bbp_contextual_help[] =
     176            '<ul>' .
     177                '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     178                '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>', 'bbpress', 'bbpress' ) . '</li>' .
     179            '</ul>';
     180
     181        // Wrap each help item in paragraph tags
     182        foreach( $bbp_contextual_help as $paragraph )
     183            $contextual_help .= '<p>' . $paragraph . '</p>';
     184
     185        // Add help
     186        add_contextual_help( 'edit-' . bbp_get_reply_post_type(), $contextual_help );
    111187    }
    112188
  • branches/plugin/bbp-admin/bbp-settings.php

    r3095 r3119  
    326326<?php
    327327}
    328 ?>
     328
     329/**
     330 * Contextual help for bbPress settings page
     331 *
     332 * @since bbPress (r3119)
     333 */
     334function bbp_admin_settings_help() {
     335
     336    $bbp_contextual_help[] = __('This screen provides access to basic bbPress settings.', 'bbpress' );
     337    $bbp_contextual_help[] = __('In the Main Settings you have a number of options:',     'bbpress' );
     338    $bbp_contextual_help[] =
     339        '<ul>' .
     340            '<li>' . __( 'You can choose to lock a post after a certain number of minutes. "Locking post editing" will prevent the author from editing some amount of time after saving a post.',              'bbpress' ) . '</li>' .
     341            '<li>' . __( '"Throttle time" is the amount of time required between posts from a single author. The higher the throttle time, the longer a user will need to wait between posting to the forum.', 'bbpress' ) . '</li>' .
     342            '<li>' . __( 'You may choose to allow favorites, which are a way for users to save and later return to topics they favor. This is enabled by default.',                                            'bbpress' ) . '</li>' .
     343            '<li>' . __( 'You may choose to allow subscriptions, which allows users to subscribe for notifications to topics that interest them. This is enabled by default.',                                 'bbpress' ) . '</li>' .
     344            '<li>' . __( 'You may choose to allow "Anonymous Posting", which will allow guest users who do not have accounts on your site to both create topics as well as replies.',                          'bbpress' ) . '</li>' .
     345        '</ul>';
     346
     347    $bbp_contextual_help[] = __( 'Per Page settings allow you to control the number of topics and replies will appear on each of those pages. This is comparable to the WordPress "Reading Settings" page, where you can set the number of posts that should show on blog pages and in feeds.', 'bbpress' );
     348    $bbp_contextual_help[] = __( 'The Forums section allows you to control the permalink structure for your forums. Each "base" is what will be displayed after your main URL and right before your permalink slug.', 'bbpress' );
     349    $bbp_contextual_help[] = __( 'You must click the Save Changes button at the bottom of the screen for new settings to take effect.', 'bbpress' );
     350    $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     351    $bbp_contextual_help[] =
     352        '<ul>' .
     353            '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     354            '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>',       'bbpress' ) . '</li>' .
     355        '</ul>' ;
     356
     357    // Empty the default $contextual_help var
     358    $contextual_help = '';
     359
     360    // Wrap each help item in paragraph tags
     361    foreach( $bbp_contextual_help as $paragraph )
     362        $contextual_help .= '<p>' . $paragraph . '</p>';
     363
     364    // Add help
     365    add_contextual_help( 'settings_page_bbpress', $contextual_help );
     366}
     367
     368?>
  • branches/plugin/bbp-admin/bbp-topics.php

    r3097 r3119  
    5353        $this->_setup_globals();
    5454        $this->_setup_actions();
     55        $this->_setup_help();
    5556    }
    5657
     
    109110        // Setup the post type for this admin component
    110111        $this->post_type = bbp_get_topic_post_type();
     112    }
     113
     114    /**
     115     * Contextual help for topics
     116     *
     117     * @since bbPress (r3119)
     118     * @access private
     119     */
     120    function _setup_help() {
     121
     122        // Prevent debug notices
     123        $contextual_help = '';
     124
     125        /** New/Edit **********************************************************/
     126
     127        $bbp_contextual_help[] = __( 'The topic title field and the big topic editing area are fixed in place, but you can reposition all the other boxes using drag and drop, and can minimize or expand them by clicking the title bar of the box. Use the Screen Options tab to unhide more boxes (Topic Tags, Topic Attributes, or Slug) or to choose a 1- or 2-column layout for this screen.', 'bbpress' );
     128        $bbp_contextual_help[] = __( '<strong>Title</strong> - Enter a title for your topic. After you enter a title, you will see the permalink below, which you can edit.', 'bbpress' );
     129        $bbp_contextual_help[] = __( '<strong>Post editor</strong> - Enter the text for your topic. There are two modes of editing: Visual and HTML. Choose the mode by clicking on the appropriate tab. Visual mode gives you a WYSIWYG editor. Click the last icon in the row to get a second row of controls. The screen icon just before that allows you to expand the edit box to full screen. The HTML mode allows you to enter raw HTML along with your forum text. You can insert media files by clicking the icons above the post editor and following the directions.', 'bbpress' );
     130        $bbp_contextual_help[] = __( '<strong>Topic Attributes</strong> - Select the attributes that your topic should have. The Forum dropdown determines the parent forum that the topic belongs to. Select the forum or category from the dropdown, or leave the default (No Forum) to post the topic without an assigned forum.', 'bbpress' );
     131        $bbp_contextual_help[] = __( '<strong>Publish</strong> - The Publish box will allow you to save your topic as Draft or Pending Review. You may Preview your topic before it is published as well. The Visibility will determine whether the topic is Public, Password protected (requiring a password on the site to view) or Private (only the author will have access to it). Topics may be published immediately by clicking the dropdown, or at a specific date and time by clicking the Edit link.', 'bbpress' );
     132        $bbp_contextual_help[] = __( '<strong>Topic Tags</strong> - You can assign keywords to your topics using Topic Tags. Unlike categories, tags have no hierarchy, meaning there is no relationship from one tag to another. Topics can be added and modified further from the Topic Tags screen.', 'bbpress' );
     133        $bbp_contextual_help[] = __( '<strong>Revisions</strong> - Revisions show past versions of the saved topic. Each revision can be compared to the current version, or another revision. Revisions can also be restored to the current version.', 'bbpress' );
     134        $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     135        $bbp_contextual_help[] =
     136            '<ul>' .
     137                '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     138                '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>',       'bbpress' ) . '</li>' .
     139            '</ul>';
     140
     141        // Wrap each help item in paragraph tags
     142        foreach( $bbp_contextual_help as $paragraph )
     143            $contextual_help .= '<p>' . $paragraph . '</p>';
     144
     145        // Add help
     146        add_contextual_help( bbp_get_topic_post_type(), $contextual_help );
     147
     148        // Reset
     149        $contextual_help = $bbp_contextual_help = '';
     150
     151        /** Post Rows *********************************************************/
     152
     153        $bbp_contextual_help[] = __( 'This screen displays the topics created on your site.',           'bbpress' );
     154        $bbp_contextual_help[] = __( 'You can customize the display of this screen in a number of ways:', 'bbpress' );
     155        $bbp_contextual_help[] =
     156            '<ul>' .
     157                '<li>' . __( 'You can hide/display columns based on your needs and decide how many topics to list per screen using the Screen Options tab.',                                                                             'bbpress' ) . '</li>' .
     158                '<li>' . __( 'You can filter the list of topics by topics status using the text links in the upper left to show All, Published, Pending Review, Draft, or Trashed topics. The default view is to show all topics.',      'bbpress' ) . '</li>' .
     159                '<li>' . __( 'You can view topics in a simple title list or with an excerpt. Choose the view you prefer by clicking on the icons at the top of the list on the right.',                                                  'bbpress' ) . '</li>' .
     160                '<li>' . __( 'You can refine the list to show only topics from a specific month by using the dropdown menus above the topics list. Click the Filter button after making your selection.',                                'bbpress' ) . '</li>' .
     161                '<li>' . __( 'You can also show only topics from a specific parent forum by using the parent forum dropdown above the topics list and selecting the parent forum. Click the Filter button after making your selection.', 'bbpress' ) . '</li>' .
     162                '<li>' . __( 'You can refine the list by clicking on the topic creator in the topics list.', 'bbpress' ) . '</li>' .
     163            '</ul>' .
     164
     165        $bbp_contextual_help[] = __( 'Hovering over a row in the topics list will display action links that allow you to manage your topic. You can perform the following actions:', 'bbpress' );
     166        $bbp_contextual_help[] =
     167            '<ul>' .
     168                '<li>' . __( 'Edit takes you to the editing screen for that topic. You can also reach that screen by clicking on the topic title.',                                                                            'bbpress' ) . '</li>' .
     169                '<li>' . __( 'Trash removes your topic from this list and places it in the trash, from which you can permanently delete it.',                                                                                  'bbpress' ) . '</li>' .
     170                '<li>' . __( 'View will take you to your live topic to view the topic.',                                                                                                                                       'bbpress' ) . '</li>' .
     171                '<li>' . __( 'Close will close your topic, disabling new replies within it. It will remain viewable to users, but replies will not be allowed.',                                                               'bbpress' ) . '</li>' .
     172                '<li>' . __( 'Stick (to front) will pin the topic to the front page of the forum that it&rsquo;s in. New topics will begin beneath the list of "stuck" topics, which will always sit at the top of the list.', 'bbpress' ) . '</li>' .
     173                '<li>' . __( 'Spam will mark the topic as spam, closing the post to new replies and removing it from the public view.',                                                                                        'bbpress' ) . '</li>' .
     174            '</ul>' .
     175
     176        $bbp_contextual_help[] = __( 'You can also edit multiple topics at once. Select the topics you want to edit using the checkboxes, select Edit from the Bulk Actions menu and click Apply. You will be able to change the metadata for all selected topics at once. To remove a topic from the grouping, just click the x next to its name in the Bulk Edit area that appears.', 'bbpress' );
     177        $bbp_contextual_help[] = __( 'The Bulk Actions menu may also be used to delete multiple topics at once. Select Delete from the dropdown after making your selection.', 'bbpress' );
     178        $bbp_contextual_help[] = __( '<strong>For more information:</strong>', 'bbpress' );
     179        $bbp_contextual_help[] =
     180            '<ul>' .
     181                '<li>' . __( '<a href="http://bbpress.org/documentation/">bbPress Documentation</a>', 'bbpress' ) . '</li>' .
     182                '<li>' . __( '<a href="http://bbpress.org/forums/">bbPress Support Forums</a>'      , 'bbpress' ) . '</li>' .
     183            '</ul>';
     184
     185        // Wrap each help item in paragraph tags
     186        foreach( $bbp_contextual_help as $paragraph )
     187            $contextual_help .= '<p>' . $paragraph . '</p>';
     188
     189        // Add help
     190        add_contextual_help( bbp_get_topic_post_type(), $contextual_help );
     191
     192        // Reset
     193        $contextual_help = $bbp_contextual_help = '';
     194
     195        /** Topic Tags **********************************************************/
     196
     197        $bbp_contextual_help[] = __( 'You can change the display of this screen using the Screen Options tab to set how many items are displayed per screen (20 by default) and to display/hide columns in the table (Description, Slug, and Topics).', 'bbpress' );
     198        $bbp_contextual_help[] = __( 'You can assign keywords to your topics using Topic Tags. Unlike categories, tags have no hierarchy, meaning there is no relationship from one tag to another.', 'bbpress' );
     199        $bbp_contextual_help[] = __( 'Normally, tags are ad-hoc keywords that identify important information in your topic (names, subjects, etc) that may or may not recur in other topics. If you think of your forum like a book, the tags are like the terms in the index.', 'bbpress' );
     200        $bbp_contextual_help[] = __( 'When editing a topic tag on this screen, you will fill in the following fields:', 'bbpress' );
     201        $bbp_contextual_help[] =
     202            '<ul>' .
     203                '<li>' . __( '<strong>Name</strong> - The name is how it appears on your site.',                                                                                       'bbpress' ) . '</li>' .
     204                '<li>' . __( '<strong>Slug</strong> - The Slug is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'bbpress' ) . '</li>' .
     205                '<li>' . __( '<strong>Description</strong> - The description is not prominent by default; however, some forum themes may display it.',                                 'bbpress' ) . '</li>' .
     206            '</ul>' ;
     207
     208        // Wrap each help item in paragraph tags
     209        foreach( $bbp_contextual_help as $paragraph )
     210            $contextual_help .= '<p>' . $paragraph . '</p>';
     211
     212        // Add help
     213        global $bbp;
     214        add_contextual_help( 'edit-' . $bbp->topic_tag_id, $contextual_help );
    111215    }
    112216
  • branches/plugin/bbp-includes/bbp-hooks.php

    r3095 r3119  
    7474    add_action( 'bbp_admin_init',    'bbp_topics_admin'            );
    7575    add_action( 'bbp_admin_init',    'bbp_replies_admin'           );
     76    add_action( 'bbp_admin_init',    'bbp_admin_settings_help'     );
    7677    add_action( 'admin_menu',        'bbp_admin_separator'         );
    7778    add_action( 'custom_menu_order', 'bbp_admin_custom_menu_order' );
Note: See TracChangeset for help on using the changeset viewer.