[Linpha-cvs] SF.net SVN: linpha: [4624] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-11-06 22:53:18
|
Revision: 4624 http://svn.sourceforge.net/linpha/?rev=4624&view=rev Author: fangehrn Date: 2006-11-06 14:52:41 -0800 (Mon, 06 Nov 2006) Log Message: ----------- 2006-11-06 flo * fixed some bugs * testing new folder thumbnail but they are to big in png format Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/index.php trunk/linpha2/lib/classes/image/imagemagick/thumbnail_folder.php trunk/linpha2/lib/classes/linpha.functions.php trunk/linpha2/lib/classes/linpha.image.class.php trunk/linpha2/lib/classes/linpha.metadata.class.php trunk/linpha2/lib/classes/linpha.template.class.php trunk/linpha2/lib/js/LinImage.js trunk/linpha2/lib/js/LinThumbnails.js trunk/linpha2/templates/default/fragments.php trunk/linpha2/templates/default/themes/default/colorsettings.php trunk/linpha2/templates/default/themes/default/css/global.css trunk/linpha2/templates/default/themes/default/css/view_img.css trunk/linpha2/templates/default/themes/default/css/view_thumb.css Added Paths: ----------- trunk/linpha2/lib/graphics/thumb_folder.png Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/ChangeLog 2006-11-06 22:52:41 UTC (rev 4624) @@ -1,3 +1,8 @@ +2006-11-06 flo + * fixed some bugs + * testing new folder thumbnail + but they are to big in png format + 2006-11-05 flo * change the linpha2/?id to linpha2/?linId * reorganized javascript classes and functions Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/index.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -1,8 +1,9 @@ <?php - if(defined('LINPHA_DIR')) { - define('LINPHA_IS_INCLUDED',1); + if(!defined('LINPHA_IS_INCLUDED')) { + define('LINPHA_IS_INCLUDED',1); + } } else { define('LINPHA_DIR','.'); } Modified: trunk/linpha2/lib/classes/image/imagemagick/thumbnail_folder.php =================================================================== --- trunk/linpha2/lib/classes/image/imagemagick/thumbnail_folder.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/classes/image/imagemagick/thumbnail_folder.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -38,26 +38,27 @@ */ for($i=1; list($key,$value) = each($array_ids) ; $i++) { - LinFilesys::linExec("convert ". LinImage::getCachePath('thumb',$value) . " -resize 80x80 ".$tmp_folder."/".$i.".jpg" ); + LinFilesys::linExec("convert ". LinImage::getCachePath('thumb',$value) . " -quality 70 -resize 80x80 ".$tmp_folder."/".$i.".jpg" ); } - LinFilesys::linExec("convert -size 180x180 xc:lemonchiffon -mattecolor peru -frame 9x9+3+3 ".$this->output_file); +// LinFilesys::linExec("convert -size 182x182 xc:lemonchiffon -mattecolor peru -frame 9x9+3+3 -quality 70 ".$this->output_file); for($i=1; $i<=count($array_ids); $i++ ) { switch($i) { case 1: - LinFilesys::linExec("composite -compose atop -geometry +10+10 ".$tmp_folder."/1.jpg ".$this->output_file." ".$this->output_file); + //LinFilesys::linExec("composite -compose atop -geometry +15+15 -quality 70 ".$tmp_folder."/1.jpg ".$this->output_file." ".$this->output_file); + LinFilesys::linExec("composite -compose atop -geometry +15+15 -quality 70 ".$tmp_folder."/1.jpg ".LINPHA_DIR."/lib/graphics/thumb_folder.png ".$this->output_file); break; case 2: - LinFilesys::linExec("composite -compose atop -geometry +100+10 ".$tmp_folder."/2.jpg ".$this->output_file." ".$this->output_file); + LinFilesys::linExec("composite -compose atop -geometry +105+15 -quality 70 ".$tmp_folder."/2.jpg ".$this->output_file." ".$this->output_file); break; case 3: - LinFilesys::linExec("composite -compose atop -geometry +10+100 ".$tmp_folder."/3.jpg ".$this->output_file." ".$this->output_file); + LinFilesys::linExec("composite -compose atop -geometry +15+105 -quality 70 ".$tmp_folder."/3.jpg ".$this->output_file." ".$this->output_file); break; case 4: - LinFilesys::linExec("composite -compose atop -geometry +100+100 ".$tmp_folder."/4.jpg ".$this->output_file." ".$this->output_file); + LinFilesys::linExec("composite -compose atop -geometry +105+105 -quality 70 ".$tmp_folder."/4.jpg ".$this->output_file." ".$this->output_file); break; } } Modified: trunk/linpha2/lib/classes/linpha.functions.php =================================================================== --- trunk/linpha2/lib/classes/linpha.functions.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/classes/linpha.functions.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -26,7 +26,7 @@ /** * get content of the systems PATH variable and remove dirs not in open_basedir and safe_mode_exec_dir (only if activated) */ -function inGetPATH($array_path) +function linGetPATH($array_path) { /** * use the path variable instead of own array Modified: trunk/linpha2/lib/classes/linpha.image.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.image.class.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/classes/linpha.image.class.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -145,7 +145,15 @@ if($this->mode == 'thumb') { $this->cached_id = $this->photo_id; - $this->output_file = LinImage::getCachePath($this->mode,$this->cached_id); + if($this->img_type == 0) + { + $this->output_file = LinImage::getCachePath($this->mode,$this->cached_id).'.png'; + } + else + { + $this->output_file = LinImage::getCachePath($this->mode,$this->cached_id); + } + } elseif($this->mode == 'img') { @@ -590,7 +598,14 @@ */ function printFileToScreen() { - header("Content-type: image/jpeg"); + if( $this->img_type == 0 ) + { + header("Content-type: image/png"); + } + else + { + header("Content-type: image/jpeg"); + } /** * show correct image filename wenn selecting "save as" in browser Modified: trunk/linpha2/lib/classes/linpha.metadata.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.metadata.class.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/classes/linpha.metadata.class.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -103,7 +103,7 @@ switch($last_part) { case 'filename': - $value = $filename; // is already escaped + $value = '<span title="'.$filename.'">'.$filename.'</span>'; // is already escaped break; case 'imagesize': $value = LinFilesys::niceFilesize( filesize( $full_filename ), 2 ); Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -373,7 +373,7 @@ if(empty($alpha)) // default { $str = '<div style="background: url('.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignright.') no-repeat top right;">'; - $str .= '<img src="'.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'" alt="" width="'.$size.'" height="'.$size.'" class="corner" />'; + $str .= '<img src="'.LINPHA_CLIENT.'/templates/misc/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'" alt="" width="'.$size.'" height="'.$size.'" />'; $str .= '</div>'; } else // currently only used in slideshow, does not work well in internet explorer Added: trunk/linpha2/lib/graphics/thumb_folder.png =================================================================== (Binary files differ) Property changes on: trunk/linpha2/lib/graphics/thumb_folder.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/linpha2/lib/js/LinImage.js =================================================================== --- trunk/linpha2/lib/js/LinImage.js 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/js/LinImage.js 2006-11-06 22:52:41 UTC (rev 4624) @@ -543,7 +543,7 @@ } else if ((keycode == 122)) // F11 { - if( this.fullscreenActive ) { + if( myLinImage.fullscreenActive ) { $('linDivSlideshowExit').show(); // hide exit button to force exit again with F11 myLinImage.fullscreenStop(); } else { @@ -563,20 +563,20 @@ myLinImage.moveLast(); return false; } - else if( this.fullscreenActive && ((key == 'f') || (key == 'x') || (key == 'o') || (key == 'c') ) ) // close fullscreen + else if( myLinImage.fullscreenActive && ((key == 'f') || (key == 'x') || (key == 'o') || (key == 'c') ) ) // close fullscreen { myLinImage.fullscreenStop(); } - else if(this.fullscreenActive && key == 's') // start/stop slideshow + else if(myLinImage.fullscreenActive && key == 's') // start/stop slideshow { myLinImage.slideshowStartStop(); } - else if(this.fullscreenActive && key == 'p') // display previous image + else if(myLinImage.fullscreenActive && key == 'p') // display previous image { myLinImage.disableKeyboardNav(); myLinImage.movePrev(); } - else if(this.fullscreenActive && key == 'n') // display next image + else if(myLinImage.fullscreenActive && key == 'n') // display next image { myLinImage.disableKeyboardNav(); myLinImage.moveNext(); @@ -702,7 +702,7 @@ * start slideshow with some superduper effects */ Effect.Appear('linDivSlideshowOverlay', { queue: 'end', duration: 1.0, from: 0.0, to: 0.9 }); - Effect.BlindDown('linDivSlideshowControls', { queue: 'end'} ); + Effect.BlindDown('linDivSlideshowControlsOuter', { queue: 'end'} ); Element.show('linDivSlideshowImage'); /** @@ -739,7 +739,7 @@ /** * end slideshow with some superduper effects */ - Effect.Fold('linDivSlideshowControls', { queue: 'end'} ); + Effect.Fold('linDivSlideshowControlsOuter', { queue: 'end'} ); Effect.Fade('linDivSlideshowOverlay', { queue: 'end', duration: 0.5, from: 0.9, to: 0.0 } ); Element.hide('linDivSlideshowImage'); @@ -767,7 +767,7 @@ else // stop Slideshow { this.slideshowActive = false; - Element.setOpacity('ssImgStart',1); + Element.setOpacity('linSsImgStart',1); clearTimeout(this.ssCurrentTimerID); } }, Modified: trunk/linpha2/lib/js/LinThumbnails.js =================================================================== --- trunk/linpha2/lib/js/LinThumbnails.js 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/lib/js/LinThumbnails.js 2006-11-06 22:52:41 UTC (rev 4624) @@ -107,11 +107,13 @@ divhtmltext = ''; if(linViewMode == 'thumbdetail') { + var style1text = ''; var style2text = ' linDivImgDetail'; - var style3text = 'linDivTextDetail'; + var style3text = 'class="linDivTextDetail"'; } else { + var style1text = ' style="width: ' + linTnSize + '"'; var style2text = ''; - var style3text = 'linDivText'; + var style3text = 'class="linDivText"'; } /** @@ -136,14 +138,14 @@ } divhtmltext += - '<div id="linDivThumb' + index + '" class="linDivThumb">' + + '<div id="linDivThumb' + index + '" class="linDivThumb"' + style1text + '>' + linImgIds[index]['before'] + '<div class="linDivImg' + style2text + '">' + '<a href="' + linUrlBase + '&linId=' + linImgIds[index]['id'] + '">' + '<img src="' + LINPHA_CLIENT + '/get_thumb.php?linId=' + linImgIds[index]['id'] + '"' + ' height="' + linTnSize + '" width="' + linTnSize + '" ' + ' alt="' + linImgIds[index]['title'] + '" title="' + linImgIds[index]['title'] + '"' + ' class="linImgThumb" />' + - '</a></div><div class="' + style3text + '">' + linImgIds[index]['after'] + '</div></div>'; + '</a></div><div ' + style3text + '>' + linImgIds[index]['after'] + '</div></div>'; /** * flush buffer of divhtmltext on end of line Modified: trunk/linpha2/templates/default/fragments.php =================================================================== --- trunk/linpha2/templates/default/fragments.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/templates/default/fragments.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -40,7 +40,7 @@ <li> <div> <?php if( linUseAjax() ) { ?> - <form action="" method="POST" onsubmit="new Ajax.Updater('menu', LINPHA_CLIENT + '/?linCat=ajax&reloadmenu&linId='+IdCurrent, {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> + <form action="" method="POST" onsubmit="new Ajax.Updater('linDivMenu', LINPHA_CLIENT + '/?linCat=ajax&reloadmenu&linId='+IdCurrent, {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> <?php } else { ?> <form action="<?php echo $this->URL_full; ?>" method="POST"> <?php } @@ -88,7 +88,7 @@ </div> <div style="float: left; margin-left: 40px; "> - <select id="linSsDelay" name="delay" size="1" onchange="myLinImage.slideshowChangeDelay()" title="<?php echo i18n("Delay"); ?>"> + <select id="linSsDelay" name="delay" size="1" class="linForms" onchange="myLinImage.slideshowChangeDelay()" title="<?php echo i18n("Delay"); ?>"> <option value="3">3 s</option> <option value="4">4 s</option> <option value="5" selected="selected">5 s</option> Modified: trunk/linpha2/templates/default/themes/default/colorsettings.php =================================================================== --- trunk/linpha2/templates/default/themes/default/colorsettings.php 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/templates/default/themes/default/colorsettings.php 2006-11-06 22:52:41 UTC (rev 4624) @@ -33,7 +33,7 @@ /** * font color */ - body { + body, #linDivMenu ul a, #linDivMenu ul span, #linDivMenu ul div { color: #<?php echo $_GET['font']; ?>; } @@ -58,3 +58,13 @@ background-color: #d5eeff; border: 1px solid grey; } + +/** + * menu + */ + #linDivMenu ul a:hover, #linDivMenu ul span:hover { + background: #bbbbbb; + } + #linDivMenu ul ul { + background-color: #eeeeee; + } Modified: trunk/linpha2/templates/default/themes/default/css/global.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/global.css 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/templates/default/themes/default/css/global.css 2006-11-06 22:52:41 UTC (rev 4624) @@ -214,11 +214,7 @@ text-align: center; text-decoration: none; - color: #000000; } - #linDivMenu ul a:hover, #linDivMenu ul span:hover { - background: #bbbbbb; - } #linDivMenu ul span { background: url(../images/expand.gif) no-repeat 100% 100%; } @@ -232,7 +228,6 @@ z-index: 500; border: 0; - background-color: #eeeeee; /** * relativ to parent element! be careful Modified: trunk/linpha2/templates/default/themes/default/css/view_img.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/view_img.css 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/templates/default/themes/default/css/view_img.css 2006-11-06 22:52:41 UTC (rev 4624) @@ -129,7 +129,7 @@ background-color: #000; } - #linDivSlideshowControls + #linDivSlideshowControlsOuter { position: absolute; top: 0px; @@ -143,7 +143,7 @@ z-index: 91; } - #linDivSlideshowControlsInner + #linDivSlideshowControls { padding: 5px; margin: 0px; Modified: trunk/linpha2/templates/default/themes/default/css/view_thumb.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/view_thumb.css 2006-11-05 17:42:35 UTC (rev 4623) +++ trunk/linpha2/templates/default/themes/default/css/view_thumb.css 2006-11-06 22:52:41 UTC (rev 4624) @@ -46,6 +46,7 @@ text-align: center; float: left; font-size: 8pt; + } .linDivImg { /* inner div with thumbnail */ margin: 0px; @@ -65,7 +66,12 @@ .linDivText { /* inner div with bottom or right text */ margin: 0px; padding: 0px; + padding-left: 5px; + padding-right: 5px; text-align: center; + + white-space: nowrap; + overflow: hidden; } .linDivTextDetail { margin: 0px; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |