Last updated May 26, 2009. Created by peaced on November 6, 2006.
Edited by bekasu. Log in to edit this page.
Display (x) last logged in userpictures
This script show userpictures of the last logged in users. It looks nice and it enhances the community-feeling. It will only show those users who have uploaded a picture. You propably need to adjust $count variable. Also it propably looks better if you have fixed width userpictures. (there is a module for this I think)
<?php
//show user pictures ---------------------------
//Will only show those users who have a picture
$count = 9; //how many users in total with or without pictures, edit this value
global $user;
$output = '<BR><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%"><TR><TD BGCOLOR="#f0f7f0"><center>';
$result = db_query_range("SELECT * FROM {users} as u where status=1 AND picture <> '' ORDER BY access DESC",0,$count);
while ($user_info = db_fetch_object($result)) {
$output .= '<a href="/user/'.$user_info->uid.'">
<img src="/'.$user_info->picture.'" hspace=0 height="90" ></a>';
}
$output .= '</center></TD></TR></TABLE>';
//------------------------------------------------------
print $output;
?>