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

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Crowns ติดดาว[สัญลักษณ์]หน้าชื่อกลุ่มสมาชิก  (อ่าน 3916 ครั้ง)
0 สมาชิก และ 2 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Crowns
  • ผู้เขียน: Bulakbol
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: New Feature
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 28 มิถุนายน 2552
  • ต้นฉบับ: Crowns

รายละเอียด
  • เพิ่มสัญลักษณ์หน้าชื่อสมาชิก
  • สัญลักษณ์ที่แตกต่างกันแต่ละกลุ่มขึ้นอยู่กับกาัรกำหนด
  • สามารถใช้รูปที่เลือกเองโดยอัพโหลดไปไว้ที่โฟลเดอร์ images
  • กำหนดให้แสดงในที่ต่างๆ ได้เช่น หน้าหลัก, หน้าหัวข้อกระทู้, หน้าอ่านกระทู้, ใครบ้างที่ออนไลน์ฯ

ตัวอย่าง


แก้ไขไฟล์:

file $sourcedir/ManageMembergroups.php

ค้นหา -->>
โค๊ด: [Select]
SELECT ID_GROUP, groupName, minPosts, onlineColor, stars

แก้เป็น -->>
SELECT ID_GROUP, groupName, minPosts, onlineColor, stars, crown

ค้นหา -->>
โค๊ด: [Select]
'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],

แก้เป็น -->>
โค๊ด: [Select]
'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
'crown' => empty($row['crown']) ? '' : '<span style="padding-right: 2px;"><img src="' . $settings['images_url'] . '/' . $row['crown'] . '" alt="" /></span>',

ค้นหา -->>
โค๊ด: [Select]
// !!! Don't set onlineColor for the Moderators group?

แก้เป็น -->>
โค๊ด: [Select]
$_POST['crown'] = isset($_POST['crown']) ? $_POST['crown'] : '';

// !!! Don't set onlineColor for the Moderators group?

ค้นหา -->>
โค๊ด: [Select]
maxMessages = $_POST[max_messages], minPosts = $_POST[min_posts], stars = '$_POST[stars]'

แก้เป็น -->>
โค๊ด: [Select]
maxMessages = $_POST[max_messages], minPosts = $_POST[min_posts], stars = '$_POST[stars]', crown = '$_POST[crown]'

ค้นหา -->>
โค๊ด: [Select]
SELECT groupName, minPosts, onlineColor, maxMessages, stars

แก้เป็น -->>
โค๊ด: [Select]
SELECT groupName, minPosts, onlineColor, maxMessages, stars, crown

ค้นหา -->>
โค๊ด: [Select]
'color' => $row['onlineColor'],

แก้เป็น -->>
โค๊ด: [Select]
'color' => $row['onlineColor'],
'crown' => $row['crown'],

file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
$context['sub_template'] = 'show_settings';

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'karma' => 'ModifyKarmaSettings',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'crown' => 'ModifyCrownSettings',

ค้นหา -->>
โค๊ด: [Select]
'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
'is_last' => true,
),

แก้เป็น -->>
โค๊ด: [Select]
'href' => $scripturl . '?action=featuresettings;sa=karma;sesc=' . $context['session_id'],
'is_last' => false,
),
'crown' => array(
'title' => $txt['crown'],
'href' => $scripturl . '?action=featuresettings;sa=crown;sesc=' . $context['session_id'],
'is_last' => true,
),

ค้นหา -->>
โค๊ด: [Select]
require_once($sourcedir . '/ManageServer.php');

$subActions = array(
'basic' => 'ModifyBasicSettings',
'layout' => 'ModifyLayoutSettings',
'karma' => 'ModifyKarmaSettings',

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'crown' => 'ModifyCrownSettings',

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function ModifyCrownSettings()
{
global $txt, $scripturl, $context, $settings, $sc, $modSettings;

$config_vars = array(
array('check', 'hide_index_page'),
array('check', 'topic_started_by'),
array('check', 'topic_last_post'),
array('check', 'hide_msg_display'),
array('check', 'hide_profile'),
array('check', 'hide_personal_msgs'),
array('check', 'show_memberlist'),
array('check', 'hide_who_is_online'),
array('check', 'hide_board_index'),
'',
array('check', 'avatar_in_whos_online'),
'',
);

// Saving?
if (isset($_GET['save']))
{
checkSession();

saveDBSettings($config_vars);
writeLog();

redirectexit('action=featuresettings;sa=crown');
}

$context['post_url'] = $scripturl . '?action=featuresettings2;save;sa=crown';
$context['settings_title'] = '<span style="color: gray; font-weight: normal; font-size: 7pt; float: right;">Crown version 1.0 by Bulakbol</span>' . $txt['crown'];

prepareDBSettingContext($config_vars);
}

file $sourcedir/Load.php

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

แก้เป็น -->>
โค๊ด: [Select]
'permissions' => array(),
'group_id' => empty($user_settings['ID_GROUP']) ? (!empty($user_settings['ID_POST_GROUP']) ? $user_settings['ID_POST_GROUP'] : '') : $user_settings['ID_GROUP'],

ค้นหา -->>
โค๊ด: [Select]
'group_color' => $profile['member_group_color'],

แก้เป็น -->>
โค๊ด: [Select]
'group_color' => $profile['member_group_color'],
'group_item' => !empty($profile['ID_GROUP']) ? get_group_color($profile['ID_GROUP']) : (!empty($profile['ID_POST_GROUP']) ? get_group_color($profile['ID_POST_GROUP']) : ''),

ค้นหา -->>
โค๊ด: [Select]
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),
);

แก้เป็น -->>
โค๊ด: [Select]
'local_time' => timeformat(time() + ($profile['timeOffset'] - $user_info['time_offset']) * 3600, false),
);
// Board moderator?
if (strtolower($memberContext[$user]['group']) == 'moderator')
$memberContext[$user]['group_item'] = get_group_color(3);

ค้นหา -->>
โค๊ด: [Select]
'email' => &$user_info['email'

แก้เป็น -->>
โค๊ด: [Select]
'email' => &$user_info['email'],
'group_item' => !$user_info['is_guest'] ? get_group_color($user_info['group_id']) : '',

file $sourcedir/Subs.php

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Get group color and crown.
function get_group_color($group_id)
{
global $db_prefix, $settings;

if ($group_id == 0)
return;

$group_item = array(
'color' => array(),
'crown' => array()
);
$request = db_query("
SELECT onlineColor, crown
FROM {$db_prefix}membergroups
WHERE ID_GROUP = $group_id
LIMIT 1", __FILE__, __LINE__);

while ($row = mysql_fetch_assoc($request))
{
$group_item['color'] = empty($row['onlineColor']) ? '' : $row['onlineColor'];
$group_item['crown'] = empty($row['crown']) ? '' : '<span style="padding-right: 2px;"><img src="' . $settings['images_url'] . '/' . $row['crown'] . '" alt="" /></span>';
}
mysql_free_result($request);

return $group_item;
}

file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
t.ID_FIRST_MSG, mf.posterTime AS firstPosterTime,

แก้เป็น -->>
โค๊ด: [Select]
t.ID_FIRST_MSG, mf.posterTime AS firstPosterTime, memf.ID_GROUP AS first_id_group,
memf.ID_POST_GROUP AS first_id_post_group, meml.ID_GROUP AS last_id_group, meml.ID_POST_GROUP AS last_id_post_group,

ค้นหา -->>
โค๊ด: [Select]
'id' => $row['firstID_MEMBER'],

แก้เป็น -->>
โค๊ด: [Select]
'id' => $row['firstID_MEMBER'],
'group_item' => get_group_color(!empty($row['first_id_group']) ? $row['first_id_group'] : $row['first_id_post_group']),

ค้นหา -->>
โค๊ด: [Select]
'id' => $row['lastID_MEMBER'],

แก้เป็น -->>
โค๊ด: [Select]
'id' => $row['lastID_MEMBER'],
'group_item' => get_group_color(!empty($row['last_id_group']) ? $row['last_id_group'] : $row['last_id_post_group']),

file $sourcedir/BoardIndex.php

ค้นหา -->>
โค๊ด: [Select]
$context['users_online'][$row['logTime'] . $row['memberName']] = array(

แก้เป็น -->>
โค๊ด: [Select]
// add crown if there is one
if (empty($modSettings['hide_board_index']) && $row['ID_GROUP'] > 0)
{
$group_item = get_group_color($row['ID_GROUP']);
$link = $group_item['crown'] . $link;
}

$context['users_online'][$row['logTime'] . $row['memberName']] = array(

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 20 มิถุนายน 2553, 00:38:59
file $themedir/ManageMembergroups.template.php

ค้นหา -->>
โค๊ด: [Select]
<tr class="titlebg"><td colspan="4" style="padding: 4px;">', $txt['membergroups_regular'], '</td></tr>
<tr class="catbg3">

แก้เป็น -->>
โค๊ด: [Select]
<tr class="titlebg"><td colspan="5" style="padding: 4px;">', $txt['membergroups_regular'], '</td></tr>
<tr class="catbg3">
<td width="4%">', $txt['crown'], '</td>

ค้นหา -->>
โค๊ด: [Select]
<td class="windowbg2">', empty($group['color']) ? ( $group['can_search'] ? $group['link'] : $group['name'] ) : '<span style="color: ' . $group['color'] . '">' . ( $group['can_search'] ? $group['link'] : $group['name']) . '</span>', $group['id'] == 1 ? ' (<a href="' . $scripturl . '?action=helpadmin;help=membergroup_administrator" onclick="return reqWin(this.href);">?</a>)' : ($group['id'] == 3 ? ' (<a href="' . $scripturl . '?action=helpadmin;help=membergroup_moderator" onclick="return reqWin(this.href);">?</a>)' : ''), '</td>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
<td class="windowbg" align="center">', $group['crown'], '</td>

ค้นหา -->>
โค๊ด: [Select]
<td colspan="4" align="right" style="padding-top: 1ex; padding-bottom: 2ex;">

แก้เป็น -->>
โค๊ด: [Select]
<td colspan="5" align="right" style="padding-top: 1ex; padding-bottom: 2ex;">

ค้นหา -->>
โค๊ด: [Select]
<tr class="titlebg"><td colspan="5" style="padding: 4px;">', $txt['membergroups_post'], '</td></tr>
<tr class="catbg3">

แก้เป็น -->>
โค๊ด: [Select]
<tr class="titlebg"><td colspan="6" style="padding: 4px;">', $txt['membergroups_post'], '</td></tr>
<tr class="catbg3">
<td width="4%">', $txt['crown'], '</td>

ค้นหา -->>
โค๊ด: [Select]
<td class="windowbg2">', empty($group['color']) ? ($group['can_search'] ? $group['link'] : $group['name']) : '<span style="color: ' . $group['color'] . '">' . ($group['can_search'] ? $group['link'] : $group['name']) . '</span>', '</td>

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
<td class="windowbg" align="center">', $group['crown'], '</td>

ค้นหา -->>
โค๊ด: [Select]
<td colspan="5" align="right" style="padding-top: 1ex; padding-bottom: 2ex;">
<input type="submit" value="', $txt['membergroups_add_group'], '" style="margin: 4px;" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="postgroup" value="1" />
</form>

แก้เป็น -->>
โค๊ด: [Select]
<td colspan="6" align="right" style="padding-top: 1ex; padding-bottom: 2ex;">
<input type="submit" value="', $txt['membergroups_add_group'], '" style="margin: 4px;" />
</td>
</tr>
</table>
<input type="hidden" name="sc" value="' . $context['session_id'] . '" />
<input type="hidden" name="postgroup" value="1" />
</form>

ค้นหา -->>
โค๊ด: [Select]
<tr class="windowbg2">
<th align="right" style="padding-top: 1em;">
<label for="max_messages_input">', $txt['membergroups_max_messages'], ':</label>

แก้เป็น -->>
โค๊ด: [Select]
<tr class="windowbg2">
<th align="right" style="padding-top: 1em;">
<label for="crown_input">', $txt['crown_image_filename'], ':</label>
</th>
<td>
', $txt['membergroups_images_url'], '
<input type="text" name="crown" value="', $context['group']['crown'], '" />
<img src="', $settings['images_url'], '/', $context['group']['crown'] == '' ? 'blank.gif' : $context['group']['crown'], '" alt="*" />
</td>
</tr>
<tr class="windowbg2">
<th align="right" style="padding-top: 1em;">
<label for="max_messages_input">', $txt['membergroups_max_messages'], ':</label>

file $themedir/index.template.php

ค้นหา -->>
โค๊ด: [Select]
<span style="font-size: 130%;"> ', $txt['hello_member_ndt'], ' <b>', $context['user']['name'] , '</b></span>

แก้เป็น -->>
โค๊ด: [Select]
<span style="font-size: 130%;">', !empty($context['user']['group_item']['crown']) && empty($modSettings['hide_index_page']) ?  $context['user']['group_item']['crown'] : $txt['hello_member_ndt']. ' ', '<b', !empty($context['user']['group_item']['color']) && empty($modSettings['hide_index_page']) ?
(' style="color: '. $context['user']['group_item']['color']. ';">') : '> ', $context['user']['name'] , '</b></span>

file $themedir/MessageIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
<td class="windowbg2" valign="middle" width="14%">

แก้เป็น -->>
โค๊ด: [Select]
<td class="windowbg2" valign="middle" width="14%"><span style="float: left;">', !empty($topic['first_post']['member']['group_item']['crown']) && !empty($modSettings['topic_started_by']) ? $topic['first_post']['member']['group_item']['crown'] : '', '</span>

ค้นหา -->>
โค๊ด: [Select]
', $txt[525], ' ', $topic['last_post']['member']['link'], '

แก้เป็น -->>
โค๊ด: [Select]
', $txt[525], ' ', !empty($topic['last_post']['member']['group_item']['crown']) && !empty($modSettings['topic_last_post']) ? $topic['last_post']['member']['group_item']['crown'] : '', $topic['last_post']['member']['link'], '

file $themedir/Display.template.php

ค้นหา -->>
โค๊ด: [Select]
<b>', $message['member']['link'], '</b>

แก้เป็น -->>
โค๊ด: [Select]
<b>', (!empty($message['member']['group_item']['crown']) && empty($modSettings['hide_msg_display']) ? $message['member']['group_item']['crown'] : ''), $message['member']['link'], '</b>

file $themedir/Profile.template.php

ค้นหา -->>
โค๊ด: [Select]
<td><b>', $txt[68], ': </b></td>
<td>',

แก้เป็น -->>
โค๊ด: [Select]
<td><b>', $txt[68], ': </b></td>
<td>', (!empty($context['member']['group_item']['crown']) && empty($modSettings['hide_profile']) ? $context['member']['group_item']['crown'] : ''),

file $themedir/PersonalMessage.template.php

ค้นหา -->>
โค๊ด: [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>',

แก้เป็น -->>
โค๊ด: [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
', (!empty($message['member']['group_item']['crown']) && empty($modSettings['hide_personal_msgs']) ? $message['member']['group_item']['crown'] : ''), '<b>',

file $themedir/Memberlist.template.php

ค้นหา -->>
โค๊ด: [Select]
function template_main()
{
global $context, $settings, $options,

แก้เป็น -->>
โค๊ด: [Select]
function template_main()
{
global $context, $settings, $options, $modSettings,

ค้นหา -->>
โค๊ด: [Select]
<td class="windowbg" align="left">', $member['link'], '</td>

แก้เป็น -->>
โค๊ด: [Select]
<td class="windowbg" align="left">', (!empty($member['group_item']['crown']) && !empty($modSettings['show_memberlist']) ? $member['group_item']['crown'] : ''), $member['link'], '</td>

file $themedir/Who.template.php

ค้นหา -->>
โค๊ด: [Select]
global $context, $settings,

แก้เป็น -->>
โค๊ด: [Select]
global $context, $settings, $modSettings,

ค้นหา -->>
โค๊ด: [Select]
echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>

แก้เป็น -->>
โค๊ด: [Select]
if (!empty($member['avatar']['href']) && empty($modSettings['avatar_in_whos_online']))
echo '<img src="', $member['avatar']['href'], '" width="30" alt="" />';
elseif (empty($modSettings['avatar_in_whos_online']))
echo '<img src="', $settings['images_url'], '/shadow.gif" width="30" alt="" />';

echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>

ค้นหา -->>
โค๊ด: [Select]
' . $member['name'] . '</a>', '</span>';

แก้เป็น -->>
โค๊ด: [Select]
' . (!empty($member['group_item']['crown']) && empty($modSettings['hide_who_is_online']) ? $member['group_item']['crown'] : '') . $member['name'] . '</a>', '</span>';

file $languagedir/Modifications.thai-utf8.php

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

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

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file starblue.gif -->> $imagesdir
file stargreen.gif -->> $imagesdir
file stargray.gif -->> $imagesdir
file starpink.gif -->> $imagesdir
file starpurple.gif -->> $imagesdir
file starred.gif -->> $imagesdir
file starteal.gif -->> $imagesdir
file shadow.gif -->> $imagesdir

สร้างไฟล์: installdb1.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/installdb1.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php

if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
elseif (!
defined('SMF'))
die('<b>Error:</b> Cannot update database.');

global 
$db_prefix;

$request db_query("
SHOW COLUMNS FROM {$db_prefix}membergroups
LIKE 'crown'"
__FILE____LINE__);

$no_upgrade mysql_num_rows($request) > 0;
mysql_free_result($request);

if (!
$no_upgrade
db_query("
ALTER TABLE {$db_prefix}membergroups
ADD COLUMN crown tinytext NOT NULL
"
__FILE__,__LINE__);

if(
SMF == 'SSI')
echo 'Done!';

?>

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


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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 20 มิถุนายน 2553, 15:08:40
สำหรับ SMF 2.0.xx

แก้ไขไฟล์:

file $sourcedir/ManageMembergroups.php

ค้นหา -->>
โค๊ด: [Select]
'params' => array(
'regular',
),
),
'columns' => array(

แก้เป็น -->>
โค๊ด: [Select]
'params' => array(
'regular',
),
),
'columns' => array(
'crown' => array(
'header' => array(
'value' => $txt['crown'],
),
'data' => array(
'function' => create_function('$rowData', '
global $settings;

$crown = $rowData[\'crown\'];

if (empty($crown))
return \'\';
else
{
$crown_image = sprintf(\'<img src="%1$s/%2$s" alt="*" border="0" />\', $settings[\'images_url\'], $crown);
return $crown_image;
}
'),
'class' => 'windowbg',
'style' => 'text-align: center; width: 5%;',
),
),

ค้นหา -->>
โค๊ด: [Select]
'params' => array(
'post_count',
),
),
'columns' => array(

แก้เป็น -->>
โค๊ด: [Select]
'params' => array(
'post_count',
),
),
'columns' => array(
'crown' => array(
'header' => array(
'value' => $txt['crown'],
),
'data' => array(
'function' => create_function('$rowData', '
global $settings;

$crown = $rowData[\'crown\'];

if (empty($crown))
return \'\';
else
{
$crown_image = sprintf(\'<img src="%1$s/%2$s" alt="*" border="0" />\', $settings[\'images_url\'], $crown);
return $crown_image;
}
'),
'class' => 'windowbg',
'style' => 'text-align: center; width: 4%;',
),
),

ค้นหา -->>
โค๊ด: [Select]
'stars' => 'string', 'online_color' => 'string', 'group_type' => 'int',

แก้เป็น -->>
โค๊ด: [Select]
'stars' => 'string', 'online_color' => 'string', 'group_type' => 'int', 'crown' => 'string',

ค้นหา -->>
โค๊ด: [Select]
'1#star.gif', '', $_POST['group_type'],

แก้เป็น -->>
โค๊ด: [Select]
'1#star.gif', '', $_POST['group_type'], '',

ค้นหา -->>
โค๊ด: [Select]
stars = {string:stars}
WHERE id_group = {int:current_group}',

แก้เป็น -->>
โค๊ด: [Select]
stars = {string:stars},
crown = {string:crown}
WHERE id_group = {int:current_group}',

ค้นหา -->>
โค๊ด: [Select]
'stars' => $group_info['stars'],

แก้เป็น -->>
โค๊ด: [Select]
'stars' => $group_info['stars'],
'crown' => $group_info['crown'],

ค้นหา -->>
โค๊ด: [Select]
// Set variables to their proper value.

แก้เป็น -->>
โค๊ด: [Select]
// Set variables to their proper value.
$_POST['crown'] = isset($_POST['crown']) ? $_POST['crown'] : '';

ค้นหา -->>
โค๊ด: [Select]
SET group_name = {string:group_name}, online_color = {string:online_color},

แก้เป็น -->>
โค๊ด: [Select]
SET group_name = {string:group_name}, online_color = {string:online_color}, crown = {string:crown},

ค้นหา -->>
โค๊ด: [Select]
'stars' => $_POST['stars'],

แก้เป็น -->>
โค๊ด: [Select]
'stars' => $_POST['stars'],
'crown' => $_POST['crown'],

ค้นหา -->>
โค๊ด: [Select]
SELECT group_name, description, min_posts, online_color, max_messages, stars, group_type, hidden, id_parent

แก้เป็น -->>
โค๊ด: [Select]
group_name, description, min_posts, online_color, max_messages, stars, group_type, hidden, id_parent, crown

ค้นหา -->>
โค๊ด: [Select]
'star_image' => isset($row['stars'][1]) ? $row['stars'][1] : '',

แก้เป็น -->>
โค๊ด: [Select]
'star_image' => isset($row['stars'][1]) ? $row['stars'][1] : '',
'crown_image' => isset($row['crown']) ? $row['crown'] : '',

file $sourcedir/Subs-Membergroups.php

ค้นหา -->>
โค๊ด: [Select]
SELECT id_group, group_name, min_posts, online_color, stars, 0 AS num_members

แก้เป็น -->>
โค๊ด: [Select]
SELECT id_group, group_name, min_posts, online_color, stars, 0 AS num_members, crown

ค้นหา -->>
โค๊ด: [Select]
'num_members' => $row['num_members'],

แก้เป็น -->>
โค๊ด: [Select]
'num_members' => $row['num_members'],
'crown' => $row['crown'],

file $sourcedir/Admin.php

ค้นหา -->>
โค๊ด: [Select]
// Note the comma!! The setting with automatically appear with the first mod to be added.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'crowns' => array($txt['crown']),

file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Mod authors, once again, if you have a whole section to add do it AFTER this line, and keep a comma at the end.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'crowns' => 'ModifyCrownSettings',

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function ModifyCrownSettings($return_config = false)
{
global $txt, $scripturl, $context, $settings, $sc, $modSettings;

$config_vars = array(
array('check', 'hide_index_page', 'postinput' => $txt['including']),
array('check', 'topic_started_by', 'postinput' => $txt['off_by_default']),
array('check', 'topic_last_post', 'postinput' => $txt['off_by_default']),
array('check', 'hide_msg_display', 'postinput' => $txt['on_by_default']),
array('check', 'hide_profile', 'postinput' => $txt['on_by_default']),
array('check', 'hide_personal_msgs', 'postinput' => $txt['on_by_default']),
array('check', 'show_memberlist', 'postinput' => $txt['off_by_default']),
array('check', 'hide_who_is_online', 'postinput' => $txt['on_by_default']),
array('check', 'hide_board_index', 'postinput' => $txt['on_by_default']),
'',
array('check', 'avatar_in_whos_online', 'postinput' => $txt['on_by_default']),
'',
);

if ($return_config)
return $config_vars;

// Saving?
if (isset($_GET['save']))
{
checkSession();

saveDBSettings($config_vars);
writeLog();

redirectexit('action=admin;area=modsettings;sa=crowns');
}

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=crowns';
$context['settings_title'] = '<span style="color: gray; font-weight: normal; font-size: 7pt; float: right;">Crown version 1.0 by Bulakbol</span>' . $txt['crown'];

prepareDBSettingContext($config_vars);
}

file $sourcedir/Load.php

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

แก้เป็น -->>
โค๊ด: [Select]
'permissions' => array(),
'group_id' => empty($user_settings['id_group']) ? (!empty($user_settings['id_post_group']) ? $user_settings['id_post_group'] : '') : $user_settings['id_group'],

ค้นหา -->>
โค๊ด: [Select]
'group_color' => $profile['member_group_color'],

แก้เป็น -->>
โค๊ด: [Select]
'group_color' => $profile['member_group_color'],
'group_item' => !empty($profile['id_group']) ? get_group_color($profile['id_group']) : (!empty($profile['id_post_group']) ? get_group_color($profile['id_post_group']) : ''),

ค้นหา -->
โค๊ด: [Select]
'local_time' => timeformat(time() + ($profile['time_offset'] - $user_info['time_offset']) * 3600, false),
);

แก้เป็น -->>
โค๊ด: [Select]
'local_time' => timeformat(time() + ($profile['time_offset'] - $user_info['time_offset']) * 3600, false),
);
// Board moderator?
if (strtolower($memberContext[$user]['group']) == 'moderator')
$memberContext[$user]['group_item'] = get_group_color(3);

ค้นหา -->>
โค๊ด: [Select]
'ignoreusers' => $user_info['ignoreusers'],

แก้เป็น -->>
โค๊ด: [Select]
'ignoreusers' => $user_info['ignoreusers'],
'group_item' => !$user_info['is_guest'] ? get_group_color($user_info['group_id']) : '',

file $sourcedir/Subs.php

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Get group color and crown.
function get_group_color($group_id)
{
global $smcFunc, $settings;

if ($group_id == 0)
return;

$group_item = array(
'color' => array(),
'crown' => array()
);
$request = $smcFunc['db_query']('', '
SELECT online_color, crown
FROM {db_prefix}membergroups
WHERE id_group = {int:group_id}
LIMIT 1',
array(
'group_id' => $group_id
)
);
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$group_item['color'] = empty($row['online_color']) ? '' : $row['online_color'];
$group_item['crown'] = empty($row['crown']) ? '' : '<span style="padding-right: 2px;"><img src="' . $settings['images_url'] . '/' . $row['crown'] . '" alt="" /></span>';
}
$smcFunc['db_free_result']($request);

return $group_item;
}

file $sourcedir/MessageIndex.php

ค้นหา -->>
โค๊ด: [Select]
mf.poster_name AS first_member_name, mf.id_member AS first_id_member,

แก้เป็น -->>
โค๊ด: [Select]
mf.poster_name AS first_member_name, mf.id_member AS first_id_member, memf.id_group AS first_id_group,
memf.id_post_group AS first_id_post_group, meml.id_group AS last_id_group, meml.id_post_group AS last_id_post_group,

ค้นหา -->>
โค๊ด: [Select]
'id' => $row['first_id_member'],

แก้เป็น -->>
โค๊ด: [Select]
'id' => $row['first_id_member'],
'group_item' => get_group_color(!empty($row['first_id_group']) ? $row['first_id_group'] : $row['first_id_post_group']),

ค้นหา -->>
โค๊ด: [Select]
'id' => $row['last_id_member'],

แก้เป็น -->>
โค๊ด: [Select]
'id' => $row['last_id_member'],
'group_item' => get_group_color(!empty($row['last_id_group']) ? $row['last_id_group'] : $row['last_id_post_group']),

file $sourcedir/Subs-MembersOnline.php

ค้นหา -->>
โค๊ด: [Select]
// Buddies get counted and highlighted.

แก้เป็น -->>
โค๊ด: [Select]
if (empty($modSettings['hide_board_index']) && $row['id_group'] > 0)
{
$group_item = get_group_color($row['id_group']);
$link = $group_item['crown'] . $link;
}

// Buddies get counted and highlighted.

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 20 มิถุนายน 2553, 15:31:47
file $themedir/ManageMembergroups.template.php

ค้นหา -->>
โค๊ด: [Select]
<tr class="windowbg2">
<th align="left" style="padding-top: 1em;">
<label for="max_messages_input">', $txt['membergroups_max_messages'], ':</label>

แก้เป็น -->>
โค๊ด: [Select]
<tr class="windowbg2">
<th align="left">
<label for="crown_image_input">', $txt['crown_image_filename'], ':</label>
</th>
<td>
', $txt['membergroups_images_url'], '
<input type="text" name="crown" value="', $context['group']['crown_image'], '" />
<img src="', $settings['images_url'], '/', $context['group']['crown_image'] == '' ? 'blank.gif' : $context['group']['crown_image'], '" alt="*" />
</td>
</tr>
<tr class="windowbg2">
<th align="left" style="padding-top: 1em;">
<label for="max_messages_input">', $txt['membergroups_max_messages'], ':</label>

file $themedir/index.template.php

ค้นหา -->>
โค๊ด: [Select]
<li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em></li>';

แก้เป็น -->>
โค๊ด: [Select]
<li id="name">', !empty($context['user']['group_item']['crown']) && empty($modSettings['hide_index_page']) ? $context['user']['group_item']['crown'] : $txt['hello_member_ndt']. ' ', '<em', !empty($context['user']['group_item']['color']) && empty($modSettings['hide_index_page']) ?
(' style="color: '. $context['user']['group_item']['color']. ';">') : '>', $context['user']['name'] , '</em></li>';

file $themedir/MessageIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
<td class="windowbg2 starter">

แก้เป็น -->>
โค๊ด: [Select]
<td class="windowbg2 starter"><span style="float: left;">', !empty($topic['first_post']['member']['group_item']['crown']) && !empty($modSettings['topic_started_by']) ? $topic['first_post']['member']['group_item']['crown'] : '', '</span>

ค้นหา -->>
โค๊ด: [Select]
', $txt['by'], ' ', $topic['last_post']['member']['link'], '

แก้เป็น -->>
โค๊ด: [Select]
', $txt['by'], ' ', !empty($topic['last_post']['member']['group_item']['crown']) && !empty($modSettings['topic_last_post']) ? $topic['last_post']['member']['group_item']['crown'] : '', $topic['last_post']['member']['link'], '

file $themedir/Display.template.php

ค้นหา -->>
โค๊ด: [Select]
<h4>', $message['member']['link'], '</h4>

แก้เป็น -->>
โค๊ด: [Select]
<h4>', (!empty($message['member']['group_item']['crown']) && empty($modSettings['hide_msg_display']) ? $message['member']['group_item']['crown'] : ''), $message['member']['link'], '</h4>

file $themedir/Profile.template.php

ค้นหา -->>
โค๊ด: [Select]
<span class="topslice"><span></span></span>
<div class="content">
<h4>',

แก้เป็น -->>
โค๊ด: [Select]
<span class="topslice"><span></span></span>
<div class="content">
<h4>', (!empty($context['member']['group_item']['crown']) && empty($modSettings['hide_profile']) ? $context['member']['group_item']['crown'] : ''),

file $themedir/PersonalMessage.template.php

ค้นหา -->>
โค๊ด: [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
<b>',

แก้เป็น -->>
โค๊ด: [Select]
<td valign="top" width="16%" rowspan="2" style="overflow: hidden;">
', (!empty($message['member']['group_item']['crown']) && empty($modSettings['hide_personal_msgs']) ? $message['member']['group_item']['crown'] : ''), '<b>',

file $themedir/Memberlist.template.php

ค้นหา -->>
โค๊ด: [Select]
function template_main()
{
global $context, $settings, $options,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$modSettings,

ค้นหา -->>
โค๊ด: [Select]
<td class="windowbg" align="left">', $member['link'], '</td>

แก้เป็น -->>
โค๊ด: [Select]
<td class="windowbg" align="left">', (!empty($member['group_item']['crown']) && !empty($modSettings['show_memberlist']) ? $member['group_item']['crown'] : ''), $member['link'], '</td>

file $themedir/Who.template.php

ค้นหา -->>
โค๊ด: [Select]
global $context, $settings,

แก้เป็น -->>
โค๊ด: [Select]
global $context, $settings, $modSettings,

ค้นหา -->>
โค๊ด: [Select]
echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>

แก้เป็น -->>
โค๊ด: [Select]
if (!empty($member['avatar']['href']) && empty($modSettings['avatar_in_whos_online']))
echo '<img src="', $member['avatar']['href'], '" width="30" alt="" />';
elseif (empty($modSettings['avatar_in_whos_online']))
echo '<img src="', $settings['images_url'], '/shadow.gif" width="30" alt="" />';

echo '
<span', $member['is_hidden'] ? ' style="font-style: italic;"' : '', '>

ค้นหา -->>
โค๊ด: [Select]
' . $member['name'] . '</a>', '</span>';

แก้เป็น -->>
โค๊ด: [Select]
' . (!empty($member['group_item']['crown']) && empty($modSettings['hide_who_is_online']) ? $member['group_item']['crown'] : '') . $member['name'] . '</a>', '</span>';

file $languagedir/Modifications.thai-utf8.php

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

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

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file starblue.gif -->> $imagesdir
file stargreen.gif -->> $imagesdir
file stargray.gif -->> $imagesdir
file starpink.gif -->> $imagesdir
file starpurple.gif -->> $imagesdir
file starred.gif -->> $imagesdir
file starteal.gif -->> $imagesdir
file shadow.gif -->> $imagesdir

สร้างไฟล์: installdb2.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/installdb2.php -->> Enter เสร็จแล้วลบทิ้ง
โค๊ด: [Select]
<?php

if (file_exists(dirname(__FILE__) . '/SSI.php') && !defined('SMF'))
require_once(dirname(__FILE__) . '/SSI.php');
elseif (!
defined('SMF'))
die('<b>Error:</b> Cannot update database.');

global 
$smcFunc;

if(!
array_key_exists('db_add_column'$smcFunc))
db_extend('packages');

$columns $smcFunc['db_list_columns']('membergroups');

if(!
in_array('crown'$columns))
$smcFunc['db_add_column']('membergroups'
array(
'name' => 'crown'
'type' => 'tinytext',
'null' => false,
)
);

if(
SMF == 'SSI')
echo 'Done!';

?>

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



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 17 กรกฎาคม 2553, 23:06:10
มรัน installdb1.php แล้วขึ้น Unknown column 'crown' in 'field list'

ช่วยด้วยครับ
ผม ว่าผมทำตามทุกอย่างแล้ว

ลิงค์หัวข้อ: http://dexmore.com/topic/2031
Windows XP    Firefox 3.6.6   see ip บันทึกการเข้า
ดูรายการสิ่งของน้องหมี..เอาไว้กอดนอนแทนกิ๊ก  
โฮสต์ดีๆ บริการด้วยใจ
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 5 เมื่อ: 18 กรกฎาคม 2553, 00:08:13
เพิ่ม field ในตาราง membergroups
ชื่อ crown  ชนิด tinytext  ค่าปริยาย NOT NULL

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



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 6 เมื่อ: 18 กรกฎาคม 2553, 01:41:42
ทำได้แล้วครับ งมอยู่ตั้งนานครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/2031
Windows XP    Firefox 3.6.6   see ip บันทึกการเข้า
ดูรายการสิ่งของน้องหมี..เอาไว้กอดนอนแทนกิ๊ก  
โฮสต์ดีๆ บริการด้วยใจ
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 7 เมื่อ: 8 เมษายน 2554, 23:53:44
เพิ่ม field ในตาราง membergroups
ชื่อ crown  ชนิด tinytext  ค่าปริยาย NOT NULL

ทำยังไงครับ ผมทำไม่เป็น

ลิงค์หัวข้อ: http://dexmore.com/topic/2031
Windows XP    Chrome 10.0.648.204   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 8 เมื่อ: 8 เมษายน 2554, 23:56:44
-->> การแทรก เพิ่มตาราง และฟิลด์ใน phpMyadmin ของ mod SMF

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



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 9 เมื่อ: 9 เมษายน 2554, 00:11:31
ไม่มีให้เลือกค่าปรียาย NOT NULL ครับ

ลิงค์หัวข้อ: http://dexmore.com/topic/2031
Windows XP    Chrome 10.0.648.204   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 10 เมื่อ: 28 สิงหาคม 2554, 14:48:40
ทำไมเพิ่มฟิวด์แล้ว มันยังไม่หายเลยครับ งง #.#

Unknown column 'crown' in 'field list'

ลิงค์หัวข้อ: http://dexmore.com/topic/2031
Windows XP    Chrome 13.0.782.215   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

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

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

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