Skip to main content
Mod "Recent messages" in SMF and ElKarte Started by ksamochkin · · Read 3725 times 0 Members and 1 Guest are viewing this topic. previous topic - next topic

Mod "Recent messages" in SMF and ElKarte

Снимок экрана от 2022-12-04 03-11-39.png
Code: [Select]
// * dRecentTopics mod
require_once(‘SSI.php’);
$ssi_count_topics_left = 5; // The number of recent messages displayed in the left column
$ssi_count_topics_right = 5; // The number of recent messages displayed in the right column
$ssi_exclude_boards = array(); // Comma-separated list the ids of the sections, the latest messages from which are not displayed. For example, array (1, 2)
$ssi_include_boards = array(); // List, separated by commas, the ids of the sections, the latest messages from which to display. For example, array (1, 2). Works only for SMF2
$ssi_row_counter = 0;
$ssi_recentTopics = ssi_recentTopics($ssi_count_topics_left + $ssi_count_topics_right, $ssi_exclude_boards, ‘array’); //  SMF1
$ssi_recentTopics = ssi_recentTopics($ssi_count_topics_left + $ssi_count_topics_right, $ssi_exclude_boards, $ssi_include_boards, ‘array’); //  SMF2
echo ‘<table border=»0″ width=»100%»><tr><td>’;
foreach ($ssi_recentTopics as $ssi_recentTopic) {
$ssi_row_counter++;
echo ‘
[+’, $ssi_recentTopic[‘replies’], ‘] ‘, // Number of responses in the topic
$ssi_recentTopic[‘link’], // Link to the last message
!$ssi_recentTopic[‘new’] ? ‘<img src=»/Themes/default/images/russian/new.gif» />’ : », // Pin new
‘ | ‘, // Separator
$ssi_recentTopic[‘time’], // Date of last message
‘ | ‘, // Separator
$ssi_recentTopic[‘poster’][‘link’], // Link to the author of the last message
‘ | ‘, // Separator
$ssi_recentTopic[‘board’][‘link’], // Link to the section
‘<br />’;
if ($ssi_row_counter == $ssi_count_topics_left)
echo ‘</td><td>’;
}
echo ‘</td></tr></table>’;
// dRecentTopics mod *

Re: Mod "Recent messages" in SMF and ElKarte

Reply #1

SMF 1 ... going old school  :cheesy:

Although a different presentation then what you show, you can choose between recent topics or messages in ElkArtes info center as well.

Re: Mod "Recent messages" in SMF and ElKarte

Reply #2

You will laugh, but a lot of people use version 1
Quote from: Spuds – you can choose between recent topics or messages in ElkArtes info center as well.
this option is much more informative

Quote from: Spuds – Although a different presentation then what you show,
yes, I have also upgraded for myself )