/[drupal]/contributions/modules/profile_pages/README.txt
ViewVC logotype

Diff of /contributions/modules/profile_pages/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.2, Thu Jan 5 20:42:47 2006 UTC revision 1.3, Mon Oct 22 21:57:46 2007 UTC
# Line 1  Line 1 
1  DESCRIPTION  ; $Id$
2  -----------  README
3    ---------------------------
4    A module that lists every user on the site with a certain profile_field filled in, similar to a site directory of users with that information listed (i.e., users with an AOL Instant Messenger or XFire account)
5    
 A module that lists every user on the site with a certain  
 profile_field filled in, similar to a site directory of users  
 with that information listed (i.e., users with an AOL Instant  
 Messenger or XFire account)  
6    
7  REQUIREMENTS  Installation
8  ------------  ---------------------------
9    After you have installed the module through the standard Drupal 5.x workflow, you will want to add a link to the profile pages from your user's profiles.  You can do so by overriding theme_user_profile in your theme's template.php file.  See below for a sample.
10    
 Drupal's core profile.module must be activated.  
11    All profile pages will be accessible via the URL scheme http://example.com/profile_pages/profile_field_name.
12    
13    Visiting http://yoursite.com/profile_pages will list all profile fields with a link to their respective profile page.
14    
15    
16    Sample theme function
17    ---------------------------
18    Notice the link created with the text 'View All':
19    
20    function example_user_profile($account, $fields) {
21      $output = '<div class="profile">';
22      $output .= theme('user_picture', $account);
23      foreach ($fields as $category => $items) {
24        if (strlen($category) > 0) {
25          $output .= '<h2 class="title">'. check_plain($category) .'</h2>';
26        }
27        $output .= '<dl>';
28        foreach ($items as $item) {
29          if (isset($item['title'])) {
30            $output .= '<dt class="'. $item['class'] .'">'. $item['title'] .'</dt>';
31          }
32          $output .= '<dd class="'. $item['class'] .'">'. $item['value'] . ' <strong>' . l(t('(View All)'), 'profile_pages/'.$type) . '</strong></dd>';
33        }
34        $output .= '</dl>';
35      }
36      $output .= '</div>';
37    
38      return $output;
39    }

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.2