Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trackbacks: Add checkbox to resend trackbacks #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions serendipity_event_trackback/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.21:
-----
* Add checkbox to editor area to resend trackbacks

1.20:
-----
* Fix draft check.
Expand Down
1 change: 1 addition & 0 deletions serendipity_event_trackback/lang_en.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');

10 changes: 8 additions & 2 deletions serendipity_event_trackback/serendipity_event_trackback.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
));
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -193,6 +198,7 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
<legend><?php echo PLUGIN_EVENT_MTRACKBACK_TITLETITLE; ?></legend>
<input class="input_radio" type="radio" id="checkbox_enable_trackback_1" <?php echo ($serendipity['POST']['enable_trackback'] == 'on' ? 'checked="checked"' : ''); ?> name="serendipity[enable_trackback]" value="on" /><label for="checkbox_enable_trackback_1"><?php echo ACTIVATE_AUTODISCOVERY; ?></label><br />
<input class="input_radio" type="radio" id="checkbox_enable_trackback_2" <?php echo ($serendipity['POST']['enable_trackback'] == 'off' ? 'checked="checked"' : ''); ?> name="serendipity[enable_trackback]" value="off" /><label for="checkbox_enable_trackback_2"><?php echo PLUGIN_EVENT_MTRACKBACK_TITLETRACKALL; ?></label><br />
<input class="input_checkbox" type="checkbox" id="checkbox_enable_trackback_4" <?php echo ($serendipity['POST']['trackback_resend'] ? 'checked="checked"' : ''); ?> name="serendipity[trackback_resend]" value="true" /><label for="checkbox_enable_trackback_4"><?php echo PLUGIN_EVENT_MTRACKBACK_TITLERESEND; ?></label><br />
<input class="input_radio" type="radio" id="checkbox_enable_trackback_3" <?php echo ($serendipity['POST']['enable_trackback'] == 'selective' ? 'checked="checked"' : ''); ?> name="serendipity[enable_trackback]" value="selective" /><label for="checkbox_enable_trackback_3"><?php echo PLUGIN_EVENT_MTRACKBACK_TITLETRACKSEL; ?></label><br />

<br />
Expand Down