diff --git a/public_html/templates/help.tpl b/public_html/templates/help.tpl index 173c3c53..2e89d25f 100644 --- a/public_html/templates/help.tpl +++ b/public_html/templates/help.tpl @@ -176,6 +176,7 @@ {search: 'order:fav_date', description: 'recently added to favorites'}, {search: 'order:comment_date', description: 'recently commented'}, {search: 'order:feature_date', description: 'recently featured'}, + {search: 'order:feature_count', description: 'most often featured'}, ]; _.each(table, function(row) { %> diff --git a/src/Search/Filters/PostFilter.php b/src/Search/Filters/PostFilter.php index b583ab61..63d3f13d 100644 --- a/src/Search/Filters/PostFilter.php +++ b/src/Search/Filters/PostFilter.php @@ -14,6 +14,7 @@ class PostFilter extends BasicFilter implements IFilter const ORDER_LAST_COMMENT_TIME = 'lastCommentCreationTime'; const ORDER_LAST_FAV_TIME = 'lastFavTime'; const ORDER_LAST_FEATURE_TIME = 'lastFeatureTime'; + const ORDER_FEATURE_COUNT = 'featureCount'; const REQUIREMENT_TAG = 'tag'; const REQUIREMENT_ID = 'id'; diff --git a/src/Search/Parsers/PostSearchParser.php b/src/Search/Parsers/PostSearchParser.php index e200e4be..41c3dd51 100644 --- a/src/Search/Parsers/PostSearchParser.php +++ b/src/Search/Parsers/PostSearchParser.php @@ -117,18 +117,19 @@ class PostSearchParser extends AbstractSearchParser { return [ - [['id'], PostFilter::ORDER_ID], - [['random'], PostFilter::ORDER_RANDOM], - [['time', 'date'], PostFilter::ORDER_LAST_EDIT_TIME], - [['score'], PostFilter::ORDER_SCORE], - [['file_size'], PostFilter::ORDER_FILE_SIZE], - [['tag_count', 'tags', 'tag'], PostFilter::ORDER_TAG_COUNT], - [['fav_count', 'fags', 'fav'], PostFilter::ORDER_FAV_COUNT], - [['comment_count', 'comments', 'comment'], PostFilter::ORDER_COMMENT_COUNT], - [['note_count', 'notes', 'note'], PostFilter::ORDER_NOTE_COUNT], - [['fav_time', 'fav_date'], PostFilter::ORDER_LAST_FAV_TIME], - [['comment_time', 'comment_date'], PostFilter::ORDER_LAST_COMMENT_TIME], - [['feature_time', 'feature_date', 'featured', 'feature'], PostFilter::ORDER_LAST_FEATURE_TIME], + [['id'], PostFilter::ORDER_ID], + [['random'], PostFilter::ORDER_RANDOM], + [['time', 'date'], PostFilter::ORDER_LAST_EDIT_TIME], + [['score'], PostFilter::ORDER_SCORE], + [['file_size'], PostFilter::ORDER_FILE_SIZE], + [['tag_count', 'tags', 'tag'], PostFilter::ORDER_TAG_COUNT], + [['fav_count', 'fags', 'fav'], PostFilter::ORDER_FAV_COUNT], + [['comment_count', 'comments', 'comment'], PostFilter::ORDER_COMMENT_COUNT], + [['note_count', 'notes', 'note'], PostFilter::ORDER_NOTE_COUNT], + [['fav_time', 'fav_date'], PostFilter::ORDER_LAST_FAV_TIME], + [['comment_time', 'comment_date'], PostFilter::ORDER_LAST_COMMENT_TIME], + [['feature_time', 'feature_date'], PostFilter::ORDER_LAST_FEATURE_TIME], + [['feature_count', 'features', 'featured'], PostFilter::ORDER_FEATURE_COUNT], ]; }