Foros del Web » Creando para Internet » Sistemas de gestión de contenidos » Joomla »

cargar paises y ciudades en un combo en community builder

Estas en el tema de cargar paises y ciudades en un combo en community builder en el foro de Joomla en Foros del Web. Buenas; como puedo cargar todo un listado de paises de una base de datos en un combobox para un formulario de registro en community builder ...
  #1 (permalink)  
Antiguo 04/03/2010, 16:58
 
Fecha de Ingreso: octubre-2008
Mensajes: 26
Antigüedad: 15 años, 5 meses
Puntos: 1
cargar paises y ciudades en un combo en community builder

Buenas;

como puedo cargar todo un listado de paises de una base de datos en un combobox para un formulario de registro en community builder y luego de seleccionar un pais se carguen las ciudades en otro combobox.

Desde ya gracias.
  #2 (permalink)  
Antiguo 17/03/2010, 07:38
 
Fecha de Ingreso: octubre-2008
Mensajes: 26
Antigüedad: 15 años, 5 meses
Puntos: 1
Respuesta: cargar paises y ciudades en un combo en community builder

Bueno no pude con mommunity builder por mas que trate lo que hice fue modificar el propio modulo de registro y perfil del usuario que vienen por defecto en joomla
  #3 (permalink)  
Antiguo 18/03/2010, 20:45
Avatar de CraToS  
Fecha de Ingreso: diciembre-2008
Ubicación: Alajuela, CR
Mensajes: 24
Antigüedad: 15 años, 4 meses
Puntos: 0
Respuesta: cargar paises y ciudades en un combo en community builder

Ah, yo lo que usé una vez fue un query de la base de datos que alguien por ahí sacó, una vez que hizo toda la lista país por país.

RECOMENDADO: Hacer backup de la base de datos ANTES de importar esta tabla, verdad, no vaya a ser...


Lo paso en dos post, poque el sistema sólo permite 10000 caracteres, y el post completo me quedaría de 10249. Espero que los moderadores me dejen hacer eso :-p

Es esta:

Código MySQL:
Ver original
  1. -- phpMyAdmin SQL Dump
  2. -- version 2.11.9.5
  3. -- http://www.phpmyadmin.net
  4. --
  5. -- Host: localhost
  6. -- Generation Time: Jun 30, 2009 at 09:52 PM
  7. -- Server version: 5.0.75
  8. -- PHP Version: 5.2.5
  9.  
  10. SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
  11.  
  12.  
  13. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  14. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  15. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  16. /*!40101 SET NAMES utf8 */;
  17.  
  18. --
  19. -- Database: `nombre_de_la_base_de_datos`
  20. --
  21.  
  22. -- --------------------------------------------------------
  23.  
  24. --
  25. -- Table structure for table `jos_comprofiler_field_values`
  26. --
  27.  
  28. DROP TABLE IF EXISTS `jos_comprofiler_field_values`;
  29. CREATE TABLE IF NOT EXISTS `jos_comprofiler_field_values` (
  30.   `fieldvalueid` int(11) NOT NULL auto_increment,
  31.   `fieldid` int(11) NOT NULL default '0',
  32.   `fieldtitle` varchar(255) NOT NULL default '',
  33.   `ordering` int(11) NOT NULL default '0',
  34.   `sys` tinyint(4) NOT NULL default '0',
  35.   PRIMARY KEY  (`fieldvalueid`),
  36.   KEY `fieldid_ordering` (`fieldid`,`ordering`),
  37.   KEY `fieldtitle_id` (`fieldtitle`,`fieldid`)
  38. ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1256 ;
  39.  
  40. --
  41. -- Dumping data for table `jos_comprofiler_field_values`
  42. --
  43.  
  44. INSERT INTO `jos_comprofiler_field_values` (`fieldvalueid`, `fieldid`, `fieldtitle`, `ordering`, `sys`) VALUES
  45. (1243, 59, 'US Minor Outlying Islands', 235, 0),
  46. (1241, 59, 'United States Virgin Islands', 233, 0),
  47. (1242, 59, 'Uruguay', 234, 0),
  48. (1240, 59, 'United States of America', 232, 0),
  49. (1239, 59, 'United Kingdom', 231, 0),
  50. (1238, 59, 'United Arab Emirates', 230, 0),
  51. (1237, 59, 'Ukraine', 229, 0),
  52. (1236, 59, 'Uganda', 228, 0),
  53. (1235, 59, 'Tuvalu', 227, 0),
  54. (1234, 59, 'Turks and Caicos Islands', 226, 0),
  55. (1233, 59, 'Turkmenistan', 225, 0),
  56. (1232, 59, 'Turkey', 224, 0),
  57. (1231, 59, 'Tunisia', 223, 0),
  58. (1230, 59, 'Trinidad and Tobago', 222, 0),
  59. (1229, 59, 'Tonga', 221, 0),
  60. (1228, 59, 'Tokelau', 220, 0),
  61. (1227, 59, 'Togo', 219, 0),
  62. (1226, 59, 'Timor-Leste', 218, 0),
  63. (1225, 59, 'Thailand', 217, 0),
  64. (1224, 59, 'Tanzania', 216, 0),
  65. (1223, 59, 'Tajikistan', 215, 0),
  66. (1220, 59, 'Switzerland', 212, 0),
  67. (1221, 59, 'Syria', 213, 0),
  68. (1222, 59, 'Taiwan', 214, 0),
  69. (1219, 59, 'Sweden', 211, 0),
  70. (1218, 59, 'Swaziland', 210, 0),
  71. (1217, 59, 'Svalbard and Jan Mayen Islands', 209, 0),
  72. (1216, 59, 'Suriname', 208, 0),
  73. (1215, 59, 'Sudan', 207, 0),
  74. (1214, 59, 'Sri Lanka', 206, 0),
  75. (1213, 59, 'Spain', 205, 0),
  76. (1212, 59, 'South Georgia and the South Sandwich Islands', 204, 0),
  77. (1211, 59, 'South Africa', 203, 0),
  78. (1210, 59, 'Somalia', 202, 0),
  79. (1209, 59, 'Solomon Islands', 201, 0),
  80. (1208, 59, 'Slovenia', 200, 0),
  81. (1206, 59, 'Singapore', 198, 0),
  82. (1207, 59, 'Slovak Republic', 199, 0),
  83. (1205, 59, 'Sierra Leone', 197, 0),
  84. (1203, 59, 'Serbia and Montenegro', 195, 0),
  85. (1204, 59, 'Seychelles', 196, 0),
  86. (1202, 59, 'Senegal', 194, 0),
  87. (1201, 59, 'Saudia Arabia', 193, 0),
  88. (1200, 59, 'Sao Tome and Principe', 192, 0),
  89. (1199, 59, 'San Marino', 191, 0),
  90. (1198, 59, 'Samoa', 190, 0),
  91. (1197, 59, 'Saint Vincent and the Grenadines', 189, 0),
  92. (1196, 59, 'Saint Pierre and Miquelon', 188, 0),
  93. (1195, 59, 'Saint Lucia', 187, 0),
  94. (1194, 59, 'Saint Kitts and Nevis', 186, 0),
  95. (1193, 59, 'Saint Helena', 185, 0),
  96. (1192, 59, 'Rwanda', 184, 0),
  97. (1190, 59, 'Romania', 182, 0),
  98. (1191, 59, 'Russia', 183, 0),
  99. (1189, 59, 'Reunion', 181, 0),
  100. (1188, 59, 'Qatar', 180, 0),
  101. (1187, 59, 'Puerto Rico', 179, 0),
  102. (1186, 59, 'Portugal', 178, 0),
  103. (1185, 59, 'Poland', 177, 0),
  104. (1184, 59, 'Pitcairn Island', 176, 0),
  105. (1183, 59, 'Philippines', 175, 0),
  106. (1182, 59, 'Peru', 174, 0),
  107. (1181, 59, 'Paraguay', 173, 0),
  108. (1180, 59, 'Papua New Guinea', 172, 0),
  109. (1179, 59, 'Panama', 171, 0),
  110. (1178, 59, 'Palestinian Territory, Occupied', 170, 0),
  111. (1176, 59, 'Pakistan', 168, 0),
  112. (1177, 59, 'Palau', 169, 0),
  113. (1175, 59, 'Oman', 167, 0),
  114. (1174, 59, 'Norway', 166, 0),
  115. (1173, 59, 'Northern Mariana Islands', 165, 0),
  116. (1172, 59, 'Norfolk Island', 164, 0),
  117. (1171, 59, 'Nigeria', 163, 0),
  118. (1170, 59, 'Niger', 162, 0),
  119. (1169, 59, 'Niue', 161, 0),
  120. (1168, 59, 'Nicaragua', 160, 0),
  121. (1167, 59, 'New Zealand', 159, 0),
  122. (1166, 59, 'New Caledonia', 158, 0),
  123. (1165, 59, 'Netherlands Antilles', 157, 0),
  124. (1164, 59, 'Netherlands', 156, 0),
  125. (1163, 59, 'Nepal', 155, 0),
  126. (1162, 59, 'Nauru', 154, 0),
  127. (1160, 59, 'Myanmar', 152, 0),
  128. (1161, 59, 'Namibia', 153, 0),
  129. (1159, 59, 'Mozambique', 151, 0),
  130. (1158, 59, 'Morocco', 150, 0),
  131. (1157, 59, 'Montserrat', 149, 0),
  132. (1156, 59, 'Mongolia', 148, 0),
  133. (1155, 59, 'Monaco', 147, 0),
  134. (1154, 59, 'Moldova', 146, 0),
  135. (1153, 59, 'Micronesia', 145, 0),
  136. (1152, 59, 'Mexico', 144, 0),
  137. (1150, 59, 'Mauritius', 142, 0),
  138. (1151, 59, 'Mayotte', 143, 0),
  139. (1149, 59, 'Mauritania', 141, 0),
  140. (1148, 59, 'Martinique', 140, 0),
  141. (1147, 59, 'Marshall Islands', 139, 0),
  142. (1146, 59, 'Malta', 138, 0),
  143. (1145, 59, 'Mali', 137, 0),
  144. (1144, 59, 'Maldives', 136, 0),
  145. (1143, 59, 'Malaysia', 135, 0),
  146. (1142, 59, 'Malawi', 134, 0),
  147. (1139, 59, 'Macau', 131, 0),
  148. (1140, 59, 'Macedonia', 132, 0),
  149. (1141, 59, 'Madagascar', 133, 0),
  150. (1138, 59, 'Luxembourg', 130, 0),
  151. (1137, 59, 'Lithuania', 129, 0),
  152. (1135, 59, 'Libya', 127, 0),
  153. (1136, 59, 'Liechtenstein', 128, 0),
  154. (1134, 59, 'Liberia', 126, 0),
  155. (1133, 59, 'Lesotho', 125, 0),
  156. (1132, 59, 'Lebanon', 124, 0),
  157. (1131, 59, 'Latvia', 123, 0),
  158. (1130, 59, 'Laos', 122, 0),
  159. (1129, 59, 'Kyrgyzstan', 121, 0),
  160. (1128, 59, 'Kuwait', 120, 0),
  161. (1127, 59, 'Korea, South', 119, 0),
  162. (1126, 59, 'Korea, North', 118, 0),
  163. (1125, 59, 'Kiribati', 117, 0),
  164. (1124, 59, 'Kenya', 116, 0),
  165. (1123, 59, 'Kazakhstan', 115, 0),
  166. (1122, 59, 'Jordan', 114, 0),
  167. (1121, 59, 'Jersey', 113, 0),
  168. (1120, 59, 'Japan', 112, 0),
  169. (1119, 59, 'Jamaica', 111, 0),

continua...
  #4 (permalink)  
Antiguo 18/03/2010, 20:46
Avatar de CraToS  
Fecha de Ingreso: diciembre-2008
Ubicación: Alajuela, CR
Mensajes: 24
Antigüedad: 15 años, 4 meses
Puntos: 0
Respuesta: cargar paises y ciudades en un combo en community builder

...continúa:

Código MySQL:
Ver original
  1. (1118, 59, 'Italy', 110, 0),
  2. (1117, 59, 'Israel', 109, 0),
  3. (1116, 59, 'Isle of Man', 108, 0),
  4. (1115, 59, 'Ireland', 107, 0),
  5. (1114, 59, 'Iraq', 106, 0),
  6. (1113, 59, 'Iran', 105, 0),
  7. (1112, 59, 'Indonesia', 104, 0),
  8. (1111, 59, 'India', 103, 0),
  9. (1110, 59, 'Iceland', 102, 0),
  10. (1109, 59, 'Hungary', 101, 0),
  11. (1108, 59, 'Hong Kong', 100, 0),
  12. (1107, 59, 'Honduras', 99, 0),
  13. (1106, 59, 'Heard and McDonald Islands', 98, 0),
  14. (1105, 59, 'Haiti', 97, 0),
  15. (1104, 59, 'Guyana', 96, 0),
  16. (1103, 59, 'Guinea-Bissau', 95, 0),
  17. (1102, 59, 'Guinea', 94, 0),
  18. (1101, 59, 'Guernsey', 93, 0),
  19. (1098, 59, 'Guadeloupe', 90, 0),
  20. (1099, 59, 'Guam', 91, 0),
  21. (1100, 59, 'Guatemala', 92, 0),
  22. (1097, 59, 'Grenada', 89, 0),
  23. (1096, 59, 'Greenland', 88, 0),
  24. (1095, 59, 'Greece', 87, 0),
  25. (1093, 59, 'Ghana', 85, 0),
  26. (1094, 59, 'Gibraltar', 86, 0),
  27. (1092, 59, 'Germany', 84, 0),
  28. (1091, 59, 'Georgia', 83, 0),
  29. (1090, 59, 'Gambia', 82, 0),
  30. (1089, 59, 'Gabon', 81, 0),
  31. (1088, 59, 'French Southern Territories', 80, 0),
  32. (1087, 59, 'French Polynesia', 79, 0),
  33. (1086, 59, 'French Guiana', 78, 0),
  34. (1085, 59, 'France', 77, 0),
  35. (1084, 59, 'Finland', 76, 0),
  36. (1083, 59, 'Fiji', 75, 0),
  37. (1082, 59, 'Falkland Islands (Malvinas)', 74, 0),
  38. (1081, 59, 'Faroe Islands', 73, 0),
  39. (1080, 59, 'Ethiopia', 72, 0),
  40. (1079, 59, 'Estonia', 71, 0),
  41. (1078, 59, 'Eritrea', 70, 0),
  42. (1077, 59, 'Equatorial Guinea', 69, 0),
  43. (1076, 59, 'El Salvador', 68, 0),
  44. (1075, 59, 'Egypt', 67, 0),
  45. (1074, 59, 'Ecuador', 66, 0),
  46. (1072, 59, 'Dominica', 64, 0),
  47. (1073, 59, 'Dominican Republic', 65, 0),
  48. (1071, 59, 'Djibouti', 63, 0),
  49. (1070, 59, 'Denmark', 62, 0),
  50. (1069, 59, 'Czech Republic', 61, 0),
  51. (1068, 59, 'Cyprus', 60, 0),
  52. (1067, 59, 'Cuba', 59, 0),
  53. (1066, 59, 'Croatia', 58, 0),
  54. (1065, 59, 'Cote d''Ivoire', 57, 0),
  55. (1064, 59, 'Costa Rica', 56, 0),
  56. (1063, 59, 'Cook Islands', 55, 0),
  57. (1062, 59, 'Congo, Democratic Republic of', 54, 0),
  58. (1061, 59, 'Congo, Republic of', 53, 0),
  59. (1060, 59, 'Comoros', 52, 0),
  60. (1059, 59, 'Colombia', 51, 0),
  61. (1058, 59, 'Cocos (Keeling) Island', 50, 0),
  62. (1057, 59, 'Christmas Island', 49, 0),
  63. (1055, 59, 'Chile', 47, 0),
  64. (1056, 59, 'China', 48, 0),
  65. (1053, 59, 'Chad', 45, 0),
  66. (1054, 59, 'Channel Islands', 46, 0),
  67. (1052, 59, 'Central African Republic', 44, 0),
  68. (1051, 59, 'Cayman Islands', 43, 0),
  69. (1050, 59, 'Cap Verde', 42, 0),
  70. (1049, 59, 'Canada', 41, 0),
  71. (1048, 59, 'Cameroon', 40, 0),
  72. (1047, 59, 'Cambodia', 39, 0),
  73. (1046, 59, 'Burundi', 38, 0),
  74. (1045, 59, 'Burkina Faso', 37, 0),
  75. (1044, 59, 'Bulgaria', 36, 0),
  76. (1043, 59, 'Brunei Darussalam', 35, 0),
  77. (1042, 59, 'British Indian Ocean Territory', 34, 0),
  78. (1041, 59, 'British Virgin Islands', 33, 0),
  79. (1040, 59, 'Brazil', 32, 0),
  80. (1039, 59, 'Bouvet Island', 31, 0),
  81. (1038, 59, 'Botswana', 30, 0),
  82. (1037, 59, 'Bosnia and Herzegovina', 29, 0),
  83. (1036, 59, 'Bolivia', 28, 0),
  84. (1035, 59, 'Bhutan', 27, 0),
  85. (1034, 59, 'Bermuda', 26, 0),
  86. (1033, 59, 'Benin', 25, 0),
  87. (1032, 59, 'Belize', 24, 0),
  88. (1031, 59, 'Belgium', 23, 0),
  89. (1030, 59, 'Belarus', 22, 0),
  90. (1029, 59, 'Barbados', 21, 0),
  91. (1028, 59, 'Bangladesh', 20, 0),
  92. (1027, 59, 'Bahrain', 19, 0),
  93. (1026, 59, 'Bahamas', 18, 0),
  94. (1025, 59, 'Azerbaijan', 17, 0),
  95. (1024, 59, 'Austria', 16, 0),
  96. (1023, 59, 'Australia', 15, 0),
  97. (1022, 59, 'Ascension Island', 14, 0),
  98. (1021, 59, 'Aruba', 13, 0),
  99. (1020, 59, 'Armenia', 12, 0),
  100. (1019, 59, 'Argentina', 11, 0),
  101. (1018, 59, 'Antigua and Barbuda', 10, 0),
  102. (1017, 59, 'Antarctica', 9, 0),
  103. (1016, 59, 'Anguilla', 8, 0),
  104. (1015, 59, 'Angola', 7, 0),
  105. (1014, 59, 'Andorra', 6, 0),
  106. (1013, 59, 'American Samoa', 5, 0),
  107. (1012, 59, 'Algeria', 4, 0),
  108. (1011, 59, 'Albania', 3, 0),
  109. (1010, 59, 'Aland', 2, 0),
  110. (1009, 59, 'Afghanistan', 1, 0),
  111. (1245, 59, 'Uzbekistan', 237, 0),
  112. (1246, 59, 'Vanuatu', 238, 0),
  113. (1247, 59, 'Vatican City State (Holy See)', 239, 0),
  114. (1248, 59, 'Venezuela', 240, 0),
  115. (1249, 59, 'Vietnam', 241, 0),
  116. (1250, 59, 'Wallis and Futuna Islands', 242, 0),
  117. (1251, 59, 'Western Sahara', 243, 0),
  118. (1252, 59, 'Yemen', 244, 0),
  119. (1253, 59, 'Yugoslavia', 245, 0),
  120. (1254, 59, 'Zambia', 246, 0),
  121. (1255, 59, 'Zimbabwe', 247, 0);



Espero que te sirva eso para ahorrar unas cuantas horas de trabajo!

Etiquetas: builder, combo, community, ciudad
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 13:34.