avatar probleempie

Installatie lukt niet? Plotseling een foutmelding. Of weet je niet hoe iets werkt. Problemen met phpBB2 kun je in dit archief opzoeken.
Forumregels

Sinds 1 januari 2009 wordt phpBB2 niet meer ondersteund.
Onderstaande informatie is verouderd en dient uitsluitend als archief.
phpBB2.0.x
Gesloten
Gebruikersavatar
Marina
Berichten: 17
Lid geworden op: 01 nov 2003, 14:53
Contacteer:

avatar probleempie

Bericht door Marina » 04 nov 2003, 18:03

De avatargallery werkt wel: maar ik krijg dit wanneer ik in de avatargallery kom:

Warning: Missing argument 36 for display_avatar_gallery() in /home/httpd/vhosts/catslovers.be/httpdocs/forum/includes/usercp_avatar.php on line 245

Dit is het laatste gedeelte van mijn usercp_avatar.php code

Code: Selecteer alles

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, &$birthday, &$gender)
{
	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);

	@ksort($avatar_images);
	@reset($avatar_images);

	if( empty($category) )
	{
		list($category, ) = each($avatar_images);
	}
	@reset($avatar_images);

	$s_categories = '<select name="avatarcategory">';
	while( list($key) = each($avatar_images) )
	{
		$selected = ( $key == $category ) ? ' selected="selected"' : '';
		if( count($avatar_images[$key]) )
		{
			$s_categories .= '<option value="' . $key . '"' . $selected . '>' . ucfirst($key) . '</option>';
		}
	}
	$s_categories .= '</select>';

	$s_colspan = 0;
	for($i = 0; $i < count($avatar_images[$category]); $i++)
	{
		$template->assign_block_vars("avatar_row", array());

		$s_colspan = max($s_colspan, count($avatar_images[$category][$i]));

		for($j = 0; $j < count($avatar_images[$category][$i]); $j++)
		{
			$template->assign_block_vars('avatar_row.avatar_column', array(
				"AVATAR_IMAGE" => $board_config['avatar_gallery_path'] . '/' . $avatar_images[$category][$i][$j], 
				"AVATAR_NAME" => $avatar_name[$category][$i][$j])
			);

			$template->assign_block_vars('avatar_row.avatar_option_column', array(
				"S_OPTIONS_AVATAR" => $avatar_images[$category][$i][$j])
			);
		}
	}

	$params = array('coppa', 'user_id', 'username', 'email', 'current_email', 'cur_password', 'new_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', 'birthday', 'gender');

	$s_hidden_vars = '<input type="hidden" name="sid" value="' . $session_id . '" /><input type="hidden" name="agreed" value="true" />';

	for($i = 0; $i < count($params); $i++)
	{
		$s_hidden_vars .= '<input type="hidden" name="' . $params[$i] . '" value="' . str_replace('"', '"', $$params[$i]) . '" />';
	}
	
	$template->assign_vars(array(
		'L_AVATAR_GALLERY' => $lang['Avatar_gallery'], 
		'L_SELECT_AVATAR' => $lang['Select_avatar'], 
		'L_RETURN_PROFILE' => $lang['Return_profile'], 
		'L_CATEGORY' => $lang['Select_category'], 

		'S_CATEGORY_SELECT' => $s_categories, 
		'S_COLSPAN' => $s_colspan, 
		'S_PROFILE_ACTION' => append_sid("profile.$phpEx?mode=$mode"), 
		'S_HIDDEN_FIELDS' => $s_hidden_vars)
	);

	return;
}

?>

silvirio
Berichten: 150
Lid geworden op: 03 feb 2003, 20:41

Bericht door silvirio » 04 nov 2003, 18:07

misschien is het makkelijk om even te laten zien waar lijn 245 ziet. Dit kan temaken hebben omdat niet bij iedereen deze file hetzelfde is

Gebruikersavatar
Marina
Berichten: 17
Lid geworden op: 01 nov 2003, 14:53
Contacteer:

Bericht door Marina » 04 nov 2003, 18:11

ik zal heel mijn file laten zien, want ik weet niet hoe ik die lijn moet zoeken :oops:

Code: Selecteer alles

<!-- EDIT BY webdev. we kennen dat bestand wel. -->

Gebruikersavatar
WebSiteNet
Berichten: 6524
Lid geworden op: 20 okt 2003, 16:56
Locatie: Wieringerwerf
Contacteer:

Bericht door WebSiteNet » 04 nov 2003, 18:18

dat bestand kennen we ook wel. waneer is de error gekomen? Ik denk nadat je een mod geinstaleerd hebt. alleen niet goed. je moet nog iets wijzigen.

Gebruikersavatar
Marina
Berichten: 17
Lid geworden op: 01 nov 2003, 14:53
Contacteer:

Bericht door Marina » 04 nov 2003, 20:57

ja inderdaad, ik heb het gevonden, thanx :thumb:

Gebruikersavatar
mosymuis
Berichten: 6940
Lid geworden op: 05 feb 2003, 14:00
Locatie: Amsterdam
Contacteer:

Bericht door mosymuis » 05 nov 2003, 13:31

Marina schreef:ik heb het gevonden
en dat was?

Gebruikersavatar
Marina
Berichten: 17
Lid geworden op: 01 nov 2003, 14:53
Contacteer:

Bericht door Marina » 05 nov 2003, 13:44

een foutje in een mod, weet niet precies wat het was, maar de foutmelding is weg dus :bier:

Gesloten