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

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Moderator tag กล่องความเห็นผู้ดูแล  (อ่าน 709 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general เมื่อ: 18 มิถุนายน 2553, 15:01:10
  • ชื่อ: Moderator and Administrator Comment Tags
  • ผู้เขียน: Ha²
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: BBC
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 12 มีนาคม 2553
  • ต้นฉบับ: Moderator and Administrator Comment Tags

รายละเอียด
      เป็น BBC ที่ช่วยอำนวยความสะดวกแก่ผู้ดูแลในการแสดงความเห็นในกระทู้ต่างๆ โดยการแก้ไขและเพิ่มแท็กลงไป ซึ่งผู้บริหารฟอรั่มสามารถกำหนดกลุ่มของสมาชิกได้ว่าอนุญาตให้กลุ่มใหนใช้แท็กใหนได้

ตัวอย่าง




สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/Subs.php

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function get_mod_comment($content, $admin = "mod", $legend = null, $smileys, $cache_id) {
global $txt, $settings;
$content = parse_bbc($content, $smileys, $cache_id);
if($legend === null) {
$str = 'tag_comment_' . $admin;
$legend = $txt[$str];
}

return '<fieldset class="' . $admin . '_comment"><legend><img src="' . $settings['images_url'] . '/' . $admin . '_tag.gif"> ' . $legend . ' </legend>' . $content . '</fieldset>';
}

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
array(
'tag' => 'mod',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "mod", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'mod',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "mod", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
array(
'tag' => 'gmod',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "gmod", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'gmod',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "gmod", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
array(
'tag' => 'admin',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "admin", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'admin',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "admin", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),

file $sourcedir/Subs-Post.php

ค้นหา -->>
โค๊ด: [Select]
// Let's look at the time tags...

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// if users aren't moderators or admins, strip the [mod] and [admin]!
if (!$previewing && strpos($parts[$i], '[mod') !== false)
{
if (allowedTo('allow_mod_tag'))
$parts[$i] = preg_replace('~\[mod(.+?)\[/mod\]~ise', '\'[mod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/mod]\'', $parts[$i]);
else
$parts[$i] = preg_replace('~\[[/]?mod(=[^\]]*)?\]~i', '', $parts[$i]);
}

if (!$previewing && strpos($parts[$i], '[gmod') !== false)
{
if (allowedTo('allow_gmod_tag'))
$parts[$i] = preg_replace('~\[gmod(.+?)\[/gmod\]~ise', '\'[gmod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/gmod]\'', $parts[$i]);
else
$parts[$i] = preg_replace('~\[[/]?gmod(=[^\]]*)?\]~i', '', $parts[$i]);
}

if (!$previewing && strpos($parts[$i], '[admin') !== false)
{
if (allowedTo('allow_admin_tag'))
$parts[$i] = preg_replace('~\[admin(.+?)\[/admin\]~ise', '\'[admin\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/admin]\'', $parts[$i]);
else
$parts[$i] = preg_replace('~\[[/]?admin(=[^\]]*)?\]~i', '', $parts[$i]);
}

file $sourcedir/ManagePermissions.php

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

แก้เป็น -->>
โค๊ด: [Select]
[ ),
'modtag_g' => array(
'allow_gmod_tag' => false,
'allow_admin_tag' => false,
)
),
'board' => array(

ค้นหา -->>
โค๊ด: [Select]
'post_attachment' => false,
)

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

file $themedir/Post.template.php

ค้นหา -->>
โค๊ด: [Select]
$found_button = false;

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Add the moderator/admin comment buttons
$modtag = allowedTo('allow_mod_tag');
$gmodtag = allowedTo('allow_gmod_tag');
$admintag = allowedTo('allow_admin_tag');
if($modtag || $gmodtag || $admintag) {
$last = count($context['bbc_tags']) - 1;
$context['bbc_tags'][$last][] = array();
if($modtag)
$context['bbc_tags'][$last]['mod'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
if($gmodtag)
$context['bbc_tags'][$last]['gmod'] = array('code' => 'gmod', 'before' => '[gmod]', 'after' => '[/gmod]', 'description' => $txt['tag_comment_gmod']);
if($admintag)
$context['bbc_tags'][$last]['admin'] = array('code' => 'admin', 'before' => '[admin]', 'after' => '[/admin]', 'description' => $txt['tag_comment_admin']);
}

file $languagedir/Modifications.thai-utf8.php

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

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

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file mod.gif -->> $imagesdir/bbc
file admin.gif -->> $imagesdir/bbc
file gmod.gif -->> $imagesdir/bbc
file mod_tag.gif -->> $imagesdir
file admin_tag.gif -->> $imagesdir
file gmod_tag.gif -->> $imagesdir

การตั้งค่า: ผู้ดูแล -->> แก้ไขการอนุญาต -->> [กลุ่มสมาชิก] ขั้นสูง




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


!Personal

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

แก้ไขไฟล์:

file $sourcedir/Subs.php

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
function get_mod_comment($content, $admin = "mod", $legend = null, $smileys, $cache_id) {
global $txt, $settings;
$content = parse_bbc($content, $smileys, $cache_id);
if($legend === null) {
$str = 'tag_comment_' . $admin;
$legend = $txt[$str];
}

return '<fieldset class="' . $admin . '_comment"><legend><img src="' . $settings['images_url'] . '/' . $admin . '_tag.gif"> ' . $legend . ' </legend>' . $content . '</fieldset>';
}

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
array(
'tag' => 'mod',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "mod", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'mod',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "mod", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
array(
'tag' => 'gmod',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "gmod", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'gmod',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "gmod", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
array(
'tag' => 'admin',
'type' => 'unparsed_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data = get_mod_comment($data, "admin", null, ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),
array(
'tag' => 'admin',
'type' => 'unparsed_equals_content',
'content' => '$1',
'block_level' => true,
'validate' => create_function('&$tag, &$data, $disabled', '$data[0] = get_mod_comment($data[0], "admin", $data[1], ' . ($smileys ? 'true' : 'false') . ', \'' . $cache_id . '\');'),
),

file $sourcedir/Subs-Editor.php

ค้นหา -->>
โค๊ด: [Select]
// Show the toggle?

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
[ // Add the moderator/admin comment buttons
$modtag = allowedTo('allow_mod_tag');
$gmodtag = allowedTo('allow_gmod_tag');
$admintag = allowedTo('allow_admin_tag');
if($modtag || $gmodtag || $admintag) {
$last = count($context['bbc_tags']) - 1;
$context['bbc_tags'][$last][] = array();
if($modtag)
$context['bbc_tags'][$last]['mod'] = array('code' => 'mod', 'before' => '[mod]', 'after' => '[/mod]', 'description' => $txt['tag_comment_mod']);
if($gmodtag)
$context['bbc_tags'][$last]['gmod'] = array('code' => 'gmod', 'before' => '[gmod]', 'after' => '[/gmod]', 'description' => $txt['tag_comment_gmod']);
if($admintag)
$context['bbc_tags'][$last]['admin'] = array('code' => 'admin', 'before' => '[admin]', 'after' => '[/admin]', 'description' => $txt['tag_comment_admin']);
}

file $sourcedir/Subs-Post.php

ค้นหา -->>
โค๊ด: [Select]
// Let's look at the time tags...

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// if users aren't moderators or admins, strip the [mod] and [admin]!
if (!$previewing && strpos($parts[$i], '[mod') !== false)
{
if (allowedTo('allow_mod_tag'))
$parts[$i] = preg_replace('~\[mod(.+?)\[/mod\]~ise', '\'[mod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/mod]\'', $parts[$i]);
else
$parts[$i] = preg_replace('~\[[/]?mod(=[^\]]*)?\]~i', '', $parts[$i]);
}

if (!$previewing && strpos($parts[$i], '[gmod') !== false)
{
if (allowedTo('allow_gmod_tag'))
$parts[$i] = preg_replace('~\[gmod(.+?)\[/gmod\]~ise', '\'[gmod\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/gmod]\'', $parts[$i]);
else
$parts[$i] = preg_replace('~\[[/]?gmod(=[^\]]*)?\]~i', '', $parts[$i]);
}

if (!$previewing && strpos($parts[$i], '[admin') !== false)
{
if (allowedTo('allow_admin_tag'))
$parts[$i] = preg_replace('~\[admin(.+?)\[/admin\]~ise', '\'[admin\' . strtr(un_htmlspecialchars(\'$1\'), array("\n" => \'&#13;\', \'  \' => \' &#32;\')) . \'[/admin]\'', $parts[$i]);
else
$parts[$i] = preg_replace('~\[[/]?admin(=[^\]]*)?\]~i', '', $parts[$i]);
}

file $sourcedir/ManagePermissions.php

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

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'allow_gmod_tag' => array(false, 'modtag_g', 'modtag_g'),
'allow_admin_tag' => array(false, 'modtag_g', 'modtag_g'),

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

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

file $languagedir/Modifications.thai-utf8.php

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

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

แตกไฟล์แล้วอัพโหลดไปไว้ที่
file mod.gif -->> $imagesdir/bbc
file admin.gif -->> $imagesdir/bbc
file gmod.gif -->> $imagesdir/bbc
file mod_tag.gif -->> $imagesdir
file admin_tag.gif -->> $imagesdir
file gmod_tag.gif -->> $imagesdir

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



Bhutan   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 27 เมษายน 2554, 21:42:19
mod_tag โหลดไม่ได้ครับ เหมือนลิงค์เสีย

รออัพโหลดใหม่นะครับ  Smiley

ลิงค์หัวข้อ: http://dexmore.com/topic/2014
Windows XP    Firefox 3.6.16   see ip บันทึกการเข้า
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 27 เมษายน 2554, 21:56:11
อย่าเอาไฟล์ภาษามาอ้างถึงโชว์นะครับ เพราะมันเห็นได้เฉพาะสมาชิกพิเศษเท่านั้น

ลิงค์ดาวโหลดแก้ให้แล้วครับ

ส่วนเรื่องภาษาต่างดาวต้อง Encoding ไฟล์ภาษาเป็น UTF8

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



Bhutan   ชาย ออฟไลน์ เว็บไซต์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 27 เมษายน 2554, 22:15:06
เรื่อง code จะระวังไว้ครับ

ส่วนเรื่องภาษาแก้ไขได้เรียบร้อยแล้วครับ ขอบคุณมากครับ



ลิงค์หัวข้อ: http://dexmore.com/topic/2014
Windows XP    Firefox 3.6.16   see ip บันทึกการเข้า
ส่งหัวข้อนี้พิมพ์ หน้า: 1 
กระโดดไป:  

Creative Commons License

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

WordPress Google เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 17 พฤษภาคม 2555, 01:52:32

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