HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media


Welcome to TinyPortal. Please login or sign up.

May 30, 2023, 01:15:32 PM

Login with username, password and session length

Recent posts

Support / Re: Error Log Filled with Shou...
Last post by Michael Vail - February 10, 2023, 08:53:27 PM
Thank you @rjen. Much appreciated!
Support / Re: Error Log Filled Shoutbox ...
Last post by @rjen - February 10, 2023, 08:40:17 PM
It is caused by users that have the old TPShout Java script in their browser cache. It will stop once they have refreshed their browser cache or over time when the cache expires... nothing we can fix now...
Support / Error Log Filled with Shoutbox...
Last post by Michael Vail - February 10, 2023, 08:27:27 PM
Link to my forum:
SMF version: 2.1.3
TP version: TP ver. 2.3.0
Default Forum Language: English
Theme name and version: Default Curve
Browser Name and Version: Any
Mods installed: Will Provide if needed
Related Error messages: See Attached

A few days ago I upgraded three SMF 2.1.3 forums running Tinyportal from TP 2.2.2 to TP 2.3.0. The error log from one of the sites fills with 1000s of TPShout errors every day but everything seems to work. I uninstalled TP 2.3.0 from the site. Redownloaded th package and tried to reinstall it but there was no change.

I've attached an image showing the 6 recurring TPShout errors that keep getting logged. I couldnt fit all the errors on one page swithout shinking the page. You'll need to scroll it in your browser to see it better. If someone has time, I'd appreciate some ideas on how to resolve the errors.

Thank you!
Support / Re: Recent Topics Blocks
Last post by @rjen - February 10, 2023, 02:55:44 PM
I just looked up te change, and since this is a bit difficult to grasp I created attached overview.

The 'challenge' is that we use the standard SMF recentposts function
This is in SSI.php of your forum

// Find all the posts in distinct topics.  Newer ones will have higher IDs.
$request = $smcFunc['db_query']('substring', '
t.id_topic, b.id_board, AS board_name
FROM {db_prefix}topics AS t
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 = t.id_board)
WHERE t.id_last_msg >= {int:min_message_id}' . (empty($exclude_boards) ? '' : '
AND b.id_board NOT IN ({array_int:exclude_boards})') . '' . (empty($include_boards) ? '' : '
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 ' . $num_recent,
'include_boards' => empty($include_boards) ? '' : $include_boards,
'exclude_boards' => empty($exclude_boards) ? '' : $exclude_boards,
'min_message_id' => $modSettings['maxMsgID'] - (!empty($context['min_message_topics']) ? $context['min_message_topics'] : 35) * min($num_recent, 5),
'is_approved' => 1,

Now this function does some 'clever' things to reduce systemload.

1. It will NOT read all messages in the database
2. It uses the number of recent topics you want to see to determine How many of messages it reads.
As a result: the larger the number of topics you specify in the block, the larger the selection from the messages table will be.

Now SMF by default looks for an X number of messages times the number of topics you wish to show. This X number determines how far 'back'  the selection goes.

This results in the query only accessing a small section of your messages and not all...

Check attached image to indicate the % of the message table that is being searched, depening on the size of your forum (Column: 'total posts'), the number of recent topics you define in your block (column: RecentNum).

The column: 'messages read' shows how many messages are considered, the column 'percentage' indicates the percentage of all messages that is considered.

What does this mean:
if you choose a single board that has not been posted in for a long time, the messages in that board may not be selected and the block will show NO recent topics for that board.
Support / Re: Recent Topics Blocks
Last post by @rjen - February 10, 2023, 01:28:39 PM
No probs. Just to be sure (I briefly checked your site), make sure that the authorisations are correct: I you choose a board that is not accessible to guests, guests will also not see any recent topics in the block...
Support / Re: Recent Topics Blocks
Last post by Kokoro - February 10, 2023, 01:17:46 PM
Thank you!  I didn't even notice that there was an updated version!  You guys are awesome!
Support / Re: Recent Topics Blocks
Last post by @rjen - February 10, 2023, 06:25:38 AM
Well it does do that, but the recent topics functionality in SMF has a limit to the total number of topics it reads. The can result in the function showing less topics is you specify a less popular board and there are a lot of newer posts in other boards.

We included in fix for this in the latest TinyPortal version 2.3.0

Suggest you upgrade to that version...
Support / Recent Topics Blocks
Last post by Kokoro - February 10, 2023, 12:03:02 AM

Link to my forum:
SMF version: 2.1.3
TP version: 2.2.2
Default Forum Language: English
Theme name and version: Windows XP
Browser Name and Version: FireFox 109.0.1 (64-bit
Mods installed: Activity Bar (2.0.1), Avatars Display Integration (1.5.4), Board Sorting Method (1.0.1), Dice Roller BBcode (2.0), Discord Web Hooks (2.0.1), Discord Who's Online (1.0.1), Forum Width Setting (1.2), Login Menu Button (2.0), Members Online Today (1.0), Mod Version Checker (1.1), More Spiders (1.3.1), Post as Another Member (1.6), Recent Forum Topics Boardindex (1.2), SMF Post Prefix (4.1.0), SMFPacks Social Login (2.3.2), Similar Topics (1.2.2), Yet Another Spoiler Mod (1.2)
Related Error messages: N/A

Question with functionality.  I was under the impression that the Recent Topics block displayed all the recent topics IN THAT BOARD (if included) for the number of posts to include (say 5, it would list the most five recent topics in a specified board (say 75.0)

I've noticed that this is not the case though.  Would it be possible to make this functionality?

Thank you.
Support / Re: SMF Blocks Not Showing Und...
Last post by Michael Vail - February 07, 2023, 02:05:25 AM
I believe the issue is within this section if that helps. Sorry I couldn't figure it out on my own.

   if(($flag == 'E') && $show_events)
      if($show_events_to_guests || !$user_info['is_guest'])
         if (!empty($events))
            $events_printed = array();
            echo '<tr'. (isset($list_label_class) ? ' class="'.$list_label_class.'"' : '') .'><td colspan="7" class="smalltext" align="center" style="font-weight: bold;">'.$list_label_events.'</td></tr>';
            $ctr = 0;

            foreach ($events as $startdate => $evt_date)
               if (($startdate >= smf_strftime('%Y-%m-%d', $low_date_ts)) && ($startdate <= smf_strftime('%Y-%m-%d', $now + $modSettings['cal_days_for_index'] * 24 * 3600)))
                  foreach ($evt_date as $event)
                     if (!in_array($event['id'],$events_printed))
                        $events_printed[] = $event['id'];
                        $class_to_use = isset($list_entry_class) ? ( !is_array($list_entry_class) ? ' class="'.$list_entry_class.'"' : ' class="'.$list_entry_class[($ctr++) % count($list_entry_class)].'"') : '';

                        $evt_start = strtotime($event['start_date']);
                        $evt_end = strtotime($event['end_date']);
                        $text_start = !isset($month_nam['12']) ? date("M j",$evt_start) : substr($month_nam[smf_strftime('%m', $evt_start)],0,3) . date(" j",$evt_start);
                        $text_end = ($event['start_date'] == $event['end_date'] ? '' : '-'. (substr($event['start_date'],5,2) == substr($event['end_date'],5,2) ? date("j",$evt_end) : (!isset($month_nam['12']) ? date("M j",$evt_end) : substr($month_nam[smf_strftime('%m', $evt_start)],0,3) . date(" j",$evt_start))));

                        $link = $event['topic'] == 0 ? '<span class="'.$hilite_event_class.'">'. $event['title'] .'</span>' : '<a href="' . $scripturl . '?topic=' . $event['topic'] . '.0' . '"><span class="'.$hilite_event_class.'">' . $event['title'] . '</span></a>';

                        echo '<tr'.$class_to_use.'><td colspan="7" class="smalltext" style="padding: 0px 0px 0px 0px;" width="100%" align="'.$align_list_entries.'">';
                        echo '<a href="', $scripturl, '?action=calendar;year=' . date("Y") . ';month=' . substr($startdate,5,2) . '">' . $text_start . $text_end . ':</a> ';
                        echo  ( ($nowdate >= $event['start_date']) && ($event['end_date'] >= $nowdate) ) ? ''.$link.'' : $link;
                        echo '</td></tr>';
Support / Re: SMF Blocks Not Showing Und...
Last post by @rjen - February 06, 2023, 09:51:32 PM
That's a lot of code to dig through, maybe when I have some time, but not any time soon...