problem with the avatar gallery

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
User avatar
mosmos
Registered User
Posts: 24
Joined: Tue Jul 19, 2005 10:17 am
Contact:

problem with the avatar gallery

Post by mosmos » Tue Aug 09, 2005 9:29 am

Hello,

When i press the 'show gallery' button on the profile page, it shows some errors at the top of the page. Actually there is nothing wrong with displaying the avatar gallery or selecting from them but it really ruins the forum look.

Here is the errors look like

Code: Select all

Warning: Missing argument 35 for display_avatar_gallery() in /home/asstreet/public_html/xoxx/includes/usercp_avatar.php on line 257

Warning: Missing argument 36 for display_avatar_gallery() in /home/asstreet/public_html/xoxx/includes/usercp_avatar.php on line 257

Warning: Missing argument 37 for display_avatar_gallery() in /home/asstreet/public_html/xoxx/includes/usercp_avatar.php on line 258
And here is the usercp_avatar.php look like in that line.

Code: Select all

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, &$show_quickreply, &$quickreply_mode, &$user_open_quickreply
, &$session_id, $xdata = false)
I guess there is something wrong with the xdata=false code. Could someone help me to fix that?

Thanks

User avatar
battye
Extension Customisations
Extension Customisations
Posts: 10940
Joined: Wed Feb 11, 2004 11:02 am
Location: Australia
Contact:

Post by battye » Tue Aug 09, 2005 10:18 am

Not tested, but should do it (fingers crossed):

usercp_register.php

find

Code: Select all

if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
{
	include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);

	$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarcategory']) : '';

	$template->set_filenames(array(
		'body' => 'profile_avatar_gallery.tpl')
	);

	$allowviewonline = !$allowviewonline;

	display_avatar_gallery($mode, $avatar_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, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
}
replace with:

Code: Select all

if( isset($HTTP_POST_VARS['avatargallery']) && !$error )
{
	include($phpbb_root_path . 'includes/usercp_avatar.'.$phpEx);

	$avatar_category = ( !empty($HTTP_POST_VARS['avatarcategory']) ) ? htmlspecialchars($HTTP_POST_VARS['avatarcategory']) : '';

	$template->set_filenames(array(
		'body' => 'profile_avatar_gallery.tpl')
	);

	$allowviewonline = !$allowviewonline;

	@display_avatar_gallery($mode, $avatar_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, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id']);
}
The @ has been added, this stops errors being outputted. You say it works properly, but the error looks bad. This will stop the error, but if you are having any other problems it won't fix that.

If the @ doesn't work, try this:

Code: Select all

display_avatar_gallery($mode, $avatar_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, $allowviewonline, $user_style, $user_lang, $user_timezone, $user_dateformat, $userdata['session_id'], '', '');
Good luck, let me know how you go.
Customisations Team Member

https://github.com/battye/php-array-parser - Give it a Star! :D

User avatar
mosmos
Registered User
Posts: 24
Joined: Tue Jul 19, 2005 10:17 am
Contact:

Thanks :)

Post by mosmos » Tue Aug 09, 2005 1:16 pm

The first one is worked perceftly! :) Thank you for your quick support.

Locked

Return to “2.0.x Support Forum”