You are here

README.txt in Admin 6.2

Same filename and directory in other branches
  1. 6 README.txt
  2. 7.2 README.txt
Admin 2.x
=========
The admin module provides UI improvements to the standard Drupal admin interface. The 2.x branch focuses on the following goals:

1. Sustainability - avoid excessive overrides of code, markup, and
   interface strings to ensure the module keeps the workload overhead
   on the maintainers and community to a minimum.

2. Pluggable/extensible architecture - ensure that admin serves as a
   starting point for other modules in contrib to implement admin
   interfaces.

3. Expose Drupal's strengths and downplay its weaknesses where possible.
   An honest approach to the underlying framework and architecture
   of Drupal will be less confusing to the user down the road.

Admin is not an original work - many of its decisions have had direct
influences from other work in the community:

- [Administration menu](http://drupal.org/project/admin_menu)
  Daniel Kudwien (sun)

- [Navigate](http://drupal.org/project/navigate)
  Chris Shattuck (chrisshattuck)

- [d7ux](http://www.d7ux.org)
  Mark Boulton & Leisa Reichelt


Installation
============
1. Install & enable the module.

2. Admin makes a permission available that allows only properly
   permissioned users to make use of the admin toolbar. Users with the
   'use admin toolbar' permission will be able to use the toolbar.

3. You can configure the layout, position, and enabled tools for the
   admin toolbar on `admin/settings/admin`.


Implementing your own Admin "plugins"
=====================================
Admin's "plugins" are simply Drupal blocks. In order to expose one of your
module's blocks as one suitable for use in the admin toolbar you can set the `admin` key in your `hook_block()` to `TRUE`. Note that users can add any blocks to the admin toolbar if they wish at `admin/settings/admin`, though not all will work well in the context of the admin toolbar.

    /**
     * Implementation of hook_block().
     */
    function my_module_block($op = 'list', $delta = 0, $edit = array()) {
      switch ($op) {
        case 'list':
          $blocks = array();
          $blocks['example'] = array(
            'info' => t('Example block'),
            'admin' => TRUE
          );
          return $blocks;
      }
    }


Theming your block and other tips
=================================
Your block should provide general rules for either of the admin toolbar
layouts (horizontal or vertical). You can specify CSS rules using the
following selectors:

    #admin-toolbar.horizontal {}
    #admin-toolbar.vertical {}

Admin provides fairly decent defaults for the following Drupal core
theme functions:

  - `theme('item_list')`
  - menu output (e.g. `menu_tree_output()`).
  - most form elements (with the exception of fieldsets)
  - admin panes (see below)

Admin provides an additional FormAPI element type `admin_panes`. Admin
panes allow you to fit multiple elements of content into a togglable
interface. The panes will automatically adjust to the layout to the toolbar
and display as either vertical tabs (horizontal layout) or accordian boxes
(vertical layout).

Here is an example of using admin panes in a form API array:

    $form['panes'] = array(
      '#tree' => FALSE,
      '#type' => 'admin_panes',
      'foo' => array(
        '#title' => t('Pane 1'),
        ...
      ),
      'bar' => array(
        '#title' => t('Pane 2'),
        ...
      ),
    );

Note that each child element must have a #title attribute to be labeled
properly.


Contributors
============
- yhahn (Young Hahn)
- ajashton (AJ Ashton)

File

README.txt
View source
  1. Admin 2.x
  2. =========
  3. The admin module provides UI improvements to the standard Drupal admin interface. The 2.x branch focuses on the following goals:
  4. 1. Sustainability - avoid excessive overrides of code, markup, and
  5. interface strings to ensure the module keeps the workload overhead
  6. on the maintainers and community to a minimum.
  7. 2. Pluggable/extensible architecture - ensure that admin serves as a
  8. starting point for other modules in contrib to implement admin
  9. interfaces.
  10. 3. Expose Drupal's strengths and downplay its weaknesses where possible.
  11. An honest approach to the underlying framework and architecture
  12. of Drupal will be less confusing to the user down the road.
  13. Admin is not an original work - many of its decisions have had direct
  14. influences from other work in the community:
  15. - [Administration menu](http://drupal.org/project/admin_menu)
  16. Daniel Kudwien (sun)
  17. - [Navigate](http://drupal.org/project/navigate)
  18. Chris Shattuck (chrisshattuck)
  19. - [d7ux](http://www.d7ux.org)
  20. Mark Boulton & Leisa Reichelt
  21. Installation
  22. ============
  23. 1. Install & enable the module.
  24. 2. Admin makes a permission available that allows only properly
  25. permissioned users to make use of the admin toolbar. Users with the
  26. 'use admin toolbar' permission will be able to use the toolbar.
  27. 3. You can configure the layout, position, and enabled tools for the
  28. admin toolbar on `admin/settings/admin`.
  29. Implementing your own Admin "plugins"
  30. =====================================
  31. Admin's "plugins" are simply Drupal blocks. In order to expose one of your
  32. module's blocks as one suitable for use in the admin toolbar you can set the `admin` key in your `hook_block()` to `TRUE`. Note that users can add any blocks to the admin toolbar if they wish at `admin/settings/admin`, though not all will work well in the context of the admin toolbar.
  33. /**
  34. * Implementation of hook_block().
  35. */
  36. function my_module_block($op = 'list', $delta = 0, $edit = array()) {
  37. switch ($op) {
  38. case 'list':
  39. $blocks = array();
  40. $blocks['example'] = array(
  41. 'info' => t('Example block'),
  42. 'admin' => TRUE
  43. );
  44. return $blocks;
  45. }
  46. }
  47. Theming your block and other tips
  48. =================================
  49. Your block should provide general rules for either of the admin toolbar
  50. layouts (horizontal or vertical). You can specify CSS rules using the
  51. following selectors:
  52. #admin-toolbar.horizontal {}
  53. #admin-toolbar.vertical {}
  54. Admin provides fairly decent defaults for the following Drupal core
  55. theme functions:
  56. - `theme('item_list')`
  57. - menu output (e.g. `menu_tree_output()`).
  58. - most form elements (with the exception of fieldsets)
  59. - admin panes (see below)
  60. Admin provides an additional FormAPI element type `admin_panes`. Admin
  61. panes allow you to fit multiple elements of content into a togglable
  62. interface. The panes will automatically adjust to the layout to the toolbar
  63. and display as either vertical tabs (horizontal layout) or accordian boxes
  64. (vertical layout).
  65. Here is an example of using admin panes in a form API array:
  66. $form['panes'] = array(
  67. '#tree' => FALSE,
  68. '#type' => 'admin_panes',
  69. 'foo' => array(
  70. '#title' => t('Pane 1'),
  71. ...
  72. ),
  73. 'bar' => array(
  74. '#title' => t('Pane 2'),
  75. ...
  76. ),
  77. );
  78. Note that each child element must have a #title attribute to be labeled
  79. properly.
  80. Contributors
  81. ============
  82. - yhahn (Young Hahn)
  83. - ajashton (AJ Ashton)