[Linpha-cvs] SF.net SVN: linpha: [4907] trunk/linpha2/templates
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2008-03-16 08:53:10
|
Revision: 4907 http://linpha.svn.sourceforge.net/linpha/?rev=4907&view=rev Author: fangehrn Date: 2008-03-16 01:53:04 -0700 (Sun, 16 Mar 2008) Log Message: ----------- 2008-03-15 flo * fixed some IE bugs everything should now work fine on firefox/opera/IE 2008-03-13 flo * finished fullscreen/slideshow/navigation 2008-03-09 flo * re-design thumb and image view Modified Paths: -------------- trunk/linpha2/templates/default/slideshow.js.php trunk/linpha2/templates/default/themes/default/colorsettings.php trunk/linpha2/templates/misc/box.php trunk/linpha2/templates/misc/box_test.php trunk/linpha2/templates/misc/roundCorners.css Added Paths: ----------- trunk/linpha2/templates/default/tabs/ trunk/linpha2/templates/default/tabs/comments.html.php trunk/linpha2/templates/default/tabs/exif.html.php trunk/linpha2/templates/default/tabs/gps.html.php trunk/linpha2/templates/default/tabs/imageInfo.html.php trunk/linpha2/templates/default/tabs/iptcXmp.html.php trunk/linpha2/templates/default/tabs/videoInfo.html.php Modified: trunk/linpha2/templates/default/slideshow.js.php =================================================================== --- trunk/linpha2/templates/default/slideshow.js.php 2008-03-16 08:52:25 UTC (rev 4906) +++ trunk/linpha2/templates/default/slideshow.js.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -1,205 +1,80 @@ <?php +define('LINPHA_DIR','../..'); +include_once(LINPHA_DIR.'/lib/include/common.php'); +require_once(LINPHA_DIR.'/lib/classes/linpha.class.php'); +$linpha = new Linpha(); // define LINPHA_CLIENT +$linpha->sql->startSession(); // load language strings and enable template class -switch($fragment) -{ -/** - * the slideshow controls - */ -case 'slideshow': - ?> - <div id="linDivSlideshowControls"> - <div style="float: left; margin-left: 10px; "> - <a href="javascript:myLinImage.moveFirst()"><img id="linSsImgFirst" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_first.gif" width="25" height="25" border="0" alt="First" title="<?php echo i18n("First"); ?>" /></a> - <a href="javascript:myLinImage.movePrev()"><img id="linSsImgPrev" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_previous.gif" width="25" height="25" border="0" alt="Previous" title="<?php echo i18n("Previous"); ?>" /></a> - <a href="javascript:myLinImage.slideshowStartStop()"><img id="linSsImgStart" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_play.gif" width="25" height="25" border="0" alt="Play" title="<?php echo i18n("Play/Pause"); ?>" /></a> - <!--<a href="javascript:myLinImage.slideshowStop()"><img id="linSsImgStop" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_stop.gif" width="25" height="25" border="0" alt="Stop" title="<?php echo i18n("Stop"); ?>" /></a>--> - <a href="javascript:myLinImage.moveNext()"><img id="linSsImgNext" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_next.gif" width="25" height="25" border="0" alt="Next" title="<?php echo i18n("Next"); ?>" /></a> - <a href="javascript:myLinImage.moveLast()"><img id="linSsImgLast" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_last.gif" width="25" height="25" border="0" alt="Last" title="<?php echo i18n("Last"); ?>" /></a> - </div> - - <div style="float: left; margin-left: 40px; "> - <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> - <option value="10">10 s</option> - <option value="15">15 s</option> - <option value="30">30 s</option> - <option value="45">45 s</option> - <option value="60">60 s</option> - </select> - </div> - - <div style="float: left; margin-left: 10px; "> - <a href="javascript:myLinImage.slideshowChangeLoop()"><img id="linSsImgLoop" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_loop.gif" width="25" height="25" border="0" alt="Loop" title="<?php echo i18n("Enable/disable Loop"); ?>" /></a> - <!--<a href="javascript:myLinImage.slideshowChangeLoop()"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_noloop.gif" width="25" height="25" border="0" /></a>--> - <a href="javascript:myLinImage.slideshowChangeRandom()"><img id="linSsImgRandom" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_norandom.gif" width="25" height="25" border="0" alt="Random" title="<?php echo i18n("Enable/disable Random Play Order"); ?>" /></a> - <!--<a href="javascript:myLinImage.slideshowChangeRandom()"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_random.gif" width="25" height="25" border="0" /></a>--> - </div> - - <div id="linDivSlideshowImgNr" style="float: left; margin-left: 40px; "></div> - - <div id="linDivSlideshowExit" style="float: left; margin-left: 40px; "> - <a href="javascript:myLinImage.fullscreenStop()"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_stop.gif" width="25" height="25" border="0" alt="Exit" title="<?php echo i18n("Exit Fullscreen"); ?>" ></a> - </div> - - <div style="clear: both;"></div> - </div> - <?php echo $linTpl->divRoundCorners('bottom','alpha'); ?> -<?php -break; +header('Content-type: text/javascript'); - /** - * view meta + * force caching in browser + * works in firefox and internet explorer */ -case 'edit_meta': - if($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) { ?> - - <?php - /** - * @todo thats not the correct way including css files... :-/ - */ - ?> - <link rel='stylesheet' href='<?php echo LINPHA_CLIENT.'/templates/'.$this->template_name.'/themes/default/css/admin.css'; ?>' type='text/css'> +header("Last-Modified: " . gmdate("D, d M Y H:i:s",gmmktime (0,0,0,1,1,2000))); // Date in the past +header("Expires: Mon, 26 Jul 2100 05:00:00 GMT"); // In other words... never expire the image +header("Cache-Control: max-age=10000000, s-maxage=1000000, proxy-revalidate, must-revalidate"); - <?php if($GLOBALS['linpha']->imgview->img_type!=0) { ?> - <ul class="linUlMenu"> - <li><a id="linAMetaLinpha" href="javascript:showMetaLinpha()">LinPHA MetaData</a></li> - <li><a id="linAMetaIptc" href="javascript:showMetaIptc()">IPTC MetaData</a></li> - <li><a id="linAMetaXmp" href="javascript:showMetaXmp()">XMP MetaData</a></li> - </ul> - <?php } /* end if img_type!=0 */ ?> - - <div id="linDivMetaLinpha"> - <form action="<?php echo $linTpl->URL_full; ?>" method="POST"> - <table border="0" style="float: left;"> - <?php echo $linTpl->output['meta_linpha']; ?> - <tr> - <td rowspan="2"> - <br /> - <input type="hidden" name="linCmd" value="linInsertMetaLinpha" /> - <input type="submit" class="linButton" name="submit" value="<?php echo i18n("Submit"); ?>" /> - </td> - </tr> - </table> - </form> - </div> - - <?php if($GLOBALS['linpha']->imgview->img_type!=0) { ?> - <div id="linDivMetaIptc"> - <?php if($GLOBALS['linpha']->sql->config->value['sys_image_iptc']) { - echo '<br />'; - if($meta_edit_possible) { ?> - <form action="<?php echo $linTpl->URL_full; ?>" method="POST"> - <table border="0"> - <?php - include(LINPHA_DIR.'/lib/include/metadata_iptc_edit.php'); - ?> - <tr> - <td rowspan="2"> - <br /> - <input type="hidden" name="linCmd" value="linInsertMetaIptc" /> - <input type="submit" class="linButton" name="submit" value="<?php echo i18n("Submit"); ?>" /> - </td> - </tr> - </form> - </table> - <br> - <br> - <p>Powered by: <a href="http://owl.phy.queensu.ca/~phil/exiftool/" >ExifTool</a></p> - <?php - } else { - echo i18n("Error: File not writable. Please check the file permissions."); /* @todo use unified language string */ - } - } else { - echo i18n("IPTC Is Currently Disabled.").'<br /><br />'; - if($GLOBALS['linpha']->sql->isAdmin()) { - echo '<a href="'.LINPHA_CLIENT.'/admin/?cat=metadata_define_iptc">'.i18n("Enable IPTC").'</a>'; - echo '<br /><br />'; - } - } ?> - </div> - <?php } /* end if img_type!=0 */ ?> - <?php if($GLOBALS['linpha']->imgview->img_type!=0) { ?> - <div id="linDivMetaXmp"> - <?php if($GLOBALS['linpha']->sql->config->value['sys_image_xmp']) { - echo '<br />'; - if($meta_edit_possible) { ?> - <form action="<?php echo $linTpl->URL_full; ?>" method="POST"> - <table border="0"> - <?php - include(LINPHA_DIR.'/lib/include/metadata_xmp_edit.php'); - ?> - <tr> - <td rowspan="2"> - <br /> - <input type="hidden" name="linCmd" value="linInsertMetaXmp" /> - <input type="submit" class="linButton" name="submit" value="<?php echo i18n("Submit"); ?>" /> - </td> - </tr> - </form> - </table> - <br> - <br> - <p>Powered by: <a href="http://owl.phy.queensu.ca/~phil/exiftool/" >ExifTool</a></p> - <?php - } else { - echo i18n("Error: File not writable. Please check the file permissions."); /* @todo use unified language string */ - } - } else { - echo i18n("XMP Is Currently Disabled.").'<br /><br />'; - if($GLOBALS['linpha']->sql->isAdmin()) { - echo '<a href="'.LINPHA_CLIENT.'/admin/?cat=metadata_define_xmp">'.i18n("Enable XMP").'</a>'; - echo '<br /><br />'; - } - } ?> - </div> - <?php } /* end if img_type!=0 */ ?> - </form> - - <div style="clear: both;"></div> - <?php if($GLOBALS['linpha']->imgview->img_type!=0) { ?> - <script language="JavaScript" type="text/javascript"> - <!-- - function showMetaLinpha() - { - $('linAMetaLinpha').className = 'current'; - $('linAMetaIptc').className = ''; - $('linAMetaXmp').className = ''; - Element.hide('linDivMetaIptc'); - Element.hide('linDivMetaXmp'); - Element.show('linDivMetaLinpha'); - } - function showMetaIptc() - { - $('linAMetaLinpha').className = ''; - $('linAMetaXmp').className = ''; - $('linAMetaIptc').className = 'current'; - Element.hide('linDivMetaLinpha'); - Element.hide('linDivMetaXmp'); - Element.show('linDivMetaIptc'); - } - function showMetaXmp() - { - $('linAMetaLinpha').className = ''; - $('linAMetaIptc').className = ''; - $('linAMetaXmp').className = 'current'; - Element.hide('linDivMetaLinpha'); - Element.hide('linDivMetaIptc'); - Element.show('linDivMetaXmp'); - } - showMetaLinpha(); - --> - </script> - <?php } /* end if img_type!=0 */ ?> - - <?php } /* end if checkPermission('metadata_edit') */ ?> - - <?php -break; -} +ob_start(); ?> +<div id="linDivImageSlideshow" style="display: none"> + <div id="linDivMainImageSlideshow" style="width: <?php echo $GLOBALS['linpha']->sql->config->value['sys_style_image_width']; ?>px; height: <?php + echo $GLOBALS['linpha']->sql->config->value['sys_style_image_height']; ?>px;"> + <div id="linDivLoadingSlideshow"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/loading.gif"></div> + <img id="linImgMainImageSlideshow" src="" /> + <div id="linDivDescriptionSlideshow"></div> + </div> +</div> +<div id="linDivSlideshowControlsOuter" style="display: none"> + <?php echo $linTpl->divRoundCorners('top','slideshow'); ?> + <div id="linDivSlideshowControls"> + <div style="float: left; margin-left: 10px; "> + <a href="javascript:myLinAlbum.moveFirst()"><img id="linSsImgFirst" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_first.gif" width="25" height="25" border="0" alt="First" title="<?php echo i18n("First"); ?>" /></a> + <a href="javascript:myLinAlbum.movePrev()"><img id="linSsImgPrev" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_previous.gif" width="25" height="25" border="0" alt="Previous" title="<?php echo i18n("Previous"); ?>" /></a> + <a href="javascript:myLinAlbum.slideshowStartStop()"><img id="linSsImgStart" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_play.gif" width="25" height="25" border="0" alt="Play" title="<?php echo i18n("Play/Pause"); ?>" /></a> + <!--<a href="javascript:myLinAlbum.slideshowStop()"><img id="linSsImgStop" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_stop.gif" width="25" height="25" border="0" alt="Stop" title="<?php echo i18n("Stop"); ?>" /></a>--> + <a href="javascript:myLinAlbum.moveNext()"><img id="linSsImgNext" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_next.gif" width="25" height="25" border="0" alt="Next" title="<?php echo i18n("Next"); ?>" /></a> + <a href="javascript:myLinAlbum.moveLast()"><img id="linSsImgLast" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_last.gif" width="25" height="25" border="0" alt="Last" title="<?php echo i18n("Last"); ?>" /></a> + </div> + + <div style="float: left; margin-left: 40px; "> + <select id="linSsDelay" name="delay" size="1" class="linForms" onchange="myLinAlbum.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> + <option value="10">10 s</option> + <option value="15">15 s</option> + <option value="30">30 s</option> + <option value="45">45 s</option> + <option value="60">60 s</option> + </select> + </div> + + <div style="float: left; margin-left: 10px; "> + <a href="javascript:myLinAlbum.slideshowChangeLoop()"><img id="linSsImgLoop" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_loop.gif" width="25" height="25" border="0" alt="Loop" title="<?php echo i18n("Enable/disable Loop"); ?>" /></a> + <!--<a href="javascript:myLinAlbum.slideshowChangeLoop()"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_noloop.gif" width="25" height="25" border="0" /></a>--> + <a href="javascript:myLinAlbum.slideshowChangeRandom()"><img id="linSsImgRandom" src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_norandom.gif" width="25" height="25" border="0" alt="Random" title="<?php echo i18n("Enable/disable Random Play Order"); ?>" /></a> + <!--<a href="javascript:myLinAlbum.slideshowChangeRandom()"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_random.gif" width="25" height="25" border="0" /></a>--> + </div> + + <?php /*<div id="linDivSlideshowImgNr" style="float: left; margin-left: 40px; "></div>*/ ?> + + <div id="linDivSlideshowExit" style="float: left; margin-left: 40px; "> + <a href="javascript:myLinAlbum.fullscreenStop()"><img src="<?php echo LINPHA_CLIENT; ?>/lib/graphics/ss_stop.gif" width="25" height="25" border="0" alt="Exit" title="<?php echo i18n("Exit Fullscreen"); ?>" ></a> + </div> + + <div style="clear: both;"></div> + </div> + <?php echo $linTpl->divRoundCorners('bottom','slideshow'); ?> +</div> +<?php +$string = ob_get_clean(); + +$string = str_replace("\n","",$string); +$string = str_replace("\r","",$string); +$string = str_replace("\t","",$string); +echo "var linSlideshowHtml = '".$string."'"; +?> \ No newline at end of file Added: trunk/linpha2/templates/default/tabs/comments.html.php =================================================================== --- trunk/linpha2/templates/default/tabs/comments.html.php (rev 0) +++ trunk/linpha2/templates/default/tabs/comments.html.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -0,0 +1,40 @@ +<?php if($GLOBALS['linpha']->sql->checkPermission('metadata_comments')) { ?> + +<?php if (isset($linTpl->output['sys_log'])) { ?> + <?php echo $linTpl->output['sys_log']; ?><br /><br /> +<?php } ?> + +<!-- show add comment form --> +<div id="linDivAddComment"> +<?php /* myLinGlobal.AjaxPost(linUrlBase + '&linId=' + IdCurrent + '&xml', Form.serialize(this),myLinImage.saveComment) */ ?> +<form action="" method="POST" onsubmit="myLinAlbum.saveComment(this); return false;"> +<?php echo i18n("Add Comment"); ?>:<br /> +<div id="linDivAddCommentText"> + <input type="text" id="linInputAddCommentText" class="linForms" name="inputAddCommentText" value="" tabindex="1" style="width: 300px" /> + <a href="javascript:myLinAlbum.openTextarea()">(+)</a> +</div> +<div id="linDivAddCommentTextarea" style="display: none;"> + <textarea id="linInputAddCommentTextarea" class="linForms" name="inputAddCommentTextarea" tabindex="1" rows="8" style="width: 300px"></textarea> + <a href="javascript:myLinAlbum.closeTextarea()">(-)</a> +</div> + +<div style="display: block; float: left; width: 66px;"><?php echo i18n("Name"); ?>:</div> +<input type="text" class="linForms" name="inputAddCommentAuthor" value="" tabindex="2" size="10" style="width: 150px" maxlength="255" /> + +<input type="hidden" name="linCmd" value="addComment" /> +<input type="submit" name="submit" class="linButton" value="<?php echo i18n("Submit"); ?>" tabindex="3" style="width: 80px" /> +</form> +</div> + +<br /> +<?php } /* end if checkPermission('metadata_comments') */ ?> + +<!-- show image comments --> +<div id="linDivComments"> + <?php foreach($this->comments as $comment) { ?> + <?php echo $comment['time'].' '.i18n("by").' '.$comment['author']; ?> + <hr /> + <?php echo $comment['text']; ?> + <br /><br /> + <?php } ?> +</div> Added: trunk/linpha2/templates/default/tabs/exif.html.php =================================================================== --- trunk/linpha2/templates/default/tabs/exif.html.php (rev 0) +++ trunk/linpha2/templates/default/tabs/exif.html.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -0,0 +1,9 @@ +Exif +<table id="linTableMeta"> +<?php +foreach($this->exif as $data) +{ + echo '<tr><td class="linTdMetaLeftColumn">'.$data['name'].'</strong></td><td>'.$data['value'].'</td></tr>'; +} +?> +</table> Added: trunk/linpha2/templates/default/tabs/gps.html.php =================================================================== --- trunk/linpha2/templates/default/tabs/gps.html.php (rev 0) +++ trunk/linpha2/templates/default/tabs/gps.html.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -0,0 +1 @@ +GPS Added: trunk/linpha2/templates/default/tabs/imageInfo.html.php =================================================================== --- trunk/linpha2/templates/default/tabs/imageInfo.html.php (rev 0) +++ trunk/linpha2/templates/default/tabs/imageInfo.html.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -0,0 +1,8 @@ +<table id="linTableMeta"> +<?php +foreach($this->imageInfo as $data) +{ + echo '<tr><td class="linTdMetaLeftColumn">'.$data['name'].'</strong></td><td>'.$data['value'].'</td></tr>'; +} +?> +</table> Added: trunk/linpha2/templates/default/tabs/iptcXmp.html.php =================================================================== --- trunk/linpha2/templates/default/tabs/iptcXmp.html.php (rev 0) +++ trunk/linpha2/templates/default/tabs/iptcXmp.html.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -0,0 +1 @@ +IPTC/XMP Added: trunk/linpha2/templates/default/tabs/videoInfo.html.php =================================================================== --- trunk/linpha2/templates/default/tabs/videoInfo.html.php (rev 0) +++ trunk/linpha2/templates/default/tabs/videoInfo.html.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -0,0 +1,9 @@ +Video +<table id="linTableMeta"> +<?php +foreach($this->videoInfo as $data) +{ + echo '<tr><td class="linTdMetaLeftColumn">'.$data['name'].'</strong></td><td>'.$data['value'].'</td></tr>'; +} +?> +</table> Modified: trunk/linpha2/templates/default/themes/default/colorsettings.php =================================================================== --- trunk/linpha2/templates/default/themes/default/colorsettings.php 2008-03-16 08:52:25 UTC (rev 4906) +++ trunk/linpha2/templates/default/themes/default/colorsettings.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -57,8 +57,8 @@ * round corners */ .linCornMain { - min-width:20em; - max-width:3000px; + min-width: 20em; + max-width: 3000px; } .linCornMain .linCornC, /* C = content */ @@ -71,8 +71,8 @@ .linCornFolder { - min-width:20em; - max-width:800px; + min-width: 20em; + max-width: 800px; } .linCornFolder .linCornC, /* C = content */ @@ -81,3 +81,17 @@ .linCornFolder .linCornB div { background:transparent url(../../../misc/box.php?col=<?php echo $_GET['albumsbg']; ?>&w=900&h=200) no-repeat top right; } + + + .linCornSlideshow { + width: 400px; + } + + .linCornSlideshow .linCornC, /* C = content */ + .linCornSlideshow .linCornT, /* T = Top */ + .linCornSlideshow .linCornB, /* B = Bottom */ + .linCornSlideshow .linCornB div { + background:transparent url(../../../misc/box.php?col=<?php echo $_GET['bg']; ?>&w=415&h=100&t=bottom) no-repeat top right; + } + + \ No newline at end of file Modified: trunk/linpha2/templates/misc/box.php =================================================================== --- trunk/linpha2/templates/misc/box.php 2008-03-16 08:52:25 UTC (rev 4906) +++ trunk/linpha2/templates/misc/box.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -7,8 +7,15 @@ $rad = (isset($_GET['r']) ? intval($_GET['r']) : 15); $width = (isset($_GET['w']) ? intval($_GET['w']) : 2100); $height = (isset($_GET['h']) ? intval($_GET['h']) : 1300); + +if (isset($_GET['t']) && $_GET['t']=='top') { + $type = 'top'; +} elseif (isset($_GET['t']) && $_GET['t']=='bottom') { + $type = 'bottom'; +} else { + $type = 'both'; +} - // create image $image = imagecreate($width, $height); $img_corners = imagecreate(2*$rad+1, 2*$rad+1); @@ -28,16 +35,32 @@ // fill image imagefilledrectangle ($image, 0, $rad, $width-1, $height-$rad-1, $color ); -imagefilledrectangle ($image, $rad, 0, $width-$rad-1, $rad-1, $color ); -imagefilledrectangle ($image, $rad, $height-$rad, $width-$rad-1, $height, $color ); + +if ($type=='bottom') { + imagefilledrectangle ($image, 0, 0, $width-1, $rad-1, $color ); +} else { + imagefilledrectangle ($image, $rad, 0, $width-$rad-1, $rad-1, $color ); +} +if ($type=='top') { + imagefilledrectangle ($image, 0, $height-$rad, $width-1, $height, $color ); +} else { + imagefilledrectangle ($image, $rad, $height-$rad, $width-$rad-1, $height, $color ); +} // draw and copy circle imagefilledellipse($img_corners, $rad, $rad, ($rad*2)+1, ($rad*2)+1, $color); -imagecopy($image, $img_corners, 0, 0, 0, 0, $rad, $rad); -imagecopy($image, $img_corners, $width-$rad, 0, $rad+1, 0, $rad, $rad); -imagecopy($image, $img_corners, 0, $height-$rad, 0, $rad+1, $rad, $rad); -imagecopy($image, $img_corners, $width-$rad, $height-$rad, $rad+1, $rad+1, $rad, $rad); +if ($type=='both' || $type=='top') +{ + imagecopy($image, $img_corners, 0, 0, 0, 0, $rad, $rad); + imagecopy($image, $img_corners, $width-$rad, 0, $rad+1, 0, $rad, $rad); +} +if ($type=='both' || $type=='bottom') +{ + imagecopy($image, $img_corners, 0, $height-$rad, 0, $rad+1, $rad, $rad); + imagecopy($image, $img_corners, $width-$rad, $height-$rad, $rad+1, $rad+1, $rad, $rad); +} + // flush image header('Content-type: image/gif'); Modified: trunk/linpha2/templates/misc/box_test.php =================================================================== --- trunk/linpha2/templates/misc/box_test.php 2008-03-16 08:52:25 UTC (rev 4906) +++ trunk/linpha2/templates/misc/box_test.php 2008-03-16 08:53:04 UTC (rev 4907) @@ -3,4 +3,6 @@ <img src="box.php?col=87CEFA&w=200&h=100" /><br /><br /> <img src="box.php?col=red&r=5&w=50&h=25" /><br /><br /> <img src="box.php?col=lightcyan&w=30&h=150" /><br /><br /> +<img src="box.php?col=87CEFA&w=200&h=100&t=top" /><br /><br /> +<img src="box.php?col=87CEFA&w=200&h=100&t=bottom" /><br /><br /> <img src="box.php" /><br /><br /> Modified: trunk/linpha2/templates/misc/roundCorners.css =================================================================== --- trunk/linpha2/templates/misc/roundCorners.css 2008-03-16 08:52:25 UTC (rev 4906) +++ trunk/linpha2/templates/misc/roundCorners.css 2008-03-16 08:53:04 UTC (rev 4907) @@ -2,7 +2,7 @@ .linCorn { position:relative; margin:0px auto; - z-index:1; + /*z-index:1;*/ margin-left:15px; /* default, width of left corner */ margin-bottom:0.5em; /* spacing under dialog */ } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |