ยินดีต้อนรับคุณ, บุคคลทั่วไป กรุณา เข้าสู่ระบบ หรือ ลงทะเบียน

เข้าสู่ระบบด้วยชื่อผู้ใช้ รหัสผ่าน และระยะเวลาในเซสชั่น

ThaiSEOBoard.comพัฒนาเว็บไซต์CMS & Free Scriptปรึกษาปรับแต่ง Mod Recent Forum Topics for SMF
หน้า: [1]   ลงล่าง
พิมพ์
ผู้เขียน หัวข้อ: ปรึกษาปรับแต่ง Mod Recent Forum Topics for SMF  (อ่าน 1837 ครั้ง)
0 สมาชิก และ 1 บุคคลทั่วไป กำลังดูหัวข้อนี้
minmono
คนรักเสียว
*

พลังน้ำใจ: 0
ออฟไลน์ ออฟไลน์

กระทู้: 102



ดูรายละเอียด เว็บไซต์
« เมื่อ: 23 มีนาคม 2022, 14:35:17 »

บอร์ด SMF 2.0.15 ผมติดตั้ง Mod Recent Forum Topics 1.2  แล้วไปทำการแก้ไฟล์ .../Sources/RecentForumTopics.php เพื่อบล็อคบอร์ด 9 กลุ่มโฆษณาไม่ให้แสดงในรายการ
โค๊ด:
$query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}
AND b.id_board != 9.0' : ''). '
AND m.id_msg >= {int:max_id_msg}';

ตั้งค่าให้แสดง 10รายการต่อหน้า x 10หน้า = 100รายการ

หน้าแรก ก่อนการแก้ไข | หน้า2+
กระทู้ 1
กระทู้ 2
กระทู้ 3 /บอร์ด9
กระทู้ 4 /บอร์ด9
กระทู้ 5
กระทู้ 6 /บอร์ด9
กระทู้ 7
กระทู้ 8 /บอร์ด9
กระทู้ 9
กระทู้ 10
| กระทู้ 11
กระทู้ 12
กระทู้ 13
กระทู้ 14
กระทู้ 15
กระทู้ 16
กระทู้ 17 /บอร์ด9
กระทู้ 18
กระทู้ 19 /บอร์ด9
กระทู้ 20

หน้าแรก หลังการแก้ไข | หน้า2+
กระทู้ 1
กระทู้ 2
กระทู้ 5
กระทู้ 7
กระทู้ 9
กระทู้ 10
| กระทู้ 15
กระทู้ 16
กระทู้ 18
กระทู้ 20
กระทู้ 21
กระทู้ 22
กระทู้ 23
กระทู้ 24
กระทู้ 25
กระทู้ 26

ผลคือสามารถบล็อคได้จริง
- แต่จำนวนกระทู้ที่นำมาแสดงในหน้าแรกผิดพลาดไม่ครบ 10กระทู้
- หน้า2แสดงครบ10 แต่กระทู้ 11,12,13,14 หายไป(เหมือนระบบคิดว่าเอาไปวางหน้าแรกแล้ว)
- ตั้งแต่หน้า2 เป็นต้นไปแสดงครบ10 / รายการกระทู้ที่นำมาแสดงถูกต้องไม่มีขาดหาย

สรุปคือ จะแก้ยังไงให้หน้าแรกแสดงครบ(ยังบล็อค)และไม่มีกระทู้ที่ถูกตัดขาดน่ะครับ (บอร์ดจริงใช้ 15-20 จึงถูกตัดออกไปเยอะมาก)

.../Sources/RecentForumTopics.php
โค๊ด:
<?php
/**
 * @package Recent Forum Topics
 * @version 1.0
 * @Author: Pipke(AdemaStudios)
 * @copyright Copyright (C) 2014, Pipke
 *
 * This SMF modification is subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this SMF modification except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/   
 */

// Check Column Fields in Database
function rft_checkColumn($tableName$columnName)
{
global $db_prefix$smcFunc;
$check $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;DESCRIBE {db_prefix}&#39; . $tableName . &#39; &#39; . $columnName);
if ($smcFunc[&#39;db_num_rows&#39;]($check) > 0) {return true;}
return false;
}

// Find the Recent Forum Topics
function rft_mainbasic()
{
global $txt$settings$scripturl$user_info$context$modSettings$sourcedir$board$boarddir$smcFunc;

$rft_per_page = !empty($modSettings[&#39;rft_numbertopics&#39;]) ? $modSettings[&#39;rft_numbertopics&#39;] : 10;

if (isset($_REQUEST[&#39;start&#39;]) && $_REQUEST[&#39;start&#39;] > 95)
$_REQUEST[&#39;start&#39;] = 95;

$query_parameters = array();
if (!empty($_REQUEST[&#39;c&#39;]) && empty($board))
{
$_REQUEST[&#39;c&#39;] = explode(&#39;,&#39;, $_REQUEST[&#39;c&#39;]);
foreach ($_REQUEST[&#39;c&#39;] as $i => $c)
$_REQUEST[&#39;c&#39;][$i] = (int) $c;

if (count($_REQUEST[&#39;c&#39;]) == 1)
{
$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
SELECT name
FROM {db_prefix}categories
WHERE id_cat = {int:id_cat}
LIMIT 1&#39;,
array(
&#39;id_cat&#39; => $_REQUEST[&#39;c&#39;][0],
)
);
list ($name) = $smcFunc[&#39;db_fetch_row&#39;]($request);
$smcFunc[&#39;db_free_result&#39;]($request);

if (empty($name))
fatal_lang_error(&#39;no_access&#39;, false);

$context[&#39;linktree&#39;][] = array(
&#39;url&#39; => $scripturl . &#39;#c&#39; . (int) $_REQUEST[&#39;c&#39;],
&#39;name&#39; => $name
);
}

$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
SELECT b.id_boardb.num_topics
FROM {db_prefix}boards AS b
WHERE b.id_cat IN ({array_int:category_list})
AND {query_see_board}&#39;,
array(
&#39;category_list&#39; => $_REQUEST[&#39;c&#39;],
)
);
$total_cat_posts 0;
$boards = array();
while ($row $smcFunc[&#39;db_fetch_assoc&#39;]($request))
{
$boards[] = $row[&#39;id_board&#39;];
$total_cat_posts += $row[&#39;num_topics&#39;];
}
$smcFunc[&#39;db_free_result&#39;]($request);

if (empty($boards))
fatal_lang_error(&#39;error_no_boards_selected&#39;);

$query_this_board = &#39;b.id_board IN ({array_int:boards})&#39;;
$query_parameters[&#39;boards&#39;] = $boards;
// If this category has a significant number of posts in it...
if ($total_cat_posts 100 && $total_cat_posts $modSettings[&#39;totalMessages&#39;] / 15)
{
$query_this_board .= &#39;
AND m.id_msg >= {int:max_id_msg}&#39;;
$query_parameters[&#39;max_id_msg&#39;] = max(0, $modSettings[&#39;maxMsgID&#39;] - 400 - $_REQUEST[&#39;start&#39;] * 7);
}

$context[&#39;page_index&#39;] = constructPageIndex($scripturl . &#39;?action=forum;c=&#39; . implode(&#39;,&#39;, $_REQUEST[&#39;c&#39;]), $_REQUEST[&#39;start&#39;], min(100, $total_cat_posts), $rft_per_page, false);
}
elseif (!empty($_REQUEST[&#39;boards&#39;]))
{
$_REQUEST[&#39;boards&#39;] = explode(&#39;,&#39;, $_REQUEST[&#39;boards&#39;]);
foreach ($_REQUEST[&#39;boards&#39;] as $i => $b)
$_REQUEST[&#39;boards&#39;][$i] = (int) $b;

$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
SELECT b.id_boardb.num_topics
FROM {db_prefix}boards AS b
WHERE b.id_board IN ({array_int:board_list})
AND {query_see_board}
LIMIT {int:limit}&#39;,
array(
&#39;board_list&#39; => $_REQUEST[&#39;boards&#39;],
&#39;limit&#39; => count($_REQUEST[&#39;boards&#39;]),
)
);
$total_posts 0;
$boards = array();
while ($row $smcFunc[&#39;db_fetch_assoc&#39;]($request))
{
$boards[] = $row[&#39;id_board&#39;];
$total_posts += $row[&#39;num_topics&#39;];
}
$smcFunc[&#39;db_free_result&#39;]($request);

if (empty($boards))
fatal_lang_error(&#39;error_no_boards_selected&#39;);

$query_this_board = &#39;b.id_board IN ({array_int:boards})&#39;;
$query_parameters[&#39;boards&#39;] = $boards;

// If these boards have a significant number of posts in them...
if ($total_posts 100 && $total_posts $modSettings[&#39;totalMessages&#39;] / 12)
{
$query_this_board .= &#39;
AND m.id_msg >= {int:max_id_msg}&#39;;
$query_parameters[&#39;max_id_msg&#39;] = max(0, $modSettings[&#39;maxMsgID&#39;] - 500 - $_REQUEST[&#39;start&#39;] * 9);
}

$context[&#39;page_index&#39;] = constructPageIndex($scripturl . &#39;?action=forum;boards=&#39; . implode(&#39;,&#39;, $_REQUEST[&#39;boards&#39;]), $_REQUEST[&#39;start&#39;], min(100, $total_posts), $rft_per_page, false);
}
elseif (!empty($board))
{
$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
SELECT num_topics
FROM {db_prefix}boards
WHERE id_board = {int:current_board}
LIMIT 1&#39;,
array(
&#39;current_board&#39; => $board,
)
);
list ($total_posts) = $smcFunc[&#39;db_fetch_row&#39;]($request);
$smcFunc[&#39;db_free_result&#39;]($request);

$query_this_board = &#39;b.id_board = {int:board}&#39;;
$query_parameters[&#39;board&#39;] = $board;

// If this board has a significant number of posts in it...
if ($total_posts 80 && $total_posts $modSettings[&#39;totalMessages&#39;] / 10)
{
$query_this_board .= &#39;
AND m.id_msg >= {int:max_id_msg}&#39;;
$query_parameters[&#39;max_id_msg&#39;] = max(0, $modSettings[&#39;maxMsgID&#39;] - 600 - $_REQUEST[&#39;start&#39;] * 10);
}

$context[&#39;page_index&#39;] = constructPageIndex($scripturl . &#39;?action=forum;board=&#39; . $board . &#39;.%1$d&#39;, $_REQUEST[&#39;start&#39;], min(100, $total_posts), $rft_per_page, true);
}
else
{
$query_this_board = &#39;{query_wanna_see_board}&#39; . (!empty($modSettings[&#39;recycle_enable&#39;]) && $modSettings[&#39;recycle_board&#39;] > 0 ? &#39;
AND b.id_board != {int:recycle_board}
AND b.id_board != 9.0&#39; : &#39;&#39;). &#39;
AND m.id_msg >= {int:max_id_msg}&#39;;
$query_parameters[&#39;max_id_msg&#39;] = max(0, $modSettings[&#39;maxMsgID&#39;] - 100 - $_REQUEST[&#39;start&#39;] * 6);
$query_parameters[&#39;recycle_board&#39;] = $modSettings[&#39;recycle_board&#39;];

$context[&#39;page_index&#39;] = constructPageIndex($scripturl . &#39;?action=forum&#39;, $_REQUEST[&#39;start&#39;], min(100, $modSettings[&#39;totalTopics&#39;]), $rft_per_page, false);
}

$key = &#39;recent-&#39; . $user_info[&#39;id&#39;] . &#39;-&#39; . md5(serialize(array_diff_key($query_parameters, array(&#39;max_id_msg&#39; => 0)))) . &#39;-&#39; . (int) $_REQUEST[&#39;start&#39;];

    if (($messages cache_get_data($key120)) == false)
    {
$done false;
while (!$done)
{
// Find the ?? most recent messages they can *view*.
// !!!SLOW This query is really slow still, probably?
$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
SELECT m.id_msg
FROM {db_prefix}messages AS m
INNER JOIN {db_prefix}boards AS b ON (b.id_board m.id_board)
INNER JOIN {db_prefix}topics AS t ON (t.&#39; . (!empty($modSettings[&#39;rft_subject_topics&#39;]) && $modSettings[&#39;rft_subject_topics&#39;] == &#39;last&#39; ? &#39;id_last_msg&#39; : &#39;id_first_msg&#39;) . &#39; = m.id_msg)
WHERE &#39; . $query_this_board . &#39;
AND m.approved = {int:is_approved}
ORDER BY m.id_msg DESC
LIMIT {int:offset}, {int:limit}&#39;,
array_merge($query_parameters, array(
&#39;is_approved&#39; => 1,
&#39;offset&#39; => $_REQUEST[&#39;start&#39;],
&#39;limit&#39; => $rft_per_page,
))
);

// If we don&#39;t have 10 results, try again with an unoptimized version covering all rows, and cache the result.
if (isset($query_parameters[&#39;max_id_msg&#39;]) && $smcFunc[&#39;db_num_rows&#39;]($request) < 7)
{
$smcFunc[&#39;db_free_result&#39;]($request);
$query_this_board str_replace(&#39;AND m.id_msg >= {int:max_id_msg}&#39;, &#39;&#39;, $query_this_board);
$cache_results true;
unset($query_parameters[&#39;max_id_msg&#39;]);
}
else
$done true;
}
$messages = array();
while ($row $smcFunc[&#39;db_fetch_assoc&#39;]($request))
$messages[] = $row[&#39;id_msg&#39;];
$smcFunc[&#39;db_free_result&#39;]($request);
if (!empty($cache_results))
cache_put_data($key$messages120);
    }

// Nothing here... Or at least, nothing you can see...
if (empty($messages))
{
$context[&#39;posts&#39;] = array();
return;
}


// Check if Column &#39;is_solved&#39; exists from the Topic Solved Mod
$post[&#39;is_solved&#39;] = false; // to be sure ;)
$tableName = &#39;topics&#39;;
$columnName = &#39;is_solved&#39;;
$solved_exists false;
$solved_exists rft_checkColumn($tableName$columnName);

// Get all the most recent posts
$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
        
SELECT
            m
.id_msgm.id_msg_modifiedm.subjectm.smileys_enabledm.poster_time AS first_poster_time m.bodym.id_topict.id_boardb.id_cat
            
b.name AS bnamec.name AS cnamet.num_repliest.num_viewsm.id_memberm2.id_member AS id_first_member,&#39; . ($user_info[&#39;is_guest&#39;] ? &#39;1 AS is_read, 0 AS new_from&#39; : &#39;
IFNULL(lt.id_msgIFNULL(lmr.id_msg0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msgIFNULL(lmr.id_msg, -1)) + AS new_from&#39;) . &#39;,
            
m2.poster_time AS last_poster_timem.icon AS first_icon,
            
t.approvedt.unapproved_postst.lockedt.is_stickyt.id_poll,&#39; . ($solved_exists ? &#39; t.is_solved,&#39; : &#39;&#39;) . &#39;
            
IFNULL(mem2.real_namem2.poster_name) AS first_poster_namet.id_first_msg,
            
IFNULL(mem.real_namem.poster_name) AS poster_namet.id_last_msg
        FROM 
{db_prefix}messages AS m
            INNER JOIN 
{db_prefix}topics AS t ON (t.id_topic m.id_topic)
            
INNER JOIN {db_prefix}boards AS b ON (b.id_board t.id_board)
            
INNER JOIN {db_prefix}categories AS c ON (c.id_cat b.id_cat)
            
INNER JOIN {db_prefix}messages AS m2 ON (m2.id_msg t.id_first_msg)
            
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member m.id_member)
            
LEFT JOIN {db_prefix}members AS mem2 ON (mem2.id_member m2.id_member)&#39; . (!$user_info[&#39;is_guest&#39;] ? &#39;
            
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic m.id_topic AND lt.id_member = {int:current_member})
            
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board m.id_board AND lmr.id_member = {int:current_member})&#39; : &#39;&#39;) . &#39;
        
WHERE m.id_msg IN ({array_int:message_list})
        
ORDER BY m.id_msg DESC
        LIMIT 
&#39; . count($messages),
    
array(
        &
#39;message_list&#39; => $messages,
        
&#39;current_member&#39; => $user_info[&#39;id&#39;],
    
)
);
$counter $_REQUEST[&#39;start&#39;] + 1;
$context[&#39;posts&#39;] = array();
$board_ids = array(&#39;own&#39; => array(), &#39;any&#39; => array());
$topics = array();
while (
$row $smcFunc[&#39;db_fetch_assoc&#39;]($request))
{

    
// Censor everything.
    
censorText($row[&#39;subject&#39;]);

    // BBC-atize the message.
    
$row[&#39;body&#39;] = parse_bbc($row[&#39;body&#39;], $row[&#39;smileys_enabled&#39;], $row[&#39;id_msg&#39;]);

    
$topics[] = $row[&#39;id_topic&#39;];
    
    // And build the array.
    
$context[&#39;posts&#39;][$row[&#39;id_msg&#39;]] = array(
        
&#39;id&#39; => $row[&#39;id_msg&#39;],
        
&#39;counter&#39; => $counter++,
        
&#39;alternate&#39; => $counter % 2,
        
&#39;category&#39; => array(
            
&#39;id&#39; => $row[&#39;id_cat&#39;],
            
&#39;name&#39; => $row[&#39;cname&#39;],
            
&#39;href&#39; => $scripturl . &#39;#c&#39; . $row[&#39;id_cat&#39;],
            
&#39;link&#39; => &#39;<a href="&#39; . $scripturl . &#39;#c&#39; . $row[&#39;id_cat&#39;] . &#39;">&#39; . $row[&#39;cname&#39;] . &#39;</a>&#39;
        
),
        &
#39;board&#39; => array(
            
&#39;id&#39; => $row[&#39;id_board&#39;],
            
&#39;name&#39; => $row[&#39;bname&#39;],
            
&#39;href&#39; => $scripturl . &#39;?board=&#39; . $row[&#39;id_board&#39;] . &#39;.0&#39;,
            
&#39;link&#39; => &#39;<a href="&#39; . $scripturl . &#39;?board=&#39; . $row[&#39;id_board&#39;] . &#39;.0">&#39; . $row[&#39;bname&#39;] . &#39;</a>&#39;
        
),
        &
#39;topic&#39; => $row[&#39;id_topic&#39;],
        
&#39;href&#39; => $scripturl . &#39;?topic=&#39; . $row[&#39;id_topic&#39;] . &#39;.msg&#39; . $row[&#39;id_msg&#39;] . &#39;#msg&#39; . $row[&#39;id_msg&#39;],
        
&#39;linklast&#39; => &#39;<a href="&#39; . $scripturl . &#39;?topic=&#39; . $row[&#39;id_topic&#39;] . &#39;.msg&#39; . $row[&#39;id_msg&#39;] . &#39;#new" rel="nofollow">&#39; . $row[&#39;subject&#39;] . &#39;</a>&#39;,
        
&#39;linkfirst&#39; => &#39;<a href="&#39; . $scripturl . &#39;?topic=&#39; . $row[&#39;id_topic&#39;] . &#39;.0" rel="nofollow">&#39; . $row[&#39;subject&#39;] . &#39;</a>&#39;,
        
&#39;new_href&#39; => $scripturl . &#39;?topic=&#39; . $row[&#39;id_topic&#39;] . &#39;.msg&#39; . $row[&#39;id_msg&#39;] . &#39;#new&#39;,
        
&#39;start&#39; => $row[&#39;num_replies&#39;],
        
&#39;subject&#39; => $row[&#39;subject&#39;],
        
&#39;views&#39; => comma_format($row[&#39;num_views&#39;]),
        
&#39;replies&#39; => comma_format($row[&#39;num_replies&#39;]),
        
&#39;timefirst&#39; => timeformat($row[&#39;first_poster_time&#39;]),
        
&#39;timelast&#39; => timeformat($row[&#39;last_poster_time&#39;]),
        
&#39;first_poster&#39; => array(
            
&#39;id&#39; => $row[&#39;id_first_member&#39;],
            
&#39;name&#39; => $row[&#39;first_poster_name&#39;],
            
&#39;href&#39; => empty($row[&#39;id_first_member&#39;]) ? &#39;&#39; : $scripturl . &#39;?action=profile;u=&#39; . $row[&#39;id_first_member&#39;],
            
&#39;link&#39; => empty($row[&#39;id_first_member&#39;]) ? $row[&#39;first_poster_name&#39;] : &#39;<a href="&#39; . $scripturl . &#39;?action=profile;u=&#39; . $row[&#39;id_first_member&#39;] . &#39;">&#39; . $row[&#39;first_poster_name&#39;] . &#39;</a>&#39;
        
),
        &
#39;poster&#39; => array(
            
&#39;id&#39; => $row[&#39;id_member&#39;],
            
&#39;name&#39; => $row[&#39;poster_name&#39;],
            
&#39;href&#39; => empty($row[&#39;id_member&#39;]) ? &#39;&#39; : $scripturl . &#39;?action=profile;u=&#39; . $row[&#39;id_member&#39;],
            
&#39;link&#39; => empty($row[&#39;id_member&#39;]) ? $row[&#39;poster_name&#39;] : &#39;<a href="&#39; . $scripturl . &#39;?action=profile;u=&#39; . $row[&#39;id_member&#39;] . &#39;">&#39; . $row[&#39;poster_name&#39;] . &#39;</a>&#39;
        
),
        &
#39;is_own_post&#39; => false,
        
&#39;new&#39; => $row[&#39;new_from&#39;] <= $row[&#39;id_msg_modified&#39;],
        
&#39;new_from&#39; => $row[&#39;new_from&#39;],
        
&#39;newtime&#39; => $row[&#39;new_from&#39;],
&#39;new_href&#39; => $scripturl . &#39;?topic=&#39; . $row[&#39;id_topic&#39;] . &#39;.msg&#39; . $row[&#39;new_from&#39;] . &#39;;topicseen#new" rel="nofollow"><img src="&#39; . $settings[&#39;lang_images_url&#39;] . &#39;/new.gif" alt="&#39; . $txt[&#39;new&#39;],
        //&#39;new_href&#39; => $scripturl . &#39;?topic=&#39; . $row[&#39;id_topic&#39;] . &#39;.msg&#39; . $row[&#39;new_from&#39;] . &#39;#new&#39;,
        
&#39;id_msg_modified&#39; => $row[&#39;id_msg_modified&#39;],
        
&#39;is_sticky&#39; => !empty($modSettings[&#39;enableStickyTopics&#39;]) && !empty($row[&#39;is_sticky&#39;]),
        
&#39;is_locked&#39; => !empty($row[&#39;locked&#39;]),
        
&#39;is_poll&#39; => $modSettings[&#39;pollMode&#39;] == &#39;1&#39; && $row[&#39;id_poll&#39;] > 0,
        
&#39;is_hot&#39; => $row[&#39;num_replies&#39;] >= $modSettings[&#39;hotTopicPosts&#39;],
        
&#39;is_very_hot&#39; => $row[&#39;num_replies&#39;] >= $modSettings[&#39;hotTopicVeryPosts&#39;],
        
&#39;icon&#39; => $row[&#39;first_icon&#39;],
    
);
    if (!empty(
$row[&#39;is_solved&#39;]))
        
$context[&#39;posts&#39;][$row[&#39;id_msg&#39;]][&#39;is_solved&#39;] = $row[&#39;is_solved&#39;];
    
if ($user_info[&#39;id&#39;] == $row[&#39;id_first_member&#39;])
        
$board_ids[&#39;own&#39;][$row[&#39;id_board&#39;]][] = $row[&#39;id_msg&#39;];
    
$board_ids[&#39;any&#39;][$row[&#39;id_board&#39;]][] = $row[&#39;id_msg&#39;];
}

$smcFunc[&#39;db_free_result&#39;]($request);

$request $smcFunc[&#39;db_query&#39;](&#39;&#39;, &#39;
SELECT DISTINCT id_topic
FROM {db_prefix}messages
WHERE id_topic IN ({array_int:topics})
AND id_member = {int:member}&#39;,
array(
&#39;topics&#39; => $topics,
&#39;member&#39; => $user_info[&#39;id&#39;],
)
);
$context[&#39;posted_topics&#39;] = array();
while ($row $smcFunc[&#39;db_fetch_assoc&#39;]($request))
$context[&#39;posted_topics&#39;][] = $row[&#39;id_topic&#39;];

$smcFunc[&#39;db_free_result&#39;]($request);

}

.../Sources/Subs-RecentForumTopics.php
โค๊ด:
<?php
/**
 * @package Recent Forum Topics
 * @version 1.2
 * @Author: Pipke(AdemaStudios)
 * @copyright Copyright (C) 2014, Pipke
 *
 * This SMF modification is subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this SMF modification except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/   
 */

if (!defined(&#39;SMF&#39;))
die(&#39;Hacking attempt...&#39;);

//Hooks
function rft_mod_admin(&$areas)
{
global $txt;

loadLanguage(&#39;RecentForumTopics&#39;);

$areas[&#39;config&#39;][&#39;areas&#39;][&#39;modsettings&#39;][&#39;subsections&#39;][&#39;recentforumtopics&#39;] = array($txt[&#39;rft_name&#39;]);
}

function 
rft_mod_settings(&$sub_actions)
{
global $context;

$sub_actions[&#39;recentforumtopics&#39;] = &#39;rft_blockSettings&#39;;
}

function 
rft_blockSettings($return_config false)
{
global $context$scripturl$txt;

$config_vars = array(
array(&#39;desc&#39;, &#39;rft_topic_solvednote&#39;),
array(&#39;desc&#39;, &#39;rft_portalnote&#39;),
array(&#39;check&#39;, &#39;rft_enable&#39;, &#39;subtext&#39; => $txt[&#39;rft_enable_sub&#39;],),
array(&#39;select&#39;, &#39;rft_numbertopics&#39;, array(&#39;3&#39; => $txt[&#39;rft_3&#39;],&#39;4&#39; => $txt[&#39;rft_4&#39;],&#39;5&#39; => $txt[&#39;rft_5&#39;],&#39;6&#39; => $txt[&#39;rft_6&#39;],&#39;7&#39; => $txt[&#39;rft_7&#39;],&#39;8&#39; => $txt[&#39;rft_8&#39;],&#39;9&#39; => $txt[&#39;rft_9&#39;],&#39;10&#39; => $txt[&#39;rft_10&#39;],)),
array(&#39;check&#39;, &#39;rft_disable_smfrecentposts&#39;),
array(&#39;select&#39;, &#39;rft_subject_topics&#39;, &#39;subtext&#39; => $txt[&#39;rft_subject_topics_sub&#39;], array(&#39;last&#39; => $txt[&#39;rft_last&#39;],&#39;first&#39; => $txt[&#39;rft_first&#39;],)),
array(&#39;select&#39;, &#39;rft_link_topics&#39;, &#39;subtext&#39; => $txt[&#39;rft_link_topics_sub&#39;], array(&#39;last&#39; => $txt[&#39;rft_last&#39;],&#39;first&#39; => $txt[&#39;rft_first&#39;],)),
array(&#39;check&#39;, &#39;rft_linktree&#39;),
array(&#39;check&#39;, &#39;rft_counter_viewnumbers&#39;), 
array(&#39;int&#39;, &#39;rft_color_viewnumbers&#39;, &#39;subtext&#39; => $txt[&#39;rft_color_viewnumbers_sub&#39;], &#39;preinput&#39; => &#39;#&#39;, &#39;size&#39; => 7),
array(&#39;check&#39;, &#39;rft_firstpostlinkicon&#39;), 
array(&#39;check&#39;, &#39;rft_lastpostlinkicon&#39;),
array(&#39;check&#39;, &#39;rft_firstcolumn&#39;), 
array(&#39;check&#39;, &#39;rft_secondcolumn&#39;),
array(&#39;check&#39;, &#39;rft_menubuttons&#39;), 
array(&#39;check&#39;, &#39;rft_postingicons&#39;), 
array(&#39;check&#39;, &#39;rft_topic_solved&#39;, &#39;subtext&#39; => $txt[&#39;rft_topic_solved_sub&#39;]),
array(&#39;check&#39;, &#39;rft_portal&#39;, &#39;subtext&#39; => $txt[&#39;rft_portal_sub&#39;]),
);

if ($return_config)
return $config_vars;

$context[&#39;post_url&#39;] = $scripturl . &#39;?action=admin;area=modsettings;save;sa=recentforumtopics&#39;;
$context[&#39;settings_title&#39;] = $txt[&#39;rft_settings_title&#39;];

if (empty($config_vars))
{
$context[&#39;settings_save_dont_show&#39;] = true;
$context[&#39;settings_message&#39;] = &#39;<div align="center">&#39; . $txt[&#39;modification_no_misc_settings&#39;] . &#39;</div>&#39;;

return prepareDBSettingContext($config_vars);
}

if (isset($_GET[&#39;save&#39;]))
{
checkSession();
if ((!empty($_POST[&#39;rft_color_viewnumbers&#39;])) && (ctype_alnum($_POST[&#39;rft_color_viewnumbers&#39;]) === false))
fatal_lang_error(&#39;rft_error_color&#39;, false);
$save_vars $config_vars;
saveDBSettings($save_vars);
redirectexit(&#39;action=admin;area=modsettings;sa=recentforumtopics&#39;);
}

prepareDBSettingContext($config_vars);
}


function 
rft_load_themes()
{
global $context$settings$modSettings;

loadLanguage(&#39;RecentForumTopics&#39;);

if (in_array($context[&#39;current_action&#39;], array(&#39;helpadmin&#39;, &#39;printpage&#39;)) || WIRELESS) return;

if (!empty($modSettings[&#39;rft_enable&#39;])) {
if (!empty($modSettings[&#39;rft_disable_smfrecentposts&#39;]))
$settings[&#39;number_recent_posts&#39;] = 0;
RecentForumTopics_loading();
}
}

//Show on index only (yes to collapse)
function RecentForumTopics_loading()
{
global $context$sourcedir$txt$scripturl$modSettings$settings$boardurl$boarddir;

$current_action = &#39;&#39;; //all 

if (((!empty($_REQUEST[&#39;action&#39;]) && ($_REQUEST[&#39;action&#39;] != &#39;forum&#39;)) && ($_REQUEST[&#39;action&#39;] != &#39;collapse&#39;)) || !empty($_REQUEST[&#39;topic&#39;]) || !empty($_REQUEST[&#39;board&#39;]) || !empty($_REQUEST[&#39;page&#39;]) || !empty($_REQUEST[&#39;blog&#39;]))
$current_action = &#39;dontshowme&#39;;

if (!empty($modSettings[&#39;rft_portal&#39;]) && (empty($_REQUEST[&#39;action&#39;])))
$current_action = &#39;dontshowme&#39;;

if(!empty($current_action))
return;

$context[&#39;html_headers&#39;] .= &#39;
<style type="text/css">
.topic_table td.stickybg2
{
background-position966px;
}
.topic_table td.lockedbg2
{
background-position966px;
}
.topic_table td.locked_sticky2
{
background-position966px;
}
</style>&#39;;

require_once($sourcedir . &#39;/RecentForumTopics.php&#39;);

rft_mainbasic();

loadTemplate(&#39;RecentForumTopics&#39;);

//$context[&#39;page_title&#39;] = $txt[&#39;page_title&#39;];
if (!empty($modSettings[&#39;rft_linktree&#39;]))
$context[&#39;linktree&#39;][] = array(
&#39;url&#39; => $scripturl . &#39;?action=forum&#39;,
&#39;name&#39; => $txt[&#39;rft_name&#39;]
);

$context[&#39;template_layers&#39;][] = &#39;rft&#39;;
}

/* DUH! WINNING! */
function rft_copyright(&$dummy)
{
global $context;
if (isset($context[&#39;current_action&#39;]) && $context[&#39;current_action&#39;] == &#39;credits&#39;)
$context[&#39;copyrights&#39;][&#39;mods&#39;][] = &#39;Recent Forum Topics Mod | <a href="http://www.simplemachines.org/community/index.php?action=profile;u=314795" title="AdemaStudios">&copy 2014 by Pipke</a>&#39;;
}

?>

.../Themes/default/RecentForumTopics.template.php
โค๊ด:
<?php
/**
 * @package Recent Forum Topics
 * @version 1.2
 * @Author: Pipke(AdemaStudios)
 * @copyright Copyright (C) 2014, Pipke
 *
 * This SMF modification is subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this SMF modification except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/   
 */

function template_rft_above()
{
global $context$settings$scripturl$modSettings$txt$boarddir;

echo&#39;
<div class="tborder topic_table" id="messageindex">
<table class="table_grid" cellspacing="0">
<thead>
<tr class="catbg">&#39;;
// Are there actually any topics to show?
if (!empty($context[&#39;posts&#39;]))
{
// The navigation pages and numbers.
$sum=0;
$class =&#39;windowbg&#39;;
foreach ($context[&#39;posts&#39;] as $sum) {}
if ($modSettings[&#39;rft_firstcolumn&#39;] && $modSettings[&#39;rft_secondcolumn&#39;])
echo &#39;<th scope="col" class="first_th" width="8%" colspan="2">&nbsp;</th>&#39;;
elseif ((!$modSettings[&#39;rft_firstcolumn&#39;] && $modSettings[&#39;rft_secondcolumn&#39;]) || ($modSettings[&#39;rft_firstcolumn&#39;] && !$modSettings[&#39;rft_secondcolumn&#39;]))
echo &#39;<th scope="col" class="first_th" width="4%" colspan="1">&nbsp;</th>&#39;;
else
$class =&#39;first_th&#39;;

if (empty($modSettings[&#39;rft_counter_viewnumbers&#39;])){
echo&#39;<th scope="col" class="lefttext &#39;,$class,&#39;" >&#39;, $txt[&#39;rft_name&#39;], &#39; / &#39;, $txt[&#39;started_by&#39;], &#39; / &#39;, $txt[&#39;rft_in_Board&#39;], &#39;</th>&#39;;
}
else {
echo&#39;<th scope="col" class="lefttext &#39;,$class,&#39;" >&#39;, $txt[&#39;rft_name&#39;], &#39; <span style="color: #&#39;.$modSettings[&#39;rft_color_viewnumbers&#39;].&#39;;">&laquo; &#39;, $counter = $_REQUEST[&#39;start&#39;] + 1 ,&#39; &#39;.$txt[&#39;rft_to&#39;].&#39; &#39;, $sum[&#39;counter&#39;], &#39; &raquo;</span> / &#39;, $txt[&#39;started_by&#39;], &#39; / &#39;, $txt[&#39;rft_in_Board&#39;], &#39;</th>&#39;;
}
echo&#39;
<th scope="col" width="15%">&#39;, $txt[&#39;replies&#39;], &#39; / &#39;, $txt[&#39;views&#39;], &#39;</th>
<th scope="col" class="lefttext last_th" width="24%">&#39;, $txt[&#39;last_post&#39;], &#39;</th>&#39;;
}
// No topics.... just say, "sorry bub".
else
{
echo &#39;
<th scope="col" class="first_th" width="8%">&nbsp;</th>
<th colspan="3"><strong>&#39;, $txt[&#39;msg_alert_none&#39;], &#39;</strong></th>
<th scope="col" class="last_th" width="8%">&nbsp;</th>&#39;;
}
echo&#39;
</tr>
</thead>
<div class="pagesection">
<div class="pagelinks floatleft">&#39;, $txt[&#39;pages&#39;], &#39;: &#39;, $context[&#39;page_index&#39;], &#39;</div>&#39;;
if (($context[&#39;user&#39;][&#39;is_logged&#39;]) && (!empty($modSettings[&#39;rft_menubuttons&#39;])))
echo&#39;
<div class="buttonlist floatright">
<ul>
<li><class="button_strip" href="&#39;, $scripturl, &#39;?action=profile;area=showposts"><span>&#39;, rtrim($txt[&#39;rft_show_all_posts&#39;],"."),&#39;</span></a></li>
<li><class="button_strip" href="&#39;, $scripturl, &#39;?action=unread"><span>&#39;, rtrim($txt[&#39;unread_since_visit&#39;],"."),&#39;</span></a></li>
<li><class="button_strip" href="&#39;, $scripturl, &#39;?action=unreadreplies"><span>&#39;, rtrim($txt[&#39;show_unread_replies&#39;],"."), &#39;</span></a></li>
</ul>
</div>
&#39;;
echo&#39;
</div>&#39;;
// The main thingy
foreach ($context[&#39;posts&#39;] as $post)
{
// Check for posts in topics where the user has posted in. (assuming they are logged in!)
if (!empty($modSettings[&#39;enableParticipation&#39;]) && $context[&#39;user&#39;][&#39;is_logged&#39;] && !empty($post[&#39;topic&#39;]))
if (in_array($post[&#39;topic&#39;], $context[&#39;posted_topics&#39;]))
$post[&#39;is_own_post&#39;] = true;
// Setup the icons (yeah i know scripting can better i&#39;m lazy)
$icon_postls = &#39;&#39;; // to be sure
// We start with hot and real hot topics uhm autch.
if ($post[&#39;is_hot&#39;] && $post[&#39;is_very_hot&#39;]) 
$icon_post1 = &#39;veryhot&#39;;
elseif ($post[&#39;is_hot&#39;])
$icon_post1 = &#39;hot&#39;;
else
$icon_post1 = &#39;normal&#39;;
// Poll posts...
if (!empty($post[&#39;is_poll&#39;]))
$icon_post2 $icon_post1 . &#39;_poll&#39;;
else
$icon_post2 $icon_post1 . &#39;_post&#39;;
// Next we start with locked and sticky topics.
if ($post[&#39;is_sticky&#39;] && $post[&#39;is_locked&#39;]) 
$color_class = &#39;stickybg locked_sticky&#39;;
// Sticky topics should get a different color, too.
elseif ($post[&#39;is_sticky&#39;]) {
$color_class = &#39;stickybg&#39;;
$icon_postls = &#39;_sticky&#39;;
}
// Locked topics get special treatment as well.
elseif ($post[&#39;is_locked&#39;]) {
$color_class = &#39;lockedbg&#39;;
$icon_postls = &#39;_locked&#39;;
}
// Almost last, but not least: regular topics.
else {
$color_class = &#39;windowbg&#39;;
$icon_post3 $icon_post2 $icon_postls;
}
// Some columns require a different shade of the color class.
$alternate_class $color_class . &#39;2&#39;;
if ($post[&#39;is_sticky&#39;] && $post[&#39;is_locked&#39;])
$icon_post3 $icon_post2 . &#39;_locked_sticky&#39;;
elseif ($post[&#39;is_sticky&#39;]) 
$icon_post3 $icon_post2 . &#39;_sticky&#39;;
elseif ($post[&#39;is_locked&#39;]) 
$icon_post3 $icon_post2 . &#39;_locked&#39;;
else
$icon_post3 $icon_post2;
// Set the icon for posted in topics.(is_own_post)
if ($post[&#39;is_own_post&#39;])
$icon_post3 = &#39;my_&#39; . $icon_post3;
// Check for solved topics.
if (!empty($modSettings[&#39;rft_topic_solved&#39;]) && (!empty($post[&#39;is_solved&#39;])))
$post[&#39;icon&#39;] = &#39;topicsolved&#39;;
// Template 
echo&#39;<tr>&#39;;
if ($modSettings[&#39;rft_firstcolumn&#39;] && $modSettings[&#39;rft_secondcolumn&#39;])
{
echo &#39;
<td class="icon1 &#39;, $color_class, &#39;">
<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/topic/&#39; . $icon_post3 . &#39;.gif" alt="" />
</td>
<td class="icon2 &#39;, $color_class, &#39;">
<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/post/&#39;, $post[&#39;icon&#39;], &#39;.gif" alt="" />
</td>&#39;;
}
if ($modSettings[&#39;rft_firstcolumn&#39;] && !$modSettings[&#39;rft_secondcolumn&#39;])
{
echo &#39;<td class="icon1 &#39;, $color_class, &#39;">
<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/topic/&#39; . $icon_post3 . &#39;.gif" alt="" />
</td>&#39;;
}
if (!$modSettings[&#39;rft_firstcolumn&#39;] && $modSettings[&#39;rft_secondcolumn&#39;])
{
echo&#39;<td class="icon2 &#39;, $color_class, &#39;">
<img src="&#39;, $settings[&#39;images_url&#39;], &#39;/post/&#39;, $post[&#39;icon&#39;], &#39;.gif" alt="" />
</td>&#39;;
}
echo &#39;<td class="subject &#39;, $alternate_class, &#39;">&#39;;

if (!empty($modSettings[&#39;rft_firstpostlinkicon&#39;]))
echo&#39;<a href="&#39; . $scripturl . &#39;?topic=&#39; . $post[&#39;topic&#39;] , &#39;.0"><img style="float:right; padding: 4px;" src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/first_post.gif" alt="&#39;, $txt[&#39;rft_first_post&#39;], &#39;" title="&#39;, $txt[&#39;rft_first_post&#39;], &#39;" /></a>&#39;;

// link to first or last topic message? 
if (!empty($modSettings[&#39;rft_link_topics&#39;]) && ($modSettings[&#39;rft_link_topics&#39;] == &#39;last&#39;))
echo&#39;&#39;, $post[&#39;is_sticky&#39;] ? &#39;<strong>&#39; : &#39;&#39;, &#39;<span>&#39;, $post[&#39;linklast&#39;],&#39;</span>&#39;, $post[&#39;is_sticky&#39;] ? &#39;</strong>&#39; : &#39;&#39;;

if (!empty($modSettings[&#39;rft_link_topics&#39;]) && ($modSettings[&#39;rft_link_topics&#39;] == &#39;first&#39;))
echo&#39;&#39;, $post[&#39;is_sticky&#39;] ? &#39;<strong>&#39; : &#39;&#39;, &#39;<span>&#39;, $post[&#39;linkfirst&#39;],&#39;</span>&#39;, $post[&#39;is_sticky&#39;] ? &#39;</strong>&#39; : &#39;&#39;;

// Is this post new? (assuming they are logged in!)
if ($post[&#39;new&#39;] && $context[&#39;user&#39;][&#39;is_logged&#39;])
echo &#39;
<a href="&#39;, $post[&#39;new_href&#39;], &#39;" /></a>&#39;;
echo&#39;
<p>&#39;, $txt[&#39;started_by&#39;], &#39; &#39;, $post[&#39;first_poster&#39;][&#39;link&#39;] ,&#39; &#39;, $txt[&#39;on&#39;], &#39; &#39;, $post[&#39;timelast&#39;],&#39; &#39;, $txt[&#39;in&#39;], &#39; &#39;, $post[&#39;board&#39;][&#39;link&#39;], &#39;</p>
</td>
<td class="stats &#39;, $color_class, &#39;">
&#39;, $post[&#39;replies&#39;], &#39; &#39;, $txt[&#39;replies&#39;], &#39;
<br />
&#39;, $post[&#39;views&#39;], &#39; &#39;, $txt[&#39;views&#39;], &#39;
</td>
<td class="lastpost &#39;, $alternate_class, &#39;">&#39;;

if (!empty($modSettings[&#39;rft_lastpostlinkicon&#39;]))
echo&#39;<a href="&#39;, $post[&#39;href&#39;], &#39;"><img src="&#39;, $settings[&#39;images_url&#39;], &#39;/icons/last_post.gif" alt="&#39;, $txt[&#39;last_post&#39;], &#39;" title="&#39;, $txt[&#39;last_post&#39;], &#39;" /></a>&#39;;
echo&#39;&#39;, $txt[&#39;by&#39;], &#39; &#39;, $post[&#39;poster&#39;][&#39;link&#39;], &#39; <br /> &#39;, $txt[&#39;on&#39;], &#39; &#39;, $post[&#39;timefirst&#39;], &#39;</span>
</td>
</tr>&#39;;
}
echo&#39;</table></div><br />&#39;;

if (!empty($modSettings[&#39;rft_postingicons&#39;]))
echo&#39;
<div id="posting_icons" class="floatleft">
<ul class="reset">&#39;, !empty($modSettings[&#39;enableParticipation&#39;]) && $context[&#39;user&#39;][&#39;is_logged&#39;] ? &#39;
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/my_normal_post.gif" alt="" align="middle" /> &#39; . $txt[&#39;participation_caption&#39;] . &#39;<br />&#39; : &#39;&#39;, &#39;</li>
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/normal_post.gif" alt="" align="middle" /> &#39; . $txt[&#39;normal_topic&#39;] . &#39;</li>
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/hot_post.gif" alt="" align="middle" /> &#39; . $txt[&#39;rft_Hot_Topic&#39;] . &#39;</li>
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/veryhot_post.gif" alt="" align="middle" /> &#39; . $txt[&#39;rft_Very_Hot_Topic&#39;] . &#39;</li>
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/icons/quick_lock.gif" alt="" align="middle" /> &#39; . $txt[&#39;locked_topic&#39;] . &#39;<br />&#39; . ($modSettings[&#39;enableStickyTopics&#39;] == &#39;1&#39; ? &#39;</li>
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/icons/quick_sticky.gif" alt="" align="middle" /> &#39; . $txt[&#39;sticky_topic&#39;] . &#39;<br />&#39; : &#39;&#39;) . ($modSettings[&#39;pollMode&#39;] == &#39;1&#39; ? &#39;</li>
<li class="floatleft"><img src="&#39; . $settings[&#39;images_url&#39;] . &#39;/topic/normal_poll.gif" alt="" align="middle" /> &#39; . $txt[&#39;poll&#39;] : &#39;&#39;) . &#39;</li>
</ul>
</div><span class="clear upperframe"></span>&#39;;

// fix/reload &#39;hook&#39; if collapse boards (for selecting more pages) 
if (($current_action = &#39;index&#39;) && (isset($_REQUEST[&#39;action&#39;]) && $_REQUEST[&#39;action&#39;] == &#39;collapse&#39;))
redirectexit(&#39;action=forum&#39;);
}

function 
template_rft_below()
{
// none, not using yet, maybe in future...
}

?>
« แก้ไขครั้งสุดท้าย: 23 มีนาคม 2022, 14:38:46 โดย minmono » บันทึกการเข้า

[ ขอคำแนะนำด้วยครับ ]
CONY
คนรักเสียว
*

พลังน้ำใจ: 17
ออฟไลน์ ออฟไลน์

กระทู้: 171



ดูรายละเอียด
« ตอบ #1 เมื่อ: 27 มีนาคม 2022, 02:30:27 »

ลองเคลียร์แคชดูครับ ในส่วนของ maintenance
บันทึกการเข้า
minmono
คนรักเสียว
*

พลังน้ำใจ: 0
ออฟไลน์ ออฟไลน์

กระทู้: 102



ดูรายละเอียด เว็บไซต์
« ตอบ #2 เมื่อ: 27 มีนาคม 2022, 15:36:19 »

ลองเคลียร์แคชดูครับ ในส่วนของ maintenance

ไปลองกดดูมา ผลคือไม่หายครับ Lips Sealed
บันทึกการเข้า

[ ขอคำแนะนำด้วยครับ ]
minmono
คนรักเสียว
*

พลังน้ำใจ: 0
ออฟไลน์ ออฟไลน์

กระทู้: 102



ดูรายละเอียด เว็บไซต์
« ตอบ #3 เมื่อ: 28 มีนาคม 2022, 13:07:59 »

แก้ได้ล่ะโดยไปเปลี่ยนค่า maxMsgID ที่อยู่บรรทัดถัดไปจากเดิม 100 เป็น 310
โค๊ด:
$query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
AND b.id_board != {int:recycle_board}
AND b.id_board != 9.0' : ''). '
AND m.id_msg >= {int:max_id_msg}';
$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 310 - $_REQUEST['start'] * 6);

ที่มาจากกระทู้ถามเรื่อง ssi_recentTopics
https://www.simplemachines.org...unity/index.php?topic=581586.0
บันทึกการเข้า

[ ขอคำแนะนำด้วยครับ ]
watyai
สมุนแก๊งเสียว
*

พลังน้ำใจ: 12
ออฟไลน์ ออฟไลน์

กระทู้: 600



ดูรายละเอียด เว็บไซต์
« ตอบ #4 เมื่อ: 02 เมษายน 2022, 19:21:40 »

ลองขยับไป phpBB ไหมครับ ไม่ต้อง mod โค้ด
เค้าแยก extension แยกโค้ด php html css ปรับง่ายกว่า
บันทึกการเข้า

Component Joomla สร้างฟอร์ม แค่ลากวาง มีใครทำเว็บขายของด้วย MooZiiCart กันบ้าง
หน้า: [1]   ขึ้นบน
พิมพ์