Hey Everyone
I applied the .001 patch to the RC and I found this issue after I will try to explain it the best I can :)
On the upgrade of the patch before I start. I made my changes too the files I needed too and uploaded all files and as far as I know all uploads were successful with no errors and I did those two delete statements to the DB. Everything else seems to be running just fine.
Ok I created some default avatars for the guest user and members that have not selected their avatars yet. So under the 'Configuration - Board - Set default avatar' I have it set 'Both'. And the paths are right I checked them and plus they got carried over from the upgrade.
Now the default icons show up in every place like the profile, user block, forum posting, etc... But the only place where now the avatars will not show up no matter what I do is in the 'Top Posters' block. It shows normal avatars fine just fine just not the default ones.
You can see the example just going to my site if you need more proof. Link is in the signature.
Also not sure if it was meant to be left out the version number on ICY is still set too 1.0.11.11 shouldn't it be 1.0.11.11.001?
-D1-
Issue With 1.0.11.11.001
Subject: Re: Issue With 1.0.11.11.001
The version is ok
* 1 is the main version number
* 0 is the number of public releases
* 11 is the number of dev releases for each public releases
* 11 is the total number of releases
* 1 is the main version number
* 0 is the number of public releases
* 11 is the number of dev releases for each public releases
* 11 is the total number of releases
Subject: Re: Issue With 1.0.11.11.001
Anyone else running into this issue where default avatars don't show up in top poster block? They worked before the small update patch for 1.0.11.11 just not afterwards.
-D1-
-D1-
Subject: Re: Issue With 1.0.11.11.001
OPEN blocks/blocks_imp_top_posters.php
FIND
REPLACE WITH
FIND
if ($avatar_img == '')
{
$avatar_img = get_default_avatar($row['user_id']);
}
{
$avatar_img = get_default_avatar($row['user_id']);
}
REPLACE WITH
Subject: 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:
The only thing that looks like what you suggested is this line:
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-
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:
- 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&' . POST_USERS_URL . '=' . $user_id),
- 'U_VIEWPOSTS' => append_sid(SEARCH_MG . '?search_author=' . str_replace(array(' ', '?', '&'), array('%20', '%3F', '%26'), $username2) . '&showresults=posts')
- //'U_VIEWPOSTS' => append_sid(SEARCH_MG . '?search_author=' . htmlspecialchars($username2) . '&showresults=posts')
- )
- );
- $i++;
- }
- while ( $row = $db->sql_fetchrow($result) );
- }
- $template->assign_vars(array(
- 'L_POSTS' => $lang['Posts']
- )
- );
- }
- }
- imp_top_posters_func();
- ?>
The only thing that looks like what you suggested is this line:
if ($poster_avatar == '')
{
$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
{
$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
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-
Subject: Re: Issue With 1.0.11.11.001
FIND
REPLACE WITH
Try the above change, maybe it works!
if ($poster_avatar == '')
{
$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
{
$poster_avatar = '<img src="' . $board_config['default_avatar_users_url'] . '" alt="" border="0" />';
}
REPLACE WITH
if ($poster_avatar == '')
{
$poster_avatar = get_default_avatar($row['user_id']);
}
{
$poster_avatar = get_default_avatar($row['user_id']);
}
Try the above change, maybe it works!
Subject: Re: Issue With 1.0.11.11.001
Thanks Brandsrus
That did the trick. Just trying to figure out if it was copying over of a file that got messed up or if it was a code issue? Just want to make sure it doesn't happen again. :) Want to find all the bugs make ICY flawless ...
-D1-
That did the trick. Just trying to figure out if it was copying over of a file that got messed up or if it was a code issue? Just want to make sure it doesn't happen again. :) Want to find all the bugs make ICY flawless ...
-D1-
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.1199s (PHP: 15% SQL: 85%)
SQL queries: 10 - Debug Off - GZIP Enabled