[Linpha-cvs] SF.net SVN: linpha: [4746] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <bz...@us...> - 2007-07-11 18:07:37
|
Revision: 4746 http://svn.sourceforge.net/linpha/?rev=4746&view=rev Author: bzrudi Date: 2007-07-11 11:07:34 -0700 (Wed, 11 Jul 2007) Log Message: ----------- "Show all Metadata" link now does respect exiftool. Modified Paths: -------------- trunk/linpha2/index.php trunk/linpha2/lib/classes/linpha.exiftool.class.php trunk/linpha2/lib/include/metadata_info_show.php trunk/linpha2/templates/default/view_img.html.php Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2007-07-11 14:47:04 UTC (rev 4745) +++ trunk/linpha2/index.php 2007-07-11 18:07:34 UTC (rev 4746) @@ -55,7 +55,7 @@ case 'newimg': require_once(LINPHA_DIR.'/lib/modules/module.newimg.php'); break; -case 'exif': +case 'metadata': require_once(LINPHA_DIR.'/lib/include/metadata_info_show.php'); break; case 'video': Modified: trunk/linpha2/lib/classes/linpha.exiftool.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.exiftool.class.php 2007-07-11 14:47:04 UTC (rev 4745) +++ trunk/linpha2/lib/classes/linpha.exiftool.class.php 2007-07-11 18:07:34 UTC (rev 4746) @@ -101,7 +101,28 @@ } } + /** + * This method formats an html page containing all known MetaData infos + * + * @param string $filename + * @return html formatted page + */ + public function printHtmlPage($filename) + { + $meta =""; + $return = array(); + $parameters = "-g ". + "-h "; + + LinFilesys::linExec($this->exiftool.' '.$parameters.' "'.$filename.'"', $return); + + foreach($return as $value) + { + echo $value; + } + } + /** * This method reads all available MetaData (Group) Information from image. * @param string $metatype iptc, xmp, exif, makernotes... Modified: trunk/linpha2/lib/include/metadata_info_show.php =================================================================== --- trunk/linpha2/lib/include/metadata_info_show.php 2007-07-11 14:47:04 UTC (rev 4745) +++ trunk/linpha2/lib/include/metadata_info_show.php 2007-07-11 18:07:34 UTC (rev 4746) @@ -36,6 +36,31 @@ $filename = LinSql::getFullImagePath( $GLOBALS['linpha']->template->idCurrent ); $filenameShow = implode( '/', LinSql::getFullFilenameFromId( $GLOBALS['linpha']->template->idCurrent ) ); +/** + * If exiftool avail, make use of it! + */ +if($GLOBALS['linpha']->sql->config->value['sys_import_exiftool_avail']) +{ + ?> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + <html> + <head></head> + <body> + <?php + + include_once(LINPHA_DIR.'/lib/classes/linpha.exiftool.class.php'); + $objExifTool = new LinExifTool(); + + $objExifTool->printHtmlPage($filename); + + ?> + + </body> + </html> +<?php +} +else +{ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> @@ -271,4 +296,7 @@ </body> -</html> \ No newline at end of file +</html> +<?php +} +?> Modified: trunk/linpha2/templates/default/view_img.html.php =================================================================== --- trunk/linpha2/templates/default/view_img.html.php 2007-07-11 14:47:04 UTC (rev 4745) +++ trunk/linpha2/templates/default/view_img.html.php 2007-07-11 18:07:34 UTC (rev 4746) @@ -42,7 +42,7 @@ <div id="linDivMetaOuter" style="display: none;"> <div id="linDivMeta"></div> - <div id="linDivExifLink" class="linDivMetaLinks"><a href="<?php echo LINPHA_LINK.'linCat=exif&linId='.$linTpl->idCurrent; ?>" onclick="javascript:myLinImage.updateLinId(this)" target="_blank"><?php echo i18n("Show All Metadata"); ?></a></div> + <div id="linDivExifLink" class="linDivMetaLinks"><a href="<?php echo LINPHA_LINK.'linCat=metadata&linId='.$linTpl->idCurrent; ?>" onclick="javascript:myLinImage.updateLinId(this)" target="_blank"><?php echo i18n("Show All Metadata"); ?></a></div> <div id="linDivVideoLink" class="linDivMetaLinks"> <a href="<?php echo LINPHA_LINK.'linCat=video&linId='.$linTpl->idCurrent; ?>" onclick="javascript:myLinImage.updateLinId(this)" target="_blank"><?php echo i18n("Play Video"); ?></a> <br /><br /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |