[Linpha-cvs] SF.net SVN: linpha: [4425] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-03-20 18:45:27
|
Revision: 4425 Author: fangehrn Date: 2006-03-20 10:45:06 -0800 (Mon, 20 Mar 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4425&view=rev Log Message: ----------- * testing language stuff, really nice ;-) * small design review, making class img_view even more modular Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/dev.txt trunk/linpha2/index.php trunk/linpha2/lib/classes/linpha.functions.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/modules/module.albums.php trunk/linpha2/templates/main_css/view_img.css trunk/linpha2/templates/main_css/view_thumbdetail.css trunk/linpha2/templates/main_html/view_img.html.php trunk/linpha2/templates/main_html/view_thumb.head.php trunk/linpha2/templates/main_html/view_thumb.html.php trunk/linpha2/templates/main_html/view_thumbdetail.html.php Added Paths: ----------- trunk/linpha2/templates/main_css/home.css trunk/linpha2/templates/main_html/home.html.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/ChangeLog 2006-03-20 18:45:06 UTC (rev 4425) @@ -1,3 +1,7 @@ +2006-03-15 flo + * testing language stuff, really nice ;-) + * small design review, making class img_view even more modular + 2006-03-20 bzrudi <linpha2_AT_tuxpower_DOT_de> * language stuff should work now * renamed tr() to i18n() Modified: trunk/linpha2/dev.txt =================================================================== --- trunk/linpha2/dev.txt 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/dev.txt 2006-03-20 18:45:06 UTC (rev 4425) @@ -4,4 +4,4 @@ $GLOBALS['linpha']->sql->config->value['']; -test \ No newline at end of file +<?php echo i18n(""); ?> \ No newline at end of file Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/index.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -13,10 +13,10 @@ } $output['menu_main'] = Array( - 'home' => LINPHA_DIR . '/', - 'admin' => LINPHA_DIR . '/admin/', - 'search' => '#', /*LINPHA_DIR . '/?cat=search'*/ - 'login' => '#' /*LINPHA_DIR . '/?cat=login'*/ + Array('name' => 'home', 'value' => LINPHA_DIR . '/'), + Array('name' => 'admin', 'value' => LINPHA_DIR . '/admin/'), + Array('name' => 'search', 'value' => '#'), /*LINPHA_DIR . '/?cat=search'*/ + Array('name' => 'login', 'value' => '#') /*LINPHA_DIR . '/?cat=login'*/ ); Modified: trunk/linpha2/lib/classes/linpha.functions.php =================================================================== --- trunk/linpha2/lib/classes/linpha.functions.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/lib/classes/linpha.functions.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -97,7 +97,7 @@ ?> <div id="menu_switch"> - <a href="<?php echo $GLOBALS['linpha']->imgview->link_url.'&id='.$_GET['id'].'&menu='.$link; + <a href="<?php echo $GLOBALS['linpha']->imgview->url_full.'&menu='.$link; ?>"><?php echo $str_href; ?></a> </div> <?php /* @@ -111,7 +111,7 @@ menu_is_open = false; document.getElementById('menu_optional').style.visibility = 'hidden'; - document.getElementById('menu_switch').innerHTML = '<a href="<?php echo $GLOBALS['linpha']->imgview->link_url.'&id='.$_GET['id']; + document.getElementById('menu_switch').innerHTML = '<a href="<?php echo $GLOBALS['linpha']->imgview->url_full; ?>" onclick="open_close_menu(); return false;">></a>'; } else @@ -119,7 +119,7 @@ menu_is_open = true; document.getElementById('menu_optional').style.visibility = ''; - document.getElementById('menu_switch').innerHTML = '<a href="<?php echo $GLOBALS['linpha']->imgview->link_url.'&id='.$_GET['id']; + document.getElementById('menu_switch').innerHTML = '<a href="<?php echo $GLOBALS['linpha']->imgview->url_full; ?>" onclick="open_close_menu(); return false;"><</a>'; } } @@ -144,7 +144,7 @@ echo '<div">Basket: '; foreach($GLOBALS['output']['menu_sub'] AS $key=>$value) { - echo '<a href="'.$value.'">'.i18n($key).'</a> '; + echo '<a href="'.$value.'">'.$key.'</a> '; } } @@ -153,32 +153,31 @@ foreach($GLOBALS['output'][$index] AS $key=>$value) { echo "\n\n".'<ul>'."\n"; - if(! is_array($value)) + if(!is_array($value['value'])) { - echo "\t".'<li><a href="'.$value.'">'.i18n($key).'</a></li>'."\n"; + echo "\t".'<li><a href="'.$value['value'].'">'.$value['name'].'</a></li>'."\n"; } else { - echo "\t".'<li><span>'.i18n($key).'</span>'."\n"; + echo "\t".'<li><span>'.$value['name'].'</span>'."\n"; echo "\t".'<ul>'."\n"; - foreach($value AS $sub_key=>$sub_value) + foreach($value['value'] AS $sub_value) { - - if(! is_array($sub_value)) + if(!is_array($sub_value['value'])) { - echo "\t\t".'<li><a href="'.$sub_value.'">'.i18n($sub_key).'</a></li>'."\n"; + echo "\t\t".'<li><a href="'.$sub_value['value'].'">'.$sub_value['name'].'</a></li>'."\n"; } else { - echo "\t\t".'<li><span>'.i18n($sub_key).'</span>'."\n"; + echo "\t\t".'<li><span>'.$sub_value['name'].'</span>'."\n"; echo "\t\t".'<ul>'."\n"; - foreach($sub_value AS $subsub_key=>$subsub_value) + foreach($sub_value['value'] AS $subsub_value) { - echo "\t\t\t".'<li><a href="'.$subsub_value.'">'.i18n($subsub_key).'</a></li>'."\n"; + echo "\t\t\t".'<li><a href="'.$subsub_value['value'].'">'.$subsub_value['name'].'</a></li>'."\n"; } echo "\t\t".'</ul>'."\n"; @@ -213,7 +212,7 @@ */ if($GLOBALS['linpha']->imgview->img_type!=0) { - $str .= ' <a href="'.$GLOBALS['linpha']->imgview->link_url.'&id='.$GLOBALS['linpha']->imgview->id_current.'">' + $str .= ' <a href="'.$GLOBALS['linpha']->imgview->url_full.'">' .$GLOBALS['linpha']->imgview->filename.'</a>'; } @@ -260,4 +259,12 @@ return $array; } +/** + * we have to use & in links (W3C) + * in javascript, the & arent convert in & ! + */ +function convert_amp($url) +{ + return str_replace('&','&',$url); +} ?> \ No newline at end of file Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -20,7 +20,7 @@ class linImgview { public $view; -public $link_url; +public $url_base, $url_full; public $output; public $tot_photos; public $photos; @@ -47,8 +47,6 @@ */ function setCurrentView($modulename) { - $this->id_parent = 0; - if(isset($_GET['id']) && $_GET['id'] != 0) { if(isset($_GET['view'])) @@ -61,24 +59,23 @@ */ $current_data = $GLOBALS['linpha']->db->GetRow("SELECT id, name, img_type, parent_id, md5sum FROM ".PREFIX."photos " . "WHERE id = '".linSql::linAddslashes($_GET['id'])."'"); - $this->img_type = $current_data['img_type']; - $this->filename = $current_data['name']; - $this->md5sum = $current_data['md5sum']; /** * check for valid id */ - if( isset($current_data) && count($current_data) > 0 ) + if( isset($current_data) ) { + $this->img_type = $current_data['img_type']; + $this->filename = $current_data['name']; + $this->md5sum = $current_data['md5sum']; $this->id_current = $current_data['id']; + $this->id_parent = $current_data['parent_id']; /** * switch between thumb_view and img_view */ if( $this->img_type == 0) { - $this->id_parent = $current_data['id']; - if(isset($_SESSION['view'])) { switch($_SESSION['view']) @@ -121,32 +118,32 @@ { $this->view = 'img_view'; } - $this->id_parent = $current_data['parent_id']; } } else // no valid id supplied { $this->id_current = 0; - $this->id_parent = 0; $this->view = 'thumbdetail_view'; } } else { - switch($modulename) + $this->id_current = 0; + + if($modulename=='albums') { - case 'albums': - $this->id_current = 0; - $this->id_parent = 0; - $this->view = 'thumbdetail_view'; - break; - case 'browse': - $this->id_current = 0; - $this->view = 'thumb_view'; - //$_GET['id'] = -1; - break; + $this->view = 'home'; } + else + { + $this->view = 'thumb_view'; + } } + + if( ! isset( $this->id_parent) ) + { + $this->id_parent = $this->id_current; + } } /** @@ -163,6 +160,9 @@ */ switch($this->view) { + case 'home': + $this->viewHome_view(); + break; case 'img_view': $this->viewImg_view(); break; @@ -215,14 +215,14 @@ /** * don't show this menu if we're on top */ - if($this->id_current != 0) + if($this->view != 'home') { /** * more than one time used stuff */ foreach($GLOBALS['array_sort_orders'] AS $value) { - $array_sort_orders_links[$value] = $this->link_url.'&id='.$this->id_current.'&order_by='.$value; + $array_sort_orders_links[] = Array('name' => i18n($value), 'value' => $this->url_full.'&order_by='.$value); } $open_basket_link = LINPHA_DIR.'?cat=basket&ref_id='.$this->id_current; @@ -235,64 +235,88 @@ foreach($GLOBALS['array_tn_sizes'] AS $value) { - $array_tn_sizes_links[$value.' Pixel'] = 'javascript:set_tn_size('.$value.')'; + $array_tn_sizes_links[] = Array('name' => $value.' '.i18n("Pixel"), 'value' => 'javascript:set_tn_size('.$value.')'); } foreach($GLOBALS['array_nr_images'] AS $value) { - $array_nr_links[$value] = "javascript:set_nr_images('".$value."')"; + $array_nr_links[] = Array('name' => $value, 'value' =>"javascript:set_nr_images('".$value."')"); } foreach($GLOBALS['array_views'] AS $value) { - $array_views_links[$value] = $this->link_url.'&id='.$this->id_current.'&view='.$value; + $array_views_links[] = Array('name' => i18n($value), 'value' => $this->url_full.'&view='.$value); } $GLOBALS['output']['menu_optional'] = Array( - 'basket' => Array( - 'add all to basket' => $open_basket_link.'&cmd=add_all', - 'switch to basket view' => $this->link_url.'&id='.$this->id_current.'&view=basket', - 'open basket' => $open_basket_link, - 'in basket: '.count($_SESSION['basket_ids']) => '#' + Array( + 'name' => 'basket', + 'value' => Array( + Array('name' => i18n('add all to basket'), 'value' => $open_basket_link.'&cmd=add_all'), + Array('name' => i18n('switch to basket view'), 'value' => $this->url_full.'&view=basket'), + Array('name' => i18n('open basket'), 'value' => $open_basket_link), + Array('name' => i18n('in basket').': '.count($_SESSION['basket_ids']), 'value' => '#') + ) ), - 'view' => Array( - 'sort' => $array_sort_orders_links, - 'view' => $array_views_links, - 'thumb_size' => $array_tn_sizes_links, - 'thumb_nr' => $array_nr_links - ), - 'edit' => Array( - 'set_permissions' => $edit_permission_link + Array( + 'name' => 'view', + 'value' => Array( + Array('name' => i18n('sort'), 'value' => $array_sort_orders_links), + Array('name' => i18n('view'), 'value' => $array_views_links), + Array('name' => i18n('thumb size'), 'value' => $array_tn_sizes_links), + Array('name' => i18n('thumb nr'), 'value' => $array_nr_links) + ) + ), + Array( + 'name' => 'edit', + 'value' => Array( + Array('name' => i18n('set_permissions'), 'value' => $edit_permission_link) + ) ), - 'metainfo' => Array( - 'edit album comment' => $this->link_url.'&id='.$this->id_current.'&view=comment', - 'edit album information' => $this->link_url.'&id='.$this->id_current.'&view=meta' + Array( + 'name' => 'metainfo', + 'value' => Array( + Array('name' => i18n('edit album comment'), 'value' => $this->url_full.'&view=comment'), + Array('name' => i18n('edit album information'), 'value' => $this->url_full.'&view=meta') + ) ) ); break; case 'img_view': $GLOBALS['output']['menu_optional'] = Array( - 'basket' => Array( - 'add to basket' => '#', - 'switch to basket view' => '#', - 'open basket' => $open_basket_link, - 'in basket: '.count($_SESSION['basket_ids']) => '#' + Array( + 'name' => 'basket', + 'value' => Array( + Array('name' => i18n('add to basket'), 'value' => '#'), + Array('name' => i18n('switch to basket view'), 'value' => '#'), + Array('name' => i18n('open basket'), 'value' => $open_basket_link), + Array('name' => i18n('in basket').': '.count($_SESSION['basket_ids']), 'value' => '#') + ) ), - 'view' => Array( - 'sort' => $array_sort_orders_links + Array( + 'name' => 'view', + 'value' => Array( + Array('name' => i18n('sort'), 'value' => $array_sort_orders_links) + ) ), - 'edit' => Array( - 'rot_left' => '#', - 'rot_right' => '#', - 'set_permissions' => $edit_permission_link + Array( + 'name' => 'edit', + 'value' => Array( + Array('name' => i18n('rotate left'), 'value' => '#'), + Array('name' => i18n('rotate right'), 'value' => '#'), + Array('name' => i18n('set permissions'), 'value' => $edit_permission_link) + ) ), - 'metainfo' => Array( - 'edit image information' => $this->link_url.'&id='.$this->id_current.'&view=meta' + Array( + 'name' => 'metainfo', + 'value' => Array( + Array('name' => i18n('edit image information'), 'value' => $this->url_full.'&view=meta') + ) ) ); break; case 'basket_view': $GLOBALS['output']['menu_sub'] = Array( - 'back to normal view' => $this->link_url.'&id='.$this->id_current.'&view=thumb' + 'back to normal view' => $this->url_full.'&view=thumb' ); break; } @@ -314,7 +338,8 @@ if(isset($_GET['use_js'])) { $this->use_javascript = 1; - $this->link_url .= '&use_js=1'; + $this->url_base .= '&use_js=1'; + $this->url_full .= '&use_js=1'; $this->output['page_nr_left'] = ''; $this->output['page_nr_right'] = ''; $this->output['page_nr'] = ''; @@ -437,7 +462,7 @@ } else { - $this->output['page_nr'] .= '<a href="'.$this->link_url.'&id='.$this->id_current.'&pn='.$i.'">'.$i.'</a> '; + $this->output['page_nr'] .= '<a href="'.$this->url_full.'&pn='.$i.'">'.$i.'</a> '; } } @@ -448,8 +473,8 @@ */ if($this->current_page != 1) { - $this->output['page_nr_left'] = '<a href="'.$this->link_url.'&id='.$this->id_current.'&pn=1"><<</a> ' . - '<a href="'.$this->link_url.'&id='.$this->id_current.'&pn='.($this->current_page-1).'"><</a> '; + $this->output['page_nr_left'] = '<a href="'.$this->url_full.'&pn=1"><<</a> ' . + '<a href="'.$this->url_full.'&pn='.($this->current_page-1).'"><</a> '; } else { @@ -461,8 +486,8 @@ */ if($this->current_page != $this->nr_pages && $this->nr_pages != 0) // need check nr_pages != 0 because we don't need links if nr_pages == 0! { - $this->output['page_nr_right'] = '<a href="'.$this->link_url.'&id='.$this->id_current.'&pn='.($this->current_page+1).'">></a> ' . - '<a href="'.$this->link_url.'&id='.$this->id_current.'&pn='.($this->nr_pages).'">>></a> '; + $this->output['page_nr_right'] = '<a href="'.$this->url_full.'&pn='.($this->current_page+1).'">></a> ' . + '<a href="'.$this->url_full.'&pn='.($this->nr_pages).'">>></a> '; } else { @@ -498,22 +523,21 @@ } + function viewHome_view() + { + $GLOBALS['linpha']->template->setModuleName('home'); + + $this->setRandomImages(); + + $this->setBrowseByDate(); + } + /** * thumbdetail_view */ function viewThumbdetail_view() { $GLOBALS['linpha']->template->setModuleName('view_thumbdetail'); - - /** - * set some infos only viewed in top view - */ - if($this->id_current == 0) - { - $this->setRandomImages(); - - $this->setBrowseByDate(); - } } function setBrowseByDate() @@ -721,7 +745,7 @@ $name = $this->photos_filtered[$key]['name']; $str = '<div class="div_'.$class.'thumb">' - . '<a href="'.$this->link_url.'&id='.$id.'">' + . '<a href="'.$this->url_base.'&id='.$id.'">' . '<img class="img_'.$class.'thumb" src="'.LINPHA_DIR.'/get_thumb.php?id='.$id.'" /></a>' . '<br />'.$name.'</div>'."\n"; @@ -741,7 +765,6 @@ function viewImgCommon() { - /** * search current key in array */ Modified: trunk/linpha2/lib/modules/module.albums.php =================================================================== --- trunk/linpha2/lib/modules/module.albums.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/lib/modules/module.albums.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -20,22 +20,28 @@ /** * set some infos */ - $linpha->imgview->link_url = LINPHA_DIR.'/?cat=alb'; + $linpha->imgview->url_base = LINPHA_DIR.'/?cat=alb'; + + if(isset($_GET['id'])) { + $linpha->imgview->url_full = LINPHA_DIR.'/?cat=alb&id='.$_GET['id']; + } else { + $linpha->imgview->url_full = LINPHA_DIR.'/?cat=alb'; + } + $linpha->imgview->setCurrentView('albums'); /** * do import */ - if( $linpha->sql->config->value['sys_import_autoimport'] - && ($linpha->imgview->view == 'thumb_view' || $linpha->imgview->view == 'thumbdetail_view')) + if( $linpha->sql->config->value['sys_import_autoimport'] && $linpha->imgview->img_type == 0) { - linImport::updateDir( $linpha->imgview->id_parent, $recursive = false ); + linImport::updateDir( $linpha->imgview->id_current, $recursive = false ); } /** * set navigation line */ - $linpha->imgview->output['navigation'] = set_navigation_line( $linpha->imgview->id_parent ); + $linpha->imgview->output['navigation'] = set_navigation_line( $linpha->imgview->id_current ); /** Added: trunk/linpha2/templates/main_css/home.css =================================================================== --- trunk/linpha2/templates/main_css/home.css (rev 0) +++ trunk/linpha2/templates/main_css/home.css 2006-03-20 18:45:06 UTC (rev 4425) @@ -0,0 +1,62 @@ +h1 { + font-size: 18pt; + font-family: Verdana, Arial, Helvetica, sans-serif; +} + +h2 { + font-size: 14pt; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin-top: 2px; + margin-bottom: 7px; +} + +hr { + clear: both; +} + +.div_random { + height: 200px; +} + +.div_random_img { + float: left; + margin-left: 40px; +} + +.img_random_thumbnail { + border: 0; + + max-width: 130px; + max-height: 130px; +} + +.div_folder { + position: relative; + margin: 2px; + margin-left: 15px; + margin-bottom: 15px; + padding: 5px; + + height: 151px; + width: 700px; + + background-color: #d5fcf4; + border: 1px solid #0c9; +} + +.div_folder_text { + margin-left: 180px; + height: 140px; + padding: 5px; +} + +.img_folder_thumbnail { + position: absolute; + top: 15px; + left: 20px; + + width: 130px; + height: auto; + + border: 0; +} \ No newline at end of file Modified: trunk/linpha2/templates/main_css/view_img.css =================================================================== --- trunk/linpha2/templates/main_css/view_img.css 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/templates/main_css/view_img.css 2006-03-20 18:45:06 UTC (rev 4425) @@ -7,7 +7,27 @@ text-align: center; } +/** + * comment stuff + */ + .add_comment { + color: #036; + width: 600px; + text-align: left; + margin-left: 100px; + } + .add_comment input, .add_comment textarea { + background-color: #d5eeff; + } + + .comments { + border: 1px solid #09f; + width: 200px; + margin: 5px; + margin-left: 150px; + } + /** * navigation stuff */ Modified: trunk/linpha2/templates/main_css/view_thumbdetail.css =================================================================== --- trunk/linpha2/templates/main_css/view_thumbdetail.css 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/templates/main_css/view_thumbdetail.css 2006-03-20 18:45:06 UTC (rev 4425) @@ -1,35 +1,3 @@ -h1 { - font-size: 18pt; - font-family: Verdana, Arial, Helvetica, sans-serif; -} - -h2 { - font-size: 14pt; - font-family: Verdana, Arial, Helvetica, sans-serif; - margin-top: 2px; - margin-bottom: 7px; -} - -hr { - clear: both; -} - -.div_random { - height: 200px; -} - -.div_random_img { - float: left; - margin-left: 40px; -} - -.img_random_thumbnail { - border: 0; - - max-width: 130px; - max-height: 130px; -} - .div_folder { position: relative; margin: 2px; Added: trunk/linpha2/templates/main_html/home.html.php =================================================================== --- trunk/linpha2/templates/main_html/home.html.php (rev 0) +++ trunk/linpha2/templates/main_html/home.html.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -0,0 +1,59 @@ +<div class="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'> + +<h1><?php echo i18n("Welcome"); ?></h1> +<br /><br /><br /> + +<hr /> + +<?php if( count($GLOBALS['linpha']->imgview->output['random_images']) > 0 ) { ?> + <h1><?php echo i18n("Random images"); ?></h1> + <div class='div_random'> + <?php + foreach($GLOBALS['linpha']->imgview->output['random_images'] AS $key=>$value) + { + ?> + <div class='div_random_img'> + <?php echo '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">' + . '<img class="img_random_thumbnail" title="'.htmlentities($value['path']).'" src="'. LINPHA_DIR.'/get_thumb.php?id=' .$value['id'] .'" /></a>'; ?> + </div> + <?php + } + ?> + </div> + + <hr /> +<?php } ?> + +<?php echo i18n("Browse by Date").': '.$GLOBALS['linpha']->imgview->output['browse_by_date']; ?><br /> +<hr /> + +<h1><?php echo i18n("Albums"); ?></h1> + +<?php +foreach($GLOBALS['linpha']->imgview->photos_filtered AS $key=>$value) +{ + ?> + <div class='div_folder'> + <?php echo '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">' + . '<img class="img_folder_thumbnail" src="'. LINPHA_DIR.'/get_thumb.php?id=' .$value['id'] .'" /></a>'; ?> + + <div class='div_folder_text'> + <h2><?php echo $value['name']; ?></h2> + + <?php echo $value['stats_numbers']. i18n("Photos"); ?> + + <br /> + <?php echo strftime("%x %X",$value['time_add']); ?> + + </div> + </div> + <?php +} +?> +</div> + Modified: trunk/linpha2/templates/main_html/view_img.html.php =================================================================== --- trunk/linpha2/templates/main_html/view_img.html.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/templates/main_html/view_img.html.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -44,35 +44,18 @@ "'".linSql::linAddslashes($comment)."')"); } ?> -<style> -.add_comment { - color: #036; - width: 600px; - text-align: left; - margin-left: 100px; -} -.add_comment input, .add_comment textarea { - background-color: #d5eeff; -} -.comments { - border: 1px solid #09f; - width: 200px; - margin: 5px; - margin-left: 150px; -} -</style> <div class="add_comment"> <form action="<?php echo $GLOBALS['linpha']->imgview->link_url.'&id='.$GLOBALS['linpha']->imgview->id_current; ?>" method="POST"> -<?php i18n("Add Comment"); ?>:<br /> +<?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" /> <a href="javascript:open_textarea()">(+)</a> </div> <textarea style="display: none;" id="comment_textarea" name="comment_textarea" rows="10" cols="50"></textarea> -<?php i18n("Name"); ?>: <input type="text" name="author" value="" size="10" maxlength="40" /> +<?php echo i18n("Name"); ?>: <input type="text" name="author" value="" size="10" maxlength="40" /> <input type="hidden" name="cmd" value="add_comment" /> -<input type="submit" name="submit" value="submit" /> +<input type="submit" name="submit" value="<?php echo i18n("submit"); ?>" /> </form> </div> <br /><br /> Modified: trunk/linpha2/templates/main_html/view_thumb.head.php =================================================================== --- trunk/linpha2/templates/main_html/view_thumb.head.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/templates/main_html/view_thumb.head.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -3,7 +3,7 @@ var tot_photos = <?php echo $GLOBALS['linpha']->imgview->tot_photos; ?>; var startup_page = 1; var link_get_thumb = '<?php echo LINPHA_DIR.'/get_thumb.php?id='; ?>'; -var link_url = '<?php echo $GLOBALS['linpha']->imgview->link_url; ?>'; +var link_url = '<?php echo $GLOBALS['linpha']->imgview->url_base; ?>'; var tn_size = <?php echo $GLOBALS['def_tn_size']; ?>; var photos_per_page = 'auto'; <?php echo $GLOBALS['linpha']->imgview->output['files_db']."\n"; ?> Modified: trunk/linpha2/templates/main_html/view_thumb.html.php =================================================================== --- trunk/linpha2/templates/main_html/view_thumb.html.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/templates/main_html/view_thumb.html.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -48,7 +48,7 @@ ?> <script language="JavaScript" type="text/javascript"> <!-- - location.href = "<?php echo $GLOBALS['linpha']->imgview->link_url.'&id='.$GLOBALS['linpha']->imgview->id_current.'&use_js=1'; ?>"; + location.href = "<?php echo convert_amp($GLOBALS['linpha']->imgview->url_full.'&use_js=1'); ?>"; //--> </script> @@ -62,9 +62,6 @@ <div class="navigation"> <?php echo $GLOBALS['linpha']->imgview->output['navigation']; ?> - <br /><br /> - <?php echo $GLOBALS['linpha']->imgview->output['folders']; ?> - <br /><br /> </div> <div id='maindiv' class='main'> Modified: trunk/linpha2/templates/main_html/view_thumbdetail.html.php =================================================================== --- trunk/linpha2/templates/main_html/view_thumbdetail.html.php 2006-03-20 16:53:55 UTC (rev 4424) +++ trunk/linpha2/templates/main_html/view_thumbdetail.html.php 2006-03-20 18:45:06 UTC (rev 4425) @@ -3,46 +3,13 @@ left<br />left<br />left<br />left<br />left<br />left<br /> </div> -<?php if($GLOBALS['linpha']->imgview->id_current!=0) { ?> <div id='navigation' class="navigation"> <?php echo $GLOBALS['linpha']->imgview->output['navigation']; ?> <br /><br /> </div> -<?php } ?> <div id='maindiv' class='main'> -<?php if($GLOBALS['linpha']->imgview->id_current==0) { /* show welcome only in top view */ ?> - <h1><?php echo i18n("Welcome"); ?></h1> - <br /><br /><br /> - - <hr /> - - <?php if( count($GLOBALS['linpha']->imgview->output['random_images']) > 0 ) { ?> - <h1><?php echo i18n("Random images"); ?></h1> - <div class='div_random'> - <?php - foreach($GLOBALS['linpha']->imgview->output['random_images'] AS $key=>$value) - { - ?> - <div class='div_random_img'> - <?php echo '<a href="'.LINPHA_DIR.'/?cat=alb&id='.$value['id'].'">' - . '<img class="img_random_thumbnail" title="'.htmlentities($value['path']).'" src="'. LINPHA_DIR.'/get_thumb.php?id=' .$value['id'] .'" /></a>'; ?> - </div> - <?php - } - ?> - </div> - - <hr /> - <?php } ?> - - <?php echo i18n("Browse by Date").': '.$GLOBALS['linpha']->imgview->output['browse_by_date']; ?><br /> - <hr /> - - <h1><?php echo i18n("Albums"); ?></h1> -<?php } ?> - <?php foreach($GLOBALS['linpha']->imgview->photos_filtered AS $key=>$value) { @@ -64,5 +31,4 @@ <?php } ?> -</div> - +</div> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |