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

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Maximum Images Per Post จำกัดจำนวนรูปต่อกระทู้  (อ่าน 729 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Maximum Images Per Post
  • ผู้เขียน: Die Brett Die
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Posting
  • รองรับ: SMF 1.1.xx
  • ปรับปรุงล่าสุด: 17 กรกฏาคม 2551
  • ต้นฉบับ: Maximum Images Per Pos

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

ตัวอย่าง


แก้ไขไฟล์:

file $sourcedir/Post.php

ค้นหา -->>
โค๊ด: [Select]
// Let's see if there's still some content left without the tags.
if ($func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')
$post_errors[] = 'no_message';

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if($modSettings['max_images_per_post'] != '-1')
if(preg_match_all('/\[img\]/i', $_POST['message'], $matches) > $modSettings['max_images_per_post'])
fatal_lang_error('too_many_images', false);

ค้นหา -->>
โค๊ด: [Select]
elseif (!empty($modSettings['max_messageLength']) && $func['strlen']($_POST['message']) > $modSettings['max_messageLength'])
{
$post_errors[] = 'long_message';
unset($_POST['message']);
}
else
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if($modSettings['max_images_per_post'] != '-1' && preg_match_all('/\[img\]/i', $_POST['message'], $matches) > $modSettings['max_images_per_post'])
{
$post_errors[] = 'too_many_images';
unset($_POST['message']);
}

ค้นหา -->>
โค๊ด: [Select]
elseif (!empty($modSettings['max_messageLength']) && $func['strlen']($_POST['message']) > $modSettings['max_messageLength'])
$post_errors[] = 'long_message';
else
{

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if($modSettings['max_images_per_post'] != '-1' && preg_match_all('/\[img\]/i', $_POST['message'], $matches) > $modSettings['max_images_per_post']) {
$post_errors[] = 'too_many_images';
}

ค้นหา -->>
โค๊ด: [Select]
'error_in_body' => in_array('no_message', $post_errors) || in_array('long_message', $post_errors),

แก้เป็น -->>
โค๊ด: [Select]
'error_in_body' => in_array('no_message', $post_errors) || in_array('long_message', $post_errors) || in_array('too_many_images', $post_errors),

file $sourcedir/ManagePosts.php

ค้นหา -->>
โค๊ด: [Select]
'edit_disable_time' => empty($_POST['edit_disable_time']) ? '0' : (int) $_POST['edit_disable_time'],

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'max_images_per_post' => empty($_POST['maxImages']) ? '-1' : (int) $_POST['maxImages'],

file $themedir/Admin.template.php

ค้นหา -->>
โค๊ด: [Select]
<td valign="top">
<input type="text" name="edit_disable_time" id="edit_disable_time_input" value="', empty($modSettings['edit_disable_time']) ? '0' : $modSettings['edit_disable_time'], '" size="5" /> ', $txt['manageposts_minutes'], '
</td>
</tr>

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
<tr class="windowbg2">
<td colspan="2"><hr /></td>
</tr><tr class="windowbg2">
<th width="50%" align="right">
<label for="maxImages_input">', $txt['max_images'], '</label> <span style="font-weight: normal;">(<a href="', $scripturl, '?action=helpadmin;help=max_images_help" onclick="return reqWin(this.href);">?</a>)</span>:
<div class="smalltext" style="font-weight: normal;">', $txt['max_images_note'], '</div>
</th>
<td valign="top">
<input type="text" name="maxImages" id="maxImages_input" value="', empty($modSettings['max_images_per_post']) ? '0' : $modSettings['max_images_per_post'], '" size="5" />
</td>
</tr>

file $themedir/languages/Admin.thai-utf8.php

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

file $themedir/languages/Help.thai-utf8.php

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

file $themedir/languages/Post.thai-utf8.php

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

file $themedir/languages/Errors.thai-utf8.php

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

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

db_query
("INSERT INTO {$db_prefix}settings (variable, value) VALUES ('max_images_per_post', '-1')"__FILE____LINE__);

?>

การตั้งค่า: ผู้ดูแล -->> กระทู้และหัวข้อ


ลิงค์หัวข้อ: http://dexmore.com/topic/2847
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:53:26

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