From 86c745e8c8241884227d082885d5424f013b16bb Mon Sep 17 00:00:00 2001 From: onli Date: Thu, 28 May 2020 16:21:58 +0200 Subject: [PATCH] trackbacks: Add checkbox to resend trabckacks even See https://github.com/s9y/Serendipity/issues/440. Relies on code added to the core during 2.4.0-alpha2 --- serendipity_event_trackback/ChangeLog | 4 ++++ serendipity_event_trackback/lang_en.inc.php | 1 + .../serendipity_event_trackback.php | 10 ++++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/serendipity_event_trackback/ChangeLog b/serendipity_event_trackback/ChangeLog index 8e6a62322..6ee8473b6 100644 --- a/serendipity_event_trackback/ChangeLog +++ b/serendipity_event_trackback/ChangeLog @@ -1,3 +1,7 @@ +1.21: +----- + * Add checkbox to editor area to resend trackbacks + 1.20: ----- * Fix draft check. diff --git a/serendipity_event_trackback/lang_en.inc.php b/serendipity_event_trackback/lang_en.inc.php index dd07559ec..a19f7507c 100644 --- a/serendipity_event_trackback/lang_en.inc.php +++ b/serendipity_event_trackback/lang_en.inc.php @@ -14,4 +14,5 @@ @define('PLUGIN_EVENT_MTRACKBACK_TITLETRACKSEL', 'Only send trackbacks to URLs listed below'); @define('PLUGIN_EVENT_MTRACKBACK_DELAYED_TRACKBACKS_NAME', 'Delayed Trackbacks'); @define('PLUGIN_EVENT_MTRACKBACK_DELAYED_TRACKBACKS_DESC', 'Automatically create trackbacks of entries which were not released immediately.'); +@define('PLUGIN_EVENT_MTRACKBACK_TITLERESEND', 'Resend trackbacks'); diff --git a/serendipity_event_trackback/serendipity_event_trackback.php b/serendipity_event_trackback/serendipity_event_trackback.php index 9cbd6ad2b..42b43c63d 100644 --- a/serendipity_event_trackback/serendipity_event_trackback.php +++ b/serendipity_event_trackback/serendipity_event_trackback.php @@ -19,9 +19,9 @@ function introspect(&$propbag) $propbag->add('description', PLUGIN_EVENT_MTRACKBACK_TITLEDESC); $propbag->add('stackable', false); $propbag->add('author', 'Garvin Hicking, Malte Paskuda, Ian'); - $propbag->add('version', '1.20'); + $propbag->add('version', '1.21'); $propbag->add('requirements', array( - 'serendipity' => '1.6', + 'serendipity' => '2.4.0', 'smarty' => '2.6.7', 'php' => '4.1.0' )); @@ -150,6 +150,11 @@ function event_hook($event, &$bag, &$eventData, $addData = null) } } } + + if (isset($serendipity['POST']['trackback_resend'])) { + // the user selected to always send trackbacks, even if already stored + $serendipity['skip_trackback_check'] = true; + } break; case 'backend_trackback_check': @@ -193,6 +198,7 @@ function event_hook($event, &$bag, &$eventData, $addData = null) name="serendipity[enable_trackback]" value="on" />
name="serendipity[enable_trackback]" value="off" />
+ name="serendipity[trackback_resend]" value="true" />
name="serendipity[enable_trackback]" value="selective" />