[Linpha-cvs] SF.net SVN: linpha: [4596] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-10-26 21:53:56
|
Revision: 4596 http://svn.sourceforge.net/linpha/?rev=4596&view=rev Author: fangehrn Date: 2006-10-26 14:53:15 -0700 (Thu, 26 Oct 2006) Log Message: ----------- 2006-10-26 flo * playing around with different style colors, currently a blue one... * created gdlib script which will generate the nice round corners on the fly -> it will be possible to select the color through the admin settings Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/install/sql/sql.data.php trunk/linpha2/lib/classes/linpha.admin.class.php trunk/linpha2/lib/classes/linpha.image.class.php trunk/linpha2/lib/classes/linpha.imgview.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/basket.html.php trunk/linpha2/templates/default/filemanager.html.php trunk/linpha2/templates/default/home.html.php trunk/linpha2/templates/default/layouts/default/css/global.css trunk/linpha2/templates/default/search.html.php trunk/linpha2/templates/default/settings.html.php trunk/linpha2/templates/default/view_albcomment.html.php trunk/linpha2/templates/default/view_basket.html.php trunk/linpha2/templates/default/view_img.html.php trunk/linpha2/templates/default/view_img_static.html.php trunk/linpha2/templates/default/view_thumb.head.php trunk/linpha2/templates/default/view_thumb.html.php trunk/linpha2/templates/default/view_thumb_static.html.php trunk/linpha2/templates/default/view_thumbdetail.html.php Added Paths: ----------- trunk/linpha2/templates/default/colorsettings.php trunk/linpha2/templates/default/layouts/default/DefsThumbView.js trunk/linpha2/templates/roundcorners.php trunk/linpha2/templates/roundcorners_test.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/ChangeLog 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,3 +1,8 @@ +2006-10-26 flo + * playing around with different style colors, currently a blue one... + * created gdlib script which will generate the nice round corners on the fly + -> it will be possible to select the color through the admin settings + 2006-10-25 flo * fixed installation issues * secured $_SERVER['PHP_SELF'] Modified: trunk/linpha2/install/sql/sql.data.php =================================================================== --- trunk/linpha2/install/sql/sql.data.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/install/sql/sql.data.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -67,7 +67,8 @@ 'sys_style_thumb_nojsnrrows' => '3', 'sys_style_thumb_nojsnrcols' => '4', 'sys_style_image_quality' => '75', - 'sys_style_image_size' => '700', + 'sys_style_image_width' => '700', + 'sys_style_image_height' => '525', 'sys_style_image_nrprevnextthumbs' => '3', 'sys_user_autologin' => '1', @@ -89,7 +90,8 @@ 'sys_style_thumb_showsubfoldersseparate', 'sys_style_thumb_nojsnrrows', 'sys_style_thumb_nojsnrcols', - 'sys_style_image_size', + 'sys_style_image_width', + 'sys_style_image_height', 'sys_style_image_nrprevnextthumbs' ); Modified: trunk/linpha2/lib/classes/linpha.admin.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -56,7 +56,8 @@ 'sys_style_image_nrprevnextthumbs' => "Nr Of Previous/Next Thumbnails", 'sys_lang' => "Language", 'sys_lang_autolang' => "Autodetection of language", - 'sys_style_image_size' => "Image size", + 'sys_style_image_width' => "Max Image Width", + 'sys_style_image_height' => "Max Image Height", 'sys_style_sortorder' => "Sort order", 'sys_style_template' => "Template", 'sys_style_thumb_nojsnrcols' => "Nr Cols if Javascript deactivated", @@ -261,7 +262,8 @@ 'sys_style_thumb_nojsnrrows', 'sys_style_thumb_nojsnrcols', 'sys_style_image_quality', - 'sys_style_image_size', + 'sys_style_image_width', + 'sys_style_image_height', 'sys_style_image_nrprevnextthumbs', 'sys_user_autologin' Modified: trunk/linpha2/lib/classes/linpha.image.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.image.class.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/lib/classes/linpha.image.class.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -47,6 +47,92 @@ { } +function setFileInformation() +{ + /** + * check for valid id + * and get img_type and rotate informations + */ + $query = $GLOBALS['linpha']->db->Execute("SELECT id, img_type, rotate " . + "FROM ".PREFIX."photos " . + "WHERE id = '".LinSql::linAddslashes( $this->photo_id )."'"); + + if( $query->EOF ) // not a single value returned + { + $this->error_msg = "wrong id supplied!"; + return false; + } + + $data = $query->FetchRow(); + + if( ! LinSql::photoIsAllowed( $data['id'] ) ) + { + $this->error_msg = "not permitted!"; + return false; + } + + if($this->mode == 'img' && ! LinIdentify::isSupportedImage( $data['img_type'] ) ) + { + $this->error_msg = "only images possible!"; + return false; + } + + /** + * checke force parameter + */ + if( isset($_GET['force'] ) ) { + $this->force = true; + } else { + $this->force = false; + } + + /** + * set additional informations + */ + $this->rotate = $data['rotate']; + $this->img_type = $data['img_type']; + $this->setCachedInfos(); + + /** + * check if file already exists OR if forced + */ + if( file_exists( $this->output_file ) AND !$this->force ) + { + $this->isCached = true; + } + else // !file_exists() OR $this->force + { + $this->isCached = false; + + /** + * create subfolder if needed + */ + if( ! file_exists( dirname($this->output_file) ) ) + { + if( ! @mkdir( dirname($this->output_file) ) ) + { + $this->error_msg = "Cannot create folder ".dirname($this->output_file)." check permissions!"; + return false; + } + } + } + + /** + * use imagemagick or gdlib + */ + if($GLOBALS['linpha']->sql->config->value['sys_im_use_imagemagick']) + { + $this->image_tool = 'imagemagick'; + $this->imagemagick_path = $GLOBALS['linpha']->sql->config->value['sys_im_imagemagick_path']; + } + else + { + $this->image_tool = 'gdlib'; + } + + return true; +} + /** * set cached_id and output_file * in image mode set also rotate, watermark, quality, ... @@ -74,8 +160,8 @@ } else { - $this->max_width = $GLOBALS['linpha']->sql->config->value['sys_style_image_size']; - $this->max_height = $GLOBALS['linpha']->sql->config->value['sys_style_image_size']; + $this->max_width = $GLOBALS['linpha']->sql->config->value['sys_style_image_width']; + $this->max_height = $GLOBALS['linpha']->sql->config->value['sys_style_image_height']; } /** @@ -170,97 +256,13 @@ } -function setFileInformation() -{ - /** - * check for valid id - * and get img_type and rotate informations - */ - $query = $GLOBALS['linpha']->db->Execute("SELECT id, img_type, rotate " . - "FROM ".PREFIX."photos " . - "WHERE id = '".LinSql::linAddslashes( $this->photo_id )."'"); - - if( $query->EOF ) // not a single value returned - { - $this->error_msg = "wrong id supplied!"; - return false; - } - - $data = $query->FetchRow(); - - if( ! LinSql::photoIsAllowed( $data['id'] ) ) - { - $this->error_msg = "not permitted!"; - return false; - } - - if($this->mode == 'img' && ! LinIdentify::isSupportedImage( $data['img_type'] ) ) - { - $this->error_msg = "only images possible!"; - return false; - } - - /** - * checke force parameter - */ - if( isset($_GET['force'] ) ) { - $this->force = true; - } else { - $this->force = false; - } - - /** - * set additional informations - */ - $this->rotate = $data['rotate']; - $this->img_type = $data['img_type']; - $this->setCachedInfos(); - - /** - * check if file already exists OR if forced - */ - if( file_exists( $this->output_file ) AND !$this->force ) - { - $this->isCached = true; - } - else // !file_exists() OR $this->force - { - $this->isCached = false; - - /** - * create subfolder if needed - */ - if( ! file_exists( dirname($this->output_file) ) ) - { - if( ! @mkdir( dirname($this->output_file) ) ) - { - $this->error_msg = "Cannot create folder ".dirname($this->output_file)." check permissions!"; - return false; - } - } - } - - /** - * use imagemagick or gdlib - */ - if($GLOBALS['linpha']->sql->config->value['sys_im_use_imagemagick']) - { - $this->image_tool = 'imagemagick'; - $this->imagemagick_path = $GLOBALS['linpha']->sql->config->value['sys_im_imagemagick_path']; - } - else - { - $this->image_tool = 'gdlib'; - } - - return true; -} - +/** + * set source file informations + * + * @todo save values to database and read from there + */ function setSourceFileInformation() { - /** - * set source file informations - */ if($this->img_type != 0 && $this->img_type != 9999999) { $this->src_file = LinSql::getFullImagePath( $this->photo_id ); @@ -583,7 +585,13 @@ */ function printFileToScreen() { - Header("Content-type: image/jpeg"); + header("Content-type: image/jpeg"); + + /** + * show correct image filename wenn selecting "save as" in browser + * it works on firefox, but it does not on my IE + */ + header("Content-Disposition: inline; filename=".basename($this->src_file).";" ); readfile( $this->output_file ); } Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -430,19 +430,19 @@ if( $GLOBALS['linpha']->sql->checkPermission('basket_download')) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.$GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_all_with_checkout&checkout_as=download">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/download.png" border="0" title="'.i18n("Download Images").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/download.png" border="0" title="'.i18n("Download Images").'" />' .'</a>'."\n"; } if( $GLOBALS['linpha']->sql->checkPermission('basket_print')) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.$GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_all_with_checkout&checkout_as=print">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/print.png" border="0" title="'.i18n("Print Images").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/print.png" border="0" title="'.i18n("Print Images").'" />' .'</a>'."\n"; } if( $GLOBALS['linpha']->sql->checkPermission('basket_mail')) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.$GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_all_with_checkout&checkout_as=mail">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/slideshow.png" border="0" title="'.i18n("Mail Images").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/slideshow.png" border="0" title="'.i18n("Mail Images").'" />' .'</a>'."\n"; } /** @@ -450,7 +450,7 @@ */ if( useAjax() ) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="javascript:slideshowStartFromThumbview()">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/slideshow.png" border="0" title="'.i18n("Play Slideshow").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/slideshow.png" border="0" title="'.i18n("Play Slideshow").'" />' .'</a>'."\n"; } @@ -463,19 +463,19 @@ if( $GLOBALS['linpha']->sql->checkPermission('download')) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.LINPHA_DIR.'/download_file.php?id='.$this->id_current.'">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/download.png" border="0" title="'.i18n("Download Image").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/download.png" border="0" title="'.i18n("Download Image").'" />' .'</a>'."\n"; } if( $GLOBALS['linpha']->sql->checkPermission('basket_print')) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.$GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_this_with_checkout&checkout_as=print">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/print.png" border="0" title="'.i18n("Print Image").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/print.png" border="0" title="'.i18n("Print Image").'" />' .'</a>'."\n"; } if( $GLOBALS['linpha']->sql->checkPermission('basket_mail')) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="'.$GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_this_with_checkout&checkout_as=mail">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/slideshow.png" border="0" title="'.i18n("Mail Image").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/slideshow.png" border="0" title="'.i18n("Mail Image").'" />' .'</a>'."\n"; } @@ -484,7 +484,7 @@ */ if( useAjax() ) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="javascript:myLinImage.fullscreenStart()">'. - '<img src="'.LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/slideshow.png" border="0" title="'.i18n("Play Slideshow").'" />' + '<img src="'.$GLOBALS['linpha']->template->layoutsimagespath.'/slideshow.png" border="0" title="'.i18n("Play Slideshow").'" />' .'</a>'."\n"; } } @@ -1130,8 +1130,8 @@ */ $this->src_file = LinSql::getFullImagePath( $this->id_current ); list($this->org_width,$this->org_height,$org_type) = LinIdentify::linGetImageSize( $this->src_file ); - $this->max_width = $GLOBALS['linpha']->sql->config->value['sys_style_image_size']; - $this->max_height = $GLOBALS['linpha']->sql->config->value['sys_style_image_size']; + $this->max_width = $GLOBALS['linpha']->sql->config->value['sys_style_image_width']; + $this->max_height = $GLOBALS['linpha']->sql->config->value['sys_style_image_height']; $array = LinImage::scaleToFit($this->org_width,$this->org_height,$this->max_width,$this->max_height); $this->img_width = $array['w']; $this->img_height = $array['h']; Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -24,7 +24,9 @@ */ class LinTemplate { - public $template_name; + public $template_name, $layout_name; + public $layoutimagespath; + public $bgcolor, $bodybgcolor; public $output; public $URL_base, $URL_full; @@ -35,7 +37,14 @@ function __construct() { $this->template_name = 'default'; + $this->layout_name = 'default'; + $this->bgcolor = '87cefa'; // without '#' + $this->bodybgcolor = 'dddddd'; // without '#' $this->linpha_title = "Linpha 2.0"; + + + $this->layoutsimagespath = LINPHA_DIR.'/templates/'.$this->template_name.'/layouts/'.$this->layout_name.'/images'; + } /** @@ -54,7 +63,8 @@ */ ?> <!-- css includes --> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/css/global.css'; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/backgroundcolor.php?bgcolor='.$this->bgcolor.'&bodybgcolor='.$this->bodybgcolor; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/layouts/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'> <link rel='stylesheet' href='<?php $this->includeFile('css'); ?>' type='text/css'> <!-- IE hack for the menu--> <!--[if IE]> @@ -93,7 +103,7 @@ $filename = LINPHA_DIR.'/templates/'.$this->template_name.'/'.$this->head_name.'.head.php'; break; case 'css': - echo LINPHA_DIR.'/templates/'.$this->template_name.'/css/'.$this->css_name.'.css'; + echo LINPHA_DIR.'/templates/'.$this->template_name.'/layouts/'.$this->layout_name.'/css/'.$this->css_name.'.css'; break; } @@ -195,7 +205,20 @@ echo '</ul>'."\n"; } } - + + function divRoundCorners($top_bottom) + { + if($top_bottom == 'top') + { + $str = '<div class="roundtop"><img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=tl" alt="" width="15" height="15" class="corner" style="display: none" /></div>'; + } + elseif($top_bottom == 'bottom') + { + $str = '<div class="roundbottom"><img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=bl" alt="" width="15" height="15" class="corner" style="display: none" /></div>'; + } + + return $str; + } } // end class linTemplate ?> \ No newline at end of file Modified: trunk/linpha2/lib/js/LinImage.js =================================================================== --- trunk/linpha2/lib/js/LinImage.js 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/lib/js/LinImage.js 2006-10-26 21:53:15 UTC (rev 4596) @@ -205,11 +205,11 @@ // // showImage() - // Display image and begin preloading images. + // Display image and begin preloading next images. // showImage: function(){ Element.hide('divloading'); - new Effect.Appear('mainImage', { duration: 0.5, afterFinish: function(){ myLinImage.setImageInfoLink(); } }); + new Effect.Appear('mainImage', { duration: 0.5, afterFinish: function(){ myLinImage.setImageData(); } }); if(! fullscreenActive) { $('divimage').style.height = $('mainImage').style.height; // reset to correct height to prevent trouble if image is bigger or smaller @@ -217,13 +217,13 @@ this.enableKeyboardNav(); - this.setImageData(); - this.preloadXml(); }, setImageData: function() { + this.setImageInfoLink(); + /** * set title */ @@ -322,6 +322,12 @@ */ $('divSlideshowImgNr').innerHTML = xmlDoc[curImgId].getElementsByTagName('imgnr').item(0).firstChild.data; + + /** + * and at least, start preloading images + */ + this.preloadXml(); + }, // end function setImageData() @@ -385,11 +391,11 @@ keycode = e.which; } - if( e.ctrlKey ) + /*if( e.ctrlKey ) { alert('ctrl pressed'); return; - } + }*/ key = String.fromCharCode(keycode).toLowerCase(); Modified: trunk/linpha2/lib/js/LinThumbnails.js =================================================================== --- trunk/linpha2/lib/js/LinThumbnails.js 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/lib/js/LinThumbnails.js 2006-10-26 21:53:15 UTC (rev 4596) @@ -11,25 +11,6 @@ var nr_pages = 0; /** - * fine tuning - * better a space more than a space too less - */ -if(view_mode == 'thumbdetail') -{ - var img_spacer_width = 150 + 28; // used to calculate nr_cols, 200 = width of text div, 25 = overhead - var img_spacer_height = 10; // used to calculate nr_rows - var img_div_spacer_height = 0; // used to calculate max-height of the image (depending how much text we would like to add at bottom) -} -else // 'thumb' -{ - var img_spacer_width = 12; // used to calculate nr_cols - var img_spacer_height = 11; // used to calculate nr_rows - var img_div_spacer_height = 11; // used to calculate max-height of the image (depending how much text we would like to add at bottom) -} - - - -/** * page numbers */ var pn_left = 3; @@ -121,7 +102,7 @@ } if(view_mode == 'thumbdetail') { - var style2text = ' style="float: left;"'; + var style2text = ' divimgdetail'; } else { var style2text = ''; } @@ -129,7 +110,7 @@ divhtmltext += '<div id="div' + i + '"' + styletext + ' class="divthumb">' + - img_ids[i]['before'] + '<div class="divimg"' + style2text + '>' + + img_ids[i]['before'] + '<div class="divimg' + style2text + '">' + '<a href="' + link_url + '&id=' + img_ids[i]['id'] + '">' + '<img src="' + link_get_thumb + img_ids[i]['id'] + '"' + ' height="' + tn_size + '" width="' + tn_size + '" ' + Modified: trunk/linpha2/templates/default/basket.html.php =================================================================== --- trunk/linpha2/templates/default/basket.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/basket.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,7 +1,7 @@ <div id="divnavigation"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="navigation"> @@ -166,14 +166,14 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> @@ -211,7 +211,7 @@ </form> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> Added: trunk/linpha2/templates/default/colorsettings.php =================================================================== --- trunk/linpha2/templates/default/colorsettings.php (rev 0) +++ trunk/linpha2/templates/default/colorsettings.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -0,0 +1,71 @@ +<?php +header("Content-Type: text/css"); + +/* + * Created on 26.10.2006 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates + */ +?> + +/** + * background color + * #divthumbnavi amd #divSlideshowControlsInner used in view_img.html.php + */ + body { + background-color: #<?php echo $_GET['bodybgcolor']; ?>; + } + + #divleft, #divmain, #divright, #divthumbnavi, #divnavigation, #divSlideshowControlsInner, .roundAlphabottomInner { + background-color: #<?php echo $_GET['bgcolor']; ?>; + } + +/** + * rounded corner stuff + */ + .roundtop { + background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&bgcolor=<?php echo $_GET['bodybgcolor']; ?>&size=15&align=tr) no-repeat top right; + } + + .roundbottom { + background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&bgcolor=<?php echo $_GET['bodybgcolor']; ?>&size=15&align=br) no-repeat top right; + } + + img.corner { + width: 15px; + height: 15px; + border: none; + display: block !important; + } + + .roundAlphatop { + position: relative; + /*background: url(../images/tr_alpha.gif) no-repeat top right;*/ + background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&alpha&size=15&align=tr) no-repeat top right; + } + + .roundAlphabottom { + position: relative; + /*background: url(../images/br_alpha.gif) no-repeat top right;*/ + background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&alpha&size=15&align=br) no-repeat top right; + } + + + .roundAlphabottomInner { + margin: 0px; + padding: 0px; + margin-left: 15px; + margin-right: 15px; + height: 15px; + } + + img.AlphaCorner { + position: absolute; + top: 0px; + left: 0px; + width: 15px; + height: 15px; + border: none; + display: block !important; + } \ No newline at end of file Modified: trunk/linpha2/templates/default/filemanager.html.php =================================================================== --- trunk/linpha2/templates/default/filemanager.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/filemanager.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,6 +1,6 @@ <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> @@ -14,6 +14,6 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/home.html.php =================================================================== --- trunk/linpha2/templates/default/home.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/home.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,7 +1,5 @@ <div id="divmain"> - <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> <div id="main"> @@ -84,7 +82,5 @@ <?php } ?> </div> - <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> - </div> + <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Added: trunk/linpha2/templates/default/layouts/default/DefsThumbView.js =================================================================== --- trunk/linpha2/templates/default/layouts/default/DefsThumbView.js (rev 0) +++ trunk/linpha2/templates/default/layouts/default/DefsThumbView.js 2006-10-26 21:53:15 UTC (rev 4596) @@ -0,0 +1,18 @@ +/** + * fine tuning for thumb view + * maybe template specific -> place in a separate file + * + * better a space more than a space too less + */ +if(view_mode == 'thumbdetail') +{ + var img_spacer_width = 150 + 28; // used to calculate nr_cols, 150 = width of text div, 28 = overhead + var img_spacer_height = 10; // used to calculate nr_rows + var img_div_spacer_height = 0; // used to calculate max-height of the image (depending how much text we would like to add at bottom) +} +else // 'thumb' +{ + var img_spacer_width = 12; // used to calculate nr_cols + var img_spacer_height = 11; // used to calculate nr_rows + var img_div_spacer_height = 11; // used to calculate max-height of the image (depending how much text we would like to add at bottom) +} \ No newline at end of file Modified: trunk/linpha2/templates/default/layouts/default/css/global.css =================================================================== --- trunk/linpha2/templates/default/layouts/default/css/global.css 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/layouts/default/css/global.css 2006-10-26 21:53:15 UTC (rev 4596) @@ -22,14 +22,6 @@ } /** - * background color - * #divthumbnavi amd #divSlideshowControls used in view_img.html.php - */ - #divleft, #divmain, #divright, #divthumbnavi, #divnavigation, #divSlideshowControlsInner, .roundAlphabottomInner { - background-color: #f90; - } - - /** * link button */ .button, a.button { @@ -288,51 +280,4 @@ */ -/** - * rounded corner stuff - */ - .roundtop { - background: url(../images/tr.gif) no-repeat top right; - } - - .roundbottom { - background: url(../images/br.gif) no-repeat top right; - } - - img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; - } - - .roundAlphatop { - position: relative; - background: url(../images/tr_alpha.gif) no-repeat top right; - } - - .roundAlphabottom { - position: relative; - background: url(../images/br_alpha.gif) no-repeat top right; - } - - - .roundAlphabottomInner { - margin: 0px; - padding: 0px; - margin-left: 15px; - margin-right: 15px; - height: 15px; - } - - img.AlphaCorner { - position: absolute; - top: 0px; - left: 0px; - width: 15px; - height: 15px; - border: none; - display: block !important; - } - --> \ No newline at end of file Modified: trunk/linpha2/templates/default/search.html.php =================================================================== --- trunk/linpha2/templates/default/search.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/search.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -27,7 +27,7 @@ ?> <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> @@ -95,7 +95,7 @@ ?> <br /><b><?php echo i18n("Search").strtoupper($meta_type); ?></b><br /> <input type="checkbox" id="b_<?php echo $meta_type; ?>_all" name="button[<?php echo $meta_type; ?>][all]" value="1"<?php echo isset($_REQUEST['b_'.$meta_type.'_all']) ? ' checked' : ''; ?> onClick="check_all('b_<?php echo $meta_type; ?>_all','<?php echo $meta_type; ?>')"><label for="b_<?php echo $meta_type; ?>_all"><b><?php echo i18n("All"); ?></b></label> - <a href="javascript:div_expand('div_<?php echo $meta_type; ?>');"><img border="0" src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/expand.gif'; ?>" /></a> + <a href="javascript:div_expand('div_<?php echo $meta_type; ?>');"><img border="0" src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/expand.gif'; ?>" /></a> <br /> <div id="div_<?php echo $meta_type; ?>" style="border: 1px solid black; width: 200px;"> <?php @@ -230,7 +230,7 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> Modified: trunk/linpha2/templates/default/settings.html.php =================================================================== --- trunk/linpha2/templates/default/settings.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/settings.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,6 +1,6 @@ <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> @@ -14,6 +14,6 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_albcomment.html.php =================================================================== --- trunk/linpha2/templates/default/view_albcomment.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_albcomment.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,6 +1,6 @@ <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> @@ -18,6 +18,6 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_basket.html.php =================================================================== --- trunk/linpha2/templates/default/view_basket.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_basket.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -1,6 +1,6 @@ <div id="divnavigation"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="navigation"> @@ -19,13 +19,13 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="divpage_nr"> @@ -121,6 +121,6 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_img.html.php =================================================================== --- trunk/linpha2/templates/default/view_img.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_img.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -6,7 +6,7 @@ <div id="divthumbnavi"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="thumbnavi"> @@ -16,13 +16,13 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> <div id="divloading"> @@ -72,7 +72,7 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> @@ -119,7 +119,7 @@ </div> <div class="roundAlphabottom"> <div class="roundAlphabottomInner"> </div> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl_alpha.gif'; ?>" alt="" width="15" height="15" class="AlphaCorner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl_alpha.gif'; ?>" alt="" width="15" height="15" class="AlphaCorner" style="display: none" /> </div> </div> <div id="divSlideshowImage" style="display: none;"></div> Modified: trunk/linpha2/templates/default/view_img_static.html.php =================================================================== --- trunk/linpha2/templates/default/view_img_static.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_img_static.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -7,7 +7,7 @@ <div id="divthumbnavi"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="thumbnavi"> @@ -21,13 +21,13 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> <?php if($_SESSION['mode_imageview']=='meta') { ?> @@ -88,13 +88,13 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <div id="divright"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="right"> <?php @@ -105,6 +105,6 @@ ?> </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_thumb.head.php =================================================================== --- trunk/linpha2/templates/default/view_thumb.head.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_thumb.head.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -10,5 +10,5 @@ </script> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/scriptaculous.js?load=builder"></script> +<script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/layouts/'.$GLOBALS['linpha']->template->layout_name.'/DefsThumbView.js'; ?>"></script> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/LinThumbnails.js"></script> -<script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/LinThumbnails.js"></script> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_thumb.html.php =================================================================== --- trunk/linpha2/templates/default/view_thumb.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_thumb.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -9,13 +9,13 @@ <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> <div id="divnavigation"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <?php } ?> @@ -25,7 +25,7 @@ <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="divpage_nr"> @@ -42,7 +42,7 @@ <div style="clear: both;"></div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> Modified: trunk/linpha2/templates/default/view_thumb_static.html.php =================================================================== --- trunk/linpha2/templates/default/view_thumb_static.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_thumb_static.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -3,13 +3,13 @@ <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> <div id="divnavigation"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <?php } ?> @@ -19,7 +19,7 @@ <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="divpage_nr"> @@ -57,6 +57,6 @@ </div> <div style="clear: both;"></div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/view_thumbdetail.html.php =================================================================== --- trunk/linpha2/templates/default/view_thumbdetail.html.php 2006-10-26 19:07:33 UTC (rev 4595) +++ trunk/linpha2/templates/default/view_thumbdetail.html.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -10,13 +10,13 @@ <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> <div id="divnavigation"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> <?php } ?> @@ -25,7 +25,7 @@ <div id="divmain"> <div class="roundtop"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/tl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> <div id="main"> @@ -65,6 +65,6 @@ </div> <div class="roundbottom"> - <img src="<?php echo LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/images/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> + <img src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/bl.gif'; ?>" alt="" width="15" height="15" class="corner" style="display: none" /> </div> </div> \ No newline at end of file Added: trunk/linpha2/templates/roundcorners.php =================================================================== --- trunk/linpha2/templates/roundcorners.php (rev 0) +++ trunk/linpha2/templates/roundcorners.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -0,0 +1,119 @@ +<?php +if(!defined('LINPHA_DIR')) { define('LINPHA_DIR','..'); } + +/** + * @todo force cache on + */ + + +include_once( LINPHA_DIR.'/lib/plugins/watermark/func.watermark.php' ); + +if(!isset($_GET['color'])) +{ + $_GET['color'] = 'orange'; +} + +if(!isset($_GET['bgcolor'])) +{ + $_GET['bgcolor'] = 'white'; +} + +if(!isset($_GET['align'])) +{ + $_GET['align'] = 'tl'; +} + +if(!isset($_GET['size'])) +{ + $size = 15; +} +else +{ + $size = $_GET['size']; +} + +switch($_GET['align']) +{ +case 'tl': $cx = $size; $cy = $size; $workaround = 0; break; +case 'tr': $cx = -1; $cy = $size; $workaround = 0; break; +case 'bl': $cx = $size; $cy = 0; $workaround = 1; break; +case 'br': $cx = -1; $cy = -1; $workaround = 1; break; +} + +// create image +$image = imagecreatetruecolor($size, $size); + +// create colors +$rgb = get_rgb_from_all($_GET['color']); +$color = imagecolorallocate($image, $rgb['r'], $rgb['g'], $rgb['b']); + +if(isset($_GET['alpha'])) +{ + imageAlphaBlending($image, false); + imageSaveAlpha($image, true); + $bgcolor = imagecolorallocatealpha($image, 0, 0, 0, 127); +} +else +{ + $rgb = get_rgb_from_all($_GET['bgcolor']); + $bgcolor = imagecolorallocate($image, $rgb['r'], $rgb['g'], $rgb['b']); +} + +// fill image with background color +imagefill($image, 0, 0, $bgcolor); + + +// draw circly +imagefilledellipse($image, $cx, $cy, ($size*2), ($size*2), $color); + +// workaround +if($workaround) +{ + imageline($image, 0, 0, $size-1, 0, $color ); +} + + +// flush image +header('Content-type: image/png'); +imagepng($image); +imagedestroy($image); + + + +/* +$size = 300; +$image=imagecreatetruecolor($size, $size); + +// something to get a white background with black border +$back = imagecolorallocate($image, 255, 255, 255); +$border = imagecolorallocate($image, 0, 0, 0); +imagefilledrectangle($image, 0, 0, $size - 1, $size - 1, $back); +imagerectangle($image, 0, 0, $size - 1, $size - 1, $border); + +$yellow_x = 100; +$yellow_y = 75; +$red_x = 120; +$red_y = 165; +$blue_x = 187; +$blue_y = 125; +$radius = 150; + +// allocate colors with alpha values +$yellow = imagecolorallocatealpha($image, 255, 255, 0, 75); +$red = imagecolorallocatealpha($image, 255, 0, 0, 75); +$blue = imagecolorallocatealpha($image, 0, 0, 255, 127); + +// drawing 3 overlapped circle +imagefilledellipse($image, $yellow_x, $yellow_y, $radius, $radius, $yellow); +imagefilledellipse($image, $red_x, $red_y, $radius, $radius, $red); +imagefilledellipse($image, $blue_x, $blue_y, $radius, $radius, $blue); + +// don't forget to output a correct header! +header('Content-type: image/png'); + +// and finally, output the result +imagepng($image); +imagedestroy($image); +*/ + +?> \ No newline at end of file Added: trunk/linpha2/templates/roundcorners_test.php =================================================================== --- trunk/linpha2/templates/roundcorners_test.php (rev 0) +++ trunk/linpha2/templates/roundcorners_test.php 2006-10-26 21:53:15 UTC (rev 4596) @@ -0,0 +1,23 @@ +<body style="background: blue;"> + +<img src="roundcorners.php?align=tl" /><br /><br /> +<img src="roundcorners.php?align=tr" /><br /><br /> +<img src="roundcorners.php?align=bl" /><br /><br /> +<img src="roundcorners.php?align=br" /><br /><br /> + +<img src="roundcorners.php?align=tl&alpha" /><br /><br /> +<img src="roundcorners.php?align=tr&alpha" /><br /><br /> +<img src="roundcorners.php?align=bl&alpha" /><br /><br /> +<img src="roundcorners.php?align=br&alpha" /><br /><br /> + +<img src="roundcorners.php?align=tl&size=100&color=pink" /><br /><br /> +<img src="roundcorners.php?align=tr&size=75&color=skyblue" /><br /><br /> +<img src="roundcorners.php?align=bl&size=50&color=gray" /><br /><br /> +<img src="roundcorners.php?align=br&size=25&color=red" /><br /><br /> + +<img src="roundcorners.php?align=tl&size=100&color=pink&alpha" /><br /><br /> +<img src="roundcorners.php?align=tr&size=75&color=skyblue&alpha" /><br /><br /> +<img src="roundcorners.php?align=bl&size=50&color=gray&alpha" /><br /><br /> +<img src="roundcorners.php?align=br&size=25&color=red&alpha" /><br /><br /> + +</body> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |