Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4174)
FILTER MESSAGES BY POSTER v1.4
By Dougiefresh (http://www.simplemachines.org/community/index.php?action=profile;u=253913) -> Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=4174)
IntroductionThis mod allows the user to restrict the displaying of messages by any poster by using the filter icon in the poster area in the messages display. The filtering can be stopped using the unfilter icon in the poster area in the messages display (or using the back button, naturally).
Admin SettingsThere are no admin settings. To disable it, you must remove this mod.
Compatibility NotesThis mod was tested on SMF 2.0.15 and SMF 2.1 RC2, but should work on SMF 2.0 and up. SMF 2.1 Beta 1, SMF 2.1 Beta 2, and SMF 1.x is not and will not be supported.
Related Discussiono Toggle replies to show OP replies only (https://www.simplemachines.org/community/index.php?topic=559341.0)
ChangelogThe changelog can be viewed at XPtsp.com (http://www.xptsp.com/board/free-modifications/filter-messages-by-poster/?tab=1).
LicenseCopyright (c) 2018 - 2019, Douglas Orend
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Great contribution, as always :D. I leave the translation to Latin Spanish!
Regards!
Uploaded v1.1 - May 21st, 2018
o Added support for SMF 2.1 Beta 3.
o Added Spanish Latin translation, courtsey of Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597).
@Rock Lee: Thank you for the translation! It's been included in this version!
What a great feature addition. Thanks very muchly Dougie :)
Russian translation
Uploaded v1.2 - October 15th, 2018
o No functionality change.
o Updated documentation to point to new website.
o Added Russian translation, courtsey of digger (https://www.simplemachines.org/community/index.php?action=profile;u=97557)!
PT-BR translate AGAIN :D
Uploaded v1.3 - October 18th, 2018
o Added Brazilian Portugese translation, courtsey of ORIONzitos (https://www.simplemachines.org/community/index.php?action=profile;u=598068)!
@ORIONzitos: Thanks for the translation! It's been included in this version!
Does this replace / include the functionality of the Show only OP replies mod you previously created?
Quote from: landyvlad on October 21, 2018, 09:05:12 PM
Does this replace / include the functionality of the Show only OP replies mod you previously created?
It replaces that mod. Somehow it evolved into the mod it is now.....
For an idea how/why it changed, please read the Toggle replies to show OP replies only (https://www.simplemachines.org/community/index.php?topic=559341.0) thread. It'll give you a better idea why/how it changed.....
Cool, cheers dougie.
Uploaded v1.4 - May 22nd, 2018o Added support for SMF 2.1 RC2.
o Removed support for SMF 2.1 Beta 3.
o Fixed line of code to make sure element is set before checking it's value.
o SMF 2.1: Added new query to get number of posters when member ID not specified.
@Everybody: In SMF 2.1 RC2, I came upon a strange error message. It was:
QuoteMixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
File: D:\Website\clean21\Sources\Display.php
Line: 177
It referenced this query, with the offending line in bold (and arrow before it):
Quote$request = $smcFunc['db_query']('', '
SELECT
' . (isset($_GET['member']) ? 'COUNT(msgs.id_msg) AS ' : 't.') . 'num_replies, t.num_views, t.locked, ms.subject, t.is_sticky, t.id_poll,
t.id_member_started, t.id_first_msg, t.id_last_msg, t.approved, t.unapproved_posts, t.id_redirect_topic,
COALESCE(mem.real_name, ms.poster_name) AS topic_started_name, ms.poster_time AS topic_started_time,
' . ($user_info['is_guest'] ? 't.id_last_msg + 1' : 'COALESCE(lt.id_msg, lmr.id_msg, -1) + 1') . ' AS new_from
' . (!empty($board_info['recycle']) ? ', id_previous_board, id_previous_topic' : '') . '
' . (!empty($topic_selects) ? (', ' . implode(', ', $topic_selects)) : '') . '
' . (!$user_info['is_guest'] ? ', COALESCE(lt.unwatched, 0) as unwatched' : '') . ',
--> COUNT(DISTINCT msgs.id_member) AS num_posters
FROM {db_prefix}topics AS t
INNER JOIN {db_prefix}messages AS msgs ON (msgs.id_topic = t.id_topic' . (isset($_GET['member']) ? ' AND msgs.id_member = {int:filter_by}' : '') . ')
INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)
LEFT JOIN {db_prefix}members AS mem on (mem.id_member = t.id_member_started)' . ($user_info['is_guest'] ? '' : '
LEFT JOIN {db_prefix}log_topics AS lt ON (lt.id_topic = {int:current_topic} AND lt.id_member = {int:current_member})
LEFT JOIN {db_prefix}log_mark_read AS lmr ON (lmr.id_board = {int:current_board} AND lmr.id_member = {int:current_member})') . '
' . (!empty($topic_tables) ? implode("\n\t", $topic_tables) : '') . '
WHERE t.id_topic = {int:current_topic}
LIMIT 1',
$topic_parameters
);
The only way I could get rid of this irritating error message was to seperate the query getting the topic information from the query getting the number of posters in that topic. If you know of a way to merge the queries back together without triggering that error message, please drop me a line. Thanks for assisting!
There is no member parameter in link to all pages.
Display.php
$context['page_index'] .= ' <a href="' . $scripturl . '?topic=' . $topic . '.0;all">' . $txt['all'] . '</a> ';
should be replaced with
$context['page_index'] .= ' <a href="' . $scripturl . '?topic=' . $topic . '.0;all' . (isset($_GET['member']) ? ';member=' . $_GET['member'] : ''). '">' . $txt['all'] . '</a> ';
This MOD has more issues.
Below was on SMF2.1
Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause
File: xxxxxx/public_html/test2/Sources/Display.php
Line: 157
@rjen what version of MySQL/Maria?
mysqlnd 5.0.12-dev - 20150407
No, the actual server version.
Quote from: Arantor on June 22, 2020, 08:19:44 AM
No, the actual server version.
Just curious: where do I find that?
php-info does not provide more than what I gave you....
The SMF admin panel should give you that. As would phpmyadmin.
mysqlnd is just the version of the PHP-MySQL connector.
I believe it is MariaDB 10.1