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

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: RestrictQuote ให้ใช้อ้างถึงโดยกำหนดจำนวนกระทู้  (อ่าน 632 ครั้ง)
0 สมาชิก และ 2 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: RestrictQuote
  • ผู้เขียน: 4kstore
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Posting
  • รองรับ: SMF 1.1.xx, 2.0.xx
  • ปรับปรุงล่าสุด: 25 กรกฏาคม 2553
  • ต้นฉบับ: RestrictQuote

รายละเอียด
      อนุญาตให้สมาชิกใช้การอ้างถึงโดยการกำหนดจำนวนกระทู้ หากสมาชิกมีจำนวนกระทู้ไม่ถึงที่กำหนดก็ไม่สามารถมองเห็นปุ่มอ้างถึงได้

ตัวอย่าง
---

สำหรับ SMF 1.1.xx

แก้ไขไฟล์:

file $sourcedir/ModSettings.php

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

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
//RestrictQuote
array('int', 'restrict_quote_posts'),

file $sourcedir/Post.php

ค้นหา -->>
โค๊ด: [Select]
if (!empty($topic) && !empty($_REQUEST['quote']))
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (!empty($modSettings['restrict_quote_posts']) && $user_info['posts'] < $modSettings['restrict_quote_posts'])
         fatal_lang_error('restrict_quote_error');

file $themedir/Display.template.php

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

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

ค้นหา -->>
โค๊ด: [Select]
if ($context['can_reply'] && !empty($options['display_quick_reply']))

แก้เป็น -->>
โค๊ด: [Select]
isset($modSettings['restrict_quote_posts']) && !empty($modSettings['restrict_quote_posts']) && $context['can_reply'] && !empty($options['display_quick_reply']) && ($user_info['posts'] >= $modSettings['restrict_quote_posts']))

ค้นหา -->>
โค๊ด: [Select]
elseif ($context['can_reply'])

แก้เป็น -->>
โค๊ด: [Select]
elseif (isset($modSettings['restrict_quote_posts']) && !empty($modSettings['restrict_quote_posts']) && $context['can_reply'] && ($user_info['posts'] >= $modSettings['restrict_quote_posts']))

file $themedir/Post.template.php

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

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

ค้นหา -->>
โค๊ด: [Select]
// If the user is replying to a topic show the previous posts.
if (isset($context['previous_posts']) && count($context['previous_posts']) > 0)

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (!empty($modSettings['restrict_quote_posts']) && $user_info['posts'] >= $modSettings['restrict_quote_posts'])

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
//RestrictQuote
$txt['restrict_quote_posts']='อนุญาตให้ใช้การอ้างถึงหากมีกระทู้มากกว่า x กระทู้:';

file $languagedir/Errors.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
//RestrictQuote
$txt['restrict_quote_error'] = 'คุณไม่ได้รับอนุญาตให้ใช้การอ้างถึง';

การตั้งค่า: ผู้ดูแล -->> ส่วนปรับแต่งค่าการใช้งาน -->> อนุญาตให้ใช้การอ้างถึงหากมีกระทู้มากกว่า x กระทู้:

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


!Personal

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

แก้ไขไฟล์:

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]
//RestrictQuote
array('int', 'restrict_quote_posts'),

file $sourcedir/Post.php

ค้นหา -->>
โค๊ด: [Select]
if (!empty($topic) && !empty($_REQUEST['quote']))
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (!empty($modSettings['restrict_quote_posts']) && $user_info['posts'] < $modSettings['restrict_quote_posts'])
         fatal_lang_error('restrict_quote_error');

file $themedir/Display.template.php

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

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

ค้นหา -->>
โค๊ด: [Select]
if ($context['can_reply'] && !empty($options['display_quick_reply']))

แก้เป็น -->>
โค๊ด: [Select]
if (isset($modSettings['restrict_quote_posts']) && !empty($modSettings['restrict_quote_posts']) && $context['can_reply'] && !empty($options['display_quick_reply']) && ($user_info['posts'] >= $modSettings['restrict_quote_posts']))

ค้นหา -->>
โค๊ด: [Select]
elseif ($context['can_reply'])

แก้เป็น -->>
โค๊ด: [Select]
elseif (isset($modSettings['restrict_quote_posts']) && !empty($modSettings['restrict_quote_posts']) && $context['can_reply'] && ($user_info['posts'] >= $modSettings['restrict_quote_posts']))

file $themedir/Post.template.php

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

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

ค้นหา -->>
โค๊ด: [Select]
// If the user is replying to a topic show the previous posts.
if (isset($context['previous_posts']) && count($context['previous_posts']) > 0)

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (!empty($modSettings['restrict_quote_posts']) && $user_info['posts'] >= $modSettings['restrict_quote_posts'])

file $languagedir/Modifications.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
//RestrictQuote
$txt['restrict_quote_posts']='อนุญาตให้ใช้การอ้างถึงหากมีกระทู้มากกว่า x กระทู้:';

file $languagedir/Errors.thai-utf8.php

เพิ่ม -->>
โค๊ด: [Select]
//RestrictQuote
$txt['restrict_quote_error'] = 'คุณไม่ได้รับอนุญาตให้ใช้การอ้างถึง';

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



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 6 สิงหาคม 2553, 18:23:34

ขอบคุณมากครับ เป้นประโยชน์มากเลย  Afro

สำหรับ SMF 1.1.xx


สอบถามนิดนึ่งครับ ว่า file $themedir/Display.template.php และ file $themedir/Post.template.php

ตรง

โค๊ด: [Select]
global $context,

ถ้าเกิดว่ามีหลายตัว เลือกตัวไหนครับ

ขอบคุณครับ





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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 3 เมื่อ: 6 สิงหาคม 2553, 18:29:55
ดูว่ามันเพิ่มโค้ดส่วนอื่นใน function ใหน ก็เพิ่มใน function นั้น

ลิงค์หัวข้อ: http://dexmore.com/topic/2704
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 เข้าเยี่ยมชมหน้านี้ล่าสุดเมื่อ : 17 พฤษภาคม 2555, 10:51:51

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