From a3403d6f2388366008a140c24969ae7097c54e09 Mon Sep 17 00:00:00 2001 From: Tino Zeidler Date: Thu, 15 Feb 2024 12:48:19 +0100 Subject: [PATCH 1/4] added thread subject to post reports --- UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php | 2 +- UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php | 2 +- UPLOAD/inc/languages/english/reporttothread.lang.php | 2 +- UPLOAD/inc/plugins/reporttothread.php | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php b/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php index 3ef41da..5498538 100644 --- a/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php +++ b/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php @@ -49,7 +49,7 @@ $l['reporttothread_type_reputation'] = "Bewertung"; $l['reporttothread_type_privatemessage'] = "Private Nachricht"; -$l['reporttothread_subject'] = "{1} gemeldet von {2}"; +$l['reporttothread_subject'] = "{1} in \"{3}\" gemeldet von {2}"; $l['reporttothread_comment'] = "Nutzer {1} hat dazu kommentiert: {2}"; $l['reporttothread_message_post'] = "[b]{1} hat einen {2} gemeldet.[/b] diff --git a/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php b/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php index 44629bb..9da7fae 100644 --- a/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php +++ b/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php @@ -49,7 +49,7 @@ $l['reporttothread_type_reputation'] = "Bewertung"; $l['reporttothread_type_privatemessage'] = "Private Nachricht"; -$l['reporttothread_subject'] = "{1} gemeldet von {2}"; +$l['reporttothread_subject'] = "{1} in \"{3}\" gemeldet von {2}"; $l['reporttothread_comment'] = "Nutzer {1} hat dazu kommentiert: {2}"; $l['reporttothread_message_post'] = "[b]{1} hat einen {2} gemeldet.[/b] diff --git a/UPLOAD/inc/languages/english/reporttothread.lang.php b/UPLOAD/inc/languages/english/reporttothread.lang.php index 77f30b2..bbac31e 100644 --- a/UPLOAD/inc/languages/english/reporttothread.lang.php +++ b/UPLOAD/inc/languages/english/reporttothread.lang.php @@ -49,7 +49,7 @@ $l['reporttothread_type_reputation'] = "reputation"; $l['reporttothread_type_privatemessage'] = "private message"; -$l['reporttothread_subject'] = "Reported {1} by {2}"; +$l['reporttothread_subject'] = "Reported {1} in \"{3}}\" by {2}"; $l['reporttothread_comment'] = "User {1} has commented: {2}"; $l['reporttothread_message_post'] = "[b]{1} has reported a {2}.[/b] diff --git a/UPLOAD/inc/plugins/reporttothread.php b/UPLOAD/inc/plugins/reporttothread.php index d80b280..bdd2a4d 100644 --- a/UPLOAD/inc/plugins/reporttothread.php +++ b/UPLOAD/inc/plugins/reporttothread.php @@ -411,8 +411,7 @@ function reporttothread_run() break; } - $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username']); - + $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username'], $post['subject']); $find_tid = reporttothread_search_tid($reported_id, $report_type); if ($find_tid) { From e59c980163b2c6ae3fc0ac8da7d1b8b05dd668ba Mon Sep 17 00:00:00 2001 From: Tino Zeidler Date: Thu, 15 Feb 2024 13:01:04 +0100 Subject: [PATCH 2/4] removed quotation marks in language file --- UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php | 2 +- UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php | 2 +- UPLOAD/inc/languages/english/reporttothread.lang.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php b/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php index 5498538..79dcc5d 100644 --- a/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php +++ b/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php @@ -49,7 +49,7 @@ $l['reporttothread_type_reputation'] = "Bewertung"; $l['reporttothread_type_privatemessage'] = "Private Nachricht"; -$l['reporttothread_subject'] = "{1} in \"{3}\" gemeldet von {2}"; +$l['reporttothread_subject'] = "{1} in {3} gemeldet von {2}"; $l['reporttothread_comment'] = "Nutzer {1} hat dazu kommentiert: {2}"; $l['reporttothread_message_post'] = "[b]{1} hat einen {2} gemeldet.[/b] diff --git a/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php b/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php index 9da7fae..d3b3228 100644 --- a/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php +++ b/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php @@ -49,7 +49,7 @@ $l['reporttothread_type_reputation'] = "Bewertung"; $l['reporttothread_type_privatemessage'] = "Private Nachricht"; -$l['reporttothread_subject'] = "{1} in \"{3}\" gemeldet von {2}"; +$l['reporttothread_subject'] = "{1} in {3} gemeldet von {2}"; $l['reporttothread_comment'] = "Nutzer {1} hat dazu kommentiert: {2}"; $l['reporttothread_message_post'] = "[b]{1} hat einen {2} gemeldet.[/b] diff --git a/UPLOAD/inc/languages/english/reporttothread.lang.php b/UPLOAD/inc/languages/english/reporttothread.lang.php index bbac31e..7e6d07f 100644 --- a/UPLOAD/inc/languages/english/reporttothread.lang.php +++ b/UPLOAD/inc/languages/english/reporttothread.lang.php @@ -49,7 +49,7 @@ $l['reporttothread_type_reputation'] = "reputation"; $l['reporttothread_type_privatemessage'] = "private message"; -$l['reporttothread_subject'] = "Reported {1} in \"{3}}\" by {2}"; +$l['reporttothread_subject'] = "Reported {1} in {3}} by {2}"; $l['reporttothread_comment'] = "User {1} has commented: {2}"; $l['reporttothread_message_post'] = "[b]{1} has reported a {2}.[/b] From ee80e4b524a401faac0700621b60bc74a1bf9108 Mon Sep 17 00:00:00 2001 From: Tino Zeidler Date: Thu, 15 Feb 2024 19:22:51 +0100 Subject: [PATCH 3/4] added thread title, moved post title to pos 4 --- UPLOAD/inc/plugins/reporttothread.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UPLOAD/inc/plugins/reporttothread.php b/UPLOAD/inc/plugins/reporttothread.php index bdd2a4d..f6350e1 100644 --- a/UPLOAD/inc/plugins/reporttothread.php +++ b/UPLOAD/inc/plugins/reporttothread.php @@ -411,7 +411,7 @@ function reporttothread_run() break; } - $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username'], $post['subject']); + $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username'], $thread['subject'], $post['subject']); $find_tid = reporttothread_search_tid($reported_id, $report_type); if ($find_tid) { From ce61e1524e2032d63cf8f3b9ada57620cae53b5d Mon Sep 17 00:00:00 2001 From: Tino Zeidler Date: Fri, 16 Feb 2024 09:48:31 +0100 Subject: [PATCH 4/4] splittet report messages for profiles and post from the rest to get a nicer overview with more information in thread title --- UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php | 5 ++++- UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php | 5 ++++- UPLOAD/inc/languages/english/reporttothread.lang.php | 5 ++++- UPLOAD/inc/plugins/reporttothread.php | 8 ++++++-- 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php b/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php index 79dcc5d..4562608 100644 --- a/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php +++ b/UPLOAD/inc/languages/deutsch_du/reporttothread.lang.php @@ -49,7 +49,10 @@ $l['reporttothread_type_reputation'] = "Bewertung"; $l['reporttothread_type_privatemessage'] = "Private Nachricht"; -$l['reporttothread_subject'] = "{1} in {3} gemeldet von {2}"; +$l['reporttothread_subject_post'] = "{1} in {3} gemeldet von {2}"; +$l['reporttothread_subject_profile'] = "{1} {3} gemeldet von {2}"; + +$l['reporttothread_subject'] = "{1} gemeldet von {2}"; $l['reporttothread_comment'] = "Nutzer {1} hat dazu kommentiert: {2}"; $l['reporttothread_message_post'] = "[b]{1} hat einen {2} gemeldet.[/b] diff --git a/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php b/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php index d3b3228..8c88071 100644 --- a/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php +++ b/UPLOAD/inc/languages/deutsch_sie/reporttothread.lang.php @@ -49,7 +49,10 @@ $l['reporttothread_type_reputation'] = "Bewertung"; $l['reporttothread_type_privatemessage'] = "Private Nachricht"; -$l['reporttothread_subject'] = "{1} in {3} gemeldet von {2}"; +$l['reporttothread_subject_post'] = "{1} in {3} gemeldet von {2}"; +$l['reporttothread_subject_profile'] = "{1} {3} gemeldet von {2}"; + +$l['reporttothread_subject'] = "{1} gemeldet von {2}"; $l['reporttothread_comment'] = "Nutzer {1} hat dazu kommentiert: {2}"; $l['reporttothread_message_post'] = "[b]{1} hat einen {2} gemeldet.[/b] diff --git a/UPLOAD/inc/languages/english/reporttothread.lang.php b/UPLOAD/inc/languages/english/reporttothread.lang.php index 7e6d07f..96cf413 100644 --- a/UPLOAD/inc/languages/english/reporttothread.lang.php +++ b/UPLOAD/inc/languages/english/reporttothread.lang.php @@ -49,7 +49,10 @@ $l['reporttothread_type_reputation'] = "reputation"; $l['reporttothread_type_privatemessage'] = "private message"; -$l['reporttothread_subject'] = "Reported {1} in {3}} by {2}"; +$l['reporttothread_subject_post'] = "Reported {1} in {3} by {2}"; +$l['reporttothread_subject_profile'] = "Reported {1} {3} by {2}"; + +$l['reporttothread_subject'] = "Reported {1} by {2}"; $l['reporttothread_comment'] = "User {1} has commented: {2}"; $l['reporttothread_message_post'] = "[b]{1} has reported a {2}.[/b] diff --git a/UPLOAD/inc/plugins/reporttothread.php b/UPLOAD/inc/plugins/reporttothread.php index f6350e1..5201ee7 100644 --- a/UPLOAD/inc/plugins/reporttothread.php +++ b/UPLOAD/inc/plugins/reporttothread.php @@ -113,7 +113,7 @@ function reporttothread_install() 'modcp' => array( 'optionscode' => 'yesno', 'value' => 1 - ) + ), ); $disporder = 0; @@ -351,6 +351,7 @@ function reporttothread_run() } $pd_reported_post = "[quote=\"" . $post['username'] . "\" pid=\"" . $post['pid'] . "\" dateline=\"" . $post['dateline'] . "\"]" . $post['message'] . "[/quote]"; $message = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_message_post), $mybb->user['username'], $rtype, $pd_thread_link, $pd_forum_link, $reason, $comment, $pd_reported_post); + $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject_post), $rtype, $mybb->user['username'], $thread['subject']); break; case 'profile': if (!in_array(2, $reporttothread_type)) @@ -362,6 +363,7 @@ function reporttothread_run() $rtype = htmlspecialchars_uni($lang->reporttothread_type_profile); $userlink = "[url=" . $mybb->settings['bburl'] . "/member.php?action=profile&uid=" . $user['uid'] . "]" . $user['username'] . "[/url]"; $message = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_message_profile), $mybb->user['username'], $rtype, $userlink, $reason, $comment); + $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject_profile), $rtype, $mybb->user['username'], $user['username']); break; case 'reputation': if (!in_array(3, $reporttothread_type)) @@ -391,6 +393,7 @@ function reporttothread_run() $reputation_comment = "\n[quote=\"" . $adduser['username'] . "\" dateline=\"" . $reputation['dateline'] . "\"]" . htmlspecialchars_uni($reputation['comments']) . "[/quote]"; } $message = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_message_reputation), $mybb->user['username'], $rtype, $getuserlink, $reason, $comment, $reputation['reputation'], $adduserlink, $reppostlink, $reputation_comment); + $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username']); break; case 'privatemessage': if (!in_array(4, $reporttothread_type)) @@ -408,10 +411,11 @@ function reporttothread_run() $senduserlink = "[url=" . $mybb->settings['bburl'] . "/member.php?action=profile&uid=" . $senduser['uid'] . "]" . $senduser['username'] . "[/url]"; $pm_content = "\n[quote=\"" . $senduser['username'] . "\" dateline=\"" . $pm['dateline'] . "\"][b]" . htmlspecialchars_uni($lang->export_subject) . ":[/b] " . $pm['subject'] . "\n[b]" . htmlspecialchars_uni($lang->export_message) . ":[/b]\n" . $pm['message'] . "[/quote]"; $message = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_message_privatemessage), $mybb->user['username'], $rtype, $senduserlink, $reason, $comment, $pm_content); + $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username']); break; } - $subject = $lang->sprintf(htmlspecialchars_uni($lang->reporttothread_subject), $rtype, $mybb->user['username'], $thread['subject'], $post['subject']); + $find_tid = reporttothread_search_tid($reported_id, $report_type); if ($find_tid) {