there are subtle code differences in 2.2.9 vs the documentation for the country hack... so here's the members.php instructions to match 2.2.9
4 - Open member.php
find:
$templatesused = 'register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modi fyprofile';
Replace it with
// Country Hack Replace
// $templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modi fyprofile";
$templatesused .= "register_birthday,modifyprofile_customtext,modify profile_country,register_custo mfields,usercpnav,modifyprofile";
// Country Hack End
find:
eval("\$customtext = \"".gettemplate("modifyprofile_customtext")."\";") ;
}
}
Below it add:
// Country Hack
if (!$getcountry=$DB_site->query_first("SELECT country FROM user WHERE userid=$bbuserinfo[userid]")) {
$country="";
$ctrdefaultselected = "selected";
} else {
$country="$getcountry[country]";
$countryalt = str_replace("%20"," ",$country);
$countrysel = str_replace("%20","_",$country);
$flag="<img src=\"images/flags/$country.gif\" alt=\"$countryalt\" align=\"absmiddle\" border=\"0\">";
$ctryname = "ctry".$countrysel."selected";
$$ctryname = "selected";
}
eval("\$countrytext.= \"".gettemplate("modifyprofile_country")."\";") ;
// Country Hack End
find:
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");
Replace it with:
// Country Hack Replace
// $DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]' WHERE userid='$bbuserinfo[userid]'");
$DB_site->query("UPDATE user SET birthday='".addslashes($birthday)."',signature='". addslashes($signature)."',cust omtitle='".intval($customtitle)."',usertitle='".ad dslashes($customtext)."',email ='".addslashes(htmlspecialchars($email))."',parent email='".addslashes(htmlspecia lchars($parentemail))."',coppauser='$coppauser',ho mepage='".addslashes(htmlspeci alchars($homepage))."',icq='".addslashes(htmlspeci alchars($icq))."',aim='".addsl ashes(htmlspecialchars($aim))."',yahoo='".addslash es(htmlspecialchars($yahoo))." ',usergroupid='$bbuserinfo[usergroupid]',country='".addslashes($country)."' WHERE userid='$bbuserinfo[userid]'");
// Country Hack End
find:
if ($userinfo[yahoo]!="") {
eval("\$userinfo[yahooicon] = \"".gettemplate("yahoo")."\";");
} else {
$userinfo[yahoo]=" ";
}
Below it add:
// Country Hack
$getctry=$DB_site->query_first("SELECT country FROM user WHERE userid=$userid");
$country=$getctry[country];
$countryalt = str_replace("%20"," ",$country);
if ($country!="") {
$flag = "<img src=\"images/flags/$country.gif\" alt=\"$countryalt\" align=\"absmiddle\" border=\"0\">";
} else {
$flag = "";
}
// Country Hack End
|