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

แสดงกระทู้

ส่วนนี้จะช่วยให้คุณสามารถดูกระทู้ทั้งหมดสมาชิกนี้ โปรดทราบว่าคุณสามารถเห็นเฉพาะกระทู้ในพื้นที่ที่คุณเข้าถึงในขณะนี้


ข้อความ - Ase

หน้า: [1]
1
SMF Coding Discussion / การทำกระทู้แนะนำ
« เมื่อ: 19/06/09, 17:16:19 »

เปิดไฟล์ ModSettings.php

ค้นหา
โค้ด: [เลือก]
array('int', 'max_signatureLength'),
ใส่หลังโค๊ดที่หา

โค้ด: [เลือก]
array('large_text', 'toptopic2', '5'),

เปิดไฟล์ BoardIndex.template.php

ค้นหา
โค้ด: [เลือก]
/* Each category in categories is made up of:
id, href, link, name, is_collapsed (is it collapsed?), can_collapse (is it okay if it is?),
new (is it new?), collapse_href (href to collapse/expand), collapse_image (up/down iamge),
and boards. (see below.) */
$first = true;

ใส่ก่อนโค๊ดที่หา
โค้ด: [เลือก]
// Show TopTopic by Ase
echo '
<div style="padding-bottom: 1ex;">
<div class="tborder" style="">
<div class="catbg" style="padding: 5px 5px 5px 10px;">
<h3 class="reset">กระทู้แนะนำ !!</h3>
</div>
<table class="bordercolor" style="margin-top: 1px;"
 border="0" cellpadding="5" cellspacing="1"
 width="100%">
  <tbody>
    <tr>
      <td class="windowbg" align="center" valign=""
 width="20">
      <a href=""><img
 style="border: 0px solid ; width: 61px; height: 51px;"
 id="topictopimage"
 src="http://img56.imageshack.us/img56/6065/toptopiccu7.gif"
 alt="Top!"></a></td>
      <td class="windowbg2 middletext" width="100%">&nbsp;
&nbsp; &nbsp; <span style="font-weight: bold;">กระทู้แนะนำร่วม
กระทู้ที่น่าสนใจ</span> <br>
 ' . parse_bbc($modSettings['toptopic2']) . '
      <table cellpadding="6" cellspacing="0"
 width="100%">
        <tbody>
          <tr align="center">
          </tr>
        </tbody>
      </table>
      </ul>
      </td>
    </tr>
  </tbody>
</table>
</div>
</div>
<center>TopTopic 0.2 by  <a href="http://www.iamsirid.com/">iamsirid</a></center>
';

เปิดไฟล์ Modifications.thai-utf8.php

ค้นหา
โค้ด: [เลือก]
?>
ใส่ก่อนโค๊ดที่หา
โค้ด: [เลือก]
$txt['toptopic2']='การแสดงกระทู้แนะนำ<div class="smalltext">ใช้ BBC ได้</div>';
เปิดไฟล์ Subs.php

ค้นหา

โค้ด: [เลือก]
?>

ใส่ก่อนโค๊ดที่หา

โค้ด: [เลือก]
// Get topic title from Zone-IT
function zone_it_topic_bbcode_tag($message)
{
global $db_prefix;
$req = db_query("
SELECT ms.subject, ms.ID_TOPIC, ms.ID_MEMBER, mb.realName
FROM {$db_prefix}messages AS ms
INNER JOIN {$db_prefix}members AS mb ON (mb.ID_MEMBER = ms.ID_MEMBER)
WHERE ID_TOPIC = {$message[1]}
ORDER BY ID_MSG ASC LIMIT 1", __FILE__, __LINE__);
$row = mysql_fetch_assoc($req);
return (empty($row)) ? '[red]ไม่พบกระทู้หมายเลข: [b]' . $message[1] . '[/b]![/red]' : '[url=http://' . $GLOBALS['scripturl'] . '?topic='
. $message[1] . $message[2] . ']' . $row['subject'] . '[/url] โดย [url=http://' . $GLOBALS['scripturl'] . '?action=profile;u='
. $row['ID_MEMBER'] . ']' . $row['realName'] . '[/url]';
}

ค้นหา
โค้ด: [เลือก]
if (empty($modSettings['enableBBC']) && $message !== false)
{
if ($smileys === true)
parsesmileys($message);

return $message;
}

ใส่หลังโค๊ดที่หา

โค้ด: [เลือก]
$message = preg_replace_callback('~\[t=(\d+)([/\.]\d+)?\]~', 'zone_it_topic_bbcode_tag', $message);
เสร็จแล้วไปที่ : ผู้ดูแล>>>ส่วนปรับแต่งค่าการใช้งาน  แล้วมองหา "การแสดงกระทู้แนะนำ"

ข้างในใส่
โค้ด: [เลือก]
[t=ไอดีกระทู้]
จบ

3
Showcase / ทำมานานแล้ว
« เมื่อ: 21/10/08, 07:54:37 »

4
แต่ผมเห็นปกติ ???

ช่วยบอกหน่อยนะครับ ;D

หน้า: [1]