สำหรับ SMF 2.0.xxแก้ไขไฟล์:file $sourcedir/Load.php
ค้นหา -->>
'msn' => $profile['msn'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['msn'],
'href' => 'http://members.msn.com/' . $profile['msn'],
'link' => '<a href="http://members.msn.com/' . $profile['msn'] . '" class="extern" title="' . $txt['msn_title'] . ' - ' . $profile['msn'] . '"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $txt['msn_title'] . ' - ' . $profile['msn'] . '" border="0" /></a>',
'link_text' => '<a href="http://members.msn.com/' . $profile['msn'] . '" class="extern" title="' . $txt['msn_title'] . ' - ' . $profile['msn'] . '">' . $profile['msn'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
เพิ่มไว้หลัง -->>
// pfi -->
'myspace' => $profile['myspace'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['myspace'],
'href' => 'http://www.myspace.com/'.$profile['myspace'],
'link' => '<a href="http://www.myspace.com/' . $profile['myspace'] . '" target="_blank" title="' . $txt['pfi_myspace_title'] . ' - ' . $profile['myspace'] . '"><img src="' . $settings['images_url'] . '/myspace.gif" alt="G" border="0" /></a>',
'link_text' => '<a href="http://www.myspace.com/' . $profile['myspace'] . '" target="_blank" title="' . $txt['pfi_myspace_title'] . ' - ' . $profile['myspace'] . '">' . $profile['myspace'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'facebook' => $profile['facebook'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['facebook'],
'href' => 'http://www.facebook.com/'.$profile['facebook'],
'link' => '<a href="http://www.facebook.com/' . $profile['facebook'] . '" target="_blank" title="' . $txt['pfi_facebook_title'] . ' - ' . $profile['facebook'] . '"><img src="' . $settings['images_url'] . '/facebook.gif" alt="G" border="0" /></a>',
'link_text' => '<a href="http://www.facebook.com/' . $profile['facebook'] . '" target="_blank" title="' . $txt['pfi_facebook_title'] . ' - ' . $profile['facebook'] . '">' . $profile['facebook'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
'twitter' => $profile['twitter'] !='' && (empty($modSettings['guest_hideContacts']) || !$user_info['is_guest']) ? array(
'name' => $profile['twitter'],
'href' => 'http://www.twitter.com/'.$profile['twitter'],
'link' => '<a href="http://www.twitter.com/' . $profile['twitter'] . '" target="_blank" title="' . $txt['pfi_twitter_title'] . ' - ' . $profile['twitter'] . '"><img src="' . $settings['images_url'] . '/twitter.png" alt="G" border="0" /></a>',
'link_text' => '<a href="http://www.twitter.com/' . $profile['twitter'] . '" target="_blank" title="' . $txt['pfi_twitter_title'] . ' - ' . $profile['twitter'] . '">' . $profile['twitter'] . '</a>'
) : array('name' => '', 'href' => '', 'link' => '', 'link_text' => ''),
// pfi -->
ค้นหา -->>
mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,
แก้เป็น -->>
mem.myspace AS myspace, mem.facebook, mem.twitter, mem.birthdate, mem.member_ip, mem.member_ip2, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login,
ค้นหา -->>
mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,
แก้เป็น -->>
mem.myspace AS myspace, mem.facebook, mem.twitter, mem.birthdate, mem.icq, mem.aim, mem.yim, mem.msn, mem.posts, mem.last_login, mem.karma_good,
ค้นหา -->>
'icq', 'msn', 'aim', 'yim'
แก้เป็น -->>
'icq', 'msn', 'aim', 'yim', 'myspace', 'facebook', 'twitter'
file $sourcedir/Profile-Modify.php
ค้นหา -->>
'yim' => array(
'type' => 'text',
'label' => $txt['yim'],
'subtext' => $txt['your_yim'],
'size' => 24,
'input_attr' => array('maxlength="32"'),
'permission' => 'profile_extra',
),
เพิ่มไว้หลัง -->>
// pfi -->
'myspace' => array(
'type' => 'text',
'label' => $txt['pfi_myspace_title'],
'subtext' => $txt['pfi_myspace_desc'],
'size' => 24,
'input_attr' => array('maxlength="32"'),
'permission' => 'profile_extra',
),
'facebook' => array(
'type' => 'text',
'label' => $txt['pfi_facebook_title'],
'subtext' => $txt['pfi_facebook_desc'],
'size' => 24,
'input_attr' => array('maxlength="32"'),
'permission' => 'profile_extra',
),
'twitter' => array(
'type' => 'text',
'label' => $txt['pfi_twitter_title'],
'subtext' => $txt['pfi_twitter_desc'],
'size' => 24,
'input_attr' => array('maxlength="32"'),
'permission' => 'profile_extra',
),
// <-- pfi
ค้นหา -->>
'yim', 'hr',
แก้เป็น -->>
'yim', 'myspace', 'facebook', 'twitter', 'hr',
file $sourcedir/Subs-Members.php
ค้นหา -->>
'icq' => '',
เพิ่มไว้ก่อน -->>
// pfi -->
'myspace' => '',
'facebook' => '',
'twitter' => '',
// <-- pfi
ค้นหา -->>
mem.id_member, mem.member_name, mem.real_name, mem.email_address,
แก้เป็น -->>
mem.id_member, mem.member_name, mem.real_name, mem.email_address, mem.myspace AS myspace, mem.facebook, mem.twitter,
file $themedir/Display.template.php
ค้นหา -->>
', !isset($context['disabled_fields']['yim']) && !empty($message['member']['yim']['link']) ? '<li>' . $message['member']['yim']['link'] . '</li>' : '', '
เพิ่มไว้หลัง -->>
', !isset($context['disabled_fields']['facebook']) && !empty($message['member']['facebook']['link']) ? '<li>' . $message['member']['facebook']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['myspace']) && !empty($message['member']['myspace']['link']) ? '<li>' . $message['member']['myspace']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['twitter']) && !empty($message['member']['twitter']['link']) ? '<li>' . $message['member']['twitter']['link'] . '</li>' : '', '
file $themedir/Profile.template.php
ค้นหา -->>
<td align="center">', $txt['yim'], '</td>
เพิ่มไว้หลัง -->>
<td align="center">', $txt['pfi_myspace_title'], '</td>
<td align="center">', $txt['pfi_facebook_title'], '</td>
<td align="center">', $txt['pfi_twitter_title'], '</td>
ค้นหา -->>
<td align="center">', $buddy['yim']['link'], '</td>
เพิ่มไว้หลัง -->>
<td align="center">', $buddy['myspace']['link'], '</td>
<td align="center">', $buddy['facebook']['link'], '</td>
<td align="center">', $buddy['twitter']['link'], '</td>
ค้นหา -->>
', !isset($context['disabled_fields']['yim']) && !empty($context['member']['yim']['link']) ? '<li>' . $context['member']['yim']['link'] . '</li>' : '', '
เพิ่มไว้หลัง -->>
', !isset($context['disabled_fields']['myspace']) && !empty($context['member']['myspace']['link']) ? '<li>' . $context['member']['myspace']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['facebook']) && !empty($context['member']['facebook']['link']) ? '<li>' . $context['member']['facebook']['link'] . '</li>' : '', '
', !isset($context['disabled_fields']['twitter']) && !empty($context['member']['twitter']['link']) ? '<li>' . $context['member']['twitter']['link'] . '</li>' : '', '
file $themedir/Who.template.php
ค้นหา -->>
', $member['yim']['link'], '
แก้เป็น -->>
', $member['yim']['link'], ' ', $member['myspace']['link'], ' ', $member['facebook']['link'], ' ', $member['twitter']['link'], '
file $languagedir/Modifications.thai-utf8.php
เพิ่ม -->>
// pfi -->
$txt['pfi_myspace_title'] = 'MySpace';
$txt['pfi_myspace_desc'] = 'Your myspace.com username.';
$txt['pfi_myspace_alt'] = 'Me on MySpace';
$txt['pfi_facebook_title'] = 'Facebook';
$txt['pfi_facebook_desc'] = 'Your facebook.com username.';
$txt['pfi_facebook_alt'] = ' Me on Facebook';
$txt['pfi_twitter_title'] = 'Twitter';
$txt['pfi_twitter_desc'] = 'Your twitter.com username.';
$txt['pfi_twitter_alt'] = 'Follow me on Twitter';
// <-- pfi
ดาวน์โหลด: images.rar
ขออภัย! ท่านไม่สามารถเข้าถึงข้อมูลส่วนนี้ได้ กรุณาอ่าน เงื่อนไขการใช้งาน DexMore.Comแตกไฟล์แล้วอัพโหลดไปไว้ที่
folder images -->> $themesdir
สร้างไฟล์: install.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/install.php -->> Enter เสร็จแล้วลบทิ้ง
<?php
// Twitter Profile Field
if (!defined('SMF'))
die('Hacking attempt...');
global $smcFunc;
db_extend('packages');
$smcFunc['db_add_column']("members",
array(
'name' => 'myspace', 'type' => 'varchar(50)', 'null' => false,
),
array(),
'do_nothing',
''
);
$smcFunc['db_add_column']("members",
array(
'name' => 'facebook', 'type' => 'varchar(50)', 'null' => false,
),
array(),
'do_nothing',
''
);
$smcFunc['db_add_column']("members",
array(
'name' => 'twitter', 'type' => 'varchar(50)', 'null' => false,
),
array(),
'do_nothing',
''
);
?>
ลิงค์หัวข้อ:
http://dexmore.com/topic/2268