ich habe ein kleines Problem mit dem Avatar Gallery Hack.
Der lief bis jetzt ohne Probleme, aber seitdem ich die aktuelle usercp_avatar.php von BlueLagoon benutze, geht es nicht mehr.
Wenn ich diesen Einbaue, dann werden nicht mehr in der Gallery die Bilder angezeigt, sondern nur die Namen der Datei.
Hier der geänderte Teil der includes\usercp_avatar.php
Code: Alles auswählen
function display_avatar_gallery($mode, &$category, &$user_id, &$email, &$current_email, &$coppa, &$username, &$email, &$new_password, &$cur_password, &$password_confirm, &$icq, &$aim, &$msn, &$yim, &$website, &$location, &$occupation, &$interests, &$signature, &$viewemail, &$notifypm, &$popup_pm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)
{
global $board_config, $db, $template, $lang, $images, $theme;
global $phpbb_root_path, $phpEx;
$my_counter = 0;
$my_checker = 0;
$sql = "SELECT user_avatar
FROM " . USERS_TABLE . "
WHERE user_avatar_type=3";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query users', '', __LINE__, __FILE__, $sql);
}
while( $row = $db->sql_fetchrow($result) )
{
$my_counter++;
$my_used_list[$my_counter] = $row['user_avatar'];
}
$db->sql_freeresult($result);
$dir = @opendir($board_config['avatar_gallery_path']);
$avatar_images = array();
while( $file = @readdir($dir) )
{
if( $file != '.' && $file != '..' && !is_file($board_config['avatar_gallery_path'] . '/' . $file) && !is_link($board_config['avatar_gallery_path'] . '/' . $file) )
{
$sub_dir = @opendir($board_config['avatar_gallery_path'] . '/' . $file);
$avatar_row_count = 0;
$avatar_col_count = 0;
while( $sub_file = @readdir($sub_dir) )
{
$my_checker = 0;
for ($i = 1; $i<= $my_counter; $i++ )
{
$my_temp = $file . '/' . $sub_file;
if ($my_temp == $my_used_list[$i]) $my_checker=1;
if ($my_checker==1) break;
}
if ($my_checker == 0)
{
if( preg_match('/(\.gif$|\.png$|\.jpg|\.jpeg)$/is', $sub_file) )
{
$avatar_images[$file][$avatar_row_count][$avatar_col_count] = $file . '/' . $sub_file;
$avatar_name[$file][$avatar_row_count][$avatar_col_count] = ucfirst(str_replace("_", " ", preg_replace('/^(.*)\..*$/', '\1', $sub_file)));
$avatar_col_count++;
if( $avatar_col_count == 5 )
{
$avatar_row_count++;
$avatar_col_count = 0;
}
}
}
}
}
}
@closedir($dir);