Uutiset:

Wondering if this will always be free?  See why free is better.

Main Menu
Advertisement:

board immune to recent posts

Aloittaja fugiFox, helmikuu 10, 2005, 12:01:20 IP

« edellinen - seuraava »

fugiFox

How can i create a board (testing board)
where i can do tests without these messages autonatically being posted in the recent ones?

Oldiesmann

#1
First, create that board, and make a note of the board ID.

Sources/Recent.php

Find
$request = db_query("
SELECT ml.posterTime, ml.subject, ml.ID_TOPIC, ml.posterName, ml.body, ml.smileysEnabled
FROM {$db_prefix}boards AS b, {$db_prefix}messages AS ml
WHERE ml.ID_MSG = b.ID_LAST_MSG" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
ORDER BY b.lastUpdated DESC
LIMIT 1", __FILE__, __LINE__);


Replace
$request = db_query("
SELECT ml.posterTime, ml.subject, ml.ID_TOPIC, ml.posterName, ml.body, ml.smileysEnabled
FROM {$db_prefix}boards AS b, {$db_prefix}messages AS ml
WHERE ml.ID_MSG = b.ID_LAST_MSG" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND b.ID_BOARD != '{test_board_id}'
AND $user_info[query_see_board]
ORDER BY b.lastUpdated DESC
LIMIT 1", __FILE__, __LINE__);


Find
// Find the 10 most recent messages they can *view*.
$request = db_query("
SELECT m.ID_MSG
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE b.ID_BOARD = m.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT 10", __FILE__, __LINE__);


Replace
// Find the 10 most recent messages they can *view*.
$request = db_query("
SELECT m.ID_MSG
FROM {$db_prefix}messages AS m, {$db_prefix}boards AS b
WHERE b.ID_BOARD = m.ID_BOARD" . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? "
AND b.ID_BOARD != $modSettings[recycle_board]" : '') . "
AND b.ID_BOARD != '{test_board_id}'
AND $user_info[query_see_board]
ORDER BY m.ID_MSG DESC
LIMIT 10", __FILE__, __LINE__);


Just replace {test_board_id} with the ID of that board.
Michael Eshom
Christian Metal Fans

Advertisement: