Customizing the "Who's New" block???
CandiceJarrett - June 14, 2008 - 22:19
Is it possible to make user's avatars show up under the "Who's New" block instead of their names? I want to make the avatars link to the user's profile.
Thanks for your help!!!
Cheers,
Candice

Latest Members module !
Try this module. It creates a block that you can use to show the latest members pictures
http://drupal.org/project/latest_members
That's wonderful! Thank you
That's wonderful! Thank you pharma!!! :-)
Any chance you know how I can resize those avatars to the same/ smaller size?
Thanks !!!! :-)
I think some code will in
I think addition of some code/rules in CSS will do the job for you ! But i am not a programmer ..sorry ...:-)
Hey! Thank you so much - I'm
Hey!
Thank you so much - I'm not a programmer either by a loooong shot! LOL - but I'll go in there and see if I can figure it out :-)
I am having a slight problem with it... only one of my users' photos is showing up? Isn't that strange? All the photos are in the same directory... so I'm really confused. Anyone have this problem?
hmm for us it was showing
hmm for us it was showing every one. But the display is very raw (need css adjustments). Thats why we are not using this
I use the Imagecache module
I use the Imagecache module to create a set of custom user photo sizes. (It also has the ability to crop, which is key for my site design to keep everything looking nice and neat.)
You can also style the images using simple CSS, although I'm not sure what the overhead with this would be because you're taking the full size images and resizing them on the fly--so you'd be loading full-size on every page. That's probably fine if your user images are smallish anyhow. In your css use (roughly):
.xxDivNamexx img {width: 30px;
}
...
Another options is AvatarBlocks, which provides Who's New, Who's Online, etc. See the demo. There's also User Display and Avatar Gallery.
Also, if you're using Views
Also, if you're using Views you can create a block view pretty easily that does exactly this. (That's how I do it on my site.)
HTH!
Hey Everyone!
I just saw that you responded here and wanted to thank you for taking the time to do that!!! :-) I ended up using the avatar gallery - which is working really nicely for me!!! I'm using it on two sites right now: www.candicejarrett.com and www.oldgp.com. But I'll definitely scope out those other modules!!! Thanks!!!!!
I haven't figured out how to skin the profiles to have greater control on how they appear... you'll notice especially on candicejarrett.com.... the formatting of the user profiles is TERRIBLE!!! if anyone has advice on how I can keep my existing users and move over to a better way of displaying their profile info, I would love to hear it!!!! :-)
Thanks again!
Candice
Hey Candice! It took me a
Hey Candice! It took me a *long* time to figure out how to fix my profile pages, but I must say now I think they look pretty darn good! (The site isn't live yet, otherwise I'd post a link). I tried out a bunch of different modules that affect the profile, but in the end I wanted complete control. I ended up writing (aka cobbling together) a custom user-profile.tpl.php. It look pretty much an entire day because I'm no php coder, but I'm extremely happy with the outcome.
I copied the user-profile.tpl.php file from the core module file into my theme folder and then basically instead of just printing the whole content blob, which is what that does generically, I printed each little profile element individually and then meticulously styled with css. good times! I promise, it was worth it though for completely custom, non-drupal-y profile pages.
I could get into more specifics or post code if you're interested, just let me know!
Same boat
Wonderful. Could you please post it ? I would like to give a try
Sure! Keep in mind that this
Sure! Keep in mind that this is truly patched together using random snippets and things that I've found, so no doubt some php ninja will likely point out that I'd doing something wrong, that it's written really badly, and/or not as efficiently as I could have... :) But since it took me so long to figure out, I'm happy to share! Your mileage may vary. It's worth mentioning that I'm using the Friend module for all of the bottom content.
Here is the order of the content:
Left block:
user image
whether or not they're online
Member since
add to friends (if they're not already a friend)
Number of points they've earned, plus a link to the points explanation page
right block:
profile bio
"About me" section with several custom profile fields
a "what I'm talking about" block with the most recent posted nodes and comments
And then below that is a themed version of the Friend profile block output (friends, corkboard, mini-feed)
<?php
// $Id: user-profile.tpl.php,v 1.2 2007/08/07 08:39:36 goba Exp $
/**
* @file user-profile.tpl.php
* Default theme implementation to present all user profile data.
*
* This template is used when viewing a registered member's profile page,
* e.g., example.com/user/123. 123 being the users ID.
*
* By default, all user profile data is printed out with the $user_profile
* variable. If there is a need to break it up you can use $profile instead.
* It is keyed to the name of each category or other data attached to the
* account. If it is a category it will contain all the profile items. By
* default $profile['summary'] is provided which contains data on the user's
* history. Other data can be included by modules. $profile['picture'] is
* available by default showing the account picture.
*
* Also keep in mind that profile items and their categories can be defined by
* site administrators. They are also available within $profile. For example,
* if a site is configured with a category of "contact" with
* fields for of addresses, phone numbers and other related info, then doing a
* straight print of $profile['contact'] will output everything in the
* category. This is useful for altering source order and adding custom
* markup for the group.
*
* To check for all available data within $profile, use the code below.
*
* <?php print '<pre>'. check_plain(print_r($profile, 1)) .'</pre>'; ?>
*
* @see user-profile-category.tpl.php
* where the html is handled for the group.
* @see user-profile-field.tpl.php
* where the html is handled for each item in the group.
*
* Available variables:
* - $user_profile: All user profile data. Ready for print.
* - $profile: Keyed array of profile categories and their items or other data
* provided by modules.
*
* @see template_preprocess_user_profile()
*/
?>
<div class="new-profile">
<div class="profile-left-block">
<div class="profile-left-block-content">
<div class="profile-pic">
<?php if($account->picture) {print theme('user_picture', $account);}?></div>
<?php
print "<div class=\"online-status\">";
$time_period = variable_get('user_block_seconds_online', 2700);
$uid = arg(1); // get the current userid that is being viewed.
$users = db_query("SELECT uid, name, access FROM {users} WHERE access >= %d AND uid = $uid", time() - $time_period);
$total_users = db_result($users);
if ($total_users == 1) {
$output = t('This user is currently online');
}
else {
$output = t('This user is currently offline');
}
print $output;
print "</div>";
?>
<div class="member-since">Member Since: <br><?php print (format_date($account->created, 'small'));?></div>
<div class="add-friend-wrapper"><?php print $profile['friend']; ?></div>
<div class="profile-points">
<?php if ($user_profile): ?>
<div class="points-number"><?php print userpoints_get_current_points($account->uid);?></div>
<?php endif; ?><div class="points-points">points</div>
<div class="points-learn"><a href="http://www.talktoparents.com/content/parents-points">Learn about <i>Parents</i> points</a></div>
</div></div></div>
<div class="profile-right-block">
<div class="bio-wrapper-1"><div class="bio-wrapper"><div class="bio">
<?php $pfieldname = "profile_bio"; ?>
<?php if(($account->$pfieldname) == ""): ?>
<p>I haven't written my bio yet.</p>
<?php endif; ?>
<?php print $account->$pfieldname ; ?>
</div></div></div>
<div class="profile-about-wrapper">
<h2>about me</h2><div class="profile-about-content">
<?php if($account->profile_kids): ?>
<div class="profile-kids">I have <?php print check_plain($account->profile_kids) ?></div>
<?php endif ?>
<?php if($account->profile_state): ?>
<div class="profile-state">I live in <?php print check_plain($account->profile_state) ?></div>
<?php endif ?>
<?php if($account->profile_subscriber_length): ?>
<div class="profile-subscriber-length">I've been a <i>Parents</i> subscriber for <?php print check_plain($account->profile_subscriber_length) ?></div>
<?php endif ?>
<?php $urlfieldname='profile_url' ;?>
<div class="profile-weburl">
<?php if($account->$urlfieldname): ?>
My site is <a href="<?php print check_url($account->$urlfieldname) ?>"><?php print check_url($account->$urlfieldname) ?></a>
<?php endif; ?>
</div></div></div>
<div class="talking-wrapper1"><div class="talking-wrapper">
<h2>what I'm <b>talking</b> about</h2><div class="talking-content">
<?php
$output = '';
$uid = arg(1);
$nlimit = 3;
$result = db_query(db_rewrite_sql("SELECT n.created, n.title, n.nid, n.changed
FROM {node} n
WHERE n.uid = %d
AND n.status = 1
ORDER BY n.changed
DESC LIMIT %d"), $uid, $nlimit);
$output .= '<div class="talk-item-list"><ul>' . "\n";
$output .= node_title_list($result);
$output .= '</ul></div>';
print $output;
?>
</div></div></div></div>
<div class="profile-friend-block">
<?php print $profile['friend_blocks']; ?></div>
</div>
Hope this helps someone! Let me know if you have any questions or want more info! And by all means, if someone notices that I'm doing something wrong, let me know. :)
Thank you!
Thank you!