22 พฤษภาคม 2555, 16:52:32
ยินดีต้อนรับผู้เยี่ยมชม
  • noavata
  • ยินดีต้อนรับคุณ, ผู้เยี่ยมชม กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน
    เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น
Page Rank

ทำเว็บไซต์ | แต่งบอร์ด | ออกแบบ | SMF | Joomla | Drupal | WordPress | JQuery | CMS | ECommerce | Tel. +668-08577477

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Country Flags ที่นี่ประเทศไทย  (อ่าน 2966 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 13 กรกฎาคม 2553, 18:23:37
  • ชื่อ: CountryFlags
  • ผู้เขียน: vbgamer45
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Profile
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 13 มีนาคม 2553
  • ต้นฉบับ: CountryFlags

รายละเอียด
      ติดธงชาติไว้ที่ข้อมูลส่วนตัวทั้งในหน้าข้อมูลส่วนตัว (Profile) และหน้าอ่านกระทู้ (Display) โดยผู้ดำเนินการฟอรั่มสามารถกำหนดเปิด/ปิด การใช้งาน และกำหนดให้แสดงในแต่ละที่ หรือทั้ง 2 ที่ พร้อมกับกำหนดให้เลือกหรือไม่ต้องเลือกประเทศในตอนลงทะเบียนได้

ตัวอย่าง


สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/Register.php

ค้นหา -->>
โค๊ด: [Select]
fatal_lang_error('under_age_registration_prohibited', false, array($modSettings['coppaAge']));
}

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Convert the $_POST['country'] to $_POST['default_options']['country']
if (isset($_POST['country']))
{
$_POST['default_options']['country'] = $_POST['country'];

// Check if it's required to select location
if (!empty($modSettings['country_flag_required']) && empty($_POST['default_options']['country']))
fatal_lang_error('country_flag_required', false);
}

file $sourcedir/Subs.php

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function CountryFlag()
{
$flags = array(
'00' => '',
'af' => 'Afghanistan', 'al' => 'Albania', 'dz' => 'Algeria',
'as' => 'American Samoa', 'ad' => 'Andorra', 'ao' => 'Angola',
'ai' => 'Anguilla', 'aq' => 'Antarctica', 'ag' => 'Antigua and Barbuda',
'ar' => 'Argentina', 'am' => 'Armenia', 'aw' => 'Aruba',
'au' => 'Australia', 'at' => 'Austria', 'az' => 'Azerbaijan',
'bs' => 'Bahamas', 'bh' => 'Bahrain', 'bd' => 'Bangladesh',
'bb' => 'Barbados', 'by' => 'Belarus', 'be' => 'Belgium',
'bz' => 'Belize', 'bj' => 'Benin', 'bm' => 'Bermuda',
'bt' => 'Bhutan', 'bo' => 'Bolivia', 'ba' => 'Bosnia and Herzegovina',
'bw' => 'Botswana', 'bv' => 'Bouvet Island', 'br' => 'Brazil',
'io' => 'British Indian Ocean Territory', 'bn' => 'Brunei Darussalam', 'bg' => 'Bulgaria',
'bf' => 'Burkina Faso', 'bi' => 'Burundi', 'kh' => 'Cambodia',
'cm' => 'Cameroon', 'ca' => 'Canada', 'cv' => 'Cape Verde',
'ky' => 'Cayman Islands', 'cf' => 'Central African Republic', 'td' => 'Chad',
'cl' => 'Chile', 'cn' => 'China', 'cx' => 'Christmas Island',
'cc' => 'Cocos (Keeling) Islands', 'co' => 'Colombia', 'km' => 'Comoros',
'cg' => 'Congo, Republic of the', 'cd' => 'Congo, The Democratic Republic of the', 'ck' => 'Cook Islands',
'cr' => 'Costa Rica', 'ci' => 'Côte d\'Ivoire', 'hr' => 'Croatia',
'cu' => 'Cuba', 'cy' => 'Cyprus', 'cz' => 'Czech Republic',
'dk' => 'Denmark', 'dj' => 'Djibouti', 'dm' => 'Dominica',
'do' => 'Dominican Republic', 'ec' => 'Ecuador', 'eg' => 'Egypt',
'sv' => 'El Salvador', 'england' => 'England', 'gq' => 'Equatorial Guinea',
'er' => 'Eritrea',
'ee' => 'Estonia', 'et' => 'Ethiopia', 'fk' => 'Falkland Islands (Islas Malvinas)',
'fo' => 'Faroe Islands', 'fj' => 'Fiji', 'fi' => 'Finland',
'fr' => 'France', 'gf' => 'French Guiana', 'pf' => 'French Polynesia',
'tf' => 'French Southern Territories', 'ga' => 'Gabon', 'gm' => 'Gambia',
'ge' => 'Georgia', 'de' => 'Germany', 'gh' => 'Ghana',
'gi' => 'Gibraltar', 'gr' => 'Greece', 'gl' => 'Greenland',
'gd' => 'Grenada', 'gp' => 'Guadeloupe', 'gu' => 'Guam',
'gt' => 'Guatemala', 'gn' => 'Guinea', 'gw' => 'Guinea-Bissau',
'gy' => 'Guyana', 'ht' => 'Haiti', 'hm' => 'Heard Island and McDonald Islands',
'va' => 'Vatican City State', 'hn' => 'Honduras', 'hk' => 'Hong Kong',
'hu' => 'Hungary', 'is' => 'Iceland', 'in' => 'India',
'id' => 'Indonesia', 'ir' => 'Iran, Islamic Republic of', 'iq' => 'Iraq',
'ie' => 'Ireland, Republic of', 'il' => 'Israel', 'it' => 'Italy',
'jm' => 'Jamaica', 'jp' => 'Japan', 'jo' => 'Jordan',
'kz' => 'Kazakhstan', 'ke' => 'Kenya', 'ki' => 'Kiribati',
'kp' => 'Korea, Democratic People\'s Republic of', 'kr' => 'Korea, Republic of', 'kw' => 'Kuwait',
'kg' => 'Kyrgyzstan', 'la' => 'Lao People\'s Democratic Republic', 'lv' => 'Latvia',
'lb' => 'Lebanon', 'ls' => 'Lesotho', 'lr' => 'Liberia',
'ly' => 'Libyan Arab Jamahiriya', 'li' => 'Liechtenstein', 'lt' => 'Lithuania',
'lu' => 'Luxembourg', 'mo' => 'Macao', 'mk' => 'Macedonia, The Former Yugoslav Republic of',
'mg' => 'Madagascar', 'mw' => 'Malawi', 'my' => 'Malaysia',
'mv' => 'Maldives', 'ml' => 'Mali', 'mt' => 'Malta',
'mh' => 'Marshall Islands', 'mq' => 'Martinique', 'mr' => 'Mauritania',
'mu' => 'Mauritius', 'yt' => 'Mayotte', 'mx' => 'Mexico',
'fm' => 'Micronesia, Federated States of', 'md' => 'Moldova, Republic of', 'mc' => 'Monaco',
'mn' => 'Mongolia', 'ms' => 'Montserrat', 'ma' => 'Morocco',
'mz' => 'Mozambique', 'mm' => 'Myanmar', 'na' => 'Namibia',
'nr' => 'Nauru', 'np' => 'Nepal', 'nl' => 'Netherlands',
'an' => 'Netherlands Antilles', 'nc' => 'New Caledonia', 'nz' => 'New Zealand',
'ni' => 'Nicaragua', 'ne' => 'Niger', 'ng' => 'Nigeria',
'nu' => 'Niue', 'nf' => 'Norfolk Island', 'mp' => 'Northern Mariana Islands',
'no' => 'Norway', 'om' => 'Oman', 'pk' => 'Pakistan',
'pw' => 'Palau', 'ps' => 'Palestinian Territory, Occupied', 'pa' => 'Panama',
'pg' => 'Papua New Guinea', 'py' => 'Paraguay', 'pe' => 'Peru',
'ph' => 'Philippines', 'pn' => 'Pitcairn', 'pl' => 'Poland',
'pt' => 'Portugal', 'pr' => 'Puerto Rico', 'qa' => 'Qatar',
're' => 'Reunion', 'ro' => 'Romania', 'ru' => 'Russian Federation',
'rw' => 'Rwanda', 'sh' => 'Saint Helena', 'kn' => 'Saint Kitts and Nevis',
'lc' => 'Saint Lucia', 'pm' => 'Saint Pierre and Miquelon', 'vc' => 'Saint Vincent and the Grenadines',
'ws' => 'Samoa', 'sm' => 'San Marino', 'st' => 'Sao Tome and Principe',
'sa' => 'Saudi Arabia', 'scotland' => 'Scotland', 'sn' => 'Senegal',
'cs' => 'Serbia and Montenegro', 'sc' => 'Seychelles', 'sl' => 'Sierra Leone',
'sg' => 'Singapore', 'sk' => 'Slovakia', 'si' => 'Slovenia',
'sb' => 'Solomon Islands',
'so' => 'Somalia', 'za' => 'South Africa', 'gs' => 'South Georgia and the South Sandwich Islan',
'es' => 'Spain', 'lk' => 'Sri Lanka', 'sd' => 'Sudan',
'sr' => 'Suriname', 'sj' => 'Svalbard and Jan Mayen', 'sz' => 'Swaziland',
'se' => 'Sweden', 'ch' => 'Switzerland', 'sy' => 'Syrian Arab Republic',
'tw' => 'Taiwan', 'tj' => 'Tajikistan', 'tz' => 'Tanzania, United Republic of',
'th' => 'Thailand', 'tl' => 'Timor-Leste', 'tg' => 'Togo',
'tk' => 'Tokelau', 'to' => 'Tonga', 'tt' => 'Trinidad and Tobago',
'tn' => 'Tunisia', 'tr' => 'Turkey', 'tm' => 'Turkmenistan',
'tc' => 'Turks and Caicos Islands', 'tv' => 'Tuvalu', 'ug' => 'Uganda',
'ua' => 'Ukraine', 'ae' => 'United Arab Emirates', 'gb' => 'United Kingdom',
'us' => 'United States', 'um' => 'United States Minor Outlying Islands', 'uy' => 'Uruguay',
'uz' => 'Uzbekistan', 'vu' => 'Vanuatu', 've' => 'Venezuela',
'vn' => 'Viet Nam', 'vg' => 'Virgin Islands, British', 'vi' => 'Virgin Islands, U.S.', 'wales' => 'Wales',
'wf' => 'Wallis and Futuna', 'wales' => 'Wales', 'eh' => 'Western Sahara',
'ye' => 'Yemen', 'zm' => 'Zambia', 'zw' => 'Zimbabwe',
);
return $flags;
}

file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Reporting of personal messages?
array('check', 'enableReportPM'),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'',
// Show flags
array('select', 'country_flag_ask', array($txt['country_flag_disabled'], $txt['country_flag_profile'], $txt['country_flag_registration'], $txt['country_flag_both'])),
array('check', 'country_flag_required'),
array('check', 'country_flag_show'),

file $sourcedir/Profile.php

ค้นหา -->>
โค๊ด: [Select]
$erase_options = array();
if (isset($_POST['default_options']) && is_array($_POST['default_options']))

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Convert the $_POST['country'] to $_POST['default_options']['country']
if (isset($_POST['country']))
{
$_POST['default_options']['country'] = $_POST['country'];

// Check if it's required to select location
if (!empty($modSettings['country_flag_required']) && empty($_POST['default_options']['country']))
fatal_lang_error('country_flag_error_required', false);
}

file $themedir/Register.template.php

ค้นหา -->>
โค๊ด: [Select]
// Are there age restrictions in place?
if (!empty($modSettings['coppaAge']))

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// If flags is set for registration show it.
if (!empty($modSettings['country_flag_ask']) && $modSettings['country_flag_ask'] == 2 || $modSettings['country_flag_ask'] == 3)
{
// Call the function that has all the flag info
$flags = CountryFlag();

echo '
<script language="JavaScript" type="text/javascript">
function showflags()
{
document.images.flags.src = document.forms.creator.country.options[document.forms.creator.country.selectedIndex].value != \'\' ? \'' . $settings['default_theme_url'] . '/images/flags/\' + document.forms.creator.country.options[document.forms.creator.country.selectedIndex].value + \'.png\' : \'' . $settings['default_theme_url'] . '/images/flags/blank.gif\';
}
</script>
<tr>
<td width="40%" align="top">
<b>', $txt['country_flag_label'], ':</b>
</td>
<td>
<select name="country" onchange="showflags()">
<option value=""></option>';

// Loop and show the drop down.
foreach ($flags as $key => $name)
echo '
<option value="', $key, '">', $name, '</option>';

echo '
</select>
<img id="flags" src="', $settings['default_theme_url'], '/images/blank.gif" width="25" height="15" align="top" />
</td>
</tr>';
}

file $themedir/Profile.template.php

ค้นหา -->>
โค๊ด: [Select]
<td><input type="text" name="location" size="50" value="', $context['member']['location'], '" /></td>
</tr>
<tr>
<td width="40%"><b>', $txt[231], ': </b></td>

แก้เป็น -->>
โค๊ด: [Select]
<td><input type="text" name="location" size="50" value="', $context['member']['location'], '" /></td>
</tr>';

// If flags is set for registration show it.
if (!empty($modSettings['country_flag_ask']) && $modSettings['country_flag_ask'] == 1 || $modSettings['country_flag_ask'] == 3)
{
// Call the function that has all the flag info
$flags = CountryFlag();

echo '
<script language="JavaScript" type="text/javascript">
function showflags()
{
document.images.flags.src = document.forms.creator.country.options[document.forms.creator.country.selectedIndex].value != \'\' ? \'' . $settings['default_theme_url'] . '/images/flags/\' + document.forms.creator.country.options[document.forms.creator.country.selectedIndex].value + \'.png\' : \'' . $settings['default_theme_url'] . '/images/flags/blank.gif\';
}
</script>
<tr>
<td width="40%" align="top">
<b>', $txt['country_flag_label'], ':</b>
</td>
<td>
<select name="country" onchange="showflags()">
<option value=""></option>';

// Loop and show the drop down.
foreach ($flags as $key => $name)
echo '
<option value="', $key, '" ', isset($context['member']['options']['country']) &&  $context['member']['options']['country'] == $key ? 'selected="selected"' : '', '>', $name, '</option>';

echo '
</select>
<img id="flags" src="', $settings['default_theme_url'], '/images/', isset($context['member']['options']['country']) && !empty($context['member']['options']['country']) ? 'flags/' . $context['member']['options']['country'] . '.png': 'blank.gif', '" width="25" height="15" align="top" />
</td>
</tr>';
}

echo '
<tr>
<td width="40%"><b>', $txt[231], ': </b></td>

ค้นหา -->>
โค๊ด: [Select]
</tr><tr>
<td><b>', $txt[227], ':</b></td>
<td>', $context['member']['location'], '</td>
</tr><tr>

แก้เป็น -->>
โค๊ด: [Select]
</tr><tr>
<td><b>', $txt[227], ':</b></td>
<td>', $context['member']['location'], '</td>
</tr><tr>
<td><b>', $txt['country_flag'], ':</b></td>
<td>';

// Did they select a flag?
if(isset($context['member']['options']['country']) && !empty($context['member']['options']['country']))
{
$flags = CountryFlag();
echo
$flags[$context['member']['options']['country']] . ' <img src="', $settings['default_theme_url'], '/images/flags/', $context['member']['options']['country'], '.png" alt="Country" />';
}

echo '
</td>
</tr><tr>

file $themedir/Display.template.php

ค้นหา -->>
โค๊ด: [Select]
// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
// Did they select a flag?
if(isset($message['member']['options']['country']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['options']['country']))
{
$flags = CountryFlag();
echo '
<img src="', $settings['default_theme_url'], '/images/flags/', $message['member']['options']['country'], '.png" alt="', $flags[$message['member']['options']['country']], '" /> ', $flags[$message['member']['options']['country']], '<br /><br />';
}

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ดาวน์โหลด: flags.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

แตกไฟล์แล้วอัพโหลดไปไว้ที่
folder flags -->> $imagesdir

สร้างไฟล์: install.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/install.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php
/**********************************************************************************
* install.php                                                                     *
***********************************************************************************
* Modification by:            Jason Clemons (http://gamingbrotherhood.com)        *
* Copyright 2009 by:          Socialite Development (http://socialiteproject.com) *
***********************************************************************************
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
**********************************************************************************/

/* This file is a simplified database installer. It does what it is suppoed to. */

// List settings here in the format: setting_key => default_value.  Escape any "s. (" => \")
$mod_settings = array();
$mod_settings = array(
'country_flag_ask' => 0,
'country_flag_required' => 0,
'country_flag_show' => 1,
);

$columns = array();
$columns[] = array(
'table_name' => '{db_prefix}members',
'column_info' => array(
'name' => 'country_flag',
'type' => 'varchar',
'size' => 10,
'null' => false,
'default' => '',
),
'error' => 'fatal',
'if_exists' => 'update',
'parameters' => array(),
);

if (
file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
{
require_once(dirname(__FILE__) . '/SSI.php');
}
elseif(!
defined('SMF'))
{
die('<b>Error:</b> Cannot install - please verify you put this file in the same place as SMF\'s SSI.php.');
}

db_extend('packages');

updateSettings($mod_settings); 

foreach ($columns as $column)
$smcFunc['db_add_column']($column['table_name'], $column['column_info'], $column['parameters'], $column['if_exists'], $column['error']);

if (
SMF == 'SSI')
echo 'Congratulations! You have successfully installed SMF XboxLIVE!';

?>

การตั้งค่า: -->> ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> ความสามารถขั้นพื้นฐาน


ลิงค์หัวข้อ: http://dexmore.com/topic/2390
Windows XP    Firefox 3.6.6   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 13 กรกฎาคม 2553, 19:29:05
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $sourcedir/Load.php

ค้นหา -->>
โค๊ด: [Select]
'gender' => array(

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'country_flag' => $profile['country_flag'],

ค้นหา -->>
โค๊ด: [Select]
mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,

แก้เป็น -->>
โค๊ด: [Select]
mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.country_flag,

ค้นหา -->>
โค๊ด: [Select]
mem.openid_uri, mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,

แก้เป็น -->>
โค๊ด: [Select]
mem.openid_uri, mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good, mem.country_flag,

file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Mod authors, add any settings UNDER this line. Include a comma at the end of the line and don't remove this statement!!

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'',
// Show flags
array('select', 'country_flag_ask', array($txt['country_flag_disabled'], $txt['country_flag_profile'], $txt['country_flag_registration'], $txt['country_flag_both'])),
array('check', 'country_flag_required'),
array('check', 'country_flag_show'),

file $sourcedir/Profile-Modify.php

ค้นหา -->>
โค๊ด: [Select]
'date_registered' => array(

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'country_flag' => array(
'type' => 'select',
'options' => country_flags(),
'label' => $txt['country_flag_label'],
),

ค้นหา -->>
โค๊ด: [Select]
'bday1', 'location', 'gender', 'hr',

แก้เป็น -->>
โค๊ด: [Select]
'bday1', 'location', 'country_flag', 'gender', 'hr',

file $sourcedir/Subs.php

ค้นหา -->>
โค๊ด: [Select]
?>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Nice big array of countries!
function country_flags()
{
$flags = array(
'00' => '',
'af' => 'Afghanistan', 'al' => 'Albania', 'dz' => 'Algeria',
'as' => 'American Samoa', 'ad' => 'Andorra', 'ao' => 'Angola',
'ai' => 'Anguilla', 'aq' => 'Antarctica', 'ag' => 'Antigua and Barbuda',
'ar' => 'Argentina', 'am' => 'Armenia', 'aw' => 'Aruba',
'au' => 'Australia', 'at' => 'Austria', 'az' => 'Azerbaijan',
'bs' => 'Bahamas', 'bh' => 'Bahrain', 'bd' => 'Bangladesh',
'bb' => 'Barbados', 'by' => 'Belarus', 'be' => 'Belgium',
'bz' => 'Belize', 'bj' => 'Benin', 'bm' => 'Bermuda',
'bt' => 'Bhutan', 'bo' => 'Bolivia', 'ba' => 'Bosnia and Herzegovina',
'bw' => 'Botswana', 'bv' => 'Bouvet Island', 'br' => 'Brazil',
'io' => 'British Indian Ocean Territory', 'bn' => 'Brunei Darussalam', 'bg' => 'Bulgaria',
'bf' => 'Burkina Faso', 'bi' => 'Burundi', 'kh' => 'Cambodia',
'cm' => 'Cameroon', 'ca' => 'Canada', 'cv' => 'Cape Verde',
'ky' => 'Cayman Islands', 'cf' => 'Central African Republic', 'td' => 'Chad',
'cl' => 'Chile', 'cn' => 'China', 'cx' => 'Christmas Island',
'cc' => 'Cocos (Keeling) Islands', 'co' => 'Colombia', 'km' => 'Comoros',
'cg' => 'Congo, Republic of the', 'cd' => 'Congo, The Democratic Republic of the', 'ck' => 'Cook Islands',
'cr' => 'Costa Rica', 'ci' => 'Côte d\'Ivoire', 'hr' => 'Croatia',
'cu' => 'Cuba', 'cy' => 'Cyprus', 'cz' => 'Czech Republic',
'dk' => 'Denmark', 'dj' => 'Djibouti', 'dm' => 'Dominica',
'do' => 'Dominican Republic', 'ec' => 'Ecuador', 'eg' => 'Egypt',
'sv' => 'El Salvador', 'england' => 'England', 'gq' => 'Equatorial Guinea',
'er' => 'Eritrea',
'ee' => 'Estonia', 'et' => 'Ethiopia', 'fk' => 'Falkland Islands (Islas Malvinas)',
'fo' => 'Faroe Islands', 'fj' => 'Fiji', 'fi' => 'Finland',
'fr' => 'France', 'gf' => 'French Guiana', 'pf' => 'French Polynesia',
'tf' => 'French Southern Territories', 'ga' => 'Gabon', 'gm' => 'Gambia',
'ge' => 'Georgia', 'de' => 'Germany', 'gh' => 'Ghana',
'gi' => 'Gibraltar', 'gr' => 'Greece', 'gl' => 'Greenland',
'gd' => 'Grenada', 'gp' => 'Guadeloupe', 'gu' => 'Guam',
'gt' => 'Guatemala', 'gn' => 'Guinea', 'gw' => 'Guinea-Bissau',
'gy' => 'Guyana', 'ht' => 'Haiti', 'hm' => 'Heard Island and McDonald Islands',
'va' => 'Vatican City State', 'hn' => 'Honduras', 'hk' => 'Hong Kong',
'hu' => 'Hungary', 'is' => 'Iceland', 'in' => 'India',
'id' => 'Indonesia', 'ir' => 'Iran, Islamic Republic of', 'iq' => 'Iraq',
'ie' => 'Ireland, Republic of', 'il' => 'Israel', 'it' => 'Italy',
'jm' => 'Jamaica', 'jp' => 'Japan', 'jo' => 'Jordan',
'kz' => 'Kazakhstan', 'ke' => 'Kenya', 'ki' => 'Kiribati',
'kp' => 'Korea, Democratic People\'s Republic of', 'kr' => 'Korea, Republic of', 'kw' => 'Kuwait',
'kg' => 'Kyrgyzstan', 'la' => 'Lao People\'s Democratic Republic', 'lv' => 'Latvia',
'lb' => 'Lebanon', 'ls' => 'Lesotho', 'lr' => 'Liberia',
'ly' => 'Libyan Arab Jamahiriya', 'li' => 'Liechtenstein', 'lt' => 'Lithuania',
'lu' => 'Luxembourg', 'mo' => 'Macao', 'mk' => 'Macedonia, The Former Yugoslav Republic of',
'mg' => 'Madagascar', 'mw' => 'Malawi', 'my' => 'Malaysia',
'mv' => 'Maldives', 'ml' => 'Mali', 'mt' => 'Malta',
'mh' => 'Marshall Islands', 'mq' => 'Martinique', 'mr' => 'Mauritania',
'mu' => 'Mauritius', 'yt' => 'Mayotte', 'mx' => 'Mexico',
'fm' => 'Micronesia, Federated States of', 'md' => 'Moldova, Republic of', 'mc' => 'Monaco',
'mn' => 'Mongolia', 'ms' => 'Montserrat', 'ma' => 'Morocco',
'mz' => 'Mozambique', 'mm' => 'Myanmar', 'na' => 'Namibia',
'nr' => 'Nauru', 'np' => 'Nepal', 'nl' => 'Netherlands',
'an' => 'Netherlands Antilles', 'nc' => 'New Caledonia', 'nz' => 'New Zealand',
'ni' => 'Nicaragua', 'ne' => 'Niger', 'ng' => 'Nigeria',
'nu' => 'Niue', 'nf' => 'Norfolk Island', 'mp' => 'Northern Mariana Islands',
'no' => 'Norway', 'om' => 'Oman', 'pk' => 'Pakistan',
'pw' => 'Palau', 'ps' => 'Palestinian Territory, Occupied', 'pa' => 'Panama',
'pg' => 'Papua New Guinea', 'py' => 'Paraguay', 'pe' => 'Peru',
'ph' => 'Philippines', 'pn' => 'Pitcairn', 'pl' => 'Poland',
'pt' => 'Portugal', 'pr' => 'Puerto Rico', 'qa' => 'Qatar',
're' => 'Reunion', 'ro' => 'Romania', 'ru' => 'Russian Federation',
'rw' => 'Rwanda', 'sh' => 'Saint Helena', 'kn' => 'Saint Kitts and Nevis',
'lc' => 'Saint Lucia', 'pm' => 'Saint Pierre and Miquelon', 'vc' => 'Saint Vincent and the Grenadines',
'ws' => 'Samoa', 'sm' => 'San Marino', 'st' => 'Sao Tome and Principe',
'sa' => 'Saudi Arabia', 'scotland' => 'Scotland', 'sn' => 'Senegal',
'cs' => 'Serbia and Montenegro', 'sc' => 'Seychelles', 'sl' => 'Sierra Leone',
'sg' => 'Singapore', 'sk' => 'Slovakia', 'si' => 'Slovenia',
'sb' => 'Solomon Islands',
'so' => 'Somalia', 'za' => 'South Africa', 'gs' => 'South Georgia and the South Sandwich Islan',
'es' => 'Spain', 'lk' => 'Sri Lanka', 'sd' => 'Sudan',
'sr' => 'Suriname', 'sj' => 'Svalbard and Jan Mayen', 'sz' => 'Swaziland',
'se' => 'Sweden', 'ch' => 'Switzerland', 'sy' => 'Syrian Arab Republic',
'tw' => 'Taiwan', 'tj' => 'Tajikistan', 'tz' => 'Tanzania, United Republic of',
'th' => 'Thailand', 'tl' => 'Timor-Leste', 'tg' => 'Togo',
'tk' => 'Tokelau', 'to' => 'Tonga', 'tt' => 'Trinidad and Tobago',
'tn' => 'Tunisia', 'tr' => 'Turkey', 'tm' => 'Turkmenistan',
'tc' => 'Turks and Caicos Islands', 'tv' => 'Tuvalu', 'ug' => 'Uganda',
'ua' => 'Ukraine', 'ae' => 'United Arab Emirates', 'gb' => 'United Kingdom',
'us' => 'United States', 'um' => 'United States Minor Outlying Islands', 'uy' => 'Uruguay',
'uz' => 'Uzbekistan', 'vu' => 'Vanuatu', 've' => 'Venezuela',
'vn' => 'Viet Nam', 'vg' => 'Virgin Islands, British', 'vi' => 'Virgin Islands, U.S.', 'wales' => 'Wales',
'wf' => 'Wallis and Futuna', 'wales' => 'Wales', 'eh' => 'Western Sahara',
'ye' => 'Yemen', 'zm' => 'Zambia', 'zw' => 'Zimbabwe',
);
return $flags;
}

file $themedir/Display.template.php

ค้นหา -->>
โค๊ด: [Select]
// Is karma display enabled?  Total or +/-?

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Show the country they hail from!
if (isset($message['member']['country_flag']) && !empty($modSettings['country_flag_show']) && !empty($message['member']['country_flag']))
{
$flags = country_flags();
echo '
<li class="gender">', $txt['country_flag'], ': <img src="', $settings['images_url'], '/flags/', $message['member']['country_flag'], '.png" alt="', $message['member']['country_flag'], '" title="', $flags[$message['member']['country_flag']], '" /></li>';
}

file $themedir/Profile.template.php

ค้นหา -->>
โค๊ด: [Select]
// Always fun - select boxes!
elseif ($field['type'] == 'select')
{
echo '
<select name="', $key, '" id="', $key, '">';

if (isset($field['options']))
{
// Is this some code to generate the options?
if (!is_array($field['options']))
$field['options'] = eval($field['options']);
// Assuming we now have some!
if (is_array($field['options']))
foreach ($field['options'] as $value => $name)
echo '
<option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
}

echo '
</select>';
}

แก้เป็น -->>
โค๊ด: [Select]
// Always fun - select boxes!
elseif ($field['type'] == 'select')
{
if ($key == 'country_flag')
{
echo '
<script type="text/javascript" language="JavaScript">
function show_country_flags()
{
document.images.flags.src = document.forms.creator.country_flag.options[document.forms.creator.country_flag.selectedIndex].value != \'\' ? \'' . $settings['images_url'] . '/flags/\' + document.forms.creator.country_flag.options[document.forms.creator.country_flag.selectedIndex].value + \'.png\' : \'' . $settings['images_url'] . '/flags/blank.gif\';
}
</script>
<select name="', $key, '" id="', $key, '" onchange="show_country_flags()">';

foreach ($field['options'] as $value => $name)
echo '
<option value="', $value, '" ', isset($context['member']['country_flag']) &&  $context['member']['country_flag'] == $value ? 'selected="selected"' : '', '>', $name, '</option>';

echo '
</select>
<img id="flags" src="', $settings['images_url'], '/', isset($context['member']['country_flag']) && !empty($context['member']['country_flag']) ? 'flags/' . $context['member']['country_flag'] . '.png': 'blank.gif', '" width="25" height="15" align="top" />';
}
else
{
echo '
<select name="', $key, '" id="', $key, '">';

if (isset($field['options']))
{
// Is this some code to generate the options?
if (!is_array($field['options']))
$field['options'] = eval($field['options']);
// Assuming we now have some!
if (is_array($field['options']))
foreach ($field['options'] as $value => $name)
echo '
<option value="', $value, '" ', $value == $field['value'] ? 'selected="selected"' : '', '>', $name, '</option>';
}

echo '
</select>';
}
}

file $themedir/Register.template.php

ค้นหา -->>
โค๊ด: [Select]

echo '
</fieldset>
<span class="botslice"><span></span></span>
</div>';

// If we have either of these, show the extra group.

แก้เป็น -->>
โค๊ด: [Select]
// If flags is set for registration show it.
if (!empty($modSettings['country_flag_ask']) && $modSettings['country_flag_ask'] == 2 || $modSettings['country_flag_ask'] == 3)
{
// Call the function that has all the flag info
$flags = country_flags();

echo '
<script language="JavaScript" type="text/javascript">
function showflags()
{
document.images.flags.src = document.forms.registration.country.options[document.forms.registration.country.selectedIndex].value != \'\' ? \'' . $settings['default_theme_url'] . '/images/flags/\' + document.forms.registration.country.options[document.forms.registration.country.selectedIndex].value + \'.png\' : \'' . $settings['default_theme_url'] . '/images/flags/blank.gif\';
}
</script>
<dl class="register_form" id="country_flag">
<dt><strong>', $txt['country_flag_label'], ':</strong></dt>
<dd>
<select name="country" onchange="showflags()">
<option value=""></option>';

// Loop and show the drop down.
foreach ($flags as $key => $name)
echo '
<option value="', $key, '">', $name, '</option>';

echo '
</select>
<img id="flags" src="', $settings['default_theme_url'], '/images/blank.gif" width="25" height="15" align="top" />
</dd>
</dl>';
}

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

ดาวน์โหลด: flags.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Com

แตกไฟล์แล้วอัพโหลดไปไว้ที่
folder flags -->> $imagesdir

สร้างไฟล์: install.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/install.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php
/**********************************************************************************
* install.php                                                                     *
***********************************************************************************
* Modification by:            Jason Clemons (http://gamingbrotherhood.com)        *
* Copyright 2009 by:          Socialite Development (http://socialiteproject.com) *
***********************************************************************************
* This program is distributed in the hope that it is and will be useful, but      *
* WITHOUT ANY WARRANTIES; without even any implied warranty of MERCHANTABILITY    *
* or FITNESS FOR A PARTICULAR PURPOSE.                                            *
**********************************************************************************/

/* This file is a simplified database installer. It does what it is suppoed to. */

// List settings here in the format: setting_key => default_value.  Escape any "s. (" => \")
$mod_settings = array();
$mod_settings = array(
'country_flag_ask' => 0,
'country_flag_required' => 0,
'country_flag_show' => 1,
);

$columns = array();
$columns[] = array(
'table_name' => '{db_prefix}members',
'column_info' => array(
'name' => 'country_flag',
'type' => 'varchar',
'size' => 10,
'null' => false,
'default' => '',
),
'error' => 'fatal',
'if_exists' => 'update',
'parameters' => array(),
);

if (
file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
{
require_once(dirname(__FILE__) . '/SSI.php');
}
elseif(!
defined('SMF'))
{
die('<b>Error:</b> Cannot install - please verify you put this file in the same place as SMF\'s SSI.php.');
}

db_extend('packages');

updateSettings($mod_settings); 

foreach ($columns as $column)
$smcFunc['db_add_column']($column['table_name'], $column['column_info'], $column['parameters'], $column['if_exists'], $column['error']);

if (
SMF == 'SSI')
echo 'Congratulations! You have successfully installed SMF XboxLIVE!';

?>

ลิงค์หัวข้อ: http://dexmore.com/topic/2390
Windows XP    Firefox 3.6.6   see ip บันทึกการเข้า
ดูรายการสิ่งของสำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  สำหรับติดหมุดกระทู้ของคุณ!  เพิ่มเวลาที่อยู่ในระบบอีก 12 ชั่วโมง  น้องหมี..เอาไว้กอดนอนแทนกิ๊ก  สำหรับบอกรักใครสักคน ก็ส่งไปให้เขาเลย!  
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

SMF Thai Translation Powered by SMF © 2006–2012, Simple Machines LLC

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 20 พฤษภาคม 2555, 00:50:24

jQuery Plugin Copyright © 2551-2555 Themes Design & Hosting by DexMoreGroup

Sitemap | Thai Simple Machines Forum support SMF Thai

Web Begining | SMF Modifications | SMF Thai Translation Web Begining

Drupal | WordPress | CMS Joomla | jQuery Plugin | Web Graphics CMS Joomla