[Linpha-cvs] SF.net SVN: linpha: [4435] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-03-25 13:09:01
|
Revision: 4435 Author: fangehrn Date: 2006-03-25 05:08:27 -0800 (Sat, 25 Mar 2006) ViewCVS: http://svn.sourceforge.net/linpha/?rev=4435&view=rev Log Message: ----------- * working on templates Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/lib/classes/linpha.functions.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.template_new.class.php trunk/linpha2/templates/css/default/basket.css trunk/linpha2/templates/css/default/global.css trunk/linpha2/templates/css/default/view_thumb.css trunk/linpha2/templates/html/default/global.html.php trunk/linpha2/templates/html/default/view_basket.html.php trunk/linpha2/templates/html/default/view_img.html.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/lib/classes/syslog.js trunk/linpha2/templates/css/default/syslog.css trunk/linpha2/templates/css/default/view_meta.css trunk/linpha2/templates/html/default/view_meta.head.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/ChangeLog 2006-03-25 13:08:27 UTC (rev 4435) @@ -1,3 +1,6 @@ +2006-03-25 flo + * working on templates + 2006-03-24 bzrudi <linpha2_AT_tuxpower_DOT_de> * code cleanups and documentation Modified: trunk/linpha2/lib/classes/linpha.functions.php =================================================================== --- trunk/linpha2/lib/classes/linpha.functions.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/lib/classes/linpha.functions.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -71,176 +71,7 @@ } // end tr() -/** - * print the main menu - * - * view http://www.tanfa.co.uk/css/examples/menu/tutorial-h.asp - * the nicest one! - * - * @todo should not work in IE yet - */ -function printMenu() -{ - printMenuEntry('menu_main'); - - if(isset($GLOBALS['linpha']->template->output['menu_optional'] ) ) - { - /** - * stuff for browsers with deactivated javascript - */ - if(isset($_GET['menu'])) - { - if($_GET['menu'] == 'open') - { - $_SESSION['menu'] = 'open'; - } - else - { - $_SESSION['menu'] = 'close'; - } - } - - if( (isset($_SESSION['menu']) && $_SESSION['menu']=='open') - OR isset($_SESSION['view']) && $_SESSION['view']=='basket') - { - $style = "visibility: visible;"; - $link = 'close'; - $str_href = '<'; - } - else - { - $style = "visibility: hidden;"; - $link = 'open'; - $str_href = '>'; - } - ?> -<div id="menu_switch"> -<a href="<?php echo $GLOBALS['linpha']->template->URL_full.'&menu='.$link; - ?>"><?php echo $str_href; ?></a> -</div> -<?php /* - onclick="open_close_menu(); return false;" - <script language="JavaScript" type="text/javascript"> - var menu_is_open = false; - function open_close_menu() - { - if( menu_is_open ) - { - menu_is_open = false; - - document.getElementById('menu_optional').style.visibility = 'hidden'; - document.getElementById('menu_switch').innerHTML = '<a href="<?php echo $GLOBALS['linpha']->template->URL_full; - ?>" onclick="open_close_menu(); return false;">></a>'; - } - else - { - menu_is_open = true; - - document.getElementById('menu_optional').style.visibility = ''; - document.getElementById('menu_switch').innerHTML = '<a href="<?php echo $GLOBALS['linpha']->template->URL_full; - ?>" onclick="open_close_menu(); return false;"><</a>'; - } - } - </script> - */ ?> - -<div id="menu_optional" style="<?php echo $style; ?>"> -<?php printMenuEntry('menu_optional'); ?> - -</div> -<?php - - } - - if( isset( $GLOBALS['linpha']->template->output['menu_sub'] ) ) - { - printSubMenu(); - } -} - -function printSubMenu() -{ - echo '</div>'; - echo '<div">Basket: '; - foreach($GLOBALS['linpha']->template->output['menu_sub'] AS $key=>$value) - { - echo '<a href="'.$value.'">'.$key.'</a> '; - } -} - -function printMenuEntry($index) -{ - foreach($GLOBALS['linpha']->template->output[$index] AS $key=>$value) - { - echo "\n".'<ul>'."\n"; - if(!is_array($value['value'])) - { - echo "\t".'<li><a href="'.$value['value'].'">'.$value['name'].'</a></li>'."\n"; - } - else - { - echo "\t".'<li><span>'.$value['name'].'</span>'."\n"; - - echo "\t".'<ul>'."\n"; - - foreach($value['value'] AS $sub_value) - { - /** - * search special - */ - if($sub_value['name'] == 'special_search') - { -?> - <li><span> - <input type="text" name="search" value="" /> - <input type="submit" name="submit" value="<?php echo i18n("search"); ?>" /> - </span></li> -<?php - } - /** - * login special - */ - elseif($sub_value['name'] == 'special_login') - { -?> - <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> -<?php - } - else - { - if(!is_array($sub_value['value'])) - { - echo "\t\t".'<li><a href="'.$sub_value['value'].'">'.$sub_value['name'].'</a></li>'."\n"; - } - else - { - echo "\t\t".'<li><span>'.$sub_value['name'].' ></span>'."\n"; - - echo "\t\t".'<ul>'."\n"; - - foreach($sub_value['value'] AS $subsub_value) - { - echo "\t\t\t".'<li><a href="'.$subsub_value['value'].'">'.$subsub_value['name'].'</a></li>'."\n"; - } - - echo "\t\t".'</ul>'."\n"; - echo "\t\t".'</li>'."\n"; - } - } - } - - echo "\t".'</ul>'."\n"; - echo "\t".'</li>'."\n"; - } - echo '</ul>'."\n"; - } -} - function set_navigation_line( $id ) { $array_files = $GLOBALS['linpha']->sql->getFullFilenameFromId( $id ); @@ -263,7 +94,9 @@ return $str; } - +/** + * linpha syslog window, shows up system info like "images added" + */ function linSysLog($str) { if( ! isset( $GLOBALS['linpha']->template->output['sys_log'] ) ) @@ -307,8 +140,7 @@ /** - * we have to use & in links (W3C) - * in javascript, the & arent convert in & ! + * we have to use & in links (W3C), but in javascript we cannot use &! */ function convert_amp($url) { Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -275,79 +275,73 @@ $array_views_links[] = Array('name' => i18n($value), 'value' => $GLOBALS['linpha']->template->URL_full.'&view='.$value); } - $GLOBALS['linpha']->template->output['menu_optional'] = Array( + $GLOBALS['linpha']->template->output['menu_more'] = Array( Array( - 'name' => 'basket', + 'name' => i18n("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' => $GLOBALS['linpha']->template->URL_full.'&view=basket'), - Array('name' => i18n('open basket'), 'value' => $open_basket_link), - Array('name' => i18n('in basket').': '.count($_SESSION['basket_ids']), 'value' => '#') + Array('name' => i18n("Add all To Basket"), 'value' => $open_basket_link.'&cmd=add_all'), + Array('name' => i18n("Switch To Basket View"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=basket'), + Array('name' => i18n("Open Basket"), 'value' => $open_basket_link), + Array('name' => i18n("Images In Basket").': '.count($_SESSION['basket_ids']), 'value' => '#') ) ), Array( - 'name' => 'view', + 'name' => i18n("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' => 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', + 'name' => i18n("Edit"), 'value' => Array( - Array('name' => i18n('set permissions'), 'value' => $edit_permission_link) + Array('name' => i18n("Set Permissions"), 'value' => $edit_permission_link) ) ), Array( - 'name' => 'metainfo', + 'name' => i18n("Metainfo"), 'value' => Array( - Array('name' => i18n('edit album comment'), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=comment'), - Array('name' => i18n('edit album information'), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=meta') + Array('name' => i18n("Edit Album Comment"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=comment'), + Array('name' => i18n("Edit Album Information"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=meta') ) ) ); break; case 'img_view': - $GLOBALS['linpha']->template->output['menu_optional'] = Array( + $GLOBALS['linpha']->template->output['menu_more'] = Array( Array( - 'name' => 'basket', + 'name' => i18n("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' => '#') + Array('name' => i18n("Add To Basket"), 'value' => '#'), + Array('name' => i18n("Open Basket"), 'value' => $open_basket_link), + Array('name' => i18n("Images In Basket").': '.count($_SESSION['basket_ids']), 'value' => '#') ) ), Array( - 'name' => 'view', + 'name' => i18n("View"), 'value' => Array( - Array('name' => i18n('sort'), 'value' => $array_sort_orders_links) + Array('name' => i18n("Sort"), 'value' => $array_sort_orders_links) ) ), Array( - 'name' => 'edit', + 'name' => i18n("Edit"), 'value' => Array( - Array('name' => i18n('rotate left'), 'value' => '#'), - Array('name' => i18n('rotate right'), 'value' => '#'), - Array('name' => i18n('set permissions'), 'value' => $edit_permission_link) + Array('name' => i18n("Rotate Left"), 'value' => '#'), + Array('name' => i18n("Rotate Right"), 'value' => '#'), + Array('name' => i18n("Set Permissions"), 'value' => $edit_permission_link) ) ), Array( - 'name' => 'metainfo', + 'name' => i18n("Metainfo"), 'value' => Array( - Array('name' => i18n('edit image information'), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=meta') + Array('name' => i18n("Edit Image Information"), 'value' => $GLOBALS['linpha']->template->URL_full.'&view=meta') ) ) ); break; - case 'basket_view': - $GLOBALS['linpha']->template->output['menu_sub'] = Array( - 'back to normal view' => $GLOBALS['linpha']->template->URL_full.'&view=thumb' - ); - break; } } } @@ -667,13 +661,50 @@ { $GLOBALS['linpha']->template->setModuleName('view_img'); - $this->viewImgCommon(); + $this->viewImgSetPrevNextThumb(); $array_files = $GLOBALS['linpha']->sql->getFullFilenameFromId( $this->id_current ); $this->full_filename = $this->album_dir.implode('/',$array_files); + $this->viewImg_viewReadImageInformation(); + /** + * image comments + */ + + /** + * save comment + */ + if( isset( $_POST['cmd'] ) && $_POST['cmd']=='add_comment') + { + if( !empty($_POST['comment_textarea'])) + { + $comment = $_POST['comment_textarea']; + } + else + { + $comment = $_POST['comment_text']; + } + + $GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_comments (time, md5sum, author, comment)" . + "VALUES ('".time()."','".$GLOBALS['linpha']->imgview->md5sum."','".linSql::linAddslashes($_POST['author'])."'," . + "'".linSql::linAddslashes($comment)."')"); + } + + /** + * get comments + */ + $GLOBALS['linpha']->template->output['image_comments'] = $GLOBALS['linpha']->db->Execute("SELECT id, time, author, comment FROM ".PREFIX."meta_comments " . + "WHERE md5sum = '".$GLOBALS['linpha']->imgview->md5sum."'"); +} + +/** + * read image informations + */ +function viewImg_viewReadImageInformation() +{ + /** * set image informations */ include_once(LINPHA_DIR.'/lib/classes/linpha.metadata.class.php'); @@ -718,10 +749,6 @@ } } - /** - * read image information from database - */ - if($GLOBALS['linpha']->sql->config->value['sys_image_exif']) { $str_exif_fields = strtolower( implode(', ',$MetaData->defined_exif_fields) ); $exif_data = $GLOBALS['linpha']->db->GetRow("SELECT ".$str_exif_fields." FROM ".PREFIX."meta_exif WHERE md5sum = '".$this->md5sum."'"); @@ -732,6 +759,9 @@ $iptc_data = $GLOBALS['linpha']->db->GetRow("SELECT ".$str_iptc_fields." FROM ".PREFIX."meta_iptc WHERE md5sum = '".$this->md5sum."'"); } + /** + * read image information from database + */ $query = $GLOBALS['linpha']->db->Execute("SELECT name FROM ".PREFIX."meta_fields WHERE flags = '10' ORDER by id"); while($data = $query->FetchRow()) { @@ -790,10 +820,8 @@ $GLOBALS['linpha']->template->output['image_infos'][$data['name']] = Array('name' => $name, 'value' => $value); } } - } - /** * generate html code for the prev/next thumbnail */ @@ -819,14 +847,44 @@ $GLOBALS['linpha']->template->setModuleName('view_meta'); $GLOBALS['linpha']->template->overrideModule('css','view_img'); // used the same css definitions as view_img - $this->viewImgCommon(); + $this->viewImgSetPrevNextThumb(); + + /** + * save metadata + */ + if(isset($_POST['cmd']) && $_POST['cmd']=='insert_metadata') + { + if(isset($_POST['field'])) + { + /** + * delete existing entries + */ + $query = $GLOBALS['linpha']->db->Execute("DELETE FROM ".PREFIX."meta_data " . + "WHERE md5sum = '".$GLOBALS['linpha']->imgview->md5sum."'"); + + foreach($_POST['field'] AS $key=>$value) + { + if(is_array($value)) // coming from a select (categories etc.) + { + $value = ';'.implode(';',$value).';'; + } + + if(! empty($value)) + { + $GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_data ". + "(field_id, md5sum, meta_data) VALUES " . + "('".linSql::linAddslashes($key)."','".$GLOBALS['linpha']->imgview->md5sum."','".linSql::linAddslashes($value)."')"); + } + } + } + } } /** - * @todo what exactly does this method ? + * set prev/next thumb for img_view and meta_view */ -function viewImgCommon() +function viewImgSetPrevNextThumb() { /** * search current key in array Modified: trunk/linpha2/lib/classes/linpha.template_new.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template_new.class.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/lib/classes/linpha.template_new.class.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -62,7 +62,68 @@ break; } } + + /** + * print the main menu + * + * view http://www.tanfa.co.uk/css/examples/menu/tutorial-h.asp + * the nicest one! + * + * @todo should not work in IE yet + */ + function printMenu($index) + { + echo "\n".'<ul>'."\n"; + echo "\t".'<li><span>'.i18n("More").' v</span>'."\n"; + echo "\n".'<ul>'."\n"; + + foreach($GLOBALS['linpha']->template->output['menu_'.$index] AS $key=>$value) + { + if(!is_array($value['value'])) + { + echo "\t".'<li><a href="'.$value['value'].'">'.$value['name'].'</a></li>'."\n"; + } + else + { + echo "\t".'<li><span>'.$value['name'].' ></span>'."\n"; + + echo "\t".'<ul>'."\n"; + + foreach($value['value'] AS $sub_value) + { + if(!is_array($sub_value['value'])) + { + echo "\t\t".'<li><a href="'.$sub_value['value'].'">'.$sub_value['name'].'</a></li>'."\n"; + } + else + { + echo "\t\t".'<li><span>'.$sub_value['name'].' ></span>'."\n"; + + echo "\t\t".'<ul>'."\n"; + + foreach($sub_value['value'] AS $subsub_value) + { + echo "\t\t\t".'<li><a href="'.$subsub_value['value'].'">'.$subsub_value['name'].'</a></li>'."\n"; + } + + echo "\t\t".'</ul>'."\n"; + echo "\t\t".'</li>'."\n"; + } + } + + echo "\t".'</ul>'."\n"; + echo "\t".'</li>'."\n"; + } + } + + echo "\t".'</ul>'."\n"; + echo "\t".'</li>'."\n"; + echo '</ul>'."\n"; + } + + + } // end class linTemplate ?> \ No newline at end of file Added: trunk/linpha2/lib/classes/syslog.js =================================================================== Modified: trunk/linpha2/templates/css/default/basket.css =================================================================== --- trunk/linpha2/templates/css/default/basket.css 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/css/default/basket.css 2006-03-25 13:08:27 UTC (rev 4435) @@ -2,10 +2,6 @@ margin-left: 10px; } -.navigation { - margin-left: 10px; -} - .imgdiv { border: 1px #000000 solid; margin: 3px; Modified: trunk/linpha2/templates/css/default/global.css =================================================================== --- trunk/linpha2/templates/css/default/global.css 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/css/default/global.css 2006-03-25 13:08:27 UTC (rev 4435) @@ -17,29 +17,27 @@ text-decoration: underline; } -.header { +.title { + background-color: #d5fcf4; + padding: 0; + border: 1px solid #0c9; + margin: 10px 10px 10px 10px; +} + +.menu { background-color: #ffd5ee; border: 1px solid #f09; - /*position: fixed; - top: 10px; - left: 10px; - right: 10px;*/ margin: 10px; z-index: 400; padding: 5px; - height: 70px; + height: 30px; } -.header2 { /* used if .header is position:fixed */ - /*margin: 10px; - height: 80px;*/ - /*visibility: hidden;*/ -} .left { position: absolute; - top: 100px; + top: 200px; left: 10px; width: 205px; @@ -54,13 +52,6 @@ border: 1px solid #f09; } -.navigation { - background-color: #d5fcf4; - padding: 0; - border: 1px solid #0c9; - margin: 10px 10px 10px 237px; -} - .main { background-color: #d5eeff; padding: 5px; @@ -129,7 +120,7 @@ #menu ul ul { position: absolute; z-index: 500; - font-size: 0.8em; + font-size: 1em; /* relativ to parent element */ width: auto; min-width: 7em; /* white-space: nowrap;*/ @@ -141,10 +132,6 @@ left: 100%; } - div#menu ul ul { - display: none; - } - div#menu ul ul, div#menu ul li:hover ul ul, div#menu ul ul li:hover ul ul @@ -154,9 +141,4 @@ div#menu ul ul li:hover ul, div#menu ul ul ul li:hover ul {display: block;} - - #menu_switch a { - width: 1em; - float: left; - } --> \ No newline at end of file Added: trunk/linpha2/templates/css/default/syslog.css =================================================================== --- trunk/linpha2/templates/css/default/syslog.css (rev 0) +++ trunk/linpha2/templates/css/default/syslog.css 2006-03-25 13:08:27 UTC (rev 4435) @@ -0,0 +1,24 @@ +.sys_log { + position: absolute; + left: 15px; + top: 15px; + width: auto; + + z-index: 10; + + padding: 5px; + + border: 1px solid #FFD500; + background-color: #FFFF81; + +} + +.sys_log_close { + position: absolute; + right: 0; + top: 0; + z-index: 10; + + background-color: #ffd5ee; + border: 1px solid #f09; +} \ No newline at end of file Added: trunk/linpha2/templates/css/default/view_meta.css =================================================================== --- trunk/linpha2/templates/css/default/view_meta.css (rev 0) +++ trunk/linpha2/templates/css/default/view_meta.css 2006-03-25 13:08:27 UTC (rev 4435) @@ -0,0 +1,13 @@ +.main { + margin-left: 10px; + text-align: left; +} + +.div_all_main { + margin-left: 10px; +} + +.mainimage { + width: 350px; + height: auto; +} \ No newline at end of file Modified: trunk/linpha2/templates/css/default/view_thumb.css =================================================================== --- trunk/linpha2/templates/css/default/view_thumb.css 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/css/default/view_thumb.css 2006-03-25 13:08:27 UTC (rev 4435) @@ -2,17 +2,12 @@ margin-left: 10px; } -.navigation { - margin-left: 10px; -} - - /** * need this to calculate heigh of main div * if you're gettings scrollbars, adjust the height! */ .spacer_height { - height: 220px; + height: 240px; position: absolute; visibility: hidden; } @@ -35,22 +30,38 @@ text-align: left; } -.page_nr_main { +/** + * page nr + */ +.page_nr_spacer { + height: 45px; +} +.page_nr { position: absolute; - right: 12px; - top: 100px; - width: 600px; + margin-top: 5px; + left: 50%; + width: 530px; + height: 55px; + margin-left: -265px; /* should be the half of 'width' */ + + border: 1px #000000 solid; } -.page_nr { - float: right; - border: 1px #000000 solid; - margin: 5px;; +.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; +} + + .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 Modified: trunk/linpha2/templates/html/default/global.html.php =================================================================== --- trunk/linpha2/templates/html/default/global.html.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/html/default/global.html.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -1,35 +1,5 @@ <?php /** - * create main menu - */ -$GLOBALS['linpha']->template->output['menu_main'] = Array( - Array('name' => 'home', 'value' => LINPHA_DIR . '/'), - Array('name' => 'admin', 'value' => LINPHA_DIR . '/admin/'), - Array( - 'name' => 'search', - 'value' => Array( - Array( - 'name' => 'special_search', - 'value' => '#' - ), - Array( - 'name' => 'extended search', - 'value' => LINPHA_DIR . '/?cat=search' - ) - ) - ), - Array( - 'name' => 'login', - 'value' => Array( - Array( - 'name' => 'special_login', - 'value' => '#' - ) - ) - ) -); - -/** * first output starts here */ ?> @@ -37,86 +7,86 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> +<title><?php echo $GLOBALS['linpha']->template->output['title']; ?></title> + +<!-- css includes --> <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/css/'.$GLOBALS['linpha']->template->template_name.'/global.css'; ?>' type='text/css'> +<link rel='stylesheet' href='<?php $GLOBALS['linpha']->template->includeFile('css'); ?>' type='text/css'> + <?php if( isset($GLOBALS['linpha']->template->output['sys_log'])) { ?> - <style> - .sys_log { - position: absolute; - left: 15px; - top: 15px; - width: auto; - - z-index: 10; - - padding: 5px; - - border: 1px solid #FFD500; - background-color: #FFFF81; - - } - - .sys_log_close { - position: absolute; - right: 0; - top: 0; - z-index: 10; - - background-color: #ffd5ee; - border: 1px solid #f09; - } - </style> + <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/css/'.$GLOBALS['linpha']->template->template_name.'/syslog.css'; ?>' type='text/css'> <?php } ?> -<link rel='stylesheet' href='<?php $GLOBALS['linpha']->template->includeFile('css'); ?>' type='text/css'> + <?php $GLOBALS['linpha']->template->includeFile('head'); ?> -<title><?php echo $GLOBALS['linpha']->template->output['title']; ?></title> </head> + <body> + <?php if( isset($GLOBALS['linpha']->template->output['sys_log']) ) { ?> + <!-- syslog --> <div id="sys_log" class="sys_log"> <div class="sys_log_close"><a href="javascript:toggleWindow()">X</a></div> <div id="sys_log_text" class="sys_log_text"> - <?php echo i18n("Linpha syslog"); ?>:<br /> + <?php echo i18n("Linpha Syslog"); ?>:<br /> <?php echo $GLOBALS['linpha']->template->output['sys_log']; ?> </div> </div> - <script language="JavaScript" type="text/javascript"> - var window_is_open = false; - function toggleWindow() - { - if( window_is_open ) - { - window_is_open = false; - - document.getElementById('sys_log').style.width = '20px'; - document.getElementById('sys_log').style.height = '20px'; - - document.getElementById('sys_log_text').style.visibility = 'hidden'; - } - else - { - window_is_open = true; - - document.getElementById('sys_log').style.width = 'auto'; - document.getElementById('sys_log').style.height = 'auto'; - - document.getElementById('sys_log_text').style.visibility = ''; - } - } - - toggleWindow(); - </script> + <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/classes/syslog.js"> </script> <?php } ?> -<!-- header with menu //--> -<div class="header"> +<!-- title/navigation --> +<div id="header" class="title"> + <h1><?php echo $GLOBALS['linpha']->template->output['title']." :: ".$GLOBALS['linpha']->template->output['navigation']; ?></h1> +</div> + +<!-- menu --> +<div class="menu"> <div id="menu"> -<?php printMenu(); echo "\n"; ?> + <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 --> -<div class="header2"></div> -<!-- end header with menu //--> - <?php $GLOBALS['linpha']->template->includeFile('body'); ?> </body> </html> \ 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-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/html/default/view_basket.html.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -15,8 +15,10 @@ <div class="navigation"> <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> <br /><br /> - Images in basket: <?php echo count($_SESSION['basket_ids']); ?> - (<a href="<?php echo LINPHA_DIR.'?cat=basket&ref_id='.$GLOBALS['linpha']->imgview->id_current; ?>">open basket</a>) + <?php echo i18n("Images In Basket"); ?>: <?php echo count($_SESSION['basket_ids']); ?> + (<a href="<?php echo LINPHA_DIR.'?cat=basket&ref_id='.$GLOBALS['linpha']->imgview->id_current; ?>"><?php echo i18n("Open Basket"); ?></a>) + <br /> + <a href="<?php echo $GLOBALS['linpha']->template->URL_full.'&view=thumb'; ?>"><?php echo i18n("Back To Normal View"); ?></a> </div> <form name='basket' action='<?php echo LINPHA_DIR.'/?cat=basket&cmd=add_selected&ref_id='.$GLOBALS['linpha']->imgview->id_current; ?>' method='POST'> Modified: trunk/linpha2/templates/html/default/view_img.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_img.html.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/html/default/view_img.html.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -7,12 +7,6 @@ ?> </div> - -<div class="navigation"> - <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> - <br /><br /> -</div> - <div class="div_all_main"> <div class="div_all_prevthumb"> <?php echo $GLOBALS['linpha']->template->output['prev_thumb']; ?> @@ -27,24 +21,6 @@ <?php echo $GLOBALS['linpha']->template->output['image']; ?> <br /><br /> -<?php -if( isset( $_POST['cmd'] ) ) -{ - if( !empty($_POST['comment_textarea'])) - { - $comment = $_POST['comment_textarea']; - } - else - { - $comment = $_POST['comment_text']; - } - - $GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_comments (time, md5sum, author, comment)" . - "VALUES ('".time()."','".$GLOBALS['linpha']->imgview->md5sum."','".linSql::linAddslashes($_POST['author'])."'," . - "'".linSql::linAddslashes($comment)."')"); -} -?> - <div class="add_comment"> <form action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> <?php echo i18n("Add Comment"); ?>:<br /> @@ -59,19 +35,17 @@ </form> </div> <br /><br /> - -<?php -$query = $GLOBALS['linpha']->db->Execute("SELECT id, time, author, comment FROM ".PREFIX."meta_comments " . - "WHERE md5sum = '".$GLOBALS['linpha']->imgview->md5sum."'"); -while($data = $query->FetchRow()) -{ - echo '<div class="comments">'; - echo $data['time'].' '.$data['author'].'<br />'; - echo $data['comment'].'<br /><br />'; - echo '</div>'; -} -?> +<!-- show image comments //--> +<?php while($data = $GLOBALS['linpha']->template->output['image_comments']->FetchRow()) { ?> + <div class="comments"> + <?php echo $data['time']; ?> <?php echo $data['author']; ?> + <br /> + <?php echo $data['comment']; ?> + <br /><br /> + </div> +<?php } ?> + </div> <script language="Javascript"> Added: trunk/linpha2/templates/html/default/view_meta.head.php =================================================================== --- trunk/linpha2/templates/html/default/view_meta.head.php (rev 0) +++ trunk/linpha2/templates/html/default/view_meta.head.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -0,0 +1,6 @@ +<?php +/** + * 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 Modified: trunk/linpha2/templates/html/default/view_meta.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_meta.html.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/html/default/view_meta.html.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -1,60 +1,3 @@ -<?php -if(isset($_POST['cmd']) && $_POST['cmd']=='insert_metadata') -{ - if(isset($_POST['field'])) - { - /** - * delete existing entries - */ - $query = $GLOBALS['linpha']->db->Execute("DELETE FROM ".PREFIX."meta_data " . - "WHERE md5sum = '".$GLOBALS['linpha']->imgview->md5sum."'"); - - foreach($_POST['field'] AS $key=>$value) - { - if(is_array($value)) // coming from a select (categories etc.) - { - $value = ';'.implode(';',$value).';'; - } - - if(! empty($value)) - { - $GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_data ". - "(field_id, md5sum, meta_data) VALUES " . - "('".linSql::linAddslashes($key)."','".$GLOBALS['linpha']->imgview->md5sum."','".linSql::linAddslashes($value)."')"); - } - } - } -} -?> - -<style> -.main { - margin-left: 10px; - text-align: left; -} - -.navigation { - margin-left: 10px; -} - -.div_all_main { - margin-left: 10px; -} - -.mainimage { - width: 350px; - height: auto; -} - - -</style> - -<div class="navigation"> - <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> - <br /><br /> -</div> - - <div class="div_all_main"> <div class="div_all_prevthumb"> <?php echo $GLOBALS['linpha']->template->output['prev_thumb']; ?> Modified: trunk/linpha2/templates/html/default/view_thumb.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_thumb.html.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/html/default/view_thumb.html.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -10,21 +10,16 @@ window.onresize = display_images; </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'>right</div> - <div class='page_nr' id='page_nr' style="width: 350px; text-align: center;">page nr middle</div> - <div class='page_nr' id='page_nr_left'>left</div> + <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> </div> + <div class="page_nr_spacer"></div> <div id='spacer_height' class='spacer_height'> </div> - <div id='navigation' class="navigation"> - <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> - </div> - <div id='maindiv' class='main'> </div> @@ -54,10 +49,6 @@ <div class='page_nr' id='page_nr_left'><?php echo $GLOBALS['linpha']->template->output['page_nr_left']; ?></div> </div> - <div class="navigation"> - <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> - </div> - <div id='maindiv' class='main'> <?php $i = 1; Modified: trunk/linpha2/templates/html/default/view_thumbdetail.html.php =================================================================== --- trunk/linpha2/templates/html/default/view_thumbdetail.html.php 2006-03-24 17:54:01 UTC (rev 4434) +++ trunk/linpha2/templates/html/default/view_thumbdetail.html.php 2006-03-25 13:08:27 UTC (rev 4435) @@ -3,11 +3,6 @@ left<br />left<br />left<br />left<br />left<br />left<br /> </div> -<div id='navigation' class="navigation"> - <?php echo $GLOBALS['linpha']->template->output['navigation']; ?> - <br /><br /> -</div> - <div id='maindiv' class='main'> <?php This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |