An alternate thumbnail viewer
Page: 1
silverblood
on Nov 13. 2006. 11:33 am
by installing the (untgzipped) package at chromiteblue.com/Public/EnlargeThumbnail.tar.gz to the
[activeCollabRoot]/public/assets/javascript/widgets folder
then modifying the following:
[activeCollabRoot]/application/views/files/file_details.php
[activeCollabRoot]/application/views/files/index.php
so that following the lines (line 33 in index.php, and line 29 in file_details.php):
add_stylesheet_to_page('project/files.css');
?>
the following is added:
<?php echo use_widget('EnlargeThumbnail') ?>
and so that the following line (line 47 in index.php, and line 36 in file_details.php):
<div class="fileIcon"><img src="<?php echo $file->getTypeIconUrl() ?>" alt="<?php echo $file->getFilename() ?>" /></div>
is replaced with:
<?php
$types = array( "image/jpeg", "image/jpg", "image/gif", "image/png" );
if( in_array( $file->getTypeString(), $types ) ) {
?>
<div id="EnlargeThumbnail"></div>
<a href="<?php echo $file->getDownloadUrl(); ?>" onClick="return enlarge('<?php echo $file->getDownloadUrl() ?>',event)">
<img
src="<?php echo $file->getTypeIconUrl(); ?>"
alt="<?php echo clean($file->getFilename()); ?>"
title="<?php echo clean($file->getFilename()); ?>"
border="0" />
</a>
<?php } else { ?>
<img src="<?php echo $file->getTypeIconUrl() ?>" alt="<?php echo $file->getFilename() ?>" />
<?php } ?>
one can get a somewhat less invasive thumbnail preview.
if anyone is interested I can set up a diff patch or a package for the mod.
[activeCollabRoot]/public/assets/javascript/widgets folder
then modifying the following:
[activeCollabRoot]/application/views/files/file_details.php
[activeCollabRoot]/application/views/files/index.php
so that following the lines (line 33 in index.php, and line 29 in file_details.php):
add_stylesheet_to_page('project/files.css');
?>
the following is added:
<?php echo use_widget('EnlargeThumbnail') ?>
and so that the following line (line 47 in index.php, and line 36 in file_details.php):
<div class="fileIcon"><img src="<?php echo $file->getTypeIconUrl() ?>" alt="<?php echo $file->getFilename() ?>" /></div>
is replaced with:
<?php
$types = array( "image/jpeg", "image/jpg", "image/gif", "image/png" );
if( in_array( $file->getTypeString(), $types ) ) {
?>
<div id="EnlargeThumbnail"></div>
<a href="<?php echo $file->getDownloadUrl(); ?>" onClick="return enlarge('<?php echo $file->getDownloadUrl() ?>',event)">
<img
src="<?php echo $file->getTypeIconUrl(); ?>"
alt="<?php echo clean($file->getFilename()); ?>"
title="<?php echo clean($file->getFilename()); ?>"
border="0" />
</a>
<?php } else { ?>
<img src="<?php echo $file->getTypeIconUrl() ?>" alt="<?php echo $file->getFilename() ?>" />
<?php } ?>
one can get a somewhat less invasive thumbnail preview.
if anyone is interested I can set up a diff patch or a package for the mod.
silverblood
on Nov 13. 2006. 2:35 pm
yes, allbeit a very basic and ugly one: http://chromiteblue.com/Public/EnlargeThumbnail.html
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.



