[Linpha-cvs] SF.net SVN: linpha: [4609] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-10-29 23:56:13
|
Revision: 4609 http://svn.sourceforge.net/linpha/?rev=4609&view=rev Author: fangehrn Date: 2006-10-29 15:55:17 -0800 (Sun, 29 Oct 2006) Log Message: ----------- 2006-10-30 flo * implemented ajax login/logout * implemented "view at" * implemented ajax menuReload -> while navigating through the images, the menu is not actual anymore -> now, the menu gets reloaded on mouseover if it needs updating * and maybe some other stuff Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/docs/dev/TODO.txt trunk/linpha2/index.php trunk/linpha2/install/sql/sql.data.php trunk/linpha2/lib/classes/linpha.admin.class.php trunk/linpha2/lib/classes/linpha.functions.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.import.class.php trunk/linpha2/lib/classes/linpha.sql.class.php trunk/linpha2/lib/classes/linpha.template.class.php trunk/linpha2/lib/include/basket_build_mail.php trunk/linpha2/lib/include/upgrade.php trunk/linpha2/lib/js/LinGlobal.js trunk/linpha2/lib/js/LinImage.js trunk/linpha2/lib/js/LinThumbnails.js trunk/linpha2/lib/modules/module.ajax.php trunk/linpha2/lib/modules/module.filemanager.php trunk/linpha2/templates/default/basket.html.php trunk/linpha2/templates/default/global.html.php trunk/linpha2/templates/default/themes/default/css/admin.css trunk/linpha2/templates/default/themes/default/css/global.css trunk/linpha2/templates/default/themes/default/css/view_img.css trunk/linpha2/templates/default/view_img.head.php trunk/linpha2/templates/default/view_img.html.php trunk/linpha2/templates/default/view_img_static.html.php trunk/linpha2/templates/default/view_thumb.html.php trunk/linpha2/templates/default/view_thumb_static.html.php Added Paths: ----------- trunk/linpha2/lib/modules/module.empty.php trunk/linpha2/templates/default/fragments.php Removed Paths: ------------- trunk/linpha2/templates/default/themes/default/css/view_basket.css Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/ChangeLog 2006-10-29 23:55:17 UTC (rev 4609) @@ -1,3 +1,12 @@ +2006-10-30 flo + * implemented ajax login/logout + * implemented "view at" + * implemented ajax menuReload + -> while navigating through the images, the menu is not actual anymore + -> now, the menu gets reloaded on mouseover if it needs updating + + * and maybe some other stuff + 2006-10-29 flo * changed accesskey for prev/next to page up/down * improved basket view Modified: trunk/linpha2/docs/dev/TODO.txt =================================================================== --- trunk/linpha2/docs/dev/TODO.txt 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/docs/dev/TODO.txt 2006-10-29 23:55:17 UTC (rev 4609) @@ -8,12 +8,6 @@ ## Big Todos -- Style - - use relative font sizes instead of aboslute - - style forms this way http://www.cssplay.co.uk/menu/form.html - not that much colors, but with alignments and <label> - - - Installer - define final installer behaviour - if installation is complete, the user must delete the install/ folder ? (install/ignore_delete_install_msg.txt) @@ -58,12 +52,12 @@ - - - - DONE ==== +- Style + - use relative font sizes instead of aboslute + - style forms this way http://www.cssplay.co.uk/menu/form.html + not that much colors, but with alignments and <label> - Better Javascript detection Currently the no-javscript site is loaded with a javascript location.href to the javascript enabled site -> High Pageload, LinSysLog doesnt work Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/index.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -47,6 +47,9 @@ case 'newimg': include_once(LINPHA_DIR.'/lib/modules/module.newimg.php'); break; +case 'empty': + include_once(LINPHA_DIR.'/lib/modules/module.empty.php'); + break; } ?> \ No newline at end of file Modified: trunk/linpha2/install/sql/sql.data.php =================================================================== --- trunk/linpha2/install/sql/sql.data.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/install/sql/sql.data.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -73,6 +73,7 @@ 'sys_style_image_width' => '700', 'sys_style_image_height' => '525', 'sys_style_image_nrprevnextthumbs' => '3', + 'sys_style_image_useeffects' => '1', 'sys_style_layout_color_bodybg' => 'DDDDDD', // the blue design 'sys_style_layout_color_elembg' => '87CEFA', Modified: trunk/linpha2/lib/classes/linpha.admin.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -188,6 +188,8 @@ } } + linSysLog(i18n("Settings saved.")); + /** * update config array */ @@ -304,6 +306,7 @@ 'sys_style_home_showalbums', 'sys_style_home_usedefaultwelcometext', 'sys_style_thumb_showsubfoldersseparate', + 'sys_style_image_useeffects', 'sys_user_autologin', 'plugins_filemanager_enable' ); Modified: trunk/linpha2/lib/classes/linpha.functions.php =================================================================== --- trunk/linpha2/lib/classes/linpha.functions.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/classes/linpha.functions.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -273,10 +273,12 @@ { if( ! isset( $GLOBALS['linpha']->template->output['sys_log'] ) ) { - $GLOBALS['linpha']->template->output['sys_log'] = ''; + $GLOBALS['linpha']->template->output['sys_log'] = $str; } - - $GLOBALS['linpha']->template->output['sys_log'] .= $str; + else + { + $GLOBALS['linpha']->template->output['sys_log'] .= '<br />'.$str; + } } /** Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -28,6 +28,7 @@ class LinImgview { public $mode; // 'home', 'thumb', 'image' +public $modulename; // 'albums', 'browse', ... public $tot_photos; public $photos; public $photos_filtered; @@ -50,6 +51,8 @@ */ function setCurrentView($modulename) { + $this->modulename = $modulename; + $this->orderby = getSqlSortOrder($GLOBALS['linpha']->sql->config->value['sys_style_others_sortorder']); if(isset($_GET['id']) && $_GET['id'] != 0) @@ -108,12 +111,12 @@ /** * on top view, reset current view */ - if($modulename=='albums') + if($this->modulename=='albums') { $this->mode = 'home'; $this->orderby = getSqlSortOrder($GLOBALS['linpha']->sql->config->value['sys_style_home_firstsortorder']); } - else // $modulename=='browse' | 'search' , others will come.. + else // $this->modulename=='browse' | 'search' , others will come.. { $this->mode = 'thumb'; @@ -156,17 +159,16 @@ if(isset($_GET['admin_cmd'])) { $this->adminCommands(); } - /*if(isset($_GET['slideshow'])) { - $this->slideshow(); - }*/ - /** - * set admin menu and more menu - * this should be done after adminCommands, because of - * "nr images in basket" is changed in adminCommands() - */ - $this->setMenu(); + /** + * set ref urls + * used in basket and ajax reloadmenu + */ + $_SESSION['ref_url_full'] = $GLOBALS['linpha']->template->URL_full; + $_SESSION['ref_url_base'] = $GLOBALS['linpha']->template->URL_base; + $_SESSION['ref_modulename'] = $this->modulename; + /** * set mode specific things */ @@ -202,8 +204,18 @@ } break; } + /** + * set admin menu and more menu + * - this should be done after adminCommands, because of + * "nr images in basket" is changed in adminCommands() + * + * - this should be done after viewImg(), because of $org_width and $org_height in "View at" + */ + $this->setMenu(); + + /** * at this point, there should be absolut no output */ include_once(LINPHA_DIR.'/templates/'.$GLOBALS['linpha']->template->template_name.'/global.html.php'); @@ -244,7 +256,6 @@ */ function setMenu() { - /** * Menu Admin */ @@ -293,28 +304,12 @@ $array_sort_orders_links[] = Array('name' => i18n($value), 'value' => $GLOBALS['linpha']->template->URL_full.'&order_by='.$value); } - $_SESSION['basket_ref_url'] = $GLOBALS['linpha']->template->URL_full; $open_basket_link = LINPHA_DIR.'/?cat=basket'; switch($this->mode) { case 'thumb': - $array = explode(',',$GLOBALS['linpha']->sql->config->value['sys_style_thumb_selectsizes']); - foreach($array AS $value) - { - $array_tn_sizes_links[] = Array('name' => $value.' '.i18n("Pixel"), 'value' => 'javascript:set_tn_size('.$value.')'); - } - $array = explode(',',$GLOBALS['linpha']->sql->config->value['sys_style_thumb_selectnrimages']); - foreach($array AS $value) - { - $array_nr_links[] = Array('name' => $value, 'value' =>"javascript:set_nr_images('".$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']['basket'] = Array( 'name' => i18n("Basket"), @@ -327,6 +322,21 @@ if( useAjax() ) { + $array = explode(',',$GLOBALS['linpha']->sql->config->value['sys_style_thumb_selectsizes']); + foreach($array AS $value) + { + $array_tn_sizes_links[] = Array('name' => $value.' '.i18n("Pixel"), 'value' => 'javascript:set_tn_size('.$value.')'); + } + + $array = explode(',',$GLOBALS['linpha']->sql->config->value['sys_style_thumb_selectnrimages']); + foreach($array AS $value) + { + $array_nr_links[] = Array('name' => $value, 'value' =>"javascript:set_nr_images('".$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']['view'] = Array( 'name' => i18n("View"), @@ -371,20 +381,34 @@ case 'image': $GLOBALS['linpha']->template->output['menu_More']['basket'] = - Array( + array( 'name' => i18n("Basket"), - 'value' => Array( - Array('name' => i18n("Add To Basket"), 'value' => $GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_this'), - Array('name' => i18n("Open Basket").' ('.count($_SESSION['basket_ids']).' '.i18n("Images").')', 'value' => $open_basket_link) + 'value' => array( + array('name' => i18n("Add To Basket"), 'value' => $GLOBALS['linpha']->template->URL_full.'&admin_cmd=basket_add_this'), + array('name' => i18n("Open Basket").' ('.count($_SESSION['basket_ids']).' '.i18n("Images").')', 'value' => $open_basket_link) ) ); $GLOBALS['linpha']->template->output['menu_More']['view'] = - Array( + array( 'name' => i18n("View"), - 'value' => Array( - Array('name' => i18n("Sort"), 'value' => $array_sort_orders_links) + 'value' => array( + array('name' => i18n("Sort"), 'value' => $array_sort_orders_links), + array('name' => i18n("View at"), 'value' => + array( + array('name' => '640x480', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=640&height=480', 'target' => '_blank'), + array('name' => '800x600', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=800&height=600', 'target' => '_blank'), + array('name' => '1024x768', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=1024&height=768', 'target' => '_blank'), + array('name' => '1280x800', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=1280&height=800', 'target' => '_blank'), + array('name' => '1280x960', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=1280&height=960', 'target' => '_blank'), + array('name' => '1280x1024', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=1280&height=1024', 'target' => '_blank'), + array('name' => '1600x1200', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=1600&height=1200', 'target' => '_blank'), + array('name' => '1920x1200', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width=1920&height=1200', 'target' => '_blank'), + array('name' => $this->org_width.'x'.$this->org_height.' '.i18n("Fullscreen").')', 'value' => LINPHA_DIR.'/get_image.php?id='.$this->id_current.'&width='.$this->org_width.'&height='.$this->org_height, 'target' => '_blank'), + ) + ) ) ); + if($GLOBALS['linpha']->sql->checkPermission('metadata_edit')) { @@ -446,7 +470,7 @@ .'</a>'."\n"; } /** - * slideshow icons + * slideshow icon */ if( useAjax() ) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="javascript:slideshowStartFromThumbview()">'. @@ -480,7 +504,7 @@ } /** - * slideshow icons + * slideshow icon */ if( useAjax() ) { $GLOBALS['linpha']->template->output['menu_Icons'] .= '<a href="javascript:myLinImage.fullscreenStart()">'. Modified: trunk/linpha2/lib/classes/linpha.import.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.import.class.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/classes/linpha.import.class.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -90,7 +90,7 @@ { if($dryrun) { - linSysLog(i18n("Delete Entry").": ".htmlspecialchars($dirname.'/'.$value,ENT_QUOTES)."<br />"); + linSysLog(i18n("Delete Entry").": ".htmlspecialchars($dirname.'/'.$value,ENT_QUOTES)); $deleted_keys[] = $key; } else @@ -106,7 +106,7 @@ { if($dryrun) { - linSysLog(i18n("New Entry").": ".htmlspecialchars($dirname.'/'.$value,ENT_QUOTES)."<br />"); + linSysLog(i18n("New Entry").": ".htmlspecialchars($dirname.'/'.$value,ENT_QUOTES)); } else { @@ -164,7 +164,7 @@ */ function addNewEntry( $parent_id , $dirname , $filename , $recursive ) { - linSysLog(i18n("New").': '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES).'<br />'); + linSysLog(i18n("New").': '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); list($md5sum,$file_type,$stats_number,$time_exif,$rotate) = LinImport::getFileInformation($dirname,$filename); @@ -233,7 +233,7 @@ LinImport::deleteEntry( $data['id'], $full_filename.'/'.$data['name']); } - linSysLog(i18n("Delete Entry").': '.htmlspecialchars($full_filename,ENT_QUOTES).'<br />'); + linSysLog(i18n("Delete Entry").': '.htmlspecialchars($full_filename,ENT_QUOTES)); /** * delete thumbnail and image in cache folder @@ -281,7 +281,7 @@ */ if($file_type != $data[0]) { - linSysLog(i18n("Detected a change of file_type in:")." ".htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES).'<br />'); + linSysLog(i18n("Detected a change of file_type in:")." ".htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); $GLOBALS['linpha']->db->Execute("UPDATE ".PREFIX."photos " . "SET img_type = '".$file_type."', stats_numbers = '".$stats_number."' " . "WHERE id = '".$id."'"); @@ -296,7 +296,7 @@ */ if($md5sum != $data[1]) { - linSysLog(sprintf(i18n("File %s changed, updating data..."),htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES))."<br />"); + linSysLog(sprintf(i18n("File %s changed, updating data..."),htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES))); $GLOBALS['linpha']->db->Execute("UPDATE ".PREFIX."photos " . "SET md5sum = '".$md5sum."' WHERE id = '".$id."'"); @@ -356,22 +356,22 @@ $ext = LinFilesys::getFileExtFromPath($filename); if($filename{0} == '.') { - linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is Hidden")."<br />"); + linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is Hidden")); $file_type = 9999999; } elseif( in_array( $filename, LinImport::getIgnoreFilelist() ) ) { - linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is In The Ignore List")."<br />"); + linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is In The Ignore List")); $file_type = 9999999; } elseif( in_array($ext, LinImport::getIgnoreFileext() ) ) { - linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is In The Ignore List")."<br />"); + linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is In The Ignore List")); $file_type = 9999999; } elseif( !is_readable( $dirname.'/'.$filename) ) { - linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is Not Readable")."<br />"); + linSysLog(htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)." ".i18n("Is Not Readable")); $file_type = 9999999; } /** @@ -440,7 +440,7 @@ } else { - linSysLog('Error: what am i? '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES).'<br />'); + linSysLog('Error: what am i? '.htmlspecialchars($dirname.'/'.$filename,ENT_QUOTES)); } return array($md5sum,$file_type,$stats_number,$time_exif,$rotate); Modified: trunk/linpha2/lib/classes/linpha.sql.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.sql.class.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/classes/linpha.sql.class.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -203,7 +203,7 @@ if($data = $query->FetchRow()) { //linpha_log('login','notice','User '.$_POST['user_name'].": successfully logged in."); - linSysLog(i18n("Successfully Logged In!<br />")); + linSysLog(i18n("Successfully Logged In!")); $this->setUserInformation($data['username'],$_COOKIE['linpha_userid'],$data['display_name']); } @@ -233,6 +233,8 @@ setcookie('linpha_userid'); // delete cookie linpha_userid setcookie('linpha_password'); // delete cookie linpha_password } + + linSysLog(i18n("Logged out.")); } elseif($_POST['cmd']=='login') { @@ -255,7 +257,7 @@ * @todo */ //linpha_log('login','notice','User '.$_POST['user_name'].": successfully logged in."); - linSysLog(i18n("Successfully Logged In!")."<br />"); + linSysLog(i18n("Successfully Logged In!")); $this->setUserInformation($_POST['username'],$data['id'],$data['display_name']); @@ -277,7 +279,7 @@ */ //linpha_log('login','error','User '.$_POST['user_name'].": login failed!"); - linSysLog(i18n("Login Failed!")."<br />"); + linSysLog(i18n("Login Failed!")); } } } Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -86,35 +86,35 @@ echo "<link rel='stylesheet' href='".$filename."' type='text/css'>\n"; } ?> - <!-- IE hack for the menu--> <!--[if IE]> <style type="text/css" media="screen"> - #menu a, #menu span - { - width: 50px; - } + #menu ul { width: 1em; } /* this will be a *min* width */ + #menu ul ul { width: 12em; } + #menu ul li { float: left; width: 100%; } </style> <![endif]--> <!--[if lt IE 7]> <style type="text/css" media="screen"> - body { - behavior: url(templates/misc/csshover.htc); /* enable span:hover */ - font-size: 100%; - } - - #menu ul li a {height: 1%;} - - #menu a, #menu span { - font: bold 0.7em/1.4em arial, helvetica, sans-serif; - } + body { behavior: url(<?php echo LINPHA_DIR; ?>/templates/misc/csshover.htc); font-size: 100%; } + #menu ul li a { height: 1%; } + #menu a, #menu span { font: bold 0.7em/1.4em arial, helvetica, sans-serif; } </style> <![endif]--> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/prototype.js"></script> <script type="text/javascript" language="javascript" src="<?php echo LINPHA_DIR; ?>/lib/js/LinGlobal.js"></script> <script type="text/javascript" language="JavaScript"> -var LINPHA_DIR = '<?php echo LINPHA_DIR; ?>'; -<?php +var LINPHA_DIR = '<?php echo LINPHA_DIR; ?>'; +var IdCurrent = <?php +if( isset($GLOBALS['linpha']->imgview->id_current) ) { + echo $GLOBALS['linpha']->imgview->id_current; +} elseif( isset($_GET['id'])) { + echo $_GET['id']; +} else { + echo 0; +} +echo ';'."\n"; + if(! isset($_SESSION['use_js']) && ! isset($_SESSION['disable_ajax'])) { echo "checkAjaxCompatibility();"; @@ -157,6 +157,20 @@ } } + /** + * print the whole menu + * @uses global.html.php, module.ajax.php + */ + function printMenus($comingfrom_ajax=false) + { + $fragment = 'menu'; + include(LINPHA_DIR.'/templates/'.$this->template_name.'/fragments.php'); + + if($comingfrom_ajax && isset($this->output['sys_log']) && !empty($this->output['sys_log'])) + { + echo '<script language="JavaScript" type="text/javascript">linSyslog("'.$this->output['sys_log'].'");</script>'; + } + } /** * print the main menu entries (more, admin, ...) @@ -167,7 +181,7 @@ { echo "\n".'<ul>'."\n"; echo "\t".'<li><a href="'.$link.'">'.i18n($index).'</a>'."\n"; - echo "\n".'<ul>'."\n"; + echo "\n".'</ul>'."\n"; } else { @@ -180,13 +194,18 @@ { echo "\t".'<li><span>'.i18n($index).' </span>'."\n"; } - echo "\n".'<ul>'."\n"; + echo "\n".'<ul id="menu'.$index.'" onmouseover="reloadMenu()">'."\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"; + if(isset($value['target'])) { + $target_str = ' target="'.$value['target'].'"'; + } else { + $target_str = ''; + } + echo "\t".'<li><a href="'.$value['value'].'"'.$target_str.'>'.$value['name'].'</a></li>'."\n"; } else { @@ -198,7 +217,12 @@ { if(!is_array($sub_value['value'])) { - echo "\t\t".'<li><a href="'.$sub_value['value'].'">'.$sub_value['name'].'</a></li>'."\n"; + if(isset($sub_value['target'])) { + $target_str = ' target="'.$sub_value['target'].'"'; + } else { + $target_str = ''; + } + echo "\t\t".'<li><a href="'.$sub_value['value'].'"'.$target_str.'>'.$sub_value['name'].'</a></li>'."\n"; } else { @@ -208,7 +232,15 @@ foreach($sub_value['value'] AS $subsub_value) { - echo "\t\t\t".'<li><a href="'.$subsub_value['value'].'">'.$subsub_value['name'].'</a></li>'."\n"; + + + if(isset($subsub_value['target'])) { + $target_str = ' target="'.$subsub_value['target'].'"'; + } else { + $target_str = ''; + } + echo "\t\t\t".'<li><a href="'.$subsub_value['value'].'"'.$target_str.'>'.$subsub_value['name'].'</a></li>'."\n"; + } echo "\t\t".'</ul>'."\n"; Modified: trunk/linpha2/lib/include/basket_build_mail.php =================================================================== --- trunk/linpha2/lib/include/basket_build_mail.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/include/basket_build_mail.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -212,7 +212,7 @@ /** * no exception, because we still need to delete the images */ - linSysLog(i18n("Error: E-Mail couldn't be sent. Contact the Administrator.").'<br />'); + linSysLog(i18n("Error: E-Mail couldn't be sent. Contact the Administrator.")); } $mail->ClearAddresses(); Modified: trunk/linpha2/lib/include/upgrade.php =================================================================== --- trunk/linpha2/lib/include/upgrade.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/include/upgrade.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -32,7 +32,7 @@ if($dbversion < 2) { - linSysLog("DB update 2 (add metadata values)<br />"); + linSysLog("DB update 2 (add metadata values)"); //$GLOBALS['linpha']->db->Execute("INSERT into ".PREFIX."meta_fields (name, field_type, flags) VALUES ('thumbnail',0,1)"); Modified: trunk/linpha2/lib/js/LinGlobal.js =================================================================== --- trunk/linpha2/lib/js/LinGlobal.js 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/js/LinGlobal.js 2006-10-29 23:55:17 UTC (rev 4609) @@ -41,6 +41,43 @@ linSyslog('Ajax enabled'); } +function AjaxPost(parameters,successFunction) +{ + var opt = { + // Use POST + method: 'post', + // Send this lovely data + postBody: parameters + , + // asynchron, of course + asynchronous:true, + + // Handle successful response + onSuccess: successFunction, + + // Handle 404 + on404: function(t) { + alert('Error 404: location "' + t.statusText + '" was not found.'); + }, + // Handle other errors + onFailure: function(t) { + alert('Error ' + t.status + ' -- ' + t.statusText); + } + } + + new Ajax.Request(xmlUrl + '&id=' + curImgId + '&xml', opt); +} + +var menuNeedsUpdating = false; +function reloadMenu() +{ + if( menuNeedsUpdating ) + { + new Ajax.Updater('menu', LINPHA_DIR + '/?cat=ajax&reloadmenu&id='+IdCurrent, {method: 'get', asynchronous:true, evalScripts:true}); + menuNeedsUpdating = false; + } +} + /** * setMainHeight * Modified: trunk/linpha2/lib/js/LinImage.js =================================================================== --- trunk/linpha2/lib/js/LinImage.js 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/js/LinImage.js 2006-10-29 23:55:17 UTC (rev 4609) @@ -3,7 +3,6 @@ alert('Error ' + t.status + ' -- ' + t.statusText); } -var curImgId = startImgId; var nextThumbs = new Array(); var prevThumbs = new Array(); @@ -35,7 +34,8 @@ }, loadImage: function(imgId) { - curImgId = imgId; + IdCurrent = imgId; + menuNeedsUpdating = true; // IdCurrent changed, update menu on next hover of the menu if(preloadXmlFinished[imgId] && typeof xmlDoc[imgId] != "undefined" ) // use typeof to work in IE { @@ -59,7 +59,7 @@ xmlDoc[loadedimgid] = t.responseXML.documentElement; preloadXmlFinished[loadedimgid] = true; - if( loadedimgid == curImgId ) // coming from loadImage() + if( loadedimgid == IdCurrent ) // coming from loadImage() { myLinImage.changeImage(); } @@ -163,7 +163,7 @@ /** * set height of outer div to prevent the whole page getting smaller, and if the image is loaded getting bigger again - * but we want no activities in background + * but in fullscreen, we want no activities in background */ if(! fullscreenActive) { $('divimage').style.height = $('mainImage').style.height; @@ -176,17 +176,20 @@ Element.hide('mainImage'); // hide mainimage while changing image to prevent flicker Element.hide('divinfolinks'); - if(! preloadImageFinished[curImgId] ) + if(! preloadImageFinished[IdCurrent] ) { Element.show('divloading'); } + + //$('thumbnavi_prevthumb').innerHTML = ''; + //$('thumbnavi_nextthumb').innerHTML = ''; /** * set image width and height */ - var orgWidth = xmlDoc[curImgId].getElementsByTagName('imgwidth').item(0).firstChild.data; - var orgHeight = xmlDoc[curImgId].getElementsByTagName('imgheight').item(0).firstChild.data; + var orgWidth = xmlDoc[IdCurrent].getElementsByTagName('imgwidth').item(0).firstChild.data; + var orgHeight = xmlDoc[IdCurrent].getElementsByTagName('imgheight').item(0).firstChild.data; var sizeArray = scaleToFit(orgWidth,orgHeight,maxImageWidth,maxImageHeight,1); var imgWidth = sizeArray[0]; var imgHeight = sizeArray[1]; @@ -194,7 +197,7 @@ /** * preload image */ - var currentImgSrc = imageSrc + curImgId + '&width=' + imgWidth + '&height=' + imgHeight; + var currentImgSrc = imageSrc + IdCurrent + '&width=' + imgWidth + '&height=' + imgHeight; imgPreloader = new Image(); /** @@ -205,7 +208,7 @@ * and hence the image was not resized correctly in resizeImageContainer() !!! */ imgPreloader.onload=function(){ - preloadImageFinished[curImgId] = true; + preloadImageFinished[IdCurrent] = true; $('mainImage').src = currentImgSrc; myLinImage.resizeImageContainer(imgWidth, imgHeight); } @@ -255,12 +258,26 @@ // showImage: function(){ Element.hide('divloading'); - new Effect.Appear('mainImage', { duration: 0.5, afterFinish: function(){ myLinImage.setImageData(); } }); + + if( useEffects ) + { + new Effect.Appear('mainImage', { duration: 0.5, afterFinish: function(){ myLinImage.setImageData(); } }); + } + else + { + Element.show('mainImage'); + this.setImageData() + } if(! fullscreenActive) { $('divimage').style.height = $('mainImage').style.height; // reset to correct height to prevent trouble if image is bigger or smaller } + /** + * set title + */ + $('title').innerHTML = xmlDoc[IdCurrent].getElementsByTagName('title').item(0).firstChild.data; + this.enableKeyboardNav(); }, @@ -269,27 +286,22 @@ setImageData: function() { this.setImageInfoLink(); - - /** - * set title - */ - $('title').innerHTML = xmlDoc[curImgId].getElementsByTagName('title').item(0).firstChild.data; /** * set current thumb */ - $('thumbnavi_currentthumb').innerHTML = '<a href="javascript:myLinImage.loadImage(' + curImgId + ')"><img class="img_currentthumb" src="' + thumbSrc + curImgId + '" /></a>'; + $('thumbnavi_currentthumb').innerHTML = '<a href="javascript:myLinImage.loadImage(' + IdCurrent + ')"><img class="img_currentthumb" src="' + thumbSrc + IdCurrent + '" /></a>'; /** * set prev thumbs */ $('thumbnavi_prevthumb').innerHTML = ''; prevThumbs = new Array(); - if(xmlDoc[curImgId].getElementsByTagName('prevthumb').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('prevthumb').length > 0) { - for(var i = 0; i < xmlDoc[curImgId].getElementsByTagName('prevthumb').length; i++) + for(var i = 0; i < xmlDoc[IdCurrent].getElementsByTagName('prevthumb').length; i++) { - var thumbId = xmlDoc[curImgId].getElementsByTagName('prevthumb').item(i).firstChild.data; + var thumbId = xmlDoc[IdCurrent].getElementsByTagName('prevthumb').item(i).firstChild.data; prevThumbs[i] = thumbId; this.setPrevNextThumb(thumbId, 'thumbnavi_prevthumb'); } @@ -300,11 +312,11 @@ */ $('thumbnavi_nextthumb').innerHTML = ''; nextThumbs = new Array(); - if(xmlDoc[curImgId].getElementsByTagName('nextthumb').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('nextthumb').length > 0) { - for(var i = 0; i < xmlDoc[curImgId].getElementsByTagName('nextthumb').length; i++) + for(var i = 0; i < xmlDoc[IdCurrent].getElementsByTagName('nextthumb').length; i++) { - var thumbId = xmlDoc[curImgId].getElementsByTagName('nextthumb').item(i).firstChild.data; + var thumbId = xmlDoc[IdCurrent].getElementsByTagName('nextthumb').item(i).firstChild.data; nextThumbs[i] = thumbId; this.setPrevNextThumb(thumbId, 'thumbnavi_nextthumb'); } @@ -313,13 +325,13 @@ /** * set meta data */ - if(xmlDoc[curImgId].getElementsByTagName('meta').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('meta').length > 0) { $('divmeta').innerHTML = ''; - for(var i = 0; i < xmlDoc[curImgId].getElementsByTagName('meta').length; i++) + for(var i = 0; i < xmlDoc[IdCurrent].getElementsByTagName('meta').length; i++) { - var meta = xmlDoc[curImgId].getElementsByTagName('meta').item(i); + var meta = xmlDoc[IdCurrent].getElementsByTagName('meta').item(i); var metaname = document.createTextNode( meta.getElementsByTagName('name').item(0).firstChild.data + ': ' ); var metavalue = document.createTextNode( meta.getElementsByTagName('value').item(0).firstChild.data ); @@ -334,11 +346,11 @@ */ initTextareaAddComment(); $('divcomments').innerHTML = ''; - if(xmlDoc[curImgId].getElementsByTagName('comment').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('comment').length > 0) { - for(var i = 0; i < xmlDoc[curImgId].getElementsByTagName('comment').length; i++) + for(var i = 0; i < xmlDoc[IdCurrent].getElementsByTagName('comment').length; i++) { - var tagcomment = xmlDoc[curImgId].getElementsByTagName('comment').item(i); + var tagcomment = xmlDoc[IdCurrent].getElementsByTagName('comment').item(i); var commenttime = document.createTextNode( tagcomment.getElementsByTagName('time').item(0).firstChild.data + ' by ' ); var commentauthor = document.createTextNode( tagcomment.getElementsByTagName('author').item(0).firstChild.data ); var commenttext = document.createTextNode( tagcomment.getElementsByTagName('text').item(0).firstChild.data ); @@ -366,7 +378,7 @@ * set image nr * currently only in slideshow used */ - $('divSlideshowImgNr').innerHTML = xmlDoc[curImgId].getElementsByTagName('imgnr').item(0).firstChild.data; + $('divSlideshowImgNr').innerHTML = xmlDoc[IdCurrent].getElementsByTagName('imgnr').item(0).firstChild.data; /** @@ -521,11 +533,11 @@ preloadXml: function() { // preload nextthumb from left to right - if(xmlDoc[curImgId].getElementsByTagName('nextthumb').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('nextthumb').length > 0) { - for(var i = 0; i < xmlDoc[curImgId].getElementsByTagName('nextthumb').length; i++) + for(var i = 0; i < xmlDoc[IdCurrent].getElementsByTagName('nextthumb').length; i++) { - var imgId = xmlDoc[curImgId].getElementsByTagName('nextthumb').item(i).firstChild.data; + var imgId = xmlDoc[IdCurrent].getElementsByTagName('nextthumb').item(i).firstChild.data; if(! preloadXmlFinished[imgId]) { this.loadImageXml(imgId); @@ -538,11 +550,11 @@ } // preload prevthumb from right to left - if(xmlDoc[curImgId].getElementsByTagName('prevthumb').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('prevthumb').length > 0) { - for(var i = xmlDoc[curImgId].getElementsByTagName('prevthumb').length-1; i >= 0; i--) + for(var i = xmlDoc[IdCurrent].getElementsByTagName('prevthumb').length-1; i >= 0; i--) { - var imgId = xmlDoc[curImgId].getElementsByTagName('prevthumb').item(i).firstChild.data; + var imgId = xmlDoc[IdCurrent].getElementsByTagName('prevthumb').item(i).firstChild.data; if(! preloadXmlFinished[imgId]) { this.loadImageXml(imgId); @@ -668,7 +680,7 @@ /** * reload image with old position and size */ - this.loadImage( curImgId ); + this.loadImage( IdCurrent ); }, slideshowStartStop: function() @@ -748,7 +760,7 @@ maxImageWidth = linInnerWidth - 70; maxImageHeight = linInnerHeight - 120; - myLinImage.loadImage( curImgId ); + myLinImage.loadImage( IdCurrent ); } else { @@ -774,7 +786,7 @@ } else { - myLinImage.loadImage(startImgId); + myLinImage.loadImage(IdCurrent); // setMainHeight(); // defined in LinGlobal.js window.onresize = onWindowResize; } @@ -893,49 +905,17 @@ // Comments // ----------------------------------------------------------------------------------- -function saveComment(parameters) -{ - //alert(parameters); - //new Ajax.Updater('div_to_be_updated', '/action/here', {asynchronous:true, parameters:Form.serialize(this)}) - - - var opt = { - // Use POST - method: 'post', - // Send this lovely data - postBody: parameters - , - // asynchron, of course - asynchronous:true, - - // Handle successful response - onSuccess: saveCommentContinue, - - // Handle 404 - on404: function(t) { - alert('Error 404: location "' + t.statusText + '" was not found.'); - }, - // Handle other errors - onFailure: function(t) { - alert('Error ' + t.status + ' -- ' + t.statusText); - } - } - - new Ajax.Request(xmlUrl + '&id=' + curImgId + '&xml', opt); -} - - -function saveCommentContinue(t) +function saveComment(t) { - xmlDoc[curImgId] = t.responseXML.documentElement; + xmlDoc[IdCurrent] = t.responseXML.documentElement; - if(xmlDoc[curImgId].getElementsByTagName('commentadded').length > 0) + if(xmlDoc[IdCurrent].getElementsByTagName('commentadded').length > 0) { - linSyslog( xmlDoc[curImgId].getElementsByTagName('commentadded').item(0).firstChild.data ); + linSyslog( xmlDoc[IdCurrent].getElementsByTagName('commentadded').item(0).firstChild.data ); } - myLinImage.loadImage(curImgId); + myLinImage.loadImage(IdCurrent); } /** Modified: trunk/linpha2/lib/js/LinThumbnails.js =================================================================== --- trunk/linpha2/lib/js/LinThumbnails.js 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/js/LinThumbnails.js 2006-10-29 23:55:17 UTC (rev 4609) @@ -42,7 +42,7 @@ var max_photos_per_page = nr_rows * nr_cols; break; case 'all': - var nr_cols = Math.floor( document.getElementById('main')['offsetWidth'] / (tn_size + img_spacer_width) ); + var nr_cols = Math.floor( (document.getElementById('main')['offsetWidth']-main_spacer_width) / (tn_size + img_spacer_width) ); var max_photos_per_page = tot_photos; var nr_rows = Math.ceil(max_photos_per_page / nr_cols); break; @@ -50,11 +50,12 @@ /** * ceil max_photos_per_page to complet the row! */ - 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 nr_cols = Math.floor( (document.getElementById('main')['offsetWidth']-main_spacer_width-5) / (tn_size + img_spacer_width) ); /* -5 -> scrollbars */ + var nr_rows = Math.ceil( photos_per_page / nr_cols); var max_photos_per_page = nr_rows * nr_cols; break; } + /** * at least on image per page */ Modified: trunk/linpha2/lib/modules/module.ajax.php =================================================================== --- trunk/linpha2/lib/modules/module.ajax.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/modules/module.ajax.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -35,7 +35,7 @@ /** * force ajax disable */ -if(isset($_GET['disable_ajax'])) +elseif(isset($_GET['disable_ajax'])) { $_SESSION['disable_ajax'] = true; echo 'disable_ajax saved'; @@ -43,7 +43,7 @@ /** * re-enable */ -if(isset($_GET['enable_ajax'])) +elseif(isset($_GET['enable_ajax'])) { if(isset($_SESSION['disable_ajax'])) { @@ -55,5 +55,43 @@ echo 'enable_ajax saved (but was not disabled before)'; } } - - ?> \ No newline at end of file + +/** + * reload menu + * + * the login itself is done automatically in startSession() because we are using the same form names etc. + */ +elseif(isset($_GET['reloadmenu'])) +{ + if( isset($_GET['id']) AND isset($_SESSION['ref_url_base']) ) + { + + include_once(LINPHA_DIR . '/lib/classes/linpha.imgview.class.php'); + $linpha->imgview = new linImgview(); + + $linpha->imgview->setCurrentView($_SESSION['ref_modulename']); + + $linpha->template->URL_base = $_SESSION['ref_url_base']; + $linpha->template->URL_full = $linpha->template->URL_base.'&id='.$linpha->imgview->id_current; + $_SESSION['ref_url_full'] = $linpha->template->URL_full; + + if( $linpha->imgview->mode == 'image' ) + { + /** + * @todo read from database + */ + $src_file = LinSql::getFullImagePath( $linpha->imgview->id_current ); + list($linpha->imgview->org_width,$linpha->imgview->org_height,$org_type) = LinIdentify::linGetImageSize( $src_file ); + } + + $linpha->imgview->setMenu(); + } + else // return a default menu + { + + } + + $linpha->template->printMenus($comingfrom_ajax=true); +} + +?> \ No newline at end of file Added: trunk/linpha2/lib/modules/module.empty.php =================================================================== --- trunk/linpha2/lib/modules/module.empty.php (rev 0) +++ trunk/linpha2/lib/modules/module.empty.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -0,0 +1,36 @@ +<?php +/* + * Copyright (c) 2005 Heiko Rutenbeck <bz...@tu...> + * Florian Angehrn + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +/** + * Filemanager + * @package Modules + */ + +if(!defined('LINPHA_DIR')) { exit(1); } + + +$linpha->template->output['default'] = ''; + +$linpha->template->setModuleName('default'); +$linpha->template->URL_full = LINPHA_DIR.'/?cat=empty'; +$linpha->template->output['title'] = i18n("empty"); +include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); + +?> \ No newline at end of file Modified: trunk/linpha2/lib/modules/module.filemanager.php =================================================================== --- trunk/linpha2/lib/modules/module.filemanager.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/lib/modules/module.filemanager.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -285,7 +285,7 @@ $GLOBALS['linpha']->db->Execute("UPDATE ".PREFIX."photos SET name = '".LinSql::linAddslashes($new_name)."' " . "WHERE id = '".LinSql::linAddslashes($_POST['file_id'])."'"); - linSysLog(i18n("Successfully Renamed!")."<br />"); + linSysLog(i18n("Successfully Renamed!")); } else { @@ -294,9 +294,9 @@ i18n("Error While Renaming File/Folder \"%s\" to \"%s\"!"), htmlspecialchars($full_filename,ENT_QUOTES), htmlspecialchars($parent_dirname.'/'.$new_name,ENT_QUOTES) - ).'<br />' + ) ); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n($str_checkpermissions)); } break; @@ -361,7 +361,7 @@ i18n("Successfully Moved \"%s\" to \"%s\"!"), htmlspecialchars($full_sourcename,ENT_QUOTES), htmlspecialchars($full_destparentname.'/'.basename($full_sourcename),ENT_QUOTES) - ) . "<br />" + ) ); } else @@ -371,9 +371,9 @@ i18n("Error While Moving Files/Folders \"%s\" to \"%s\"!"), htmlspecialchars($full_sourcename,ENT_QUOTES), htmlspecialchars($full_destparentname.'/'.basename($full_sourcename),ENT_QUOTES) - ).'<br />' + ) ); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n($str_checkpermissions)); } } /** @@ -403,7 +403,7 @@ i18n("Successfully Copied \"%s\" to \"%s\"!"), $full_sourcename, $full_destparentname.'/'.basename($full_sourcename) - ) . "<br />" + ) ); } else @@ -413,9 +413,9 @@ i18n("Error While Copying Files/Folders \"%s\" to \"%s\"!"), htmlspecialchars($full_sourcename,ENT_QUOTES), htmlspecialchars($full_destparentname.'/'.basename($full_sourcename),ENT_QUOTES) - ).'<br />' + ) ); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n($str_checkpermissions)); } } else @@ -425,9 +425,9 @@ i18n("Error While Copying Files/Folders \"%s\" to \"%s\"!"), htmlspecialchars($full_sourcename,ENT_QUOTES), htmlspecialchars($full_destparentname.'/'.basename($full_sourcename),ENT_QUOTES) - ).'<br />' + ) ); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n($str_checkpermissions)); } } } @@ -455,14 +455,14 @@ if(file_exists($full_filename)) { - linSysLog(i18n("Error While Deleting Files/Folders")." \"".htmlspecialchars($full_filename,ENT_QUOTES)."\"".'<br />'); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n("Error While Deleting Files/Folders")." \"".htmlspecialchars($full_filename,ENT_QUOTES)."\""); + linSysLog(i18n($str_checkpermissions)); } else { LinImport::deleteEntry( $value, $full_filename); - linSysLog(i18n("File/Folder deleted successfully!").'<br />'); + linSysLog(i18n("File/Folder deleted successfully!")); } } break; @@ -487,17 +487,17 @@ if( @mkdir( $full_filename .'/'. $new_name )) { - linSysLog(i18n("Folder Created Successfully!").'<br />'); + linSysLog(i18n("Folder Created Successfully!")); if( ! $linpha->sql->config->value['sys_import_autoimport'] ) { - linSysLog(i18n($str_autoimportdisabled).'<br />'); + linSysLog(i18n($str_autoimportdisabled)); } } else { - linSysLog(i18n("Error While Creating Folder")." \"".htmlspecialchars($new_name,ENT_QUOTES)."\"".'<br />'); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n("Error While Creating Folder")." \"".htmlspecialchars($new_name,ENT_QUOTES)."\""); + linSysLog(i18n($str_checkpermissions)); } break; case 'changeperm': @@ -521,12 +521,12 @@ if(@chmod($full_filename,intval($mode,8))) { - linSysLog(i18n("Permissions Changed Successfully!").'<br />'); + linSysLog(i18n("Permissions Changed Successfully!")); } else { - linSysLog(i18n("Error While Changing Permissions!").'<br />'); - linSysLog(i18n($str_checkpermissions).'<br />'); + linSysLog(i18n("Error While Changing Permissions!")); + linSysLog(i18n($str_checkpermissions)); } break; } // end switch($_POST['file_action']) @@ -624,7 +624,7 @@ { if( ! $linpha->sql->config->value['sys_import_autoimport'] ) { - linSysLog(i18n($str_autoimportdisabled).'<br />'); + linSysLog(i18n($str_autoimportdisabled)); } } break; Modified: trunk/linpha2/templates/default/basket.html.php =================================================================== --- trunk/linpha2/templates/default/basket.html.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/templates/default/basket.html.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -3,8 +3,8 @@ <?php echo $tpl->divRoundCorners('top'); ?> <div id="navigation"> - <?php if(isset($_SESSION['basket_ref_url'])) { ?> - <a style="float: left; margin-right: 2px;" class="button" href="<?php echo $_SESSION['basket_ref_url']; ?>"><?php echo i18n("Go Back"); ?></a> + <?php if(isset($_SESSION['ref_url_full'])) { ?> + <a style="float: left; margin-right: 2px;" class="button" href="<?php echo $_SESSION['ref_url_full']; ?>"><?php echo i18n("Go Back"); ?></a> <?php } ?> <br /><br /> Added: trunk/linpha2/templates/default/fragments.php =================================================================== --- trunk/linpha2/templates/default/fragments.php (rev 0) +++ trunk/linpha2/templates/default/fragments.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -0,0 +1,79 @@ +<?php + +switch($fragment) +{ +case 'menu': +?> + <ul style="margin-left: 50px;"> + <li><a href="<?php echo LINPHA_DIR; ?>/"><?php echo i18n("Home"); ?></a></li> + </ul> + <ul> + <li><span><?php echo i18n("Search"); ?> </span> + <ul> + <li><a href="<?php echo LINPHA_DIR; ?>/?cat=search"><?php echo i18n("Extended Search"); ?></a></li> + <li> + <div> + <form method="GET" action="<?php echo LINPHA_DIR; ?>/?cat=search"> + <input type="text" class="linForms" name="search_text" value="" /> + <input type="hidden" name="button[meta][all]" value="1" /> + <input type="hidden" name="cmd" value="search" /> + <input type="hidden" name="cat" value="search" /> + <input type="submit" name="submit" value="<?php echo i18n("Search"); ?>" /> + </form> + </div> + </li> + </ul> + </li> + </ul> + <ul> + <li> + <span><?php echo i18n("Login"); ?> </span> + <ul id="menuLogin"> + <li> + <div> + <?php if( useAjax() ) { ?> + <form action="" method="POST" onsubmit="new Ajax.Updater('menu', LINPHA_DIR + '/?cat=ajax&reloadmenu', {method: 'post', asynchronous:true, parameters:Form.serialize(this), evalScripts:true}); return false;"> + <?php } else { ?> + <form action="<?php echo $this->URL_full; ?>" method="POST"> + <?php } + if($GLOBALS['linpha']->sql->isLoggedIn()) { ?> + <?php echo i18n("Welcome").' '.$_SESSION['user_name'].' ('.$_SESSION['user_displayname'].')<br />'; ?> + <input type="hidden" name="cmd" value="logout" /> + <input type="submit" name="submit" value="<?php echo i18n("Logout"); ?>" /> + <?php } else { ?> + <!-- login infos --> + <label for="formUsername" style="display: block; float: left; width: 80px;"><?php echo i18n("Username"); ?>: </label><input style="width: 105px;" class="linForms" type="text" name="username" value="" id="formUsername" /><br /> + <label for="formPassword" style="display: block; float: left; width: 80px;"><?php echo i18n("Password"); ?>: </label><input style="width: 105px;" class="linForms" type="password" name="password" value="" id="formPassword" /><br /> + <?php if($GLOBALS['linpha']->sql->config->value['sys_user_autologin']) { ?><input type="checkbox" name="rememberme" value="true" id="formCheckboxRemember" /><label for="formCheckboxRemember"><?php echo i18n("Remember Me"); ?></label><?php } ?> + <input type="hidden" name="cmd" value="login" /> + <input type="submit" name="submit" value="<?php echo i18n("Login"); ?>" /> + <?php } ?> + + </form> + </div> + </li> + </ul> + </li> + </ul> + <?php if( isset( $this->output['menu_More'] ) ) { + $this->printMenu("More"); + } ?> + + <!-- icons --> + <div> + <?php if( isset( $this->output['menu_Icons'] ) ) { + echo $this->output['menu_Icons']; + } ?> + </div> + + <!-- my settings and admin links --> + <?php if($GLOBALS['linpha']->sql->isLoggedIn()) { ?> + <ul> + <li><a href="<?php echo LINPHA_DIR; ?>/?cat=settings"><?php echo i18n("My Settings"); ?></a></li> + </ul> + <?php $this->printMenu("Admin",LINPHA_DIR."/admin/"); ?> + <?php } ?> +<?php +break; +} +?> Modified: trunk/linpha2/templates/default/global.html.php =================================================================== --- trunk/linpha2/templates/default/global.html.php 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/templates/default/global.html.php 2006-10-29 23:55:17 UTC (rev 4609) @@ -32,75 +32,14 @@ <!-- menu --> <div id="menu"> - <ul> - <li><a href="<?php echo LINPHA_DIR; ?>/"><?php echo i18n("Home"); ?></a></li> - </ul> - <ul> - <li><span><?php echo i18n("Search"); ?> </span> - <ul> - <li><a href="<?php echo LINPHA_DIR; ?>/?cat=search"><?php echo i18n("Extended Search"); ?></a></li> - <li> - <div> - <form method="GET" action="<?php echo LINPHA_DIR; ?>/?cat=search"> - <input type="text" name="search_text" value="" /> - <input type="hidden" name="button[meta][all]" value="1" /> - <input type="hidden" name="cmd" value="search" /> - <input type="hidden" name="cat" value="search" /> - <input type="submit" name="submit" value="<?php echo i18n("Search"); ?>" /> - </form> - </div> - </li> - </ul> - </li> - </ul> - <ul> - <li> - <span><?php echo i18n("Login"); ?> </span> - <ul> - <li> - <div> - <form action="<?php echo $tpl->URL_full; ?>" method="POST"> - <?php if($GLOBALS['linpha']->sql->isLoggedIn()) { ?> - <!-- logout infos --> - <?php echo i18n("You Are Currently Logged In As:").' '.$_SESSION['user_name'].' ('.$_SESSION['user_displayname'].')<br />'; ?> - <input type="hidden" name="cmd" value="logout" /> - <input type="submit" name="submit" value="<?php echo i18n("Logout"); ?>" /> - <?php } else { ?> - <!-- login infos --> - <label for="formUsername" style="display: block; float: left; width: 80px;"><?php echo i18n("Username"); ?>: </label><input style="width: 105px;" type="text" name="username" value="" id="formUsername" /><br /> - <label for="formPassword" style="display: block; float: left; width: 80px;"><?php echo i18n("Password"); ?>: </label><input style="width: 105px;" type="password" name="password" value="" id="formPassword" /><br /> - <?php if($GLOBALS['linpha']->sql->config->value['sys_user_autologin']) { ?><input type="checkbox" name="rememberme" value="true" id="formCheckboxRemember" /><label for="formCheckboxRemember"><?php echo i18n("Remember Me"); ?></label><?php } ?> - <input type="hidden" name="cmd" value="login" /> - <input type="submit" name="submit" value="<?php echo i18n("Login"); ?>" /> - <?php } ?> - </form> - </div> - </li> - </ul> - </li> - </ul> - <?php if( isset( $tpl->output['menu_More'] ) ) { - $tpl->printMenu("More"); - } ?> - - <!-- icons --> - <div> - <?php if( isset( $tpl->output['menu_Icons'] ) ) { - echo $tpl->output['menu_Icons']; - } ?> - </div> - - <?php if($GLOBALS['linpha']->sql->isLoggedIn()) { ?> - <!-- my settings and admin links --> - <ul> - <li><a href="<?php echo LINPHA_DIR; ?>/?cat=settings"><?php echo i18n("My Settings"); ?></a></li> - </ul> - <?php $tpl->printMenu("Admin",LINPHA_DIR."/admin/"); ?> - <?php } ?> + <?php $tpl->printMenus(); ?> </div> + <div style="clear: both;"></div> <!-- end menu --> + + <?php $tpl->includeFile('body'); ?> </body> Modified: trunk/linpha2/templates/default/themes/default/css/admin.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/admin.css 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/templates/default/themes/default/css/admin.css 2006-10-29 23:55:17 UTC (rev 4609) @@ -4,50 +4,52 @@ padding: 0; } -.navlist +.option_title { - padding: 3px 0; - margin-left: 0; - border-bottom: 1px solid #778; - font: bold 12px Verdana, sans-serif; + font-weight: bold; } -.navlist li -{ - list-style: none; - margin: 0; - display: inline; -} - -.navlist li a -{ - padding: 3px 0.5em; - margin-left: 3px; - border: 1px solid #778; - border-bottom: none; - background: #DDE; - text-decoration: none; -} - -.navlist li a:link { color: #448; } -.navlist li a:visited { color: #448; } - -.navlist li a:hover -{ -color: #000; -background: #AAE; -border-color: #227; -} - -.navlist li a.current -{ -background: #01298f; -color: #ffffff; -border-bottom: 1px solid white; -} - - -.option_title -{ - font-weight: bold; -} \ No newline at end of file +/** + * menu + */ + .navlist + { + padding: 3px 0; + margin-left: 0; + border-bottom: 1px solid #778; + font: bold 12px Verdana, sans-serif; + } + + .navlist li + { + list-style: none; + margin: 0; + display: inline; + } + + .navlist li a + { + padding: 3px 0.5em; + margin-left: 3px; + border: 1px solid #778; + border-bottom: none; + background: #DDE; + text-decoration: none; + } + + .navlist li a:link { color: #448; } + .navlist li a:visited { color: #448; } + + .navlist li a:hover + { + color: #000; + background: #AAE; + border-color: #227; + } + + .navlist li a.current + { + background: #01298f; + color: #ffffff; + border-bottom: 1px solid white; + } \ No newline at end of file Modified: trunk/linpha2/templates/default/themes/default/css/global.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/global.css 2006-10-29 13:35:39 UTC (rev 4608) +++ trunk/linpha2/templates/default/themes/default/css/global.css 2006-10-29 23:55:17 UTC (rev 4609) @@ -5,7 +5,7 @@ */ body { font-family: arial, helvetica, sans-serif; - margin: 0px; + margin: 10px; padding: 0px; } @@ -42,9 +42,9 @@ */ #title { - margin-top: 10px; + margin: 0; margin-bottom: 20px; - margin-left: 100px; + margin-left: 90px; font-size: 25pt; } @@ -59,30 +59,16 @@ } /** - * left - */ - #divleft - { - position: absolute; - top: 120px; - left: 10px; - } - #left - { - width: 205px; - - padding: 5px; - margin: 0px; - } - -/** * navigation */ #divnavigation { - margin: 0px 10px 10px 10px; + margin: 0; + margin-bottom: 10px; + padding: 0; } #navigation { + margin: 0; padding: 5px; } @@ -90,31 +76,17 @@ * main */ #divmain { - margin: 0px 10px 10px 10px; - padding: 0px; + margin: 0; + padding: 0; } #main { + margin: 0; padding: 0px; padding-left: 10px; padding-right: 10px; } /** - * right - * - * @todo not used anymore, but in static view.. - */ - #divright - { - margin: 10px 10px 10px 10px; - } - #right - { - padding: 5px; - margin: 0px; - } - -/** * syslog */ #divSysLog { @@ -125,6 +97,7 @@ z-index: 10; + margin: 0; padding: 5px; border: 1px solid #FFD500; @@ -135,7 +108,11 @@ position: absolute; right: 0; top: 0; + z-index: 10; + + margin: 0; + padding: 0; background-color: #ffd5ee; border: 1px solid #f09; @@ -149,21 +126,26 @@ margin: 2px; margin-left: 15px; margin-bottom: 15px; + padding: 0; width: 700px; } .div_folder_text { - height: 140px; + margin: 0; padding: 5px; + + height: 140px; } .img_folder_thumbnail { - float: left; - + margin: 0; margin-left: 20px; margin-right: 30px; margin-top: 5px; + padding: 0; + + float: left; width: 130px; height: 130px; @@ -176,7 +158,11 @@ * menu */ #menu { - margin-left: 50px; + margin: 0; + padding: 0; + + width: 100%; + float: left; } /** @@ -189,33 +175,31 @@ padding: 0; float: left; } - - /** - * hover - */ - #menu li a:hover, #menu span:hover { - background: #bbbbbb; + #menu div a { + margin: 0; + padding: 0; + float: left; } /** * first level elements - */ + */ #menu ul { list-style: none; + margin: 0; margin-left: 5px; margin-right: 5px; padding: 0; + + width: auto; float: left; - white-space: nowrap; border-top: 1px solid #000000; - } - /** - * first level elements - */ - #menu ul a, #menu ul span { + white-space: nowrap; + } + #menu ul a, #menu ul span, #menu ul div { display: block; margin: 0; @@ -226,79 +210,78 @@ text-align: center; text-decoration: none; - + color: #000000; - /*background: #FFFFFF;*/ } + #menu ul a:hover, #menu ul span:hover { + background: #bbbbbb; + } #menu ul span { background: url(../images/expand.gif) no-repeat 100% 100%; } - #menu li { - position: relative; - } - - /** - * only two or more level elements - */ + * second and more level elements + */ #menu ul ul { position: absolute; z-index: 500; + + border: 0; + background: #eeeeee; /** * relativ to parent element! be careful */ - font-size: 1em; margin: 0; padding: 0; + font-size: 1em; + } #menu ul ul a, #menu ul ul span, #menu ul ul div { - display: block; - margin: 0; padding-left: 5px; - padding-right: 5px; + padding-right: 15px; padding-top: 2px; padding-bottom: 2px; + border-width: 1px; + border-style: solid; + border-color: #ccc #888 #555 #bbb; text-align: left; - text-decoration: none; - - border: 1px solid #000000; - border-top-width: 0px; - background: #eeeeee; } #menu ul ul span { background: #eeeeee url(../images/expand.gif) no-repeat 100% 100%; } /** - * the most important thing - * enable/disable submenus - */ - div... [truncated message content] |