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

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Membergroup Color Legend แสดงสีชื่อกลุ่มสมาชิก  (อ่าน 1569 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 19 มิถุนายน 2553, 19:34:47
  • ชื่อ: Membergroup Color Legend II.2
  • ผู้เขียน: Bulakbol
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: New Feature
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 18 กุมภาพันธ์ 2552
  • ต้นฉบับ: Membergroup Color Legend II.2

รายละเอียด
      แสดงสีชื่อกลุ่มสมาชิกในศูนย์กลางข้อมูล

ตัวอย่าง


สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Stats, compression, cookies.... server type stuff.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// MCLegendII
array('text', 'arrange_mclegend'),
'',

file $sourcedir/BoardIndex.php

ค้นหา -->>
โค๊ด: [Select]
$context['page_title'] = $txt[18];

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (!empty($modSettings['arrange_mclegend']))
{
// group color legend
$context['mc_legend'] = array();
$result = db_query("
SELECT onlineColor, groupName, ID_GROUP
FROM {$db_prefix}membergroups
", __FILE__, __LINE__);
   while($row = mysql_fetch_assoc($result))
   {
if (allowedTo('moderate_forum'))
$link = '<a href="'. $scripturl . '?action=membergroups;sa=members;group='. $row['ID_GROUP']. '" style="color: '. $row['onlineColor']. ';">'. $row['groupName']. '</a>';  
else
$link = !empty($row['onlineColor']) ? '<span style="color: '. $row['onlineColor']. ';">'. $row['groupName']. '</span>' : $row['groupName'];
$context['mc_legend'][] = array (
'id' => $row['ID_GROUP'],
'link' => $link,
);
}
   mysql_free_result($result);
$context['mcl_group'] = explode(',', $modSettings['arrange_mclegend'], 30);
foreach($context['mcl_group'] AS $key => $dummy)
for ($i = 0; $i < count($context['mc_legend']); $i++)
if ($context['mc_legend'][$i]['id'] == $context['mcl_group'][$key])
  $context['membergroups'][] = $context['mc_legend'][$i]['link'];
}

file $themedir/BoardIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
<td rowspan="2" class="windowbg"

แก้เป็น -->>
โค๊ด: [Select]
<td rowspan="3" class="windowbg"

ค้นหา -->>
โค๊ด: [Select]
echo '
<br />
', $context['show_stats'] && !$settings['show_sp1_info'] ? '<a href="' . $scripturl . '?action=stats">' . $txt['smf223'] . '</a>' : '', '
</div>
</td>
</tr>

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
';
if (!empty($context['membergroups']))
echo '
<tr>
<td class="windowbg2" width="100%">
<span class="smalltext">[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']</span>
</td>
</tr>';

echo '

file $languagedir/ModSettings.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['arrange_mclegend'] = 'จัดเรียงลำดับความสำคัญของกลุ่มสมาชิก<br /><span class="smalltext">(คั่นแต่ละกลุ่มด้วยจุลภาค เช่น 1,2,8,7,6,5,4)</span>';

file $languagedir/Help.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$helptxt['arrange_mclegend'] = 'Arrange the display of your membergroups color legend. Enter the group id number and must be separated by comma. No comma after the last number. (i.e. 1,2,8,7,6,5,4)';

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

$request db_query("
SHOW COLUMNS FROM {$db_prefix}settings
LIKE 'arrange_mclegend'"
__FILE____LINE__);
$no_upgrade mysql_num_rows($request) > 0;
if (!
$no_upgradedb_query("
INSERT IGNORE {$db_prefix}settings
VALUES ('arrange_mclegend', '1,2,8,7,6,5,4')
"
__FILE__,__LINE__);
mysql_free_result($request);
}
?>

การตั้งค่า: ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> จัดเรียงลำดับความสำคัญของกลุ่มสมาชิก

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


!Personal

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

แก้ไขไฟล์:

file $sourcedir/ManageSettings.php

ค้นหา -->>
โค๊ด: [Select]
// Stats, compression, cookies.... server type stuff.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// MCLegendII
array('text', 'arrange_mclegend'),
'',

file $sourcedir/BoardIndex.php

ค้นหา -->>
โค๊ด: [Select]
$context['membergroups'] = cache_quick_get('membergroup_list', 'Subs-Membergroups.php', 'cache_getMembergroupList', array());

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
elseif (!empty($modSettings['arrange_mclegend']))
{
// group color legend
global $smcFunc, $scripturl;
$context['mc_legend'] = array();

$result = $smcFunc['db_query']('', '
SELECT online_color, group_name, id_group
FROM {db_prefix}membergroups',
array()
);
    while ($row = $smcFunc['db_fetch_assoc']($result))
    {
if (allowedTo('view_mlist'))
$link = '<a href="' . $scripturl . '?action=groups;sa=members;group=' . $row['id_group'] . '" ' . ($row['online_color'] ? 'style="color: ' . $row['online_color'] . '"' : '') . '>' . $row['group_name'] . '</a>';
else
$link = !empty($row['online_color']) ? '<span style="color: ' . $row['online_color'] . ';">'. $row['group_name'] . '</span>' : $row['group_name'];
$context['mc_legend'][] = array (
'id' => $row['id_group'],
'link' => $link,
);
}
    $smcFunc['db_free_result']($result);
$context['mcl_group'] = explode(',', $modSettings['arrange_mclegend'], 30);
foreach($context['mcl_group'] AS $key => $dummy)
for ($i = 0; $i < count($context['mc_legend']); $i++)
if ($context['mc_legend'][$i]['id'] == $context['mcl_group'][$key])
$context['membergroups'][] = $context['mc_legend'][$i]['link'];
}

file $themedir/BoardIndex.template.php

ค้นหา -->>
โค๊ด: [Select]
if (!empty($settings['show_group_key']) && !empty($context['membergroups']))
echo '
<br />[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']';

แก้เป็น -->>
โค๊ด: [Select]
if (!empty($context['membergroups']))
echo '<div style="padding-top: 2px; margin-top: 2px; border-top: 1px solid #c6c6c6;">
[' . implode(']&nbsp;&nbsp;[', $context['membergroups']) . ']', '</div>';

file $languagedir/Help.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$helptxt['arrange_mclegend'] = 'Arrange the display of your membergroups color legend. Enter the group id number and must be separated by comma. No comma after the last number. (i.e. 1,2,8,7,6,5,4).
To enable the display, disable the "Show group key on board index" from Admin -> Current Theme, under Theme Settings tab.';

file $languagedir/ManageSettings.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
$txt['arrange_mclegend'] = '<span style="color: blue;">จัดเรียงลำดับความสำคัญของกลุ่มสมาชิก</span><br /><span class="smalltext">(คั่นแต่ละกลุ่มด้วยจุลภาค เช่น 1,2,8,7,6,5,4)</span>';

สร้างไฟล์: mclegenddb2.php เพื่อสร้างฐานข้อมูล ไว้ใน $boarddir (ที่เดียวกับไฟล์ SSI.php) รัน http://www.your_url.xxx/$boarddir/mclegenddb2.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.');

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

$smcFunc['db_insert']('ignore''{db_prefix}settings',
array ('variable' => 'string''value' => 'string'),
array ('arrange_mclegend''1,2,8,7,6,5,4'),
array()
);

?>

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

icon message
general ความคิดเห็นที่ 2 เมื่อ: 5 กันยายน 2553, 23:43:19
อันนี้ผมลงใช้ได้แล้วครับ แต่ว่าชื่อสมาชิกมันขึ้นไม่ครบทุกลำดับน่ะครับ

ผมจะแก้ได้ไงครับ +




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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 6 กันยายน 2553, 00:05:32
ก็ใส่ id กลุ่มสมาชิกเข้าไปซิครับ..

กลุ่มใหนที่มันไม่ขึ้น ได้ใส่ id กลุ่มเข้าไปหรือยัง ค่าเดิมมันเป็น -->> 1,2,8,7,6,5,4

จะให้กลุ่มใหนแสดงก็ใส่เข้าไปโดยคั่นแต่ละกลุ่มด้วยจุลภาค

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

icon message
general ความคิดเห็นที่ 4 เมื่อ: 6 กันยายน 2553, 00:43:51
ก็ใส่ id กลุ่มสมาชิกเข้าไปซิครับ..

กลุ่มใหนที่มันไม่ขึ้น ได้ใส่ id กลุ่มเข้าไปหรือยัง ค่าเดิมมันเป็น -->> 1,2,8,7,6,5,4

จะให้กลุ่มใหนแสดงก็ใส่เข้าไปโดยคั่นแต่ละกลุ่มด้วยจุลภาค

แต่มันไม่เรียงให้ผมอยู่ดีน่ะครับ ผมลองสลับเลขดูแล้วครับ

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 5 เมื่อ: 6 กันยายน 2553, 02:23:15
ผมไม่เข้าใจปัญหาของคุณเลยครับ?

ตกลงมันไม่แสดงกลุ่ม หรือไม่จัดเรียงกันแน่ ถ้าแสดงกลุ่มแล้วแต่จัดเรียงไม่ตรงแสดงว่าอยู่ที่การจัดตำแหน่งของคุณเอง คุณต้องรู้ว่ากลุ่มใหน id เท่าไหร่ แล้วเอามาจัดเรียงตามลำดับที่ต้องการ

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

icon message
general ความคิดเห็นที่ 6 เมื่อ: 6 กันยายน 2553, 12:47:04
ผมไม่เข้าใจปัญหาของคุณเลยครับ?

ตกลงมันไม่แสดงกลุ่ม หรือไม่จัดเรียงกันแน่ ถ้าแสดงกลุ่มแล้วแต่จัดเรียงไม่ตรงแสดงว่าอยู่ที่การจัดตำแหน่งของคุณเอง คุณต้องรู้ว่ากลุ่มใหน id เท่าไหร่ แล้วเอามาจัดเรียงตามลำดับที่ต้องการ

มันขึ้นแล้วน่ะครับ กลุ่มไหนไอดีเท่ารัยผมก้อทราบ แต่ว่าผมลบเลขที่ผมจะไม่ให้มันขึ้นน่ะครับ สลับกันแล้ว มันก้อไม่สลับนะครับ

อย่างเช่น ผมใส่เลข 1,2,3,4,5

มันจะเป็น [A][C][D][E]

พอเปลี่ยนเป็นเลข 1,3,4,5,2

มันก้อยังเป็น [A][C][D][E] อยู่ดีน่ะครับ


ขอโทษที่อาจจะอธิบายไม่เข้าใจนะครับ ขอบคุณท่านมากที่กรุณาช่วย ขอบคุณครับ ^ ^ :

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 7 เมื่อ: 6 กันยายน 2553, 12:55:03
เข้าไปในบำรุงรักษา แล้วจัดการ

>> ค้นหาและแก้ไขข้อผิดพลาดทั้งหมด
>> นับจำนวนบอร์ดทั้งหมดและสถิติใหม่
>> ปรับปรุงตารางทั้งหมดเพื่อเพิ่มประสิทธิภาพ

ตามลำดับนะครับ

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

Creative Commons License

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

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 7 กุมภาพันธ์ 2555, 17:38:36

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