Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Adding dimensions as an option for thumbnail and list view. #71

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Adding dimensions as an option for thumbnail and list view. #71

wants to merge 1 commit into from

Conversation

fleeting
Copy link

@fleeting fleeting commented Dec 3, 2014

This adds an option under Settings->Show that lets you display dimensions for images. If not an image then it shows nothing. Screenshot of it below.

kcfinder

@fleeting fleeting mentioned this pull request Dec 3, 2014
@@ -737,6 +737,7 @@ protected function getFiles($dir) {
$bigIcon = file_exists("themes/{$this->config['theme']}/img/files/big/$ext.png");
$smallIcon = file_exists("themes/{$this->config['theme']}/img/files/small/$ext.png");
$thumb = file_exists("$thumbDir/$name");
list($width, $height) = $img->getSize();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Size is already extracted on line 717:

$size = $img->getSize($file);

There is no need to extract the size twice. This can be avoided by replacing your line 740 with:

if ($type && count($size) >= 2)
  list($width, $height) = $size;

@espaan
Copy link

espaan commented Mar 9, 2015

This seems a very nice addition, can it be Pulled ?

@ToX82
Copy link

ToX82 commented Mar 15, 2015

This is a useful addition, would be nice to have it Pulled...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants