Forum anasayfasında Son kaydolan bes uye ve En cok mesaj atan bes uyeyi gosteren block

Powered by:codezviz

KURULUM

AC
modules/Forums/index.php

BUL

Kod:
//
// Generate the page
//
$template->pparse('body');
ALTINA EKLE

Kod:
// Begin Latest Members
global $prefix;
// How Many to display
$tdsize = 20;
$members = 5;
$query="SELECT username, theme, user_from, user_regdate, user_id from $prefix"._users." ORDER BY user_id DESC LIMIT $members"; 
	$result=mysql_query($query);
	while(list($username, $theme, $user_from, $user_regdate, $uid) = mysql_fetch_row($result)) {

		if ($theme == "") {
			$theme = "Default";
			}
		if ($user_from == "") {
			$user_from = "N/A";
			}				
	$ShowLatest .="<td width=\"$tdsize%\" class=\"row1\"><font class=\"content\"><A HREF=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$username\" title=\"View $username's profile\">$username</a><br>Theme: <b>$theme</b><br>Joined: <b>$user_regdate</b><br>Location: <b>$user_from</b></font></td>";
}
echo "<hr width=\"100%\" noShade><br><table border=\"1\" cellspacing=\"2\" width=\"100%\" class=\"forumline\"><tr><td class=\"cat\" colspan=\"2\">$members Latest Members</font></td></tr></table>";
echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"5\" width=\"100%\" class=\"forumline\" align=\"center\"><tr>";
echo "$ShowLatest";
echo "</tr></table><br />";
// End Latest Members
// Begin Top Posters 
global $user_prefix, $dbi; 
$tdsize = 20; 
$members = 5; 
$result=sql_query("SELECT user_id, username, user_posts, user_avatar FROM ".$user_prefix."_users ORDER BY user_posts DESC LIMIT 0,$members", $dbi); 
while(list($user_id, $username, $user_posts, $user_avatar) = sql_fetch_row($result, $dbi)) { 
if ( ereg( "(http://)", $user_avatar) ) 
{ 
$avatar2 = "<img src=\"$user_avatar\" border=\"0\" vspace=\"10\" hspace=\"10\" width=\"48\" align=\"left\">"; 
} else { 
$avatar = $user_avatar; 
$avatar2 = "<img src=\"modules/Forums/images/avatars/$avatar\" border=\"0\" vspace=\"10\" hspace=\"10\" width=\"48\" align=\"left\">"; 
} 
if ($avatar2 == "<img src=\"modules/Forums/images/avatars/") { 
         $avatar2 = ""; 
         } 
if ( empty($user_avatar) ) 

   { 
} 
$Topposters .="<td width=\"$tdsize%\" class=\"row1\"><font class=\"content\"><a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$username\">$avatar2</a><br><a href=\"modules.php?name=Forums&amp;file=profile&amp;mode=viewprofile&amp;u=$username\">$username</a><br><a href=\"modules.php?name=Forums&amp;file=search&amp;search_author=$username\">Posts:</a> ;;<a href=\"modules.php?name=Forums&amp;file=search&amp;search_author=$username\">$user_posts</a></font></td>"; 
} 
echo "<hr width='95%' noShade><br><table border=\"1\" cellspacing=\"2\" width=\"100%\" class=\"forumline\"><tr><td class=\"cat\" colspan=\"2\">Top 5 Posters</font></td></tr></table>"; 
echo "<table border=\"1\" cellspacing=\"1\" cellpadding=\"5\" width=\"100%\" class=\"forumline\" align=\"center\"><tr>"; 
echo "$Topposters"; 
echo "</tr></table>"; 
/*Copyright notice - Do not remove*/ 
echo "<div align=\"right\"><small>"; 
echo "Forum Blocks &copy; 2003-2004 <a href=\"http://codezwiz.com\">Codezwiz</a></small><br></div>"; 
/*Copyright notice - Do not remove*/ 
// End Top Posters