Seite 1 von 1

[erledigt]Fehler bei Custom Post ColorMOD

Verfasst: 30.08.2006 23:43
von Ceiltis
HI,

Ich habe den Mod installiert und kriege jetzt diese Fehlermeldung im ACP:
Parse error: parse error, expecting `'&'' or `T_VARIABLE' or `T_CONST'

includes/usercp_avatar.php on line 306
Habe die usercp_avatar.php sofort kontrolliert aber keinen Fehler festgestellt.

Laut der INStall.txt solteich das machen:

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, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id)

#
#-----[ IN-LINE FIND ]------------------------------------------
#

, &$session_id

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

, &$custom_post_color

#
#-----[ FIND ]------------------------------------------
#

$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', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat');

#
#-----[ IN-LINE FIND ]------------------------------------------
#

'dateformat'

#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#

, 'custom_post_color'
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, &$popuppm, &$notifyreply, &$attachsig, &$allowhtml, &$allowbbcode, &$allowsmilies, &$hideonline, &$style, &$language, &$timezone, &$dateformat, &$session_id, &$custom_post_color)
{
global $board_config, $db, $template, $lang, $images, $theme;
global $phpbb_root_path, $phpEx;

$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) )
{
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', 'popuppm', 'notifyreply', 'attachsig', 'allowhtml', 'allowbbcode', 'allowsmilies', 'hideonline', 'style', 'language', 'timezone', 'dateformat', 'custom_post_color');

$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]) . '" />';
}
Kann mir da einer weiter helfen?

Verfasst: 30.08.2006 23:49
von SoLo1905
was steht den in der zeile der datei includes/usercp_avatar.php in der zeile 306

verlink die datei mal :D

Verfasst: 31.08.2006 00:00
von Ceiltis
SoLo1905 hat geschrieben:was steht den in der zeile der datei includes/usercp_avatar.php in der zeile 360

verlink die datei mal :D
zeile 306 oder nicht??

Verfasst: 31.08.2006 00:08
von SoLo1905
ja sry 6 zuvor als 0 eingetippt :D ich schau die Datei mal an :D ich editiere dann oder falls jemand drauf antwortet schreib ich dann rein

Verfasst: 31.08.2006 00:16
von Ceiltis
war nen versuch wert, hat aber leider nichts verändert :cry: , trotzdem thx SoLo1905.

Hat einer vieleicht noch nen RAT??

Verfasst: 31.08.2006 11:38
von Ceiltis
Fehler ist behoben hab geschafft.
Weiss einer wieso man die Farbe nur im ACP einstellen kann oder gibt es noch die Möglichkeit das die User das selbst machen können?