Esempio n. 1
0
function boinc_preprocess_privatemsg_view(&$vars, $hook)
{
    $user_image = boincuser_get_user_profile_image($vars['message']['author']->uid);
    if ($user_image['image']['filepath']) {
        $author_picture = '<div class="picture">';
        $author_picture .= theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
        $author_picture .= '</div>';
    }
    $vars['author_picture'] = $author_picture;
    $vars['message_timestamp'] = date('j M Y H:i:s T', $vars['message']['timestamp']);
}
Esempio n. 2
0
        $authors[$comment->uid] = user_load(array('uid' => $comment->uid));
    }
    // Remove the wrapper the Ignore User module puts around node->content.
    // It should be around the whole comment, not one part...
    // Absurd nested functions to remove wrappers are as follows.
    $content = strstr(end(explode('<div class="ignore-user-content">', $content)), '</div></div>', TRUE);
    print '<div class="ignore-user-container">';
    print bts('!username is on your !ignore_list. Click !here to view this post.', array('!username' => theme('username', $authors[$comment->uid]), '!ignore_list' => l(bts('ignore list'), 'ignore_user/list'), '!here' => l(bts('here'), "node/{$comment->nid}#comment-{$comment->cid}", array('attributes' => array('class' => 'ignore-user-content-link')))));
    print '<div class="ignore-user-content">';
}
?>
  
  <div class="user">
    <?php 
$account = user_load(array('uid' => $comment->uid));
$user_image = boincuser_get_user_profile_image($comment->uid);
if ($user_image) {
    print '<div class="picture">';
    if (is_array($user_image) and $user_image['image']['filepath']) {
        //print theme('imagecache', 'thumbnail', $user_image['image']['filepath'], $user_image['alt'], $user_image['alt']);
        print theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
    } elseif (is_string($user_image)) {
        print '<img src="' . $user_image . '"/>';
    }
    print '</div>';
}
// Generate ignore user link
$ignore_link = ignore_user_link('comment', $comment);
//echo '<pre>' . print_r($links, TRUE) . '</pre>';
?>
    <div class="name"><?php 
</div>
  <?php 
}
?>
  
  <?php 
// Only show this post on the first page of a thread
?>
  <?php 
if ($first_page) {
    ?>
    
    <div class="user">
      <?php 
    $account = user_load(array('uid' => $uid));
    $user_image = boincuser_get_user_profile_image($uid);
    if ($user_image['image']['filepath']) {
        print '<div class="picture">';
        //print theme('imagecache', 'thumbnail', $user_image['image']['filepath'], $user_image['alt'], $user_image['alt']);
        print theme('imagefield_image', $user_image['image'], $user_image['alt'], $user_image['alt'], array(), false);
        print '</div>';
    }
    // Generate ignore user link
    $ignore_link = ignore_user_link('node', $node);
    //echo '<pre>' . print_r($node->links, TRUE) . '</pre>';
    ?>
      <div class="name"><?php 
    print $name;
    ?>
</div>
      <?php 
Esempio n. 4
0
 *
 * @see template_preprocess_search_result()
 */
global $base_path;
switch ($info_split['type']) {
    case 'Profile':
    case 'profile':
        $parsed_url = parse_url($url);
        $base_length = strlen($base_path);
        $core_path = trim(substr($parsed_url['path'], $base_length), '/');
        $path = drupal_lookup_path('source', $core_path);
        $matches = array();
        if (preg_match('/node\\/([0-9]+)/', $path, $matches)) {
            $node = node_load($matches[1]);
            $account = user_load($node->uid);
            $user_image = boincuser_get_user_profile_image($account->uid);
            $url = "{$base_path}account/{$account->uid}";
            $forum = $node->taxonomy[$node->forum_tid]->name;
            if ($forum) {
                $title_prefix = "{$forum} : ";
            }
            //echo '<pre>' . print_r($node,1) . '</pre>';
            //echo '<pre>' . print_r($account,1) . '</pre>';
        }
        ?>
  <div class="result user">
    <?php 
        if ($user_image['image']['filepath']) {
            ?>
      <div class="picture">
        <?php