/[drupal]/contributions/modules/username_highlighter/username_highlighter.module
ViewVC logotype

Diff of /contributions/modules/username_highlighter/username_highlighter.module

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

revision 1.4, Fri Jul 24 13:31:34 2009 UTC revision 1.5, Fri Jul 24 13:58:53 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: username_highlighter.module,v 1.3 2008/06/26 07:57:40 soxofaan Exp $  // $Id: username_highlighter.module,v 1.4 2009/07/24 13:31:34 soxofaan Exp $
3    
4  /**  /**
5   * @file Implementation of the User name highlighter module.   * @file Implementation of the User name highlighter module.
# Line 148  function _username_highlighter_username_ Line 148  function _username_highlighter_username_
148      $result = db_query('SELECT uid, name FROM {users} WHERE name <> ""');      $result = db_query('SELECT uid, name FROM {users} WHERE name <> ""');
149      while ($user = db_fetch_object($result)) {      while ($user = db_fetch_object($result)) {
150        $color = _username_highlighter_uid2color($user->uid);        $color = _username_highlighter_uid2color($user->uid);
151        $username_map['/\\b'. $user->name .'\\b/'] = '<span style="background-color:'. $color .';">'. $user->name .'</span>';        $username_map['/\\b'. $user->name .'\\b/'] =
152            l($user->name, 'user/' . $user->uid,
153              array('attributes' => array('style' => 'background-color:'. $color .';'))
154            );
155      }      }
156    }    }
157    return $username_map;    return $username_map;

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.2