Feng Forum
Other Topics => Development => Community Contributions => : 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.
-
Would find this useful for at-a-glance recognition also.
-
This would definitely be a useful functionality.
-
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
-
Would love that. Anyone up for the hack?
-
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.
-
Sorry to be dense - what exactly is meant by this? What images and what overview are we talking about?
-
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.
-
awesome hack!!!!
thank you so much.
-
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.