ติดต่อลงโฆษณา [email protected]

โพลล์

พอทำได้ไหมครับ

ได้ๆ เจ๋งๆ
2 (40%)
งง อะ อะไรเหรอ
3 (60%)

จำนวนผู้โหวตทั้งหมด: 5

ผู้เขียน หัวข้อ: mod ป้องกันการปั๊มกระทู้ครับ พวกพิมสั้นๆ dd ff ggrr ss โดนแน่  (อ่าน 6749 ครั้ง)

0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้

ออฟไลน์ sketball

  • New Member
  • *
  • กระทู้: 6
    • ดูรายละเอียด
<id>aitsukai:minwords</id>
<version>1.0.0</version>

<edit file>
$themedir/languages/Errors.english.php
</edit file>

<search for>
$txt['error_long_message'] = 'The message exceeds the maximum allowed length (' . $modSettings['max_messageLength'] . ' characters).';
</search for>

<add after>
$txt['error_minWordLen'] = 'The message does not meet the minimum word requirements (' . $modSettings['minWordLen'] . ' words).';
$txt['error_minChar'] = 'The message does not meet the minimum character requirements (' . $modSettings['minChar'] . ' characters).';
</add after>

<edit file>
$sourcedir/Post.php
</edit file>

<search for>
   // Check the subject and message.
</search for>

<add after>
if (!empty($modSettings['minWordLen']) && ((int)$modSettings['minWordLen'] != 0))
{
    $Temp = trim(preg_replace('~[^a-z0-9 ]~si', '', $_POST['message']));
    $Temp = preg_replace('~(( )+)~si', ' ', $Temp);
    $WordArr = explode(' ', $Temp);
    if (count($WordArr) < (int)$modSettings['minWordLen'])
    $post_errors[] = 'minWordLen';
}

if (!empty($modSettings['minChar']) && ((int)$modSettings['minChar'] != 0))
{
    if (strlen($_POST['message']) < (int)$modSettings['minChar'])
      $post_errors[] = 'minChar';
}
</add after>

<edit file>
$sourcedir/ManagePosts.php
</edit file>

<search for>
      // Update the actual settings.
      updateSettings(array(
</search for>

<add after>
         'minWordLen' => empty($_POST['minWordLen']) ? '0' : (int) $_POST['minWordLen'],
         'minChar' => empty($_POST['minChar']) ? '0' : (int) $_POST['minChar'],
</add after>

<edit file>
$themedir/languages/Admin.english.php
</edit file>

<search for>
$txt['caching_settings'] = 'Caching';
</search for>

<add after>
$txt['minWordLen'] = 'Minimum words per post';
$txt['minWordLen_zero'] = '0 for no minimum.';
$txt['minWordLen_words'] = 'words';
$txt['minChar'] = 'Minimum characters per post';
$txt['minChar_zero'] = '0 for no minimum.';
$txt['minChar_chars'] = 'characters';
</add after>

<edit file>
$themedir/Admin.template.php
</edit file>

<search for>
            <td valign="top">
               <input type="text" name="max_messageLength" id="max_messageLength_input" value="', empty($modSettings['max_messageLength']) ? '0' : $modSettings['max_messageLength'], '" size="5" /> ', $txt['manageposts_characters'], '
            </td>
         </tr>
</search for>

<add after>
         <tr class="windowbg2">
            <th width="50%" align="right">
               <label for="minWordLen_input">', $txt['minWordLen'], ':
               <div class="smalltext" style="font-weight: normal;">', $txt['minWordLen_zero'], '</div>
            </th>
            <td valign="top">
               <input type="text" name="minWordLen" id="minWordLen_input" value="', empty($modSettings['minWordLen']) ? '5' : $modSettings['minWordLen'], '" size="5" /> ', $txt['minWordLen_words'], '
            </td>
         </tr>
         <tr class="windowbg2">
            <th width="50%" align="right">
               <label for="minChar_input">', $txt['minChar'], ':
               <div class="smalltext" style="font-weight: normal;">', $txt['minChar_zero'], '</div>
            </th>
            <td valign="top">
               <input type="text" name="minChar" id="minChar_input" value="', empty($modSettings['minChar']) ? '100' : $modSettings['minChar'], '" size="5" /> ', $txt['minChar_chars'], '
            </td>
         </tr>
</add after>

ออฟไลน์ blueranchu

  • New Member
  • *
  • กระทู้: 24
    • ดูรายละเอียด
ไม่เห็นใช้ได้เลยครับ
ผมโพสสั้นๆว่า d ยังโพสได้ปกติอ่ะครับ
มันกันไง

ออฟไลน์ An_ant

  • Jr. Member
  • **
  • กระทู้: 71
    • ดูรายละเอียด
ปัญหานี้ใน vB มันจะบังคับไว้เป็นพื้นฐานรู้สึกว่าจะไม่น้อยกว่า 10 ตัว...

ถ้าเกรงว่าจะเกิดปัญหาแบบนั้น  และเพื่อใครอยากลองเล่นดู

ออฟไลน์ blueranchu

  • New Member
  • *
  • กระทู้: 24
    • ดูรายละเอียด
ของผมมันเวป smf อ่ะดิ ย้ายดาต้าเบสไม่เป็น
เสียดายดาต้าเบสเดิม

ผมเซ็ตไอ้ minum word แล้วมันไม่เปลี่ยนด้วยอ่ะครับ

มีอะไรผิดพลาดไม่รู้
ผมตรวจสอบหลายทีก็ทำตามคำแนะนำเหมือนหมดแล้วอ่ะ
ผมทางลองทำในเครื่องผมเอง ไม่ได้ลองที่ โฮสจริง

ทดลองโดยใช้ smf rc2 บน iis ครับ
« แก้ไขครั้งสุดท้าย: 13/01/07, 16:14:17 โดย blueranchu »

ออฟไลน์ sketball

  • New Member
  • *
  • กระทู้: 6
    • ดูรายละเอียด
ผมใช้ที่เว็บ www.devil-bike.com ใช้ได้เลยครับ

ผมใช้วิธีดูบันทัดที่ค้นหา ปละใส่เข้าไปตามที่โค๊ดระบุ ยากและสับสนหน่อยครับ แต่ใช้ได้แน่นอน

ออฟไลน์ singh

  • Jr. Member
  • **
  • กระทู้: 64
    • ดูรายละเอียด
ไม่รู้จะ แต่คงไม่ทำง่ะ ตามลบเอาเอง