| 1 |
DESCRIPTION
|
| 2 |
===========
|
| 3 |
|
| 4 |
The admin module provides UI improvements to the standard Drupal admin
|
| 5 |
interface. It implements some of the ideas being explored for
|
| 6 |
usability improvements in Drupal 7.
|
| 7 |
|
| 8 |
|
| 9 |
INSTALLATION
|
| 10 |
============
|
| 11 |
|
| 12 |
1. Install & enable the module.
|
| 13 |
|
| 14 |
2. If you do not have an admin theme selected, admin will provide its
|
| 15 |
admin theme as the default.
|
| 16 |
|
| 17 |
3. To make use of the admin header within your theme, you must add the
|
| 18 |
following line to your theme's page.tpl.php file immediately
|
| 19 |
following the <body> tag:
|
| 20 |
|
| 21 |
<?php if (!empty($admin)) print $admin; ?>
|
| 22 |
|
| 23 |
4. Admin makes 2 different permissions available:
|
| 24 |
|
| 25 |
'admin inline': Grant users access to inline contextual links for
|
| 26 |
editing nodes, views, blocks, etc.
|
| 27 |
|
| 28 |
'admin menu': Grant users access to the admin header/menu.
|
| 29 |
|
| 30 |
|
| 31 |
GRAPHICS
|
| 32 |
========
|
| 33 |
|
| 34 |
The icons used by the admin module were designed by Young Hahn and
|
| 35 |
AJ Ashton specifically for use with Drupal's admin interface.
|
| 36 |
The iconset is available for use under a dual GPL/BSD license,
|
| 37 |
meaning you may choose the license which is most appropriate for
|
| 38 |
your project.
|
| 39 |
|
| 40 |
|
| 41 |
API
|
| 42 |
===
|
| 43 |
|
| 44 |
There is a small API included in admin for adding contextual popup
|
| 45 |
links to various Drupal objects.
|
| 46 |
|
| 47 |
You can currently add an admin link to a block, node or view at any
|
| 48 |
time during page generation BEFORE the respective item is themed.
|
| 49 |
|
| 50 |
To add a link you can use the admin_links_set() function. You need
|
| 51 |
to specify the $type, $id, and $link parameters. Here are some
|
| 52 |
examples.
|
| 53 |
|
| 54 |
Example 1: from within hook_block():
|
| 55 |
|
| 56 |
if (module_exists('admin')) {
|
| 57 |
$link = l(t('Configure me'), 'path/to/my/settings/page');
|
| 58 |
admin_links_set('block', 'mymodule-delta', $link);
|
| 59 |
}
|
| 60 |
|
| 61 |
Example 2: from within hook_views_pre_view():
|
| 62 |
|
| 63 |
if (module_exists('admin')) {
|
| 64 |
$link = admin_admin_link('views', array('view' => $view->name));
|
| 65 |
admin_links_set('views', $view->name .'-'. $display_id, $link);
|
| 66 |
}
|
| 67 |
|
| 68 |
In this case, we use the helper function admin_admin_link(). It is
|
| 69 |
just that -- a helper function for generating some common admin links.
|
| 70 |
It also does some nice things like add &destination=$_GET['q'] to the
|
| 71 |
query string to send the user back to the current page after they
|
| 72 |
finish editing a view.
|
| 73 |
|
| 74 |
|
| 75 |
CONTRIBUTORS
|
| 76 |
============
|
| 77 |
Young Hahn young@developmentseed.org
|
| 78 |
AJ Ashton aj@developmentseed.org
|