collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 342
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

NEED HELP? If you're looking for support with Simple Portal, look no further than the Support Board!

Author Topic: Show Message Icons in Recent Post/Thread Block  (Read 16182 times)

0 Members and 1 Guest are viewing this topic.

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Show Message Icons in Recent Post/Thread Block
« on: February 25, 2014, 11:30:18 PM »
When you go to the detailed option, the recent posts/topics shows this icon: - What I'd like to do is change it so that it shows the message icon (eg, this topic's message icon is the exclamation point)

Is that possible?

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #1 on: March 06, 2014, 06:25:36 AM »
Yes, it is possible. Someone here wrote this code, you can put it into a new PHP-Block:

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 10);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, m.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.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:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="3" width="100%">
';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 12px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div>
</td>
</tr>';
echo '
</table></div>';

It looks very nice; you can change how many posts you would like to see and also the font, size or anything else.

I am sorry for my englisch, it's very poor. ;-)


Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #2 on: March 06, 2014, 06:49:11 AM »
When you go to the detailed option

Sorry... first I did not understand, that you only want to change the icon.

But there ist another code, that I have changed a little, it is also to be put into a new PHP-Block:

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, m.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.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:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<b><a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a></b>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="0" width="100%">
<tr class="catbg">

</tr>
<tr>
<td style="padding: 5px;">
</td>';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 12px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div><div style="font-size: 9px;">von ', $post['poster']['link'], ' im Board ', $post['board']['link'], ' | ', $post['time'], '
<div style="font-size: 10px;">
<i>Klicks: ', $post['views'], ' | Antworten: ', $post['replies'], '</i></font>
</td>
</tr>';
echo '
</table></div>';
« Last Edit: March 06, 2014, 06:53:48 AM by Schnuffeltier »

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #3 on: March 06, 2014, 08:49:29 PM »
Thank you so much!
And, no, the first code is exactly what I wanted! I prefer the simple listing of topics rather than the detailed information - I just wanted the image too :D

You're English is great, too :)

Thank you for your help!

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #4 on: March 06, 2014, 10:51:04 PM »
Question:

Is it possible to have it only draw the topic starter icon, and not the icon of the following posts?

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #5 on: March 07, 2014, 08:41:50 AM »
Quote
You're English is great, too
Thank you for your help!

You are welcome. It is very hard to me to write in english, I think there are a lot of mistakes, so I am very glad that you understood my posts. ;-)

Quote
Is it possible to have it only draw the topic starter icon, and not the icon of the following posts?

I have tried to do this, but I can not figure it out. Unfortunately I do not know much about all this stuff. ;-)

I would be very interessted, too, if there is a possiblity to show the topic icon.

These codes show "last posts subjects, last posts icons and Re:", there should be a nice one with "last active topics subjects and the topic icons, without any Re:".

The last posts stick together wih their icons, I cannot seperate them and change the post icon into the topic icon.

But maybe someone else here can show us how it works. Would be great!
« Last Edit: March 07, 2014, 10:00:31 AM by Schnuffeltier »

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #6 on: March 07, 2014, 10:48:07 AM »
Oh! I can help with removing the 're'! I got rid of it in mine :D You want to:

Code: (FIND) [Select]
censorText($row['subject']);
censorText($row['body']);

Code: (ADD BEFORE) [Select]
$row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Show Message Icons in Recent Post/Thread Block
« Reply #7 on: March 11, 2014, 03:38:48 PM »
Congratulations, Fireditto and Schnuffeltier,

Together you have figured out how to get some custom coding done and improve both of your web sites.

I will mark this topic "solved" to get it off the "support radar".  If this is not correct, please mark it "not solved"
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #8 on: March 11, 2014, 09:15:39 PM »
Thanks!

It isn't solved though; we are still looking to change it so that instead of retrieving the Post Icon of the latest post, it only retrieved the Post Icon of the Topic Starter post.

If anyone knows how to do this, that's be fantastic.

Offline Cal

  • Semi Newbie
  • *
  • Posts: 15
  • Gender: Female
    • Seiryuu RPG Resources
  • SMF Version: 2.0.2
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #9 on: March 21, 2014, 10:49:51 AM »
In order to grab just the first topic icon, you have to add some lines to the SQL query so it grabs two message IDs -- id_first_post (for the icon) and id_last_post (for everything else).  This is the code from the first post, with the query edited to pull the starter icon and not the recent icon:

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 10);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.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:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="3" width="100%">
';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 12px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div>
</td>
</tr>';
echo '
</table></div>';



Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #10 on: March 21, 2014, 12:31:58 PM »
Thank you very much, Cal and FireDitto!

I have tried it in the more detailed version and it works perfekt and looks very nice.

I am really glad now!

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 20);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.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:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
                  $row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="0" width="100%">
<tr class="catbg">

</tr>
<tr>
<td style="padding: 5px;">
</td> ';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 12px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div><div style="font-size: 10px;">von ', $post['poster']['link'], ' in ', $post['board']['link'], ' </br> ', $post['time'], '

| Klicks: ', $post['views'], ' | Antworten: ', $post['replies'], '</font><hr>
</td>
</tr>';
echo '
</table></div>';

« Last Edit: March 22, 2014, 05:40:37 AM by Schnuffeltier »

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #11 on: March 21, 2014, 10:58:40 PM »
Thank you very much, Cal! :)

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #12 on: March 22, 2014, 01:18:34 AM »
@Cal - It doesn't seem to include the Poster, or the Post Time any more...

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #13 on: March 22, 2014, 04:25:29 AM »
FireDitto, you can include this, the way you would like it, as I did it in the code-box above. I added a screenshot, have a look there.

I added board, time, poster, etc. in this lines:

Code: [Select]
<td valign="middle" width="%100">
<div style="font-size: 12px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div><div style="font-size: 10px;">von ', $post['poster']['link'], ' in ', $post['board']['link'], ' </br> ', $post['time'], '

| Klicks: ', $post['views'], ' | Antworten: ', $post['replies'], '</font><hr>
</td>
« Last Edit: March 22, 2014, 05:39:16 AM by Schnuffeltier »

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #14 on: March 22, 2014, 04:49:29 AM »
This one don't show the boards and other details - just the icon, subject, poster and time:

Code: [Select]
global $context, $settings, $scripturl, $txt;
global $user_info, $modSettings, $smcFunc, $posts;
global $color_profile;

$exclude_boards = null;
$num_recent = !empty($parameters[0]) ? $parameters[0] :  (isset($_GET['limit']) ? (int) $_GET['limit'] : 10);

if ($exclude_boards === null && !empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0)
$exclude_boards = array($modSettings['recycle_board']);
else
$exclude_boards = empty($exclude_boards) ? array() : $exclude_boards;

$stable_icons = array('xx', 'thumbup', 'thumbdown', 'exclamation', 'question', 'lamp', 'smiley', 'angry', 'cheesy', 'grin', 'sad', 'wink', 'moved', 'recycled', 'wireless');
$icon_sources = array();
foreach ($stable_icons as $icon)
$icon_sources[$icon] = 'images_url';

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('','
SELECT
m.poster_time, ms.subject, m.id_topic, m.id_member, m.id_msg, b.id_board, t.num_replies, t.num_views, b.name AS bName,
IFNULL(mem.real_name, m.poster_name) AS poster_name, ' . ($user_info['is_guest'] ? '1 AS is_read, 0 AS new_from' : '
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, 0)) >= m.id_msg_modified AS is_read,
IFNULL(lt.id_msg, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from') . ', LEFT(m.body, 384) AS body, m.smileys_enabled, mf.icon
FROM ({db_prefix}messages AS m, {db_prefix}topics AS t, {db_prefix}boards AS b, {db_prefix}messages AS ms)
INNER JOIN {db_prefix}messages AS mf ON (mf.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem ON (mem.id_member = m.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:id_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = b.id_board AND lmr.id_member = {int:id_member})' : '') . '
WHERE t.ID_LAST_MSG >= ' . ($modSettings['maxMsgID'] - 35 * min($num_recent, 5)) . '
AND t.id_last_msg = m.id_msg
AND b.id_board = t.id_board' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})'). '
AND {raw:query_see_board}
AND ms.id_msg = t.id_last_msg
ORDER BY t.id_last_msg DESC
LIMIT {int:limit}',
array(
'id_member' => $user_info['id'],
'exclude_boards' => $exclude_boards,
'query_see_board' => $user_info['query_wanna_see_board'],
'limit' => (int) $num_recent,
)
);
$posts = array();
$colorids = array();
while ($row = $smcFunc['db_fetch_assoc']($request))
{
$row['body'] = strip_tags(strtr(parse_bbc($row['body'], $row['smileys_enabled'], $row['id_msg']), array('<br />' => '')));
if ($smcFunc['strlen']($row['body']) > 128)
$row['body'] = $smcFunc['substr']($row['body'], 0, 128) . '...';

// Censor the subject.
                  $row['subject'] = preg_replace('/^' . preg_quote($txt['response_prefix']) . '/', '', $row['subject']);
censorText($row['subject']);
censorText($row['body']);

//Collect the color ids :)
$colorids[$row['id_member']] = $row['id_member'];

if (empty($modSettings['messageIconChecks_disable']) && !isset($icon_sources[$row['icon']]))
$icon_sources[$row['icon']] = file_exists($settings['theme_dir'] . '/images/post/' . $row['icon'] . '.gif') ? 'images_url' : 'default_images_url';

// Build the array.
$posts[] = array(
'board' => array(
'id' => $row['id_board'],
'name' => $row['bName'],
'href' => $scripturl . '?board=' . $row['id_board'] . '.0',
'link' => '<a href="' . $scripturl . '?board=' . $row['id_board'] . '.0">' . $row['bName'] . '</a>'
),
'topic' => $row['id_topic'],
'poster' => array(
'id' => $row['id_member'],
'name' => $row['poster_name'],
'href' => empty($row['id_member']) ? '' : $scripturl . '?action=profile;u=' . $row['id_member'],
'link' => empty($row['id_member']) ? $row['poster_name'] : '<a href="' . $scripturl . '?action=profile;u=' . $row['id_member'] . '">' . $row['poster_name'] . '</a>'
),
'subject' => $row['subject'],
'short_subject' => shorten_subject($row['subject'], 25),
'preview' => $row['body'],
'time' => timeformat($row['poster_time']),
'timestamp' => forum_time(true, $row['poster_time']),
'href' => $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . ';topicseen#new',
'link' => '<a href="' . $scripturl . '?topic=' . $row['id_topic'] . '.msg' . $row['id_msg'] . '#new">' . $row['subject'] . '</a>',
'new' => !empty($row['is_read']),
'new_from' => $row['new_from'],
'icon' => '<img src="' . $settings[$icon_sources[$row['icon']]] . '/post/' . $row['icon'] . '.gif" align="middle" alt="' . $row['icon'] . '" border="0" />',
'views' => $row['num_views'],
'replies' => $row['num_replies'],
);
}
$smcFunc['db_free_result']($request);

// Load recent topic posts colors =)
if(!empty($colorids) && sp_loadColors($colorids) !== false)
foreach($posts as $k => $p)
if(!empty($color_profile[$p['poster']['id']]['link']))
$posts[$k]['poster']['link'] = $color_profile[$p['poster']['id']]['link'];

$context['recent_topics']=$posts;

// Just return it.
if (empty($posts))
return $posts;

echo '
<div class="tborder">
<table cellspacing="0" width="100%">
<tr class="catbg">

</tr>
<tr>
<td style="padding: 5px;">
</td> ';
foreach ($posts as $post)
echo '
<tr>
<td align="center" valign="middle" nowrap="nowrap">
', $post['icon'], '
</td>
<td valign="middle" width="%100">
<div style="font-size: 12px;"><b>
<a href="', $post['href'], '">', $post['subject'], '</a>
', $post['new'] ? '' : '<a href="' . $scripturl . '?topic=' . $post['topic'] . '.msg' . $post['new_from'] . ';topicseen#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt['new'] . '" border="0" /></a>', '</b></div><div style="font-size: 10px;">von ', $post['poster']['link'], ' ', $post['time'], '

</font><hr>
</td>
</tr>';
echo '
</table></div>';

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #15 on: March 26, 2014, 12:09:41 PM »
Thank you!

Got it working just how I want it now :)

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #16 on: April 25, 2014, 10:29:56 AM »
Are you using this code for members and guests?

In my forum it works perfect, if you are logged in. Members see just those posts, they are allowed to see.

But it don't works perfect for guests. Both - guests and members - should always see 20 recent posts - but guests can only see 6 oder 8 posts, it differs a liittle.

Guests should see some other posts, maybe older ones, because they have no permission to enter every board. But guests should not see less posts than members do.

It's strange...

I have tried it with two blocks, one for members and one for guests - but it was just the same.

Offline FireDitto

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Female
    • Second Pass Weyr
  • SMF Version: 2.0.11
  • SP Version: 2.3.5
  • Elkarte Version: None
Re: Show Message Icons in Recent Post/Thread Block
« Reply #17 on: April 25, 2014, 10:33:55 AM »
From what I've seen, the block will only hold literally RECENT posts; after a time period has passed, messages vanish from the listing. Idk how or where to change this, it's just something I've noticed.

Offline Schnuffeltier

  • Semi Newbie
  • *
  • Posts: 19
  • Gender: Female
  • SMF Version: 2.0.7
  • SP Version: 2.3.5
Re: Show Message Icons in Recent Post/Thread Block
« Reply #18 on: April 25, 2014, 11:39:04 AM »
Quote
...after a time period has passed, messages vanish from the listing

But this happens only if you are logged out?
Members can still see every post, they should?

I think, there is a basic mistake in this code....it is hard to explain my thoughts in English:

For example, if you go to this link in forum http://simpleportal.net/index.php?action=recent you will see 10 pages with posts if you are logged in. As a guest, you will see 10 pages as well, but only those posts on the first page, pages 2 - 10 are empty.

Maybe this could be a reason, why this block-code don't work proper for guests?

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Show Message Icons in Recent Post/Thread Block
« Reply #19 on: April 28, 2014, 02:10:48 PM »
The SimplePortal recent post / topic block uses SMF's SSI recent posts and recent topics functions.

If
1) You display recent posts/topics from only SOME boards and
2) These boards are much less active than the rest of the forum,

You will often see fewer posts than you want to see in recent posts and topics.
This is because, to save CPU use, the SSI function only searches back a small number of posts --  (125 or 175)
If you search in SSI.php, you will find
Code: [Select]
* min($num_recent, 5)And you will find this in two places -- ssi_recentPosts and ssi_recentTopics

In the most recent version of SMF, the number before the "*" is a 25 in recentPosts and 35 in recentTopics.
If you are not getting enough posts in your recentposts/topics block, you can raise this number.  Depending on your forum, you might use 50 in both cases, or 100.  It all depends on your forum.

When you make this change in SSI.php, you will wind up with something like the following:
Code: [Select]
'min_message_id' => $modSettings['maxMsgID'] - 50 * min($num_recent, 5),
---------
When you look at  http://simpleportal.net/index.php?action=recent, you are seeing the results of a COMPLETELY different section of SMF code.  When I do this as guest, I see all 10 pages here at simpleportal.net.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?