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

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

ส่งหัวข้อนี้พิมพ์ หน้า: 1 
icon message ผู้เขียน หัวข้อ: Hide Post : เลือกซ่อนข้อความในแบบต่างๆ  (อ่าน 1619 ครั้ง)
0 สมาชิก และ 1 ผู้เยี่ยมชม กำลังดูหัวข้อนี้
*
*


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
  • ชื่อ: Hide Post
  • ผู้เขียน: Leaf
  • นำเสนอโดย: DexMoreGroup
  • ประเภท: Permissions
  • รองรับ: SMF 1.1.xx
  • ปรับปรุงล่าสุด: 21 ตุลาคม 2551
  • ต้นฉบับ: Hide Post

รายละเอียด
      เราจะลองมา modified การซ่อนข้อความในลักษณะต่างๆกันครับ mod นี้จะอนุญาตให้ซ่อนข้อความ ซึ่งยูสเซอร์ที่จะอ่านได้ จะต้องมีเงื่อนไขตามนี้
  • Login: ต้องล็อกอินก่อนจึงจะเห็นข้อความที่ซ่อนไว้
  • Reply: ต้องตอบกระทู้ก่อนจึงจะเห็นข้อความที่ซ่อนไว้
  • Karma: ต้องมีจำนวนการ์ม่าเท่ากับที่กำหนดไว้ก่อนจึงจะเห็นข้อความที่ซ่อนไว้
  • Posts: ต้องมีจำวนกระทู้เท่ากับที่กำหนดไว้ก่อนจึงจะเห็นข้อความที่ซ่อนไว้
  • Moderator: ต้องมีสิทธิเป็น moderator หรือ global moderator หรือ administrator จึงจะเห็นข้อความที่ซ่อนไว้

แก้ไขไฟล์:

file $sourcesdir/Display.php
ค้นหา -->>
โค๊ด: [Select]
ID_MSG, icon, subject, posterTime, posterIP, ID_MEMBER, modifiedTime, modifiedName, body,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
hiddenOption, hiddenValue, ID_BOARD,

ค้นหา -->>
โค๊ด: [Select]
// Run BBC interpreter on the message.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Hide the post or Not? --- XD
$message['can_view_post'] = 1;
if (!empty($modSettings['allow_hiddenPost']) && $message['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
$message['ID_TOPIC'] = $topic;
$context['current_message'] = $message;
$message['body'] = getHiddenMessage();
$message['can_view_post'] = $context['can_view_post'];
}

ค้นหา -->>
โค๊ด: [Select]
'attachment' => loadAttachmentContext($message['ID_MSG']),

แก้เป็น -->>
โค๊ด: [Select]
'attachment' => empty($message['can_view_post']) ? array() : loadAttachmentContext($message['ID_MSG']),

ค้นหา -->>
โค๊ด: [Select]
'can_see_ip' => allowedTo('moderate_forum') || ($message['ID_MEMBER'] == $ID_MEMBER && !empty($ID_MEMBER)),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'can_view_post' => $message['can_view_post'],

ค้นหา -->>
โค๊ด: [Select]
hiddenOption, hiddenValue, ID_BOARD,

แก้เป็น -->>
โค๊ด: [Select]
hiddenOption, hiddenValue, hiddenInfo, ID_BOARD,

file $sourcesdir/Load.php

ค้นหา -->>
โค๊ด: [Select]
'total_time_logged_in' => empty($user_settings['totalTimeLoggedIn']) ? 0 : $user_settings['totalTimeLoggedIn'],

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'karma' => array(
'good' => isset($user_settings['karmaGood']) ? $user_settings['karmaGood'] : 0,
'bad' => isset($user_settings['karmaBad']) ? $user_settings['karmaBad'] : 0,
),

ค้นหา -->>
โค๊ด: [Select]
loadLanguage('Modifications', '', false);

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
loadLanguage('HidePost');

file $sourcesdir/ManagePermissions.php

ค้นหา -->>
โค๊ด: [Select]
$groupLevels['board']['restrict'] = array(

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'view_hidden_msg',
'view_hidden_post',
'hide_post_own',

ค้นหา -->>
โค๊ด: [Select]
$groupLevels['board']['standard'] = array_merge($groupLevels['board']['restrict'], array(

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'hide_post_any',

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'hide_post' => true,
'view_hidden_post' => false,
'view_hidden_msg' => false,

file $sourcesdir/ModSettings.php

ค้นหา -->>
โค๊ด: [Select]
'',
// Reporting of personal messages?
array('check', 'enableReportPM'),

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
'',
// Hide post or not? ;).
array('check', 'allow_hiddenPost'),
array('check', 'show_hiddenMessage'),
array('int', 'max_hiddenValue'),
array('text', 'show_hiddenColor'),

ค้นหา -->>
โค๊ด: [Select]
loadLanguage('Help');

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
loadLanguage('HidePost');

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

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

file $sourcesdir/Post.php

ค้นหา -->>
โค๊ด: [Select]
$context['can_lock'] = allowedTo('lock_any') || ($ID_MEMBER == $ID_MEMBER_POSTER && allowedTo('lock_own'));

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
$context['can_hide_post'] = (allowedTo('hide_post_any') ||  ($ID_MEMBER == $ID_MEMBER_POSTER && allowedTo('hide_post_own'))) && !empty($modSettings['allow_hiddenPost']);

ค้นหา -->>
โค๊ด: [Select]
// !!! These won't work if you're making an event.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['can_hide_post'] = allowedTo(array('hide_post_any', 'hide_post_own')) && !empty($modSettings['allow_hiddenPost']);

ค้นหา -->>
โค๊ด: [Select]
// !!! These won't work if you're posting an event!

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['max_hidden_value'] = sprintf($txt['hide_value'], $modSettings['max_hiddenValue']);

ค้นหา -->>
โค๊ด: [Select]
IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH,

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue,

ค้นหา -->>
โค๊ด: [Select]
// Check the boxes that should be checked.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['hidden_option'] = $row['hiddenOption'];
$context['hidden_value'] = $row['hiddenValue'];

ค้นหา -->>
โค๊ด: [Select]
$context['icon'] = 'xx';

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['hidden_option'] = 0;
$context['hidden_value'] = 0;

ค้นหา -->>
โค๊ด: [Select]
if (!empty($topic))
getTopic();

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Set hidden options for posts.
$context['hidden_options'] = array(
array('value' => 0, 'name' => $txt['hide_select']),
array('value' => 1, 'name' => $txt['hide_login']),
array('value' => 2, 'name' => $txt['hide_reply']),
array('value' => 3, 'name' => $txt['hide_karma']),
array('value' => 4, 'name' => $txt['hide_posts']),
);

$found = false;
for ($i = 0, $n = count($context['hidden_options']); $i < $n; $i++)
{
$context['hidden_options'][$i]['selected'] = $context['hidden_option'] == $context['hidden_options'][$i]['value'];
if ($context['icons'][$i]['selected'])
$found = true;
}

ค้นหา -->>
โค๊ด: [Select]
// If the number of replies has changed, if the setting is enabled, go back to Post() - which handles the error.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if (isset($_POST['hiddenOption']) && !((allowedTo('hide_post_any') || ($ID_MEMBER == $ID_MEMBER_POSTER && allowedTo('hide_post_own'))) && !empty($modSettings['allow_hiddenPost'])))
unset($_POST['hiddenOption']);

ค้นหา -->>
โค๊ด: [Select]
// Prevent double submission of this form.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Fix the hidden post option.
if (isset($_POST['hiddenOption']))
{
$_POST['hiddenOption'] = (int) $_POST['hiddenOption'];
$_POST['hiddenValue'] = (int) $_POST['hiddenValue'];
// Fix hidden option.
if ($_POST['hiddenOption'] < 0 || $_POST['hiddenOption'] > 4)
$_POST['hiddenOption'] = 0;
// Fix hidden value.
if ($_POST['hiddenValue'] > $modSettings['max_hiddenValue'])
$_POST['hiddenValue'] = $modSettings['max_hiddenValue'];
if ($_POST['hiddenValue'] < 0)
$_POST['hiddenValue'] = 0;
if ($_POST['hiddenOption'] < 3)
$_POST['hiddenValue'] = 0;
}
else {
$_POST['hiddenOption'] = 0;
$_POST['hiddenValue'] = 0;
}

ค้นหา -->>
โค๊ด: [Select]
'attachments' => empty($attachIDs) ? array() : $attachIDs,

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

ค้นหา -->>
โค๊ด: [Select]
SELECT IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body, m.smileysEnabled, m.ID_MSG

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
,m.hiddenOption, m.hiddenValue, m.ID_MEMBER, m.ID_BOARD

ค้นหา -->>
โค๊ด: [Select]
// ...and store.
$context['previous_posts'][] = array(

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'can_view_post' => $row['can_view_post'],

ค้นหา -->>
โค๊ด: [Select]
// Censor, BBC, ...

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Hide the post in preview or not? --- XD
$row['can_view_post'] = 1;
if (!empty($modSettings['allow_hiddenPost']) && $row['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
$row['ID_TOPIC'] = $topic;
$context['current_message'] = $row;
$row['body'] = getHiddenMessage();
$row['can_view_post'] = $context['can_view_post'];
}

ค้นหา -->>
โค๊ด: [Select]
// Check if it's locked.  It isn't locked if no topic is specified.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
$context['can_hide_post'] = 0;
$context['hidden_option'] = 0;
$context['hidden_value'] = 0;

ค้นหา -->>
โค๊ด: [Select]
list ($form_subject, $mname, $mdate, $form_message) = mysql_fetch_row($request);

แก้เป็น -->>
โค๊ด: [Select]
// Hide the post in quotes or not? --- XD
$row = mysql_fetch_assoc($request);
$form_subject = $row['subject'];
$mname = $row['posterName'];
$mdate = $row['posterTime'];
if (!empty($modSettings['allow_hiddenPost']) && $row['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
$context['current_message'] = $row;
$form_message = getHiddenMessage();
} else
$form_message = $row['body'];

ค้นหา -->>
โค๊ด: [Select]
SELECT m.subject, IFNULL(mem.realName, m.posterName) AS posterName, m.posterTime, m.body

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
,m.ID_BOARD, m.ID_TOPIC, m.ID_MEMBER, m.hiddenOption, m.hiddenValue, m.hiddenInfo

ค้นหา -->>
โค๊ด: [Select]
$context['can_hide_post'] = 0;
$context['hidden_option'] = 0;
$context['hidden_value'] = 0;

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['hidden_info'] = '';

ค้นหา -->>
โค๊ด: [Select]
$context['hidden_option'] = $row['hiddenOption'];
$context['hidden_value'] = $row['hiddenValue'];

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['hidden_info'] = $row['hiddenInfo'];

ค้นหา -->>
โค๊ด: [Select]
$context['hidden_option'] = 0;
$context['hidden_value'] = 0;

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$context['hidden_info'] = '';

ค้นหา -->>
โค๊ด: [Select]
// Set hidden options for posts.
$context['hidden_options'] = array(
array('value' => 0, 'name' => $txt['hide_select']),
array('value' => 1, 'name' => $txt['hide_login']),
array('value' => 2, 'name' => $txt['hide_reply']),
array('value' => 3, 'name' => $txt['hide_karma']),
array('value' => 4, 'name' => $txt['hide_posts']),
);

แก้เป็น -->>
โค๊ด: [Select]
// Set hidden options for posts.
$context['hidden_options'] = array(
array('value' => 0, 'name' => $txt['hide_select']),
array('value' => 1, 'name' => $txt['hide_login']),
array('value' => 2, 'name' => $txt['hide_reply']),
array('value' => 4, 'name' => $txt['hide_posts']),
);
if (!empty($modSettings['karmaMode']))
$context['hidden_options'][] = array('value' => 3, 'name' => $txt['hide_karma']);
if (allowedTo('moderate_board'))
$context['hidden_options'][] = array('value' => 5, 'name' => $txt['hide_moderator']);

ค้นหา -->>
โค๊ด: [Select]
// Fix the hidden post option.
if (isset($_POST['hiddenOption']))
{
$_POST['hiddenOption'] = (int) $_POST['hiddenOption'];
$_POST['hiddenValue'] = (int) $_POST['hiddenValue'];
// Fix hidden option.
if ($_POST['hiddenOption'] < 0 || $_POST['hiddenOption'] > 4)
$_POST['hiddenOption'] = 0;
// Fix hidden value.
if ($_POST['hiddenValue'] > $modSettings['max_hiddenValue'])
$_POST['hiddenValue'] = $modSettings['max_hiddenValue'];
if ($_POST['hiddenValue'] < 0)
$_POST['hiddenValue'] = 0;
if ($_POST['hiddenOption'] < 3)
$_POST['hiddenValue'] = 0;
}
else {
$_POST['hiddenOption'] = 0;
$_POST['hiddenValue'] = 0;
}

แก้เป็น -->>
โค๊ด: [Select]
// Fix the hidden post option.
if (isset($_POST['hiddenOption']))
{
$_POST['hiddenOption'] = (int) $_POST['hiddenOption'];
$_POST['hiddenValue'] = (int) $_POST['hiddenValue'];
// Fix hidden option.
if ($_POST['hiddenOption'] < 0 || $_POST['hiddenOption'] > 5)
$_POST['hiddenOption'] = 0;
// Fix hidden value.
if ($_POST['hiddenValue'] > $modSettings['max_hiddenValue'])
$_POST['hiddenValue'] = $modSettings['max_hiddenValue'];
if ($_POST['hiddenValue'] < 0)
$_POST['hiddenValue'] = 0;
if ($_POST['hiddenOption'] < 3 || $_POST['hiddenOption'] == 5)
$_POST['hiddenValue'] = 0;
if (empty($_POST['hiddenOption'])) $_POST['hiddenInfo'] = '';
if (!empty($modSettings['hidden_info_length']) && strlen($_POST['hiddenInfo']) > $modSettings['hidden_info_length'])
$_POST['hiddenInfo'] = substr($_POST['hiddenInfo'], 0, $modSettings['hidden_info_length']);
}
else {
$_POST['hiddenOption'] = 0;
$_POST['hiddenValue'] = 0;
$_POST['hiddenInfo'] = '';
}

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

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

ค้นหา -->>
โค๊ด: [Select]
,m.hiddenOption, m.hiddenValue, m.ID_MEMBER, m.ID_BOARD

แก้เป็น -->>
โค๊ด: [Select]
,m.hiddenOption, m.hiddenValue, m.hiddenInfo, m.ID_MEMBER, m.ID_BOARD

ค้นหา -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue,

แก้เป็น -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue, m.hiddenInfo,

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 1 เมื่อ: 30 มกราคม 2553, 18:40:13
file $sourcesdir/Printpage.php

ค้นหา -->>
โค๊ด: [Select]
SELECT subject, posterTime, body, IFNULL(mem.realName, posterName) AS posterName

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
,m.hiddenOption, m.hiddenValue, m.ID_BOARD, m.ID_MEMBER

ค้นหา -->>
โค๊ด: [Select]
// Censor the subject and message.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Hide the post or Not? For print results. --- XD
$row['can_view_post'] = 1;
if (!empty($modSettings['allow_hiddenPost']) && $row['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
$row['ID_TOPIC'] = $topic;
$context['current_message'] = $row;
$row['body'] = getHiddenMessage(1);
$row['can_view_post'] = $context['can_view_post'];
}

ค้นหา -->>
โค๊ด: [Select]
global $db_prefix, $topic, $txt, $scripturl, $context;

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
global $modSettings;

ค้นหา -->>
โค๊ด: [Select]
,m.hiddenOption, m.hiddenValue, m.ID_BOARD, m.ID_MEMBER

แก้เป็น -->>
โค๊ด: [Select]
,m.hiddenOption, m.hiddenValue, m.hiddenInfo, m.ID_BOARD, m.ID_MEMBER

file $sourcesdir/Profile.php

ค้นหา -->>
โค๊ด: [Select]
t.ID_MEMBER_STARTED, t.ID_FIRST_MSG, t.ID_LAST_MSG, m.body, m.smileysEnabled,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue, m.ID_MEMBER,

ค้นหา -->>
โค๊ด: [Select]
// Do the code.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Hide the post or Not? For user posts in profile. --- XD
$row['can_view_post'] = 1;
if (!empty($modSettings['allow_hiddenPost']) && $row['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
$context['current_message'] = $row;
$row['body'] = getHiddenMessage();
$row['can_view_post'] = $context['can_view_post'];
}

ค้นหา -->>
โค๊ด: [Select]
'delete_possible' => ($row['ID_FIRST_MSG'] != $row['ID_MSG'] || $row['ID_LAST_MSG'] == $row['ID_MSG']) && (empty($modSettings['edit_disable_time']) || $row['posterTime'] + $modSettings['edit_disable_time'] * 60 >= time()),

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'can_view_post' => $row['can_view_post'],

ค้นหา -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue, m.ID_MEMBER,

แก้เป็น -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue, m.hiddenInfo, m.ID_MEMBER,

ค้นหา -->>
โค๊ด: [Select]
b.name AS bname, c.name AS cname, t.numReplies, m.ID_MEMBER, m2.ID_MEMBER AS ID_FIRST_MEMBER,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue,

ค้นหา -->>
โค๊ด: [Select]
// Censor everything.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Hide the post or Not? For recent posts. --- XD
$row['can_view_post'] = 1;
if (!empty($modSettings['allow_hiddenPost']) && $row['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
// For recent posts!!!
$context['current_message'] = $row;
$row['body'] = getHiddenMessage();
$row['can_view_post'] = $context['can_view_post'];
}

ค้นหา -->>
โค๊ด: [Select]
// And build the array.
$context['posts'][$row['ID_MSG']] = array(

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'can_view_post' => $row['can_view_post'],

ค้นหา -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue,

แก้เป็น -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue, m.hiddenInfo,

file $sourcesdir/Security.php

ค้นหา -->>
โค๊ด: [Select]
global $user_info, $db_prefix, $modSettings;

// You're always allowed to do nothing. (unless you're a working man, MR. LAZY :P!)

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

// You're always allowed to do nothing. (unless you're a working man, MR. LAZY :P!)

file $sourcesdir/Subs-Post.php

ค้นหา -->>
โค๊ด: [Select]
// Change the post.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if (isset($msgOptions['hiddenOption']))
$messages_columns[] = "hiddenOption = '$msgOptions[hiddenOption]'";
if (isset($msgOptions['hiddenValue']))
$messages_columns[] = "hiddenValue = '$msgOptions[hiddenValue]'";

ค้นหา -->>
โค๊ด: [Select]
// Set optional parameters to the default value.

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$msgOptions['hiddenOption'] = empty($msgOptions['hiddenOption']) ? '-----' : $msgOptions['hiddenOption'];
$msgOptions['hiddenValue'] = empty($msgOptions['hiddenValue']) ? 0 : $msgOptions['hiddenValue'];

ค้นหา -->>
โค๊ด: [Select]
(ID_BOARD, ID_TOPIC, ID_MEMBER, subject, body, posterName, posterEmail, posterTime,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
hiddenOption, hiddenValue,

ค้นหา -->>
โค๊ด: [Select]
VALUES ($topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
'$msgOptions[hiddenOption]', '$msgOptions[hiddenValue]',

ค้นหา -->>
โค๊ด: [Select]
$msgOptions['hiddenOption'] = empty($msgOptions['hiddenOption']) ? '-----' : $msgOptions['hiddenOption'];
$msgOptions['hiddenValue'] = empty($msgOptions['hiddenValue']) ? 0 : $msgOptions['hiddenValue'];

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
$msgOptions['hiddenInfo'] = empty($msgOptions['hiddenInfo']) ? '' : $msgOptions['hiddenInfo'];

ค้นหา -->>
โค๊ด: [Select]
hiddenOption, hiddenValue,

แก้เป็น -->>
โค๊ด: [Select]
hiddenOption, hiddenValue, hiddenInfo,

ค้นหา -->>
โค๊ด: [Select]
'$msgOptions[hiddenOption]', '$msgOptions[hiddenValue]',

แก้เป็น -->>
โค๊ด: [Select]
'$msgOptions[hiddenOption]', '$msgOptions[hiddenValue]', '$msgOptions[hiddenInfo]',

ค้นหา -->>
โค๊ด: [Select]
if (isset($msgOptions['hiddenOption']))
$messages_columns[] = "hiddenOption = '$msgOptions[hiddenOption]'";
if (isset($msgOptions['hiddenValue']))
$messages_columns[] = "hiddenValue = '$msgOptions[hiddenValue]'";

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
if (isset($msgOptions['hiddenInfo']))
$messages_columns[] = "hiddenInfo = '$msgOptions[hiddenInfo]'";

file $themesdir/default/Display.template.php

ค้นหา -->>
โค๊ด: [Select]
// Can they reply? Have they turned on quick reply?

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if ($message['can_view_post']) {

ค้นหา -->>
โค๊ด: [Select]
// Show a checkbox for quick moderation?

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
}

file $themesdir/default/Post.template.php

ค้นหา -->>
โค๊ด: [Select]
<div id="postMoreOptions">

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
';

// Display the hidden post options - if they are available to the user!
if ($context['can_hide_post'])
{
echo '
', $txt['hide_this_post'], ': <select name="hiddenOption" id="hiddenOption">';

// Loop through each encrypt option allowed, adding it to the drop down list.
foreach ($context['hidden_options'] as $hidden_option)
echo '
<option value="', $hidden_option['value'], '"', $hidden_option['value'] == $context['hidden_option'] ? ' selected="selected"' : '', '>', $hidden_option['name'], '</option>';

echo '
</select>
', $context['max_hidden_value'], ' <input type="text" name="hiddenValue" value="', $context['hidden_value'], '" size="4" />';
}

echo '

ค้นหา -->>
โค๊ด: [Select]
foreach ($context['previous_posts'] as $post)

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
{

ค้นหา -->>
โค๊ด: [Select]
<div align="right" class="smalltext"><a href="#top" onclick="return insertQuoteFast(', $post['id'], ');">', $txt[260], '</a></div>
<div class="post">', $post['message'], '</div>
</td>
</tr>';

แก้เป็น -->>
โค๊ด: [Select]
';
if ($post['can_view_post'])
echo '
<div align="right" class="smalltext"><a href="#top" onclick="return insertQuoteFast(', $post['id'], ');">', $txt[260], '</a></div>';
echo '
<div class="post">', $post['message'], '</div>
</td>
</tr>';
}

file $themesdir/default/Profile.template.php

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

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
if ($post['can_reply'] && $post['can_view_post'])
echo '
<a href="', $scripturl, '?action=post;topic=', $post['topic'], '.', $post['start'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/reply_sm.gif" alt="' . $txt[146] . '" border="0" />' : $txt[146]), '</a>';
else

file $themesdir/default/Recent.template.php

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

แก้เป็น -->>
โค๊ด: [Select]
if ($post['can_reply'] && $post['can_view_post'])

file $sourcesdir/Search.php

ค้นหา -->>
โค๊ด: [Select]
m.icon, m.posterIP, m.body, m.smileysEnabled, m.modifiedTime, m.modifiedName,

เพิ่มไว้หลัง -->>
โค๊ด: [Select]
m.hiddenOption, m.hiddenValue, m.hiddenInfo,

ค้นหา -->>
โค๊ด: [Select]
// Sadly, we need to check the icon ain't broke.

เพิ่มไว้ก่อน -->>
โค๊ด: [Select]
// Hide the post in search or not? --- XD
if (!empty($modSettings['allow_hiddenPost']) && $message['hiddenOption'] > 0)
{
global $sourcedir;
require_once($sourcedir . '/HidePost.php');
$context['current_message'] = $message;
$message['body'] = getHiddenMessage(1);
}

สร้างฐานข้อมูล
Query:
โค๊ด: [Select]
ALTER TABLE {$db_prefix}messages ADD `hiddenOption` TINYINT( 4 ) UNSIGNED NOT NULL DEFAULT '0'

Query:
โค๊ด: [Select]
ALTER TABLE {$db_prefix}messages Add `hiddenValue` MEDIUMINT( 8 ) UNSIGNED NOT NULL DEFAULT '0'

Query:
โค๊ด: [Select]
ALTER TABLE {$db_prefix}messages ADD `hiddenInfo` TEXT NOT NULL DEFAULT ''

Query:
โค๊ด: [Select]
INSERT INTO {$db_prefix}settings (`variable`, `value`)
VALUES ('allow_hiddenPost', '1'),
('show_hiddenMessage', '1'),
('max_hiddenValue', '500'),
('show_hiddenColor', 'red')

Query:
โค๊ด: [Select]
INSERT INTO {$db_prefix}settings (`variable`, `value`)
VALUES ('enable_point', '1'),('hidden_info_length', '500')

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 2 เมื่อ: 30 มกราคม 2553, 18:44:17
สร้างไฟล์ Themes/default/HidePost.template.php
โค๊ด: [Select]
<?php
// Version: 1.0.5; Hide Post

function template_main()
{
global $context$settings$options$txt$scripturl$modSettings;

echo '
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>'
theme_linktree(), '</td>
</tr>
</table>

<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
<tr>
<td align="left" class="catbg" height="30">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle"><b>' 
$txt[139] . ':</b> ' $context['page_index'] . '</td>
<td valign="middle" align="right">' 
$context['view_hidden_post_info'] . '</td>
</tr>
</table>
</td>
</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor" style="margin-bottom: 1ex;">
<tr><td>
<table border="0" width="100%" cellspacing="1" cellpadding="4" class="bordercolor">
<tr class="titlebg">'
;
if (!empty($context['topics']))
echo '
<td width="8%" colspan="2">&nbsp;</td>
<td width="36%"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=subject'$context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[70], $context['sort_by'] == 'subject' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="8%"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=board'$context['sort_by'] == 'board' && $context['sort_direction'] == 'up' ';desc' '''">'$txt['smf82'], $context['sort_by'] == 'board' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="8%"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=starter'$context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[109], $context['sort_by'] == 'starter' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="4%" align="center"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=hidden_option'$context['sort_by'] == 'hidden_option' && $context['sort_direction'] == 'up' ';desc' '''">'$txt['hide_method'], $context['sort_by'] == 'hidden_Option' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="4%" align="center"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=hidden_value'$context['sort_by'] == 'hidden_value' && $context['sort_direction'] == 'up' ';desc' '''">'$txt['hide_value'], $context['sort_by'] == 'hidden_value' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="4%" align="center"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=replies'$context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[110], $context['sort_by'] == 'replies' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="4%" align="center"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=views'$context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[301], $context['sort_by'] == 'views' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>
<td width="24%"><a href="'
$scripturl'?action=hidepost'$context['querystring_board_limits'], ';sort=last_post'$context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ';desc' '''">'$txt[111], $context['sort_by'] == 'last_post' ' <img src="' $settings['images_url'] . '/sort_' $context['sort_direction'] . '.gif" alt="" border="0" />' '''</a></td>';
else
echo '
<td width="100%" colspan="7">'
$txt[151] , '</td>';
echo '
</tr>'
;

foreach ($context['topics'] as $topic)
{
echo '
<tr>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="' 
$settings['images_url'] . '/topic/' $topic['class'] . '.gif" alt="" /></td>
<td class="windowbg2" valign="middle" align="center" width="4%">
<img src="' 
$topic['first_post']['icon_url'] . '" alt="" border="0" align="middle" /></td>
<td class="windowbg" valign="middle" width="36%">
$topic['first_post']['link'] . '<span class="smalltext">';
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="'
$topic['new_href'], '"><img src="'$settings['images_url'], '/'$context['user']['language'], '/new.gif" alt="'$txt[302], '" border="0" /></a>';
echo '
     </span>
</td>
<td class="windowbg2" valign="middle" width="8%">
'
$topic['board']['link'], '</td>
<td class="windowbg2" valign="middle" width="8%">
$topic['first_post']['member']['link'] . '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
$topic['hidden_option'] . '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
$topic['hidden_value'] . '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
$topic['replies'] . '</td>
<td class="windowbg" valign="middle" width="4%" align="center">
$topic['views'] . '</td>
<td class="windowbg2" valign="middle" width="24%">
<a href="'
$topic['last_post']['href'], '"><img src="'$settings['images_url'], '/icons/last_post.gif" alt="'$txt[111], '" title="'$txt[111], '" border="0" style="float: right;" /></a>
<span class="smalltext">
'
$topic['last_post']['time'], 
'
$txt[525], ' '$topic['last_post']['member']['link'], '
</span></td>
</tr>'
;
}

echo '
</table>
</td></tr>
</table>

<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-bottom: 1ex;">
<tr>
<td align="left" class="catbg" height="30">
<table border="0" width="100%" cellpadding="0" cellspacing="0">
<tr>
<td valign="middle"><b>' 
$txt[139] . ':</b> ' $context['page_index'] . '</td>
<td valign="middle" align="right">' 
$context['view_hidden_post_info'] . '</td>
</tr>
</table>
</td>
</tr>
</table>

<table cellpadding="0" cellspacing="0" width="55%">
<tr>
<td class="smalltext" align="left" style="padding-top: 1ex;">'
, !empty($modSettings['enableParticipation']) ? '
<img src="' 
$settings['images_url'] . '/topic/normal_post.gif" alt="" align="middle" /> ' $txt[457] . '<br />
<img src="' 
$settings['images_url'] . '/topic/hot_post.gif" alt="" align="middle" /> ' $txt[454] . '<br />
<img src="' 
$settings['images_url'] . '/topic/veryhot_post.gif" alt="" align="middle" /> ' $txt[455] . '
<br/>' 
. (empty($modSettings['enableChest']) ? '' '<img src="' $settings['images_url'] . '/topic/chest_post.gif" alt="" align="middle" /> ' $txt['legend_chest'] ) . '
</td>
<td class="smalltext" align="left" valign="top" style="padding-top: 1ex;">
<img src="' 
$settings['images_url'] . '/topic/my_normal_post.gif" alt="" align="middle" /> ' $txt['participation_caption'] . '<br />' '''
<img src="' 
$settings['images_url'] . '/topic/normal_post_locked.gif" alt="" align="middle" /> ' $txt[456] . '<br />' . ($modSettings['enableStickyTopics'] == '1' '
<img src="' 
$settings['images_url'] . '/topic/normal_post_sticky.gif" alt="" align="middle" /> ' $txt['smf96'] . '<br />' '') . ($modSettings['pollMode'] == '1' '
<img src="' 
$settings['images_url'] . '/topic/normal_poll.gif" alt="" align="middle" /> ' $txt['smf43'] : '') . '
</td>
</tr>
</table>'
;
}

function 
template_admin()
{
global $context$settings$options$txt$scripturl$modSettings;

echo '
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>'
theme_linktree(), '</td>
</tr>
</table>

<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="margin-bottom: 0.1ex;">
<tr>
<td align="center" class="titlebg" height="30">
<b>' 
$txt['hide_post_info'] . '</b>
</td>
</tr>
</table>

<table border="0" width="100%" cellspacing="0" cellpadding="0" class="bordercolor" style="margin-bottom: 1ex;">
<tr><td>
<table border="0" width="100%" cellspacing="0" cellpadding="4" class="bordercolor">
<tr class="windowbg">
<td width="15%">'
$txt['hide_topic_all'], '</td>
<td>'
$context['hide_topic'], '</td>
<td width="15%">'
$txt['hide_post_all'], '</td>
<td>'
$context['hide_post'], '</td>
</tr>
<tr class="windowbg2">
<td width="15%">'
$txt['hide_topic_login'], '</td>
<td>'
$context['hide_topic_login'], '</td>
<td width="15%">'
$txt['hide_post_login'], '</td>
<td>'
$context['hide_post_login'], '</td>
</tr>
<tr class="windowbg">
<td width="15%">'
$txt['hide_topic_reply'], '</td>
<td>'
$context['hide_topic_reply'], '</td>
<td width="15%">'
$txt['hide_post_reply'], '</td>
<td>'
$context['hide_post_reply'], '</td>
</tr>
<tr class="windowbg2">
<td width="15%">'
$txt['hide_topic_karma'],'</td>
<td>'
$context['hide_topic_karma'], ' ('$context['hide_karma_min'], '-'$context['hide_karma_max'], ')</td>
<td width="15%">'
$txt['hide_post_karma'], '</td>
<td>'
$context['hide_post_karma'], ' ('$context['hide_karma_min'], '-'$context['hide_karma_max'], ')</td>
</tr>
<tr class="windowbg">
<td width="15%">'
$txt['hide_topic_posts'], '</td>
<td>'
$context['hide_topic_posts'], ' ('$context['hide_post_min'], '-'$context['hide_post_max'], ')</td>
<td width="15%">'
$txt['hide_post_posts'], '</td>
<td>'
$context['hide_post_posts'], ' ('$context['hide_post_min'], '-'$context['hide_post_max'], ')</td>
</tr>'
;

if (!empty($context['auto_hide_post']))
{
echo '
<tr class="catbg">
<td colspan="4" align="right">
<form action="'
$context['auto_hide_post'], '" method="POST">
<input type="submit" value="'
$txt['hide_post_auto'], '" onclick="return confirm(\'' $txt['hide_post_confirm'] . '\');" />
<input type="hidden" name="sc" value="'
$context['session_id'], '" />
</form>
</td>
</tr>'
;
}

echo 
'
</table>
</td></tr>
</table>'
;

}

?>


สร้างไฟล์ Sources/HidePost.php
โค๊ด: [Select]
<?php
/******************************************************************************
* HidePost.php                                                                *
*******************************************************************************
* SMF: Simple Machines Forum - MOD                                            *
*                                                                             *
* =========================================================================== *
* Software Version:           SMF 1.0.5 - MOD                                 *
* Software by:                Xiaoqing Zhou                                   *
* Copyright 2005 by:          Xiaoqing Zhou                                   *
* Contact:                    leaf88@gmail.com                                *
* URL:                        http://www.anetcity.com                         *
*******************************************************************************
* This mod is free software. You may redistribute it and/or modify it under   *
* the terms of GNU General Public License as published by Free Software       *
* Foundation; either version 2 of the License, or (at your option) any later  *
* version.                                                                    *
*                                                                             *
* This program is distributed in the hope that it is and will be useful,      *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
* All SMF copyrights are still in effect. Anything not mine is theirs. Enjoy! * 
******************************************************************************/
if (!defined('SMF'))
die('Hacking attempt...');

// Check whether the user is in a special group.
function checkUserIsInSpecialGroup()
{
  global 
$user_info$board_info$context$ID_MEMBER;
  
// Find if a user is in special gorups.
$context['user_special'] = 0;
if ($user_info['is_admin'])
    $context['user_special'] = 1;
elseif (!$user_info['is_guest']) 
{
// Global moderators
if (in_array(2$user_info['groups'])) {
      $context['user_special'] = 1;
      return;
}
    
// Moderators
foreach ($board_info['moderators'] as $mod)
 
   if ($mod['id'] == $ID_MEMBER) {
        $context['user_special'] = 1;
        return;
}
}
else $context['user_special'] = 0//Anyway you are not a special group member!

return $context['user_special'];
}

// Check whether the user has replied to the current topic.
function checkUserRepliedToTopic($topic)
{
  global 
$user_info$board_info$context$db_prefix$ID_MEMBER;
  
// Find if there a post from you in this thread!!!
if ($user_info['is_admin'])
    $context['user_post_avaible'] = 1;
elseif (!$user_info['is_guest']) 
{
// Skip check if no topic, and allow global moderators.
if (empty($topic) || in_array(2$user_info['groups'])) {
      $context['user_post_avaible'] = 1;
      return $context['user_post_avaible'];
}
   
// Allow moderators to see the topic.
foreach ($board_info['moderators'] as $mod)
 
   if ($mod['id'] == $ID_MEMBER) {
        $context['user_post_avaible'] = 1;
        return $context['user_post_avaible'];
}
$request db_query("
SELECT ID_MSG, ID_MEMBER
FROM {$db_prefix}messages
WHERE ID_TOPIC = $topic AND ID_MEMBER = $ID_MEMBER
LIMIT 1"
__FILE____LINE__);

if (mysql_num_rows($request)) $context['user_post_avaible'] = 1;
else $context['user_post_avaible'] = 0;
mysql_free_result($request);
}
else $context['user_post_avaible'] = 0//Anyway no way you should see it!

return $context['user_post_avaible'];
}

// Check for hidden posts. Show hidden message if needed.
function getHiddenMessage($disable_hidden_msg_color 0)
{
global $modSettings$context$user_info$ID_MEMBER$txt;

$message $context['current_message'];

// Did this user post this message?
$user_own = isset($message['ID_MEMBER']) && $ID_MEMBER == $message['ID_MEMBER'] && !$user_info['is_guest'];

// Some contexts for hiding posts ... ;)
$context['can_view_post'] = $user_own || allowedTo('view_hidden_post', array($message['ID_BOARD']));
$message['hiddenOption'] = (int) $message['hiddenOption'];
$message['hiddenValue'] = (int) $message['hiddenValue'];

// Hiding posts ? ..... Haha....Check here.....
if (!empty($modSettings['allow_hiddenPost']) && !empty($message['hiddenOption']) && isset($message['hiddenValue']))
{
$hidden_message '';
// Check each hiding criteria..... ;)
if ($message['hiddenOption'] == 1)
{
// Hide by login ....;;;;
$hidden_message $txt['hide_login_msg'];
$context['can_view_post'] |= !$user_info['is_guest'];
}
elseif ($message['hiddenOption'] == 2)
{
 // Hide by reply ....... ;
$hidden_message $txt['hide_reply_msg'];
$context['can_view_post'] |= checkUserRepliedToTopic($message['ID_TOPIC']); 
}
elseif ($message['hiddenOption'] == 3
{
// Hide by Karma ..... ;;;
$karma = isset($user_info['karma']) ? ($user_info['karma']['good'] - $user_info['karma']['bad']) : 0;
$hidden_message sprintf($txt['hide_karma_msg'], $message['hiddenValue'], $karma);
checkUserIsInSpecialGroup();
$context['can_view_post'] |= (checkUserIsInSpecialGroup()) || ($karma >= $message['hiddenValue']);
}
elseif ($message['hiddenOption'] == 4)
{
// Hide by post number .....;;
$posts = isset($user_info['posts']) ? $user_info['posts'] : 0;
$hidden_message sprintf($txt['hide_posts_msg'], $message['hiddenValue'], $posts);
$context['can_view_post'] |= (checkUserIsInSpecialGroup()) || ($posts >= $message['hiddenValue']);
}
elseif ($message['hiddenOption'] == 5)
{
// Hide by moderator .....;;
$hidden_message $txt['hide_mod_msg'];
$context['can_view_post'] |= checkUserIsInSpecialGroup();
}
else
{
// Normal posts. Anyone can see it. ;)
$context['can_view_post'] = 1;
}

if ($hidden_message != '') {
// Get final hiding message here.... ;;;;
if (isset($message['hiddenInfo']) && !empty($message['hiddenInfo']))
$hidden_message .= " (" $txt['hide_info'] . ": " $message['hiddenInfo'] . ")";
$show_hidden_msg = !empty($modSettings['show_hiddenMessage']) || allowedTo('view_hidden_msg');
$show_hidden_msg_in_color = empty($disable_hidden_msg_color) && !empty($modSettings['show_hiddenColor']);
$hidden_message $show_hidden_msg_in_color ? ('[color=' $modSettings['show_hiddenColor'] . ']' $hidden_message '[/color]') : $hidden_message;
$message['body'] = !empty($context['can_view_post']) ? (empty($show_hidden_msg) ? $message['body'] : $hidden_message '<br /><br />' $message['body']) : $hidden_message;
}
else {
// Normal posts!!!.Anyone can see it. ;)
$context['can_view_post'] = 1;
}
}
else
{
// Normal posts!!! Of course, anyone can see it.
$context['can_view_post'] = 1;
}

return $message['body'];
}

?>

สร้างไฟล์ default/languages/HidePost.thai-utf8.php

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

ขอบคุณพี่หนุ่ยสำหรับคำแนะนำครับ
มีข้อผิดพลาดประการใด แจ้งในกระทู้นี้ได้เลยนะครับ

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

icon message
general ความคิดเห็นที่ 3 เมื่อ: 30 มกราคม 2553, 19:52:49
ตัวนี้กับ... ระบบซ่อนข้อความพิเศษ (อีกตัวอ่ะ)

อันไหนดีกว่ากันอ่ะครับ

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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 4 เมื่อ: 30 มกราคม 2553, 20:32:59
ตัวนี้ดีกว่าครับ..เลือกซ่อนได้หลายแบบ

ถ้าเป็น  Hide Tag Special มันไม่มีให้เลือกรูปแบบการซ่อน แต่มีให้เลือกบอร์ดที่ซ่อน แล้วใส่แทนข้อความเป็น BBcode ได้ด้วย

เรียกว่าดีไปคนละแบบแล้วกัน

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

icon message
general ความคิดเห็นที่ 5 เมื่อ: 16 กรกฎาคม 2553, 20:42:23
IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH,

ตัวนี้มันมี 2 ที่จะเอาตัวไหนครับ

สร้างฐานข้อมูลยังไงครับ

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

ลิงค์หัวข้อ: http://dexmore.com/topic/243
« แก้ไขครั้งสุดท้าย: 16 กรกฎาคม 2553, 21:02:37 โดย kaijae2004 » Windows XP    Firefox 3.0.11   see ip บันทึกการเข้า
โฮสต์ดีๆ บริการด้วยใจ
*
*



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 6 เมื่อ: 17 กรกฎาคม 2553, 00:25:42

มีสองที่ก็ต้องแก้ทั้งสองที่ครับ

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



Thailand   ชาย ออฟไลน์
icon message
general ความคิดเห็นที่ 7 เมื่อ: 16 ธันวาคม 2553, 16:54:44
ค้นหา -->>
โค๊ด: [Select]

$context['max_hidden_value'], ' <input type="text" name="hiddenValue" value="', $context['hidden_value'], '" size="4" />';


แก้เป็น -->>
โค๊ด: [Select]

$context['max_hidden_value'], ' <input type="text" name="hiddenValue" value="', $context['hidden_value'], '" size="4" /><br />
                                    ', $txt['hide_info'], ': <input type="text" name="hiddenInfo" value="', $context['hidden_info'], '" size="100" maxlength="', $modSettings['hidden_info_length'], '" />';

ตรงนี้ของผมไม่มีครับคุณลุง ไขความกระจ่างหน่อยครับ ขอบคุณมากครับ



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


!Personal

Germany   ชาย ผู้เริ่มต้นกระทู้นี้ ออฟไลน์544566157 DexMore DexMore DexMore
เว็บไซต์
icon message
general ความคิดเห็นที่ 8 เมื่อ: 16 ธันวาคม 2553, 17:55:31
แก้แล้วครับ..ไม่มีก็ข้ามไปเลย

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

Creative Commons License

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

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

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