[Linpha-cvs] SF.net SVN: linpha: [4668] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2007-01-19 15:01:05
|
Revision: 4668 http://svn.sourceforge.net/linpha/?rev=4668&view=rev Author: fangehrn Date: 2007-01-19 07:00:57 -0800 (Fri, 19 Jan 2007) Log Message: ----------- 2007-01-19 flo * added new ptviewer.jar * added panorama support (copy from linpha1) Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/docs/dev/external_libraries.txt trunk/linpha2/lib/modules/module.panorama.php Added Paths: ----------- trunk/linpha2/lib/js/ptviewer.jar Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-12-28 16:26:12 UTC (rev 4667) +++ trunk/linpha2/ChangeLog 2007-01-19 15:00:57 UTC (rev 4668) @@ -1,3 +1,6 @@ +2007-01-19 flo + * added new ptviewer.jar + * added panorama support (copy from linpha1) 2006-12-28 flo * added video support Modified: trunk/linpha2/docs/dev/external_libraries.txt =================================================================== --- trunk/linpha2/docs/dev/external_libraries.txt 2006-12-28 16:26:12 UTC (rev 4667) +++ trunk/linpha2/docs/dev/external_libraries.txt 2007-01-19 15:00:57 UTC (rev 4668) @@ -16,8 +16,9 @@ include_once($this->PluginDir . "class.smtp.php"); to include_once(LINPHA_DIR . "/lib/classes/smtp.class.php"); - +- ptviewer 3.1.2 (http://webuser.hs-furtwangen.de/~dersch/) + - PHP_JPEG_Metadata_Toolkit_1.11 CHANGES Added: trunk/linpha2/lib/js/ptviewer.jar =================================================================== (Binary files differ) Property changes on: trunk/linpha2/lib/js/ptviewer.jar ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/linpha2/lib/modules/module.panorama.php =================================================================== --- trunk/linpha2/lib/modules/module.panorama.php 2006-12-28 16:26:12 UTC (rev 4667) +++ trunk/linpha2/lib/modules/module.panorama.php 2007-01-19 15:00:57 UTC (rev 4668) @@ -45,14 +45,13 @@ /** * get file informations */ -$data = $GLOBALS['linpha']->db->GetRow("SELECT md5sum, img_type FROM ".LIN_PREFIX."photos " . +$data = $GLOBALS['linpha']->db->GetRow("SELECT md5sum, img_type, width, height FROM ".LIN_PREFIX."photos " . "WHERE id = '".LinSql::linAddslashes($linpha->template->idCurrent)."'"); $md5sum = $data['md5sum']; $img_type = $data['img_type']; $filename = basename($fullfilename); - /** * check photos permissions */ @@ -63,6 +62,73 @@ exit(1); } +if(isset($_GET['lower'])) { + $width = $_GET['width']; + $height = $_GET['height']; + + $param = ''; +} else { + $width = $data['width']; + $height = $data['height']; + $param = '&fullsize=1'; +} +$param .= '&width='.$width.'&height='.$height; + +$lower_width = round($width/2); +$lower_height = round($height/2); + + +ob_start(); +?> + +<div align='center'> +<h2><?php echo i18n("Panorama view of").' '.$filename; ?></h2> +<font color='FF0000'><?php echo i18n("Please use mouse or arrow keys to navigate!"); ?></font><br /> +<applet name='ptviewer' archive='<?php echo LINPHA_CLIENT; ?>/lib/js/ptviewer.jar' code='ptviewer.class' width='100%' height='50%' mayscript='true'> +<script language='JavaScript' type='text/javascript'> +<?php /* hint from the author of ptviewer */ ?> +if (navigator.appName != 'Netscape') document.writeln("<PARAM name=maxarray value='40000000'>"); +</script> + +<param name='file' value='<?php + /** + * use file_download.php because we don't have direct access to the albums dir anymore (.htaccess) + */ + echo LINPHA_CLIENT.'/get_image.php?linId='.$linpha->template->idCurrent.$param; +?>'> +<param name='bgcolor' value='000080'> +<param name='pan' value='0'> +<param name='tilt' value='0'> +<param name='fov' value='90'> +<param name='fovmax' value='120'> +<param name='fovmin' value='20'> +<param name='auto' value='0.5'> +</applet> +<br /> +<a href='http://www.fh-furtwangen.de/~dersch/' target='_blank'>Powered by PTViewer</a> +<br /><br /> +<?php +echo i18n("If it takes too long to load, try a lower resolution:").' '; +echo '<a href="'.LINPHA_LINK.'linCat=panorama&linId='.$linpha->template->idCurrent.'&lower=1&width='.$lower_width.'&height='.$lower_height.'">'; +echo '['.$lower_width.'x'.$lower_height.']'; +echo '</a><br />'; +echo '('.i18n("Current resolution:").' ['.$width.'x'.$height.'])'; +?> +<br /><br /> +<a href='javascript:window.close()'><?php echo i18n("Close window"); ?></a> +</div> + +<?php +$linpha->template->output['default'] = ob_get_clean(); + +$linpha->template->setModuleName('default'); +//$linpha->template->overrideModule('css','filemanager'); +$linpha->template->URL_full = LINPHA_LINK.'&linCat=panorama&linId='.$linpha->template->idCurrent; +$linpha->template->hideMenu = true; +$linpha->template->hideTitle = true; +$linpha->template->output['title'] = i18n("Panorama"); +include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); + ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |