Just wanted to say I installed this hack on 2.2.6 and it worked flawlessly. I did take care to tweak the syntax in the hack that, as I think HellSatan mentioned earlier, seems to have been made for an older version of vB -- maybe some of you who are having problems the code can make sure you do the same?
In the instructions relating to
member.php, make note of these changes:
When the instructions tell you to ...
Quote:
find:
$templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
Replace it with
// Country Hack Replace
// $templatesused .= "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
$templatesused .= "register_birthday,modifyprofile_customtext,modify profile_country,register_customfields,usercpnav,mo difyprofile";
// Country Hack End
|
Do this instead:
Quote:
find:
$templatesused = "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
Replace it with
// Country Hack Replace
// $templatesused = "register_birthday,modifyprofile_customtext,regist er_customfields,usercpnav,modifyprofile";
$templatesused = "register_birthday,modifyprofile_customtext,modify profile_country,register_customfields,usercpnav,mo difyprofile";
// Country Hack End
|
and (also in the member.php instructions) where it says to:
Quote:
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
|
instead of that, do this...
Quote:
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
|
Hope this makes sense and is correct. Basically, there were extra dots that didn't need to be there. Maybe the instructions could be updated?
Anyway, great hack, thank you very much!