Added pingback filter option for comments in admin area

This commit is contained in:
Grischa Brockhaus 2007-09-02 01:23:21 +00:00
parent de7b11e91b
commit 60a0320eb6
3 changed files with 11 additions and 1 deletions

View File

@ -187,6 +187,9 @@ if ($serendipity['GET']['filter']['show'] == 'approved') {
if ($serendipity['GET']['filter']['type'] == 'TRACKBACK') {
$c_type = 'TRACKBACK';
$searchString .= "&serendipity[filter][type]=TRACKBACK";
} elseif ($serendipity['GET']['filter']['type'] == 'PINGBACK') {
$c_type = 'PINGBACK';
$searchString .= "&serendipity[filter][type]=PINGBACK";
} elseif ($serendipity['GET']['filter']['type'] == 'NORMAL') {
$c_type = 'NORMAL';
$searchString .= "&serendipity[filter][type]=NORMAL";
@ -197,6 +200,9 @@ if ($serendipity['GET']['filter']['type'] == 'TRACKBACK') {
if ($serendipity['GET']['filter']['type'] == 'TRACKBACK') {
$c_type = 'TRACKBACK';
$searchString .= "&serendipity[filter][type]=TRACKBACK";
} elseif ($serendipity['GET']['filter']['type'] == 'PINGBACK') {
$c_type = 'PINGBACK';
$searchString .= "&serendipity[filter][type]=PINGBACK";
} elseif ($serendipity['GET']['filter']['type'] == 'NORMAL') {
$c_type = 'NORMAL';
$searchString .= "&serendipity[filter][type]=NORMAL";
@ -314,6 +320,7 @@ function highlightComment(id, checkvalue) {
<option value=""><?php echo COMMENTS_FILTER_ALL ?></option>
<option value="NORMAL"<?php if ($c_type == 'NORMAL') echo ' selected="selected"' ?>><?php echo COMMENTS; ?></option>
<option value="TRACKBACK"<?php if ($c_type == 'TRACKBACK') echo ' selected="selected"' ?>><?php echo TRACKBACKS; ?></option>
<option value="PINGBACK"<?php if ($c_type == 'PINGBACK') echo ' selected="selected"' ?>><?php echo PINGBACKS; ?></option>
</select></td>
</tr>
<tr>

View File

@ -135,6 +135,8 @@ function serendipity_fetchComments($id, $limit = null, $order = '', $showAll = f
$type = 'NORMAL';
} elseif ($type == 'trackbacks') {
$type = 'TRACKBACK';
} elseif ($type == 'pingbacks') {
$type = 'PINGBACK';
} elseif ($type == 'comments_and_trackbacks') {
$type = '%';
}

View File

@ -1 +1,2 @@
@define('CATEGORY_PLUGIN_HIDEZEROCOUNT', 'Hide archives link when no entries were made in that timespan (requires counting entries)');
@define('PINGBACK', 'Pingback');
@define('PINGBACKS', 'Pingbacks');