Feng Forum

Other Topics => Development => Community Contributions => : cloo July 14, 2009, 06:08:56 AM

: images as thumbnails in workspace overview
: cloo July 14, 2009, 06:08:56 AM
Optional of course.
It would provide quicker visual identification of workspace itself,
also function a little like a gallery, which is desired in many cases i deal with.
: Re: images as thumbnails in workspace overview
: Jon July 16, 2009, 11:25:17 AM
Would find this useful for at-a-glance recognition also.
: Re: images as thumbnails in workspace overview
: Guite January 13, 2010, 03:11:03 PM
This would definitely be a useful functionality.
: Re: images as thumbnails in workspace overview
: editfish January 17, 2010, 12:19:46 AM
I like this idea.  For us firefox users, it might also be easy to view (cache/copy/link) the fav.ico of our saved web addresses.  It breaks up the lineality of the page, and provides a quick visual reference to the site I am looking for.

Editfish
: Re: images as thumbnails in workspace overview
: conrado February 11, 2010, 11:20:25 AM
Would love that. Anyone up for the hack?
: Re: images as thumbnails in workspace overview
: Guite February 11, 2010, 11:48:25 AM
Change line 31 in application/views/dashboard/widget_documents.php to:

:
</a>
<?php if ($document->isDisplayable()) {?>
    <div>
        <div style="position: relative; left:0; top: 0; width: 450px; height: 120px; background-color: white">
        <iframe style="width:100%;height:100%;border:1px solid #ddd;" src="<?php echo get_sandbox_url("feed""display_content", array("id" => $document->getId(), "user_id" => logged_user()->getId(), "token" => logged_user()->getTwistedToken())) ?>"></iframe>
        </div>
    </div>
<?php } elseif (($dtype $document->getFileType()) instanceof FileType && $dtype->getIsImage()) { ?>
    <div>
        <a href="<?php echo get_url('files''download_image', array('id' => $document->getId(), 'inline' => true)); ?>" target="_blank" title="<?php echo lang('show image in new page'?>">
            <img id="<?php echo $document->getId(); ?>Image" src="<?php echo get_url('files''download_image', array('id' => $document->getId(), 'inline' => true)); ?>" style="max-width:450px;max-height:120px"/>
        </a>
    </div>
<?php // if ?>
</td>

This enables previews for documents as well as images. As I have not that much experience with the object's inner behavior I simply copied some stuff from the files detail template and adapted it accordingly. If there are any improvements for this code please let me know.
: Re: images as thumbnails in workspace overview
: allenlook February 12, 2010, 01:29:10 PM
Sorry to be dense - what exactly is meant by this?  What images and what overview are we talking about?
: Re: images as thumbnails in workspace overview
: cloo August 12, 2010, 07:26:06 AM
Nice tip!

This is how it looks:
(http://gyazo.com/61e0d330f4c027f25840e14880ff8681.png)

To be precise, in FO1.7 you have to replace the whole line 30, containing
:
</a></td> with the hack code.
: Re: images as thumbnails in workspace overview
: filriyadh February 01, 2011, 12:09:16 PM
awesome hack!!!!
thank you so much.
: Re: images as thumbnails in workspace overview
: tez January 31, 2013, 09:23:23 PM
It would need to load a thumbnailed cached version of the image so that it wont cause large photo files to be downloaded. At the moment I am dealing with clients who like to attach images without reducing them first, so working with the Documents area is becoming quite slow as a lot of the images are 4-5 megabytes and the whole file is loaded every time I want to edit the file or see what it is.