@Spuds
Tried to use the new block, and when try to add block, I get this:
An Error Has Occurred
syntax error, unexpected ':', expecting ')'
When look at the file, I find an error somewhere in here:
// Find all the posts in distinct topics. Newer ones will have higher IDs.
$request = $this->_db->query('substring', db_string: '
SELECT
mf.subject,
ml.id_msg, ml.id_topic, ml.id_member, ml.poster_time,
b.id_board, b.name AS bName,
t.num_replies, t.num_views, t.id_first_msg, t.id_last_msg,
COALESCE(mem.real_name, ml.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
COALESCE(lt.id_msg, lmr.id_msg, 0) >= ml.id_msg_modified AS is_read,
COALESCE(lt.id_msg, lmr.id_msg, -1) + 1 AS new_from') . ', mf.smileys_enabled, mf.icon, mg.online_color' .
$preview_bodies . '
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
INNER JOIN {db_prefix}messages AS ml ON (ml.id_msg = t.id_last_msg)
LEFT JOIN {db_prefix}boards AS b ON (b.id_board = mf.id_board)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = ml.id_member)' . (!$user_info['is_guest'] ? '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = t.id_topic AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:current_member})' : '') . '
LEFT JOIN {db_prefix}membergroups AS mg ON (mg.id_group = mem.id_group)
WHERE t.id_last_msg >= {int:likely_max_msg}
AND b.id_board = t.id_board' . ($boards === null ? '' : '
AND b.id_board IN ({array_int:include_boards})') . '
AND {query_wanna_see_board}' . ($modSettings['postmod_active'] ? '
AND t.approved = {int:is_approved}
AND ml.approved = {int:is_approved}' : '') . '
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
db_values: [
'current_member' => $user_info['id'],
'include_boards' => $boards,
'limit' => $limit,
'is_approved' => 1,
'likely_max_msg' => $modSettings['maxMsgID'] - 25 * min($limit, 5),
'preview_char' => $preview_char,
]
);