Hi!
I'm having issues after installing this MOD. The problem seems to be with this code that goes into member.php
//-----------------------
//------ Avatar ---------
//-----------------------
if ($config['avatar_use']){
$images = "";
$checked = ($user_avatar == "blank.gif" || $user_avatar == "") ? " selected" : "";
$images .= "\n<option value=\"blank.gif\"$checked>none</option>\n";
$dir = opendir(TEMPLATE_PATH."/avatars/users/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
if ($filename == $user_info['user_id']) {
$checked = (stristr($user_avatar, "users/")) ? " selected" : "";
$images .= "\n<option value=\"users/$line\"$checked>".$lang['custom']."</option>\n";
}
}
$dir = opendir(TEMPLATE_PATH."/avatars/");
$contents = array();
while ($contents[] = readdir($dir)){;}
closedir($dir);
natcasesort ($contents);
$checked = "";
foreach ($contents as $line){
$filename = substr($line,0,(strlen($line)-strlen(strrchr($line,"."))));
$extension = substr(strrchr($line,"."), 1);
$checked = "";
if ($line == $user_avatar) { $checked = " selected"; }
if (strcasecmp($extension,"gif")==0 || strcasecmp($extension,"jpg")==0 || strcasecmp($extension,"jpeg")
==0 || strcasecmp($extension,"png")==0 ){
if ($line != "blank.gif") {
$filename = str_replace("_", " ", $filename);
$images .= "<option value=\"$line\"$checked>$filename</option>\n";
}
}
}
}
//----------------------
//----- End Avatar -----
//----------------------
$site_template->register_vars(array(
"lang_avatar" => $lang['avatar'],
"lang_avatar_file" => $lang['avatar_file'],
"lang_avatar_dim" => $lang['avatar_max_dim']." ".$config['avatar_width']."x".$config['avatar_height'].
$lang['px'],
"lang_avatar_select" => $lang['avatar_select'],
"user_avatar_images" => $images,
"user_avatar_current" => ($config['avatar_use']) ? "<img src=\"".TEMPLATE_PATH."/avatars/".(($user_avatar
== "") ? "blank.gif" : $user_avatar)."\" name=\"icons\" border=\"0\" alt=\"\">" : "",
"lang_or" => $lang['or'],
"user_avatar_file" => $config['avatar_user_custom'],
"user_name" => htmlspecialchars(stripslashes($user_name)),The issue is ONLY on my editprofile.php page and this is the error:
Parse error: syntax error, unexpected $end in /home/xxxxxx/public_html/includes/template.php(101) : eval()'d code on line 244I know it's got something to do with my template but I can't figure out how to fix it. If I remover the code entirely from members.php everything seems to be fine so it's obviously something wrong there.
Anyone know how to fix this problem? I've already looked through
this but as I don't know where to look, I don't know how to fix it. Line 244 in template is this so it can't be the reason for the error:
$footer = $this->parse_template("footer");Any help would be highly appreciated!