[Linpha-cvs] SF.net SVN: linpha: [4436] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-03-26 20:32:58
|
Revision: 4436 Author: fangehrn Date: 2006-03-26 12:32:20 -0800 (Sun, 26 Mar 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4436&view=rev Log Message: ----------- * applying bastian's theme * added "more" menu entry Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.template_new.class.php trunk/linpha2/lib/classes/thumbnails.js trunk/linpha2/lib/modules/module.albums.php trunk/linpha2/lib/modules/module.browse.php trunk/linpha2/templates/css/default/basket.css trunk/linpha2/templates/css/default/global.css trunk/linpha2/templates/css/default/home.css trunk/linpha2/templates/css/default/syslog.css trunk/linpha2/templates/css/default/view_img.css trunk/linpha2/templates/css/default/view_meta.css trunk/linpha2/templates/css/default/view_thumb.css trunk/linpha2/templates/css/default/view_thumbdetail.css trunk/linpha2/templates/html/default/basket.html.php trunk/linpha2/templates/html/default/global.html.php trunk/linpha2/templates/html/default/home.html.php trunk/linpha2/templates/html/default/view_basket.html.php trunk/linpha2/templates/html/default/view_comment.html.php trunk/linpha2/templates/html/default/view_img.html.php trunk/linpha2/templates/html/default/view_meta.head.php trunk/linpha2/templates/html/default/view_meta.html.php trunk/linpha2/templates/html/default/view_thumb.html.php trunk/linpha2/templates/html/default/view_thumbdetail.html.php Added Paths: ----------- trunk/linpha2/templates/html/images/ trunk/linpha2/templates/html/images/bl.gif trunk/linpha2/templates/html/images/br.gif trunk/linpha2/templates/html/images/tl.gif trunk/linpha2/templates/html/images/tr.gif Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/ChangeLog 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,3 +1,7 @@ +2006-03-26 flo + * applying bastian's theme + * added "more" menu entry + 2006-03-25 flo * working on templates Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -35,13 +35,12 @@ $def_tn_size = 150; $array_nr_images = Array('auto',10,25,50,100,200,'all'); $array_sort_orders = Array('nameasc', 'namedesc', 'dateasc', 'datedesc'); -$array_views = Array('normal','detail'); $no_js_nr_rows = 3; $no_js_nr_cols = 4; class LinImgview { -public $view; +public $mode; // 'home', 'thumb', 'image' public $tot_photos; public $photos; public $photos_filtered; @@ -64,18 +63,13 @@ /** - * set current view - * @param string $modulname thumb, thumbdetail, img, basket, ... + * set current view and set fileinfos of $_GET['id'] + * @param string $modulname (album, browse, search, ...) */ function setCurrentView($modulename) { if(isset($_GET['id']) && $_GET['id'] != 0) { - if(isset($_GET['view'])) - { - $_SESSION['view'] = $_GET['view']; - } - /** * set file informations */ @@ -98,74 +92,65 @@ */ if( $this->img_type == 0) { + $this->mode = 'thumb'; $this->id_parent = $current_data['id']; // use current_id as parent_id, because we want to see the content of the actual folder! - if(isset($_SESSION['view'])) + if(! isset($_SESSION['mode_thumbview']) ) { - switch($_SESSION['view']) - { - case 'detail': - $this->view = 'thumbdetail_view'; - break; - case 'basket': - $this->view = 'basket_view'; - break; - case 'meta': - $this->view = 'meta_view'; - break; - case 'comment': - $this->view = 'comment_view'; - break; - default: - $this->view = 'thumb_view'; - } + $_SESSION['mode_thumbview'] = 'thumb'; } - else - { - $this->view = 'thumb_view'; - } } else { + $this->mode = 'image'; $this->id_parent = $current_data['parent_id']; // use parent_id on image view - if(isset($_SESSION['view'])) + if( ! isset($_SESSION['mode_imageview']) ) { - switch($_SESSION['view']) - { - case 'meta': - $this->view = 'meta_view'; - break; - default: - $this->view = 'img_view'; - } + $_SESSION['mode_imageview'] = 'img'; } - else - { - $this->view = 'img_view'; - } } } else // no valid id supplied { + $this->mode = 'home'; $this->id_current = 0; - $this->view = 'thumbdetail_view'; } } - else + else // ( ! isset($_GET['id'] OR $_GET['id']==0) ) { $this->id_current = 0; + /** + * on top view, reset current view + */ if($modulename=='albums') { - $this->view = 'home'; + $this->mode = 'home'; } - else + else // $modulename=='browse', others will come.. { - $this->view = 'thumb_view'; + $this->mode = 'thumb'; + + if( ! isset($_SESSION['mode_thumbview']) ) + { + $_SESSION['mode_thumbview'] = 'thumb'; + } } } - + + if($this->mode == 'thumb' && isset($_GET['view'])) + { + $_SESSION['mode_thumbview'] = $_GET['view']; + } + if($this->mode == 'image' && isset($_GET['view'])) + { + $_SESSION['mode_imageview'] = $_GET['view']; + } + + /** + * set id_parent to a default value + */ if( ! isset( $this->id_parent) ) { $this->id_parent = $this->id_current; @@ -185,29 +170,39 @@ /** * set mode specific things */ - switch($this->view) + switch($this->mode) { case 'home': $this->viewHome_view(); break; - case 'img_view': - $this->viewImg_view(); + case 'thumb': + switch($_SESSION['mode_thumbview']) + { + case 'thumb': + $this->viewThumb_view(); + break; + case 'thumbdetail': + $this->viewThumbdetail_view(); + break; + case 'basket': + $this->viewBasket_view(); + break; + case 'albcomment': + $this->viewAlbComment_view(); + break; + } break; - case 'thumb_view': - $this->viewThumb_view(); + case 'image': + switch($_SESSION['mode_imageview']) + { + case 'img': + $this->viewImg_view(); + break; + case 'meta': + $this->viewMeta_view(); + break; + } break; - case 'thumbdetail_view': - $this->viewThumbdetail_view(); - break; - case 'basket_view': - $this->viewBasket_view(); - break; - case 'meta_view': - $this->viewMeta_view(); - break; - case 'comment_view': - $this->viewComment_view(); - break; } include_once(LINPHA_DIR.'/templates/html/'.$GLOBALS['linpha']->template->template_name.'/global.html.php'); @@ -224,7 +219,7 @@ { foreach($this->photos AS $key=>$value) { - if( ! ($this->view == 'img_view' && $value['img_type']==0 ) ) // exclude subfolders from img_view + if( ! ($this->mode == 'image' && $value['img_type']==0 ) ) // exclude subfolders from img_view { if( $GLOBALS['linpha']->sql->photoIsAllowed( $value['id'] ) ) { @@ -244,7 +239,7 @@ /** * don't show this menu if we're on top */ - if($this->view != 'home') + if($this->mode != 'home') { /** * more than one time used stuff @@ -257,10 +252,9 @@ $open_basket_link = LINPHA_DIR.'?cat=basket&ref_id='.$this->id_current; $edit_permission_link = LINPHA_DIR.'/admin/permissions.php?&cmd=edit&id='.$this->id_current; - switch($this->view) + switch($this->mode) { - case 'thumb_view': - case 'thumbdetail_view': + case 'thumb': foreach($GLOBALS['array_tn_sizes'] AS $value) { @@ -270,10 +264,10 @@ { $array_nr_links[] = Array('name' => $value, 'value' =>"javascript:set_nr_images('".$value."')"); } - foreach($GLOBALS['array_views'] AS $value) - { - $array_views_links[] = Array('name' => i18n($value), 'value' => $GLOBALS['linpha']->template->URL_full.'&view='.$value); - } + + $array_views_links[] = Array('name' => i18n('Normal'), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=thumb'); + $array_views_links[] = Array('name' => i18n('Detail'), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=thumbdetail'); + $GLOBALS['linpha']->template->output['menu_more'] = Array( Array( @@ -303,13 +297,13 @@ Array( 'name' => i18n("Metainfo"), 'value' => Array( - Array('name' => i18n("Edit Album Comment"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=comment'), + Array('name' => i18n("Edit Album Comment"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=albcomment'), Array('name' => i18n("Edit Album Information"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=meta') ) ) ); break; - case 'img_view': + case 'image': $GLOBALS['linpha']->template->output['menu_more'] = Array( Array( @@ -528,29 +522,36 @@ /** - * print sub folders - * and calculate tot_photos + * print sub folders AND calculate tot_photos + * @todo should we show subfolders separate..? + * i think this is useless if we can set automatically view = thumbdetail */ function setSubFolders() { $output_folders = ''; $nr_folders = 0; + + if( ! isset($GLOBALS['linpha']->template->output['navigation'] ) ) + { + $GLOBALS['linpha']->template->output['navigation'] = ''; + } + if($GLOBALS['show_subfolders_separate']) { foreach($this->photos_filtered AS $key=>$value) { if($value['img_type'] == 0) { - $output_folders .= '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">'.$value['name'].'</a><br />'; + $GLOBALS['linpha']->template->output['navigation'] .= '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">'.$value['name'].'</a><br />'; $nr_folders++; } } } - if(! empty($output_folders)) - { - $GLOBALS['linpha']->template->output['navigation'] .= '<br /><br />'.$output_folders; - } + /** + * set tot_photos + * subtract number of folders if they are shown separate + */ $this->tot_photos = count($this->photos_filtered) - $nr_folders; } @@ -648,9 +649,41 @@ /** * setup comment view */ -function viewComment_view() +function viewAlbComment_view() { $GLOBALS['linpha']->template->setModuleName('view_comment'); + + /** + * save data + */ + if( isset( $_POST['cmd'] ) && $_POST['cmd']=="add_comment") + { + /** + * check if comment exists + */ + $query = $GLOBALS['linpha']->db->Execute("SELECT id FROM ".PREFIX."meta_comments " . + "WHERE md5sum = '".$GLOBALS['linpha']->imgview->id_current."'"); + + if($query->RecordCount()==0) // insert + { + $GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_comments (time, md5sum, author, comment)" . + "VALUES ('".time()."','".$GLOBALS['linpha']->imgview->id_current."','".linSql::linAddslashes($_POST['author'])."'," . + "'".linSql::linAddslashes($_POST['comment'])."')"); + } + else // update + { + $GLOBALS['linpha']->db->Execute("UPDATE ".PREFIX."meta_comments SET ". + "time = '".time()."', ". + "author = '".linSql::linAddslashes($_POST['author'])."', " . + "comment = '".linSql::linAddslashes($_POST['comment'])."' " . + "WHERE md5sum = '".$GLOBALS['linpha']->imgview->id_current."'"); + } + } + + /** + * get data + */ + $GLOBALS['linpha']->template->output['comment'] = $GLOBALS['linpha']->db->GetRow("SELECT id, time, author, comment FROM ".PREFIX."meta_comments"); } Modified: trunk/linpha2/lib/classes/linpha.template_new.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template_new.class.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/lib/classes/linpha.template_new.class.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -13,7 +13,7 @@ function __construct() { $this->template_name = 'default'; - $this->output['title'] = "Linpha 2.0"; + $this->linpha_title = "Linpha 2.0"; } /** Modified: trunk/linpha2/lib/classes/thumbnails.js =================================================================== --- trunk/linpha2/lib/classes/thumbnails.js 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/lib/classes/thumbnails.js 2006-03-26 20:32:20 UTC (rev 4436) @@ -60,9 +60,9 @@ } /** - * set correct maindiv height + * set correct main height */ - document.getElementById('maindiv').style.height = linInnerHeight - document.getElementById('spacer_height')['offsetHeight']; + document.getElementById('main').style.height = linInnerHeight - document.getElementById('spacer_height')['offsetHeight']; /** * calculate nr of photos per page (from select form) @@ -70,12 +70,12 @@ switch( photos_per_page ) { case 'auto': - var nr_cols = Math.floor( document.getElementById('maindiv')['offsetWidth'] / (tn_size + img_spacer_width) ); - var nr_rows = Math.floor( document.getElementById('maindiv')['offsetHeight'] / (tn_size + img_spacer_height) ); + var nr_cols = Math.floor( document.getElementById('main')['offsetWidth'] / (tn_size + img_spacer_width) ); + var nr_rows = Math.floor( document.getElementById('main')['offsetHeight'] / (tn_size + img_spacer_height) ); var max_photos_per_page = nr_rows * nr_cols; break; case 'all': - var nr_cols = Math.floor( document.getElementById('maindiv')['offsetWidth'] / (tn_size + img_spacer_width) ); + var nr_cols = Math.floor( document.getElementById('main')['offsetWidth'] / (tn_size + img_spacer_width) ); var max_photos_per_page = tot_photos; var nr_rows = Math.ceil(max_photos_per_page / nr_cols); break; @@ -83,7 +83,7 @@ /** * ceil max_photos_per_page to complet the row! */ - var nr_cols = Math.floor( document.getElementById('maindiv')['offsetWidth'] / (tn_size + img_spacer_width) ); + var nr_cols = Math.floor( document.getElementById('main')['offsetWidth'] / (tn_size + img_spacer_width) ); var nr_rows = Math.ceil( photos_per_page / nr_cols); var max_photos_per_page = nr_rows * nr_cols; break; @@ -121,7 +121,7 @@ */ var img_nr = 1; var startup_img_nr = (current_page - 1)*max_photos_per_page; - document.getElementById("maindiv").innerHTML=''; + document.getElementById("main").innerHTML=''; for (i in img_ids) { @@ -196,7 +196,7 @@ var myText = document.createTextNode(img_ids[i]['fn']); myDiv.appendChild(myText); - document.getElementById("maindiv").appendChild(myDiv); + document.getElementById("main").appendChild(myDiv); img_nr++; } @@ -379,7 +379,7 @@ /** * write page numbers */ - DivPageNr = document.getElementById("page_nr"); + DivPageNr = document.getElementById("page_nr_middle"); DivPageNr.innerHTML=''; for(var i = 1; i <= nr_pages; i++) Modified: trunk/linpha2/lib/modules/module.albums.php =================================================================== --- trunk/linpha2/lib/modules/module.albums.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/lib/modules/module.albums.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -37,7 +37,7 @@ /** * set navigation line */ - $GLOBALS['linpha']->template->output['navigation'] = set_navigation_line( $linpha->imgview->id_current ); + $GLOBALS['linpha']->template->output['title'] = set_navigation_line( $linpha->imgview->id_current ); /** Modified: trunk/linpha2/lib/modules/module.browse.php =================================================================== --- trunk/linpha2/lib/modules/module.browse.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/lib/modules/module.browse.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -186,9 +186,9 @@ /** * write navigation and date links */ - $GLOBALS['linpha']->template->output['navigation'] = $str_navigation.'<br /><br />'.$str_datelinks; + $GLOBALS['linpha']->template->output['title'] = $str_navigation; + $GLOBALS['linpha']->template->output['navigation'] = $str_datelinks; - /** * get photos */ Modified: trunk/linpha2/templates/css/default/basket.css =================================================================== --- trunk/linpha2/templates/css/default/basket.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/basket.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,4 @@ -.main { +#main { margin-left: 10px; } Modified: trunk/linpha2/templates/css/default/global.css =================================================================== --- trunk/linpha2/templates/css/default/global.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/global.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,7 @@ <!-- +/** + * common definitions + */ body { font-family: arial, helvetica, sans-serif; margin: 0px; @@ -17,56 +20,102 @@ text-decoration: underline; } -.title { - background-color: #d5fcf4; - padding: 0; - border: 1px solid #0c9; - margin: 10px 10px 10px 10px; -} +/** + * title + */ + #divtitle { + margin-top: 10px; + height: 40px; + } + #title { + /* background-color: #d5fcf4;*/ + /* border: 1px solid #0c9;*/ + + position: absolute; + left: 50%; + width: 600px; + height: 40px; + margin-left: -300px; /* should be the half of 'width' */ + white-space: nowrap; + + /* padding: 0;*/ + /* margin: 10px 10px 10px 10px;*/ + + font-size: 25pt; + } + #title a:link, #title a:visited, #title a:hover { + color: #444444; + text-decoration: none; + } + #title a:hover { + text-decoration: underline; + } -.menu { - background-color: #ffd5ee; - border: 1px solid #f09; - margin: 10px; - z-index: 400; - padding: 5px; +/** + * left + */ + #left { + /* background-color: #ffd5ee;*/ + /* border: 1px solid #f09;*/ + + position: absolute; + top: 160px; + left: 10px; + + width: 205px; + min-height: 400px; + + padding: 5px; + margin: 0px; + } - height: 30px; -} +/** + * navigation + */ + #navigation { + /* background-color: #d5fcf4;*/ + /* border: 1px solid #0c9;*/ + padding: 0; + margin: 10px 10px 10px 10px; + } +/** + * main + */ + #divmain { + margin: 10px 10px 10px 10px; + } + #main { + /* background-color: #d5eeff;*/ + /* border: 1px solid #09f;*/ + padding: 5px; + } -.left { - position: absolute; - top: 200px; - left: 10px; - - width: 205px; - min-height: 400px; - - - padding: 5px; - margin: 0px; - - background-color: #ffd5ee; - - border: 1px solid #f09; -} - -.main { - background-color: #d5eeff; - padding: 5px; - border: 1px solid #09f; - margin: 10px 10px 10px 237px; -} - /** * menu * view http://www.tanfa.co.uk/css/examples/menu/tutorial-h.asp * the nicest one! */ + #divmenu { + /* background-color: #ffd5ee;*/ + /* border: 1px solid #f09;*/ + + margin-top: 5px; + + z-index: 400; + + height: 40px; + } + #menu { - width: 100%; + position: absolute; + left: 50%; + width: 600px; + height: 40px; + margin-left: -300px; /* should be the half of 'width' */ + + /*width: 100%;*/ float: left; } @@ -84,33 +133,48 @@ */ #menu a, #menu span { display: block; - border-width: 1px; + + margin: 0; + padding: 2px 3px; + +/* border-width: 1px; border-style: solid; border-color: #ccc #888 #555 #bbb; - margin: 0; - padding: 2px 3px; color: #fff; - background: #036; - text-decoration: none; + background: #036;*/ } /** * only first level elements */ #menu ul a, #menu ul span { + margin-left: 10px; + margin-right: 10px; + text-align: center; + text-decoration: none; + border-top: 1px solid #000000; + color: #000000; + background: #FFFFFF; } /** * only two or more level elements */ #menu ul ul a, #menu ul ul span { + margin: 0px; + text-align: left; + text-decoration: none; + + border: 1px solid #000000; + border-top-width: 0px; + background: #eeeeee; } #menu a:hover, #menu span:hover { - color: #fff; - background: #369; +/* color: #fff;*/ + background: #bbbbbb; } #menu li { @@ -141,4 +205,27 @@ div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {display: block;} + +/** + * rounded corner stuff + * http://kalsey.com/2003/07/rounded_corners_in_css/ + */ + #divmain { + background-color: #f90; + } + + .roundtop { + background: url(../../html/images/tr.gif) no-repeat top right; + } + + .roundbottom { + background: url(../../html/images/br.gif) no-repeat top right; + } + + img.corner { + width: 15px; + height: 15px; + border: none; + display: block !important; + } --> \ No newline at end of file Modified: trunk/linpha2/templates/css/default/home.css =================================================================== --- trunk/linpha2/templates/css/default/home.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/home.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,4 @@ -.main { +#main { margin-left: 10px; } Modified: trunk/linpha2/templates/css/default/syslog.css =================================================================== --- trunk/linpha2/templates/css/default/syslog.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/syslog.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,4 @@ -.sys_log { +#sys_log { position: absolute; left: 15px; top: 15px; @@ -13,7 +13,7 @@ } -.sys_log_close { +#sys_log_close { position: absolute; right: 0; top: 0; Modified: trunk/linpha2/templates/css/default/view_img.css =================================================================== --- trunk/linpha2/templates/css/default/view_img.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/view_img.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,3 +1,11 @@ +#navigation { + margin: 10px 10px 10px 237px; +} + +#main { + text-align: center; +} + .mainimage { width: 350px; height: auto; @@ -3,8 +11,4 @@ } -.main { - text-align: center; -} - /** * comment stuff Modified: trunk/linpha2/templates/css/default/view_meta.css =================================================================== --- trunk/linpha2/templates/css/default/view_meta.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/view_meta.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,4 @@ -.main { +#main { margin-left: 10px; text-align: left; } Modified: trunk/linpha2/templates/css/default/view_thumb.css =================================================================== --- trunk/linpha2/templates/css/default/view_thumb.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/view_thumb.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,67 +1,67 @@ -.main { - margin-left: 10px; +#main { + min-height: 500px; /* @todo floated divs in thumb view without javascript doesnt count to the main div height */ } /** * need this to calculate heigh of main div * if you're gettings scrollbars, adjust the height! */ -.spacer_height { - height: 240px; +#spacer_height { + height: 200px; position: absolute; visibility: hidden; } -.imgdiv { - border: 1px #000000 solid; - margin: 3px; - text-align: center; - float: left; - font-size: 8pt; -} - -.img_thumbnail { - border: 0; - width: auto; -} - -.img_text { - padding-left: 10px; - text-align: left; -} - /** * page nr */ -.page_nr_spacer { - height: 45px; -} -.page_nr { - position: absolute; - margin-top: 5px; - left: 50%; - width: 530px; - height: 55px; - margin-left: -265px; /* should be the half of 'width' */ + #divpage_nr { + margin-top: 5px; + height: 35px; + } + + #page_nr { + position: absolute; + left: 50%; + width: 530px; + height: 35px; + margin-left: -265px; /* should be the half of 'width' */ + + /* border: 1px #000000 solid;*/ + } + .page_nr_divs { + float: left; + margin-left: 5px; + margin-right: 5px; + padding-left: 10px; + padding-right: 10px; - border: 1px #000000 solid; -} -.page_nr_divs { - float: left; -/* border: 1px #000000 solid; */ - margin: 5px; - padding: 10px; - height: 25px; - width: 40px; - white-space: nowrap; -} -.page_nr_maindiv { - width: 350px; - text-align: center; -} +/* height: 25px;*/ + width: 40px; + white-space: nowrap; + } + .page_nr_maindiv { + width: 350px; + text-align: center; + } - - -.main { - min-height: 500px; /* @todo floated divs in thumb view without javascript doesnt count to the main div height */ -} \ No newline at end of file +/** + * thumbnails + */ + .imgdiv { + /* border: 1px #000000 solid;*/ + margin: 3px; + text-align: center; + float: left; + font-size: 8pt; + } + + .img_thumbnail { + border: 0; + width: auto; + } + + .img_text { + padding-left: 10px; + text-align: left; + } \ No newline at end of file Modified: trunk/linpha2/templates/css/default/view_thumbdetail.css =================================================================== --- trunk/linpha2/templates/css/default/view_thumbdetail.css 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/css/default/view_thumbdetail.css 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,3 +1,10 @@ +#navigation { + background-color: #d5fcf4; + padding: 0; + border: 1px solid #0c9; + margin: 10px 10px 10px 237px; +} + .div_folder { position: relative; margin: 2px; Modified: trunk/linpha2/templates/html/default/basket.html.php =================================================================== --- trunk/linpha2/templates/html/default/basket.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/basket.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,3 @@ - <form name="basket" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>&cmd=remove_selected" method="POST"> <div class='navigation'> <a href="<?php echo LINPHA_DIR.'/?cat=alb&id='.$_GET['ref_id']; ?>"><?php echo i18n("Go Back"); ?></a> @@ -8,7 +7,7 @@ <?php echo i18n("Images in basket");?>: <?php echo count($_SESSION['basket_ids']); ?> </div> -<div id='maindiv' class='main'> +<div id="main"> <?php if( count($_SESSION['basket_ids']) > 0 ) { ?> Modified: trunk/linpha2/templates/html/default/global.html.php =================================================================== --- trunk/linpha2/templates/html/default/global.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/global.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -7,7 +7,7 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> -<title><?php echo $GLOBALS['linpha']->template->output['title']; ?></title> +<title><?php echo $GLOBALS['linpha']->template->linpha_title; ?></title> <!-- css includes --> <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/css/'.$GLOBALS['linpha']->template->template_name.'/global.css'; ?>' type='text/css'> @@ -20,13 +20,15 @@ <?php $GLOBALS['linpha']->template->includeFile('head'); ?> </head> + + <body> <?php if( isset($GLOBALS['linpha']->template->output['sys_log']) ) { ?> <!-- syslog --> - <div id="sys_log" class="sys_log"> + <div id="sys_log"> <div class="sys_log_close"><a href="javascript:toggleWindow()">X</a></div> - <div id="sys_log_text" class="sys_log_text"> + <div id="sys_log_text"> <?php echo i18n("Linpha Syslog"); ?>:<br /> <?php echo $GLOBALS['linpha']->template->output['sys_log']; ?> </div> @@ -35,56 +37,62 @@ <?php } ?> <!-- title/navigation --> -<div id="header" class="title"> - <h1><?php echo $GLOBALS['linpha']->template->output['title']." :: ".$GLOBALS['linpha']->template->output['navigation']; ?></h1> +<div id="divtitle"> +<div id="title"> + <?php echo $GLOBALS['linpha']->template->linpha_title." :: ".$GLOBALS['linpha']->template->output['title']; ?> </div> +</div> <!-- menu --> -<div class="menu"> - <div id="menu"> - <ul> - <li><a href="./"><?php echo i18n("Home"); ?></a></li> - </ul> - <ul> - <li><a href="./admin/"><?php echo i18n("Admin"); ?></a></li> - </ul> - <ul> - <li><span><?php echo i18n("Search"); ?> v</span> - <ul> - <li><a href="./?cat=search"><?php echo i18n("Extended Search"); ?></a></li> - <li> - <span> - <input type="text" name="search" value="" /> - <input type="submit" name="submit" value="<?php echo i18n("Search"); ?>" /> - </span> - </li> - </ul> - </li> - </ul> - <ul> - <li> - <span><?php echo i18n("Login"); ?> v</span> - <ul> - <li> - <span> - <?php echo i18n("Username"); ?>: <input type="text" name="username" value="" /><br /> - <?php echo i18n("Password"); ?>: <input type="password" name="password" value="" /><br /> - <input type="submit" name="submit" value="<?php echo i18n("Login"); ?>" /> - </span> - </li> - </ul> - </li> - </ul> - <?php - /** - * Print "More"-menu entry - */ - if( isset( $GLOBALS['linpha']->template->output['menu_more'] ) ) { - $GLOBALS['linpha']->template->printMenu('more'); - } - ?> - </div> +<!-- +need an outer div for the correct height, because elements in #menu are floated +and doesn't count to the this elements height +--> +<div id="divmenu"> +<div id="menu"> + <ul> + <li><a href="./"><?php echo i18n("Home"); ?></a></li> + </ul> + <ul> + <li><a href="./admin/"><?php echo i18n("Admin"); ?></a></li> + </ul> + <ul> + <li><span><?php echo i18n("Search"); ?> v</span> + <ul> + <li><a href="./?cat=search"><?php echo i18n("Extended Search"); ?></a></li> + <li> + <span> + <input type="text" name="search" value="" /> + <input type="submit" name="submit" value="<?php echo i18n("Search"); ?>" /> + </span> + </li> + </ul> + </li> + </ul> + <ul> + <li> + <span><?php echo i18n("Login"); ?> v</span> + <ul> + <li> + <span> + <?php echo i18n("Username"); ?>: <input type="text" name="username" value="" /><br /> + <?php echo i18n("Password"); ?>: <input type="password" name="password" value="" /><br /> + <input type="submit" name="submit" value="<?php echo i18n("Login"); ?>" /> + </span> + </li> + </ul> + </li> + </ul> + <?php + /** + * Print "More"-menu entry + */ + if( isset( $GLOBALS['linpha']->template->output['menu_more'] ) ) { + $GLOBALS['linpha']->template->printMenu('more'); + } + ?> </div> +</div> <!-- end menu --> <?php $GLOBALS['linpha']->template->includeFile('body'); ?> Modified: trunk/linpha2/templates/html/default/home.html.php =================================================================== --- trunk/linpha2/templates/html/default/home.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/home.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,5 +1,10 @@ -<div id='maindiv' class='main'> +<div id="divmain"> + <div class="roundtop"> + <img src="templates/html/images/tl.gif" alt="" width="15" height="15" class="corner" style="display: none" /> + </div> +<div id="main"> + <h1><?php echo i18n("Welcome"); ?></h1> <br /><br /><br /> @@ -40,7 +45,7 @@ <div class='div_folder_text'> <h2><?php echo $value['name']; ?></h2> - <?php echo $value['stats_numbers']. i18n("Photos"); ?> + <?php echo $value['stats_numbers'].' '.i18n("Photos"); ?> <br /> <?php echo strftime("%x %X",$value['time_add']); ?> @@ -52,3 +57,7 @@ ?> </div> + <div class="roundbottom"> + <img src="templates/html/images/bl.gif" alt="" width="15" height="15" class="corner" style="display: none" /> + </div> +</div> \ No newline at end of file Modified: trunk/linpha2/templates/html/default/view_basket.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_basket.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_basket.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,4 @@ -<div class="left"> +<div id="left"> left<br />left<br />left<br />left<br />left<br />left<br /> left<br />left<br />left<br />left<br />left<br />left<br /> </div> @@ -12,7 +12,7 @@ <div class='page_nr' id='page_nr_left'><?php echo $GLOBALS['linpha']->template->output['page_nr_left']; ?></div> </div> -<div class="navigation"> +<div id="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> <br /><br /> <?php echo i18n("Images In Basket"); ?>: <?php echo count($_SESSION['basket_ids']); ?> @@ -22,7 +22,7 @@ </div> <form name='basket' action='<?php echo LINPHA_DIR.'/?cat=basket&cmd=add_selected&ref_id='.$GLOBALS['linpha']->imgview->id_current; ?>' method='POST'> -<div id='maindiv' class='main'> +<div id="main"> <?php $i = 1; foreach($GLOBALS['linpha']->imgview->photos_show AS $value) Modified: trunk/linpha2/templates/html/default/view_comment.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_comment.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_comment.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,43 +1,12 @@ -<?php - -if( isset( $_POST['cmd'] ) ) -{ - /** - * check if comment exists - */ - $query = $GLOBALS['linpha']->db->Execute("SELECT id FROM ".PREFIX."meta_comments " . - "WHERE md5sum = '".$GLOBALS['linpha']->imgview->id_current."'"); - - if($query->RecordCount()==0) // insert - { - $GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_comments (time, md5sum, author, comment)" . - "VALUES ('".time()."','".$GLOBALS['linpha']->imgview->id_current."','".linSql::linAddslashes($_POST['author'])."'," . - "'".linSql::linAddslashes($_POST['comment'])."')"); - } - else // update - { - $GLOBALS['linpha']->db->Execute("UPDATE ".PREFIX."meta_comments SET ". - "time = '".time()."', ". - "author = '".linSql::linAddslashes($_POST['author'])."', " . - "comment = '".linSql::linAddslashes($_POST['comment'])."' " . - "WHERE md5sum = '".$GLOBALS['linpha']->imgview->id_current."'"); - } -} -?> - -<?php -$data = $GLOBALS['linpha']->db->GetRow("SELECT id, time, author, comment FROM ".PREFIX."meta_comments"); -?> - -<div id='maindiv' class='main'> +<div id="main"> <form action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> <a href="<?php echo $GLOBALS['linpha']->template->URL_full.'&view=thumb'; ?>">back</a> <br /><br /> Author: -<input type="text" name="author" value="<?php echo $data['author']; ?>" size="40" maxlength="40" /> +<input type="text" name="author" value="<?php echo $GLOBALS['linpha']->template->output['comment']['author']; ?>" size="40" maxlength="40" /> <br /> -<textarea name="comment" rows="10" cols="50"><?php echo $data['comment']; ?></textarea> +<textarea name="comment" rows="10" cols="50"><?php echo $GLOBALS['linpha']->template->output['comment']['comment']; ?></textarea> <br /> <input type="hidden" name="cmd" value="add_comment" /> <input type="submit" name="submit" value="submit" /> Modified: trunk/linpha2/templates/html/default/view_img.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_img.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_img.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,4 +1,4 @@ -<div class="left"> +<div id="left"> <?php foreach($GLOBALS['linpha']->template->output['image_infos'] AS $value) { @@ -7,6 +7,12 @@ ?> </div> +<?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> +<div id="navigation"> + <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> +</div> +<?php } ?> + <div class="div_all_main"> <div class="div_all_prevthumb"> <?php echo $GLOBALS['linpha']->template->output['prev_thumb']; ?> @@ -17,26 +23,29 @@ </div> </div> -<div id='maindiv' class='main'> +<div id="main"> + +<!-- show image --> <?php echo $GLOBALS['linpha']->template->output['image']; ?> <br /><br /> +<!-- show add comment form --> <div class="add_comment"> <form action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> <?php echo i18n("Add Comment"); ?>:<br /> <div id="comment_div_text"> -<input type="text" id="comment_input_text" name="comment_text" value="" size="40" maxlength="40" /> +<input type="text" id="comment_input_text" name="comment_text" value="" tabindex="1" size="40" maxlength="40" /> <a href="javascript:open_textarea()">(+)</a> </div> -<textarea style="display: none;" id="comment_textarea" name="comment_textarea" rows="10" cols="50"></textarea> -<?php echo i18n("Name"); ?>: <input type="text" name="author" value="" size="10" maxlength="40" /> +<textarea style="display: none;" id="comment_textarea" name="comment_textarea" tabindex="1" rows="10" cols="50"></textarea> +<?php echo i18n("Name"); ?>: <input type="text" name="author" value="" tabindex="2" size="10" maxlength="40" /> <input type="hidden" name="cmd" value="add_comment" /> <input type="submit" name="submit" value="<?php echo i18n("submit"); ?>" /> </form> </div> <br /><br /> -<!-- show image comments //--> +<!-- show image comments --> <?php while($data = $GLOBALS['linpha']->template->output['image_comments']->FetchRow()) { ?> <div class="comments"> <?php echo $data['time']; ?> <?php echo $data['author']; ?> @@ -48,7 +57,7 @@ </div> -<script language="Javascript"> +<script language="JavaScript" type="text/javascript"> function open_textarea() { document.getElementById('comment_textarea').style.display = 'block'; Modified: trunk/linpha2/templates/html/default/view_meta.head.php =================================================================== --- trunk/linpha2/templates/html/default/view_meta.head.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_meta.head.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -3,4 +3,4 @@ * use all definitions from view_img.css, and append here view_meta.css */ ?> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/css/'.$GLOBALS['linpha']->template->template_name.'/view_meta.css'; ?>' type='text/css'> \ No newline at end of file +<link rel="stylesheet" href="<?php echo LINPHA_DIR.'/templates/css/'.$GLOBALS['linpha']->template->template_name.'/view_meta.css'; ?>" type="text/css" /> \ No newline at end of file Modified: trunk/linpha2/templates/html/default/view_meta.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_meta.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_meta.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -8,7 +8,7 @@ </div> </div> -<div id='maindiv' class='main'> +<div id="main"> <a href="<?php echo $GLOBALS['linpha']->template->URL_full.'&view=img'; ?>">Back to normal view</a> <h1><?php i18n("Edit Image Imformation"); ?></h1> <?php Modified: trunk/linpha2/templates/html/default/view_thumb.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_thumb.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_thumb.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -10,19 +10,38 @@ window.onresize = display_images; </script> - <div class="page_nr"> - <div class="page_nr_divs" id='page_nr_left'>left</div> - <div class="page_nr_divs page_nr_maindiv" id='page_nr'>page nr middle</div> - <div class="page_nr_divs" id='page_nr_right'>right</div> + <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> + <div id="navigation"> + <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> - <div class="page_nr_spacer"></div> - - <div id='spacer_height' class='spacer_height'> + <?php } ?> + + <!-- + need an outer div for the correct height, because elements in #page_nr are floated + and doesn't count to the this elements height + --> + <div id="divpage_nr"> + <div id="page_nr"> + <div class="page_nr_divs" id="page_nr_left">left</div> + <div class="page_nr_divs page_nr_maindiv" id="page_nr_middle">page nr middle</div> + <div class="page_nr_divs" id="page_nr_right">right</div> </div> + </div> - <div id='maindiv' class='main'> + <div id="spacer_height"> </div> + <div id="divmain"> + <div class="roundtop"> + <img src="templates/html/images/tl.gif" alt="" width="15" height="15" class="corner" style="display: none" /> + </div> + <div id="main"> + </div> + <div class="roundbottom"> + <img src="templates/html/images/bl.gif" alt="" width="15" height="15" class="corner" style="display: none" /> + </div> + </div> + <script language="JavaScript" type="text/javascript"> display_images(); </script> @@ -41,15 +60,19 @@ //--> </script> - <div class="page_nr_main"> - <!-- cannot use floated div in another div !! - in this div it is possible because it has position: absolute --> - <div class='page_nr' id='page_nr_right'><?php echo $GLOBALS['linpha']->template->output['page_nr_right']; ?></div> - <div class='page_nr' id='page_nr' style="width: 350px; text-align: center;"><?php echo $GLOBALS['linpha']->template->output['page_nr']; ?></div> - <div class='page_nr' id='page_nr_left'><?php echo $GLOBALS['linpha']->template->output['page_nr_left']; ?></div> + <?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> + <div id="navigation"> + <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> </div> + <?php } ?> + + <div id="page_nr"> + <div class="page_nr_divs" id="page_nr_right"><?php echo $GLOBALS['linpha']->template->output['page_nr_right']; ?></div> + <div class="page_nr_divs page_nr_maindiv" id="page_nr"><?php echo $GLOBALS['linpha']->template->output['page_nr']; ?></div> + <div class="page_nr_divs" id="page_nr_left"><?php echo $GLOBALS['linpha']->template->output['page_nr_left']; ?></div> + </div> - <div id='maindiv' class='main'> + <div id="main"> <?php $i = 1; foreach($GLOBALS['linpha']->imgview->photos_show AS $value) @@ -67,9 +90,9 @@ } $i++; ?> - <div style='width: <?php echo $GLOBALS['def_tn_size']; ?>px; height: <?php echo $GLOBALS['def_tn_size']; ?>px; <?php echo $str_clear; ?>' class='imgdiv'> - <a href='./?cat=alb&id=<?php echo $value['id']; ?>'> - <img height='<?php echo ($GLOBALS['def_tn_size']-20); ?>' src='./get_thumb.php?id=<?php echo $value['id']; ?>' class='img_thumbnail' /> + <div style="width: <?php echo $GLOBALS['def_tn_size']; ?>px; height: <?php echo $GLOBALS['def_tn_size']; ?>px; <?php echo $str_clear; ?>" class="imgdiv"> + <a href="./?cat=alb&id=<?php echo $value['id']; ?>"> + <img height="<?php echo ($GLOBALS['def_tn_size']-20); ?>" src="./get_thumb.php?id=<?php echo $value['id']; ?>" class="img_thumbnail" /> </a> <br /><?php echo $value['name']; ?> </div> Modified: trunk/linpha2/templates/html/default/view_thumbdetail.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_thumbdetail.html.php 2006-03-25 13:08:27 UTC (rev 4435) +++ trunk/linpha2/templates/html/default/view_thumbdetail.html.php 2006-03-26 20:32:20 UTC (rev 4436) @@ -1,10 +1,17 @@ -<div class="left"> +<div id="left"> left<br />left<br />left<br />left<br />left<br />left<br /> left<br />left<br />left<br />left<br />left<br />left<br /> </div> -<div id='maindiv' class='main'> +<?php if(isset($GLOBALS['linpha']->template->output['navigation']) && !empty($GLOBALS['linpha']->template->output['navigation'])) { ?> +<div id="navigation"> + <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> +</div> +<?php } ?> + +<div id="main"> + <?php foreach($GLOBALS['linpha']->imgview->photos_filtered AS $key=>$value) { @@ -16,11 +23,22 @@ <div class='div_folder_text'> <h2><?php echo $value['name']; ?></h2> - <?php echo $value['stats_numbers']. i18n("Photos"); ?> + <?php if($value['img_type']==0) { ?> - <br /> - <?php echo strftime("%x %X",$value['time_add']); ?> + <!-- folder view --> + <?php echo $value['stats_numbers'].' '.i18n("Photos"); ?> + <br /> + <?php echo strftime("%x %X",$value['time_add']); ?> + <?php } else { ?> + + <!-- file view --> + <?php echo strftime("%x %X",$value['time_add']); ?> + + <?php } ?> + + + </div> </div> <?php Added: trunk/linpha2/templates/html/images/bl.gif =================================================================== (Binary files differ) Property changes on: trunk/linpha2/templates/html/images/bl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/linpha2/templates/html/images/br.gif =================================================================== (Binary files differ) Property changes on: trunk/linpha2/templates/html/images/br.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/linpha2/templates/html/images/tl.gif =================================================================== (Binary files differ) Property changes on: trunk/linpha2/templates/html/images/tl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: trunk/linpha2/templates/html/images/tr.gif =================================================================== (Binary files differ) Property changes on: trunk/linpha2/templates/html/images/tr.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |