| 1 |
/* $Id: README.txt,v 1.1.2.2 2008/08/14 12:56:50 smk Exp $ */
|
| 2 |
|
| 3 |
-- SUMMARY --
|
| 4 |
|
| 5 |
User Display aims at providing a centralized configuration and extendable API
|
| 6 |
to consistently display user names and pictures (avatars) across a site. By
|
| 7 |
supporting User Display's API, third party modules give site owners complete
|
| 8 |
control over how user names and pictures should be shown. For example, users
|
| 9 |
in the "Who's online" block may be displayed with their picture only, while
|
| 10 |
users in comments could be shown with their name, picture, and other elements.
|
| 11 |
|
| 12 |
Another feature of User Display is the Action Links submodule, an AHAH driven,
|
| 13 |
customizable context menu for user links, allowing users to execute various
|
| 14 |
user related actions, for example write a private message or add a user to the
|
| 15 |
buddy list.
|
| 16 |
|
| 17 |
For a full description visit the project page:
|
| 18 |
http://drupal.org/project/user_display
|
| 19 |
Bug reports, feature suggestions and latest developments:
|
| 20 |
http://drupal.org/project/issues/user_display
|
| 21 |
|
| 22 |
|
| 23 |
-- BACKGROUND --
|
| 24 |
|
| 25 |
Users are visually represented by "display styles". A style can consist of
|
| 26 |
various configurable elements that we call "decorators", for example user name,
|
| 27 |
picture, online status, role, etc. By leveraging User Display's API, third
|
| 28 |
party modules are able to extend the available elements, for example add a
|
| 29 |
country flag based on user profile data.
|
| 30 |
|
| 31 |
To be able to display customized users, third party modules need to support
|
| 32 |
User Display by making "display classes" available. Display classes identify
|
| 33 |
all locations where users are shown, and provide the link between User Display
|
| 34 |
and the third party module.
|
| 35 |
|
| 36 |
|
| 37 |
-- REQUIREMENTS --
|
| 38 |
|
| 39 |
* ImageCache v2.x
|
| 40 |
|
| 41 |
|
| 42 |
-- INSTALLATION --
|
| 43 |
|
| 44 |
* Make sure that your theme does not contain the following functions (by
|
| 45 |
commenting them out or removing them completely):
|
| 46 |
|
| 47 |
- phptemplate_username()
|
| 48 |
- phptemplate_user_picture()
|
| 49 |
- phptemplate_user_list()
|
| 50 |
|
| 51 |
You should also make sure that neither of these functions is overridden by
|
| 52 |
your theme (i.e. it exists with 'nameofyourtheme_' prefix instead of
|
| 53 |
'phptemplate_').
|
| 54 |
|
| 55 |
* Install as usual, see http://drupal.org/node/70151 for further information.
|
| 56 |
|
| 57 |
* To enable User Display API support in nodes and comments rendered by Drupal
|
| 58 |
core, copy the file user_display_phptemplate.patch to the root directory
|
| 59 |
of your Drupal installation and execute the following shell command there:
|
| 60 |
|
| 61 |
patch -b -p0 < user_display_phptemplate.patch
|
| 62 |
|
| 63 |
|
| 64 |
-- CONFIGURATION --
|
| 65 |
|
| 66 |
* As long as the User Display UI module is not completed, either enable Help
|
| 67 |
module or see user_display_ui.txt to learn how to setup user display styles
|
| 68 |
and classes.
|
| 69 |
|
| 70 |
* Configure user display styles in Administer >> User management >>
|
| 71 |
>> User Display.
|
| 72 |
|
| 73 |
|
| 74 |
-- TROUBLESHOOTING --
|
| 75 |
|
| 76 |
* If you have set up a user display style and class but Drupal outputs the
|
| 77 |
default user name or picture, you should double-check that all PHP files in
|
| 78 |
your theme do not output theme('username') or theme('user_picture') directly.
|
| 79 |
|
| 80 |
|
| 81 |
-- DEVELOPER INFO --
|
| 82 |
|
| 83 |
You are the author of a module and want to give back site owners control over
|
| 84 |
how to display user names and pictures? Great! You can support User Display by
|
| 85 |
adding a "display class" (much like a CSS class, although CSS isn't used here)
|
| 86 |
to all relevant theme('username') and theme('user_picture') calls. For
|
| 87 |
example, a module which displays a status block with user names or pictures
|
| 88 |
might add the class 'mymodule_block_status' as additional argument like this:
|
| 89 |
|
| 90 |
$output .= theme('username', $account, 'mymodule_block_status');
|
| 91 |
|
| 92 |
By implementing hook_user_display(), your module may then assign a title and
|
| 93 |
description for each available class, which in turn can be used by site admins
|
| 94 |
to control the visual representation. And the best thing is: because the core
|
| 95 |
theme functions don't use the added parameter, your code is still fully
|
| 96 |
backwards compatible! No nasty module_exists() hacks required to support User
|
| 97 |
Display.
|
| 98 |
|
| 99 |
|
| 100 |
-- CONTACT --
|
| 101 |
|
| 102 |
Developed by:
|
| 103 |
* Daniel F. Kudwien (sun) - dev@unleashedmind.com
|
| 104 |
* Stefan M. Kudwien (smk-ka) - dev@unleashedmind.com
|
| 105 |
|
| 106 |
This project has been sponsored by:
|
| 107 |
* UNLEASHED MIND
|
| 108 |
Specialized in consulting and planning of Drupal powered sites, UNLEASHED
|
| 109 |
MIND offers installation, development, theming, customization, and hosting
|
| 110 |
to get you started. Visit http://www.unleashedmind.com for more information.
|
| 111 |
|