http://www.icyphoenix.com/viewtopic.php?f=35&t=1593&p=12012#p12012
-----------------------------------
darkone
Thu 12 Apr, 2007 04:57

Re: Issue With 1.0.11.11.001
-----------------------------------
Hey MG

Thanks for the response. There is a small issue. I'm looking at the 'blocks_imp_top_posters.php' from the 1.0.11.11 RC release and this is what the file looks like:

[code linenumbers=true]
if ( !defined('IN_PHPBB') )
{
	die('Hacking attempt');
}

if(!function_exists(imp_top_posters_func))
{
	function imp_top_posters_func()
	{
		global $lang, $template, $portal_config, $block_id, $board_config, $db, $phpEx;

		$sql = "SELECT username, user_id, user_posts, user_avatar, user_avatar_type, user_allowavatar
				FROM " . USERS_TABLE . "
				WHERE user_id <> " . ANONYMOUS . "
				ORDER BY user_posts DESC LIMIT ". $portal_config['md_total_poster'][$block_id];
		if( !($result = $db->sql_query($sql)) )
		{
			message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
		}

		if ( $row = $db->sql_fetchrow($result) )
		{
			$i = 0;
			do
			{
				$username2 = $row['username'];
				$row['username'] = color_group_colorize_name($row['user_id']);
				$username = $row['username'];
				$user_id = $row['user_id'];
				$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
				$poster_avatar = '';
				if ( $row['user_avatar_type'] && $user_id != ANONYMOUS && $row['user_allowavatar'] )
				{
					switch( $row['user_avatar_type'] )
					{
						case USER_AVATAR_UPLOAD:
							//$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" height="' . $portal_config['md_avatar_height'][$block_id] . '" border="0" />' : '';
							$poster_avatar = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
							break;
						case USER_AVATAR_REMOTE:
							$poster_avatar = resize_avatar($row['user_avatar']);
							break;
						case USER_AVATAR_GALLERY:
							//$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" height="' . $portal_config['md_avatar_height'][$block_id] . '" border="0" />' : '';
							$poster_avatar = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $row['user_avatar'] . '" alt="" border="0" />' : '';
							break;
						case USER_GRAVATAR:
							$poster_avatar = ( $board_config['enable_gravatars'] ) ? '<img src="' . get_gravatar($row['user_avatar']) . '" alt="" border="0" />' : '';
							break;
					}
				}
				if ($poster_avatar == '')
				{
					$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
				}


				$template->assign_block_vars('topposter', array(
					'USERNAME' => $username,
					'POSTS' => $posts,
					'AVATAR_IMG' => $poster_avatar,
					'U_VIEWPOSTER' => append_sid(PROFILE_MG . '?mode=viewprofile&amp;' . POST_USERS_URL . '=' . $user_id),
					'U_VIEWPOSTS' => append_sid(SEARCH_MG . '?search_author=' . str_replace(array(' ', '?', '&'), array('%20', '%3F', '%26'), $username2) . '&amp;showresults=posts')
					//'U_VIEWPOSTS' => append_sid(SEARCH_MG . '?search_author=' . htmlspecialchars($username2) . '&amp;showresults=posts')
					)
				);

				$i++;
			}
			while ( $row = $db->sql_fetchrow($result) );
		}

		$template->assign_vars(array(
			'L_POSTS' => $lang['Posts']
			)
		);
	}
}

imp_top_posters_func();
?>
[/code]

The only thing that looks like what you suggested is this line:

[code linenumbers=false]
if ($poster_avatar == '')
				{
					$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
				}
[/code]

As you see it's different code than what you posted. Or am I supposed to replace all of that text with what you posted?

Thanks for the help.

-D1-


