Forums / Cotonti / Support / country in register

code_87
#1 2009-05-11 09:54
how can i stop users from changing their country in register page?, i already have a maxmind geoip the problem is they can still change their country in the register page... i saw other sites powered with seditio and cotonti, and i try to register to their site and i cant change the country in register page... how did they do that? anyone can help me? pls?
[b]I give you stuffs... and my stuffs i give you![/b] :D
GHengeveld
#2 2009-05-11 17:10
You could use javascript for this. Try:
$(document).ready(function(){
$('select[name="rcountry"]').attr("disabled","disabled");
});
Not tested, just making this up.
Dave
#3 2009-05-11 19:22
maybe this will help: Force registration fields
Your advertisement here :-)

Cotonti Genoa based site: forgotten-garage.pl
code_87
#4 2009-05-12 02:46
# Koradhil : You could use javascript for this. Try:
$(document).ready(function(){
$('select[name="rcountry"]').attr("disabled","disabled");
});
Not tested, just making this up.

thanks a lot sir.. it works but is there any way aside from that one? a core hack or plugin? coz if they just disable all javascript before entering the register page they can change the country again :-(
[b]I give you stuffs... and my stuffs i give you![/b] :D
This post was edited by code_87 (2009-05-12 03:14, 14 years ago)
Kilandor
#5 2009-05-12 09:43
Well it used to do that by default, but apparently someone changed it.

open geoip.register.php

Replace....
$t->assign(array("USERS_REGISTER_COUNTRY" => sed_selectbox_countries($usr["geoip_country"], 'rcountry')."<img src=\"images/flags/f-".$usr["geoip_country"].".gif\" alt=\"\" /><input type=\"hidden\" name=\"rcountry\" value=\"".$usr["geoip_country"]."\" />"));

With...
$t->assign(array("USERS_REGISTER_COUNTRY" => "<img src=\"system/img/flags/f-".$usr["geoip_country"].".gif\" alt=\"\" /><input type=\"hidden\" name=\"rcountry\" value=\"".$usr["geoip_country"]."\" />"));
code_87
#6 2009-05-25 21:33
# Kilandor : Well it used to do that by default, but apparently someone changed it.

open geoip.register.php

Replace....
$t->assign(array("USERS_REGISTER_COUNTRY" => sed_selectbox_countries($usr["geoip_country"], 'rcountry')."<img src=\"images/flags/f-".$usr["geoip_country"].".gif\" alt=\"\" /><input type=\"hidden\" name=\"rcountry\" value=\"".$usr["geoip_country"]."\" />"));

With...
$t->assign(array("USERS_REGISTER_COUNTRY" => "<img src=\"system/img/flags/f-".$usr["geoip_country"].".gif\" alt=\"\" /><input type=\"hidden\" name=\"rcountry\" value=\"".$usr["geoip_country"]."\" />"));


i try to change the code. but its not working sir
[b]I give you stuffs... and my stuffs i give you![/b] :D