diff --git a/include/functions_images.inc.php b/include/functions_images.inc.php index 86c779cd..df268331 100644 --- a/include/functions_images.inc.php +++ b/include/functions_images.inc.php @@ -104,9 +104,8 @@ function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total=null, $ $cond['parts']['keywords'] = " AND (mk.property IN ('" . serendipity_db_implode("', '", $keywords, 'string') . "'))\n"; $cond['joinparts']['keywords'] = true; } - foreach($filter AS $f => $fval) { - if (!isset($orderfields[$f]) || empty($fval)) { + if (! (isset($orderfields[$f]) || $f == "fileCategory") || empty($fval)) { continue; } @@ -140,6 +139,15 @@ function serendipity_fetchImagesFromDatabase($start=0, $limit=0, &$total=null, $ } else { $cond['parts']['filter'] .= " AND ($f = '" . serendipity_db_escape_string(trim($fval)) . "')\n"; } + } elseif ($f == 'fileCategory') { + switch ($fval) { + case 'image': + $cond['parts']['filter'] .= " AND (i.mime LIKE 'image/%')\n"; + break; + case 'video': + $cond['parts']['filter'] .= " AND (i.mime LIKE 'video/%')\n"; + break; + } } else { if (substr($f, 0, 3) === 'bp.') { $realf = substr($f, 3); diff --git a/include/tpl/config_local.inc.php b/include/tpl/config_local.inc.php index e8ca5f62..ec98446e 100644 --- a/include/tpl/config_local.inc.php +++ b/include/tpl/config_local.inc.php @@ -563,7 +563,7 @@ 'description' => INSTALL_THUMBWIDTH_DESC, 'type' => 'int', 'permission' => 'siteConfiguration', - 'default' => 110), + 'default' => 400), array('var' => 'thumbConstraint', 'title' => INSTALL_THUMBDIM, diff --git a/lang/UTF-8/serendipity_lang_en.inc.php b/lang/UTF-8/serendipity_lang_en.inc.php index e046cfa5..00d53d91 100644 --- a/lang/UTF-8/serendipity_lang_en.inc.php +++ b/lang/UTF-8/serendipity_lang_en.inc.php @@ -79,6 +79,7 @@ @define('YOUR_SEARCH_RETURNED_BLAHBLAH', 'Your search for %s returned %s results:'); @define('SEARCH_TOO_SHORT', 'Your search-query must be longer than 3 characters. You can try to append * to shorter words, like: s9y* to trick the search into using shorter words.'); @define('IMAGE', 'Image'); +@define('VIDEO', 'Video'); @define('ERROR_FILE_NOT_EXISTS', 'Error: Old filename does not exist!'); @define('ERROR_FILE_EXISTS', 'Error: New filename already used, pick another!'); @define('ERROR_SOMETHING', 'Error: Something is wrong.'); diff --git a/lang/serendipity_lang_en.inc.php b/lang/serendipity_lang_en.inc.php index b918c269..ee4e053a 100644 --- a/lang/serendipity_lang_en.inc.php +++ b/lang/serendipity_lang_en.inc.php @@ -79,6 +79,7 @@ @define('YOUR_SEARCH_RETURNED_BLAHBLAH', 'Your search for %s returned %s results:'); @define('SEARCH_TOO_SHORT', 'Your search-query must be longer than 3 characters. You can try to append * to shorter words, like: s9y* to trick the search into using shorter words.'); @define('IMAGE', 'Image'); +@define('VIDEO', 'Video'); @define('ERROR_FILE_NOT_EXISTS', 'Error: Old filename does not exist!'); @define('ERROR_FILE_EXISTS', 'Error: New filename already used, pick another!'); @define('ERROR_SOMETHING', 'Error: Something is wrong.'); diff --git a/templates/2k11/admin/media_items.tpl b/templates/2k11/admin/media_items.tpl index f05936a8..02bdf9fc 100644 --- a/templates/2k11/admin/media_items.tpl +++ b/templates/2k11/admin/media_items.tpl @@ -41,7 +41,7 @@ {if $file.authorid != 0}{$file.authorname}{/if} -
+
{if $file.is_image AND $file.full_thumb} {if $file.url} @@ -70,7 +70,7 @@ {/if}
-