[Linpha-cvs] SF.net SVN: linpha: [4604] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-10-28 16:36:03
|
Revision: 4604 http://svn.sourceforge.net/linpha/?rev=4604&view=rev Author: fangehrn Date: 2006-10-28 09:34:50 -0700 (Sat, 28 Oct 2006) Log Message: ----------- 2006-10-28 flo * improved a lot * reset database and enjoy Modified Paths: -------------- trunk/linpha2/ChangeLog trunk/linpha2/admin/index.php trunk/linpha2/admin/settings_layout.php trunk/linpha2/index.php trunk/linpha2/install/sql/sql.data.php trunk/linpha2/lib/classes/linpha.admin.class.php trunk/linpha2/lib/classes/linpha.image.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/js/LinGlobal.js trunk/linpha2/lib/js/LinImage.js trunk/linpha2/lib/modules/module.basket.php trunk/linpha2/lib/modules/module.filemanager.php trunk/linpha2/lib/modules/module.settings.php trunk/linpha2/lib/plugins/watermark/func.watermark.php trunk/linpha2/templates/default/basket.html.php trunk/linpha2/templates/default/default.html.php trunk/linpha2/templates/default/global.html.php trunk/linpha2/templates/default/home.html.php trunk/linpha2/templates/default/search.html.php trunk/linpha2/templates/default/themes/default/css/global.css trunk/linpha2/templates/default/themes/default/css/home.css trunk/linpha2/templates/default/themes/default/css/view_img.css trunk/linpha2/templates/default/themes/default/css/view_thumb.css trunk/linpha2/templates/default/view_albcomment.html.php trunk/linpha2/templates/default/view_basket.html.php 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_meta.html.php trunk/linpha2/templates/default/view_thumb.head.php trunk/linpha2/templates/default/view_thumb.html.php trunk/linpha2/templates/default/view_thumb_static.html.php Added Paths: ----------- trunk/linpha2/templates/default/themes/default/colorsettings.php Removed Paths: ------------- trunk/linpha2/templates/default/colorsettings.php trunk/linpha2/templates/default/settings.html.php trunk/linpha2/templates/default/themes/default/css/basket.css trunk/linpha2/templates/default/themes/default/css/view_thumbdetail.css trunk/linpha2/templates/default/view_thumbdetail.html.php Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/ChangeLog 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,3 +1,7 @@ +2006-10-28 flo + * improved a lot + * reset database and enjoy + 2006-10-27 flo * working on admin settings need to reset database Modified: trunk/linpha2/admin/index.php =================================================================== --- trunk/linpha2/admin/index.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/admin/index.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -9,7 +9,6 @@ $linpha = new linpha(); $linpha->sql->startSession(); - $linpha->template = new linTemplate(); if(!$linpha->sql->isAdmin()) { Modified: trunk/linpha2/admin/settings_layout.php =================================================================== --- trunk/linpha2/admin/settings_layout.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/admin/settings_layout.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -3,7 +3,7 @@ if(!isset($cat3)) { - $cat3 = 'layout'; + $cat3 = 'general'; } $array_menu = Array( @@ -24,30 +24,107 @@ { case 'general': + $color_examples = array( + '' => '', + 'blue' => 'blue', + 'orange' => 'orange' + ); + + $color_examples_values = array( + 'blue' => array( + 'bodybg' => 'DDDDDD', + 'elembg' => '87CEFA', + 'font' => '000000', + 'albumsbg' => 'D5FCF4', + 'links' => '005388', + 'linkshover' => '666666', + ), + 'orange' => array( + 'bodybg' => 'FFFFFF', + 'elembg' => 'F09000', + 'font' => '000000', + 'albumsbg' => '94580A', + 'links' => '3d3b33', + 'linkshover' => '555453', + ) + ); + if(isset($_POST['cmd']) && $_POST['cmd']=='saveconfig') { - include_once(LINPHA_DIR.'/lib/plugins/watermark/func.watermark.php'); - $_POST['sys_style_layout_bodybgcolor'] = get_html_from_all($_POST['sys_style_layout_bodybgcolor']); - $_POST['sys_style_layout_elembgcolor'] = get_html_from_all($_POST['sys_style_layout_elembgcolor']); - $_POST['sys_style_layout_fontcolor'] = get_html_from_all($_POST['sys_style_layout_fontcolor']); + if( isset($_POST['select_examples']) && !empty($_POST['select_examples']) && in_array($_POST['select_examples'],$color_examples) ) + { + $_POST['sys_style_layout_color_bodybg'] = $color_examples_values[ $_POST['select_examples'] ]['bodybg']; + $_POST['sys_style_layout_color_elembg'] = $color_examples_values[ $_POST['select_examples'] ]['elembg']; + $_POST['sys_style_layout_color_font'] = $color_examples_values[ $_POST['select_examples'] ]['font']; + $_POST['sys_style_layout_color_albumsbg'] = $color_examples_values[ $_POST['select_examples'] ]['albumsbg']; + $_POST['sys_style_layout_color_links'] = $color_examples_values[ $_POST['select_examples'] ]['links']; + $_POST['sys_style_layout_color_linkshover'] = $color_examples_values[ $_POST['select_examples'] ]['linkshover']; + } + else + { + include_once(LINPHA_DIR.'/lib/plugins/watermark/func.watermark.php'); + $_POST['sys_style_layout_color_bodybg'] = get_html_from_all($_POST['sys_style_layout_color_bodybg']); + $_POST['sys_style_layout_color_elembg'] = get_html_from_all($_POST['sys_style_layout_color_elembg']); + $_POST['sys_style_layout_color_font'] = get_html_from_all($_POST['sys_style_layout_color_font']); + $_POST['sys_style_layout_color_albumsbg'] = get_html_from_all($_POST['sys_style_layout_color_albumsbg']); + $_POST['sys_style_layout_color_links'] = get_html_from_all($_POST['sys_style_layout_color_links']); + $_POST['sys_style_layout_color_linkshover'] = get_html_from_all($_POST['sys_style_layout_color_linkshover']); + } $LinAdmin->saveConfig(Array( 'sys_style_layout_title', 'sys_style_layout_template', 'sys_style_layout_layout', - 'sys_style_layout_bodybgcolor', - 'sys_style_layout_elembgcolor', - 'sys_style_layout_fontcolor' + 'sys_style_layout_color_bodybg', + 'sys_style_layout_color_elembg', + 'sys_style_layout_color_font', + 'sys_style_layout_color_albumsbg', + 'sys_style_layout_color_links', + 'sys_style_layout_color_linkshover', )); } - + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_title'),'sys_style_layout_title',$LinAdmin->option_value_system['sys_style_layout_title']); - $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_template'),'sys_style_layout_template',$LinAdmin->option_value_system['sys_style_layout_template'],LinAdmin::getTemplates()); - $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_theme'),'sys_style_layout_theme',$LinAdmin->option_value_system['sys_style_layout_theme'],LinAdmin::getThemes($LinAdmin->option_value_system['sys_style_layout_template'])); - $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_bodybgcolor'),'sys_style_layout_bodybgcolor',$LinAdmin->option_value_system['sys_style_layout_bodybgcolor']); - $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_elembgcolor'),'sys_style_layout_elembgcolor',$LinAdmin->option_value_system['sys_style_layout_elembgcolor']); - $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_fontcolor'),'sys_style_layout_fontcolor',$LinAdmin->option_value_system['sys_style_layout_fontcolor']); + $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_template'),'sys_style_layout_template',$LinAdmin->option_value_system['sys_style_layout_template'],array('options' => LinAdmin::getTemplates())); + $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_layout_theme'),'sys_style_layout_theme',$LinAdmin->option_value_system['sys_style_layout_theme'],array('options' => LinAdmin::getThemes($LinAdmin->option_value_system['sys_style_layout_template']))); + + echo '<h2>'.i18n("Colors").'</h2>'; + ?> + <script language="JavaScript" type="text/javascript"> + function updateSelectBox(form_select) + { + if( form_select.options[ form_select.selectedIndex ].text == '') // enable + { + document.getElementsByName('sys_style_layout_color_bodybg')[0].disabled = false; + document.getElementsByName('sys_style_layout_color_elembg')[0].disabled = false; + document.getElementsByName('sys_style_layout_color_font')[0].disabled = false; + document.getElementsByName('sys_style_layout_color_albumsbg')[0].disabled = false; + document.getElementsByName('sys_style_layout_color_links')[0].disabled = false; + document.getElementsByName('sys_style_layout_color_linkshover')[0].disabled = false; + } + else // disable + { + document.getElementsByName('sys_style_layout_color_bodybg')[0].disabled = true; + document.getElementsByName('sys_style_layout_color_elembg')[0].disabled = true; + document.getElementsByName('sys_style_layout_color_font')[0].disabled = true; + document.getElementsByName('sys_style_layout_color_albumsbg')[0].disabled = true; + document.getElementsByName('sys_style_layout_color_links')[0].disabled = true; + document.getElementsByName('sys_style_layout_color_linkshover')[0].disabled = true; + } + } + </script> + <?php + $options = array('input_settings' => ' onchange="updateSelectBox(this)"','options' => $color_examples); + $LinAdmin->printAdminConfig('select',i18n("Examples"),'select_examples','',$options); + echo '<br />'; + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_color_bodybg'),'sys_style_layout_color_bodybg',$LinAdmin->option_value_system['sys_style_layout_color_bodybg']); + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_color_elembg'),'sys_style_layout_color_elembg',$LinAdmin->option_value_system['sys_style_layout_color_elembg']); + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_color_font'),'sys_style_layout_color_font',$LinAdmin->option_value_system['sys_style_layout_color_font']); + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_color_albumsbg'),'sys_style_layout_color_albumsbg',$LinAdmin->option_value_system['sys_style_layout_color_albumsbg']); + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_color_links'),'sys_style_layout_color_links',$LinAdmin->option_value_system['sys_style_layout_color_links']); + $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_layout_color_linkshover'),'sys_style_layout_color_linkshover',$LinAdmin->option_value_system['sys_style_layout_color_linkshover']); + break; case 'home': $welcometxt = i18n("Add Your Own Welcome Text Here"); @@ -102,7 +179,7 @@ $LinAdmin->printAdminConfig('text',$LinAdmin->getDescriptionByOptionName('sys_style_home_nrrandomimages'),'sys_style_home_nrrandomimages',$LinAdmin->option_value_system['sys_style_home_nrrandomimages']); $LinAdmin->printAdminConfig('radio',$LinAdmin->getDescriptionByOptionName('sys_style_home_showbrowsebydate'),'sys_style_home_showbrowsebydate',$LinAdmin->option_value_system['sys_style_home_showbrowsebydate']); $LinAdmin->printAdminConfig('radio',$LinAdmin->getDescriptionByOptionName('sys_style_home_showalbums'),'sys_style_home_showalbums',$LinAdmin->option_value_system['sys_style_home_showalbums']); - $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_home_firstsortorder'),'sys_style_home_firstsortorder',$LinAdmin->option_value_system['sys_style_home_firstsortorder'],getSortOrders()); + $LinAdmin->printAdminConfig('select',$LinAdmin->getDescriptionByOptionName('sys_style_home_firstsortorder'),'sys_style_home_firstsortorder',$LinAdmin->option_value_system['sys_style_home_firstsortorder'],array('options' => getSortOrders())); break; case 'thumb': Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/index.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -9,7 +9,6 @@ include_once(LINPHA_DIR.'/lib/classes/linpha.class.php'); $linpha = new Linpha(); $linpha->sql->startSession(); - $linpha->template = new linTemplate(); include_once(LINPHA_DIR.'/lib/include/integrity.php'); include_once(LINPHA_DIR.'/lib/include/upgrade.php'); Modified: trunk/linpha2/install/sql/sql.data.php =================================================================== --- trunk/linpha2/install/sql/sql.data.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/install/sql/sql.data.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -47,6 +47,7 @@ 'sys_path_tmp_dir' => $_SESSION['tmp_dir'], 'sys_basket_mail_max_size' => (1024*1024*2), + 'sys_basket_mail_smpthost' => 'localhost', 'sys_basket_download_limit' => '0', 'sys_style_datetime_dates' => '%a %m/%d/%Y', @@ -73,9 +74,13 @@ 'sys_style_image_height' => '525', 'sys_style_image_nrprevnextthumbs' => '3', - 'sys_style_layout_bodybgcolor' => 'dddddd', - 'sys_style_layout_elembgcolor' => '87cefa', - 'sys_style_layout_fontcolor' => '000000', + 'sys_style_layout_color_bodybg' => 'DDDDDD', // the blue design + 'sys_style_layout_color_elembg' => '87CEFA', + 'sys_style_layout_color_font' => '000000', + 'sys_style_layout_color_albumsbg' => 'D5FCF4', + 'sys_style_layout_color_links' => '005388', + 'sys_style_layout_color_linkshover' => '666666', + 'sys_style_layout_theme' => 'default', 'sys_style_layout_template' => 'default', 'sys_style_layout_title' => 'Linpha 2.0', Modified: trunk/linpha2/lib/classes/linpha.admin.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -70,9 +70,12 @@ 'sys_style_layout_title' => "Linpha Title", 'sys_style_layout_template' => "Template", 'sys_style_layout_theme' => "Theme", - 'sys_style_layout_bodybgcolor' => "Main Background Color", - 'sys_style_layout_elembgcolor' => "Elements Background Color", - 'sys_style_layout_fontcolor' => "Fonts Color" + 'sys_style_layout_color_bodybg' => "Main Background Color", + 'sys_style_layout_color_elembg' => "Elements Background Color", + 'sys_style_layout_color_font' => "Fonts Color", + 'sys_style_layout_color_albumsbg' => "Albums Background Color", + 'sys_style_layout_color_links' => "Links Color", + 'sys_style_layout_color_linkshover' => "Links Hover Color", ); } @@ -104,7 +107,7 @@ <?php } -function printAdminConfig($type,$text,$id,$value,$options=array()) +function printAdminConfig($type,$text,$id,$value,$settings=array()) { ?> <div style="width: 600px; border: 1px solid black; padding: 5px; margin-bottom: 5px;"> @@ -146,11 +149,11 @@ ?> </div> <div align="right"> - <select name="<?php echo $id; ?>" size="1"> + <select name="<?php echo $id; ?>" size="1"<?php echo (isset($settings['input_settings']) ? $settings['input_settings'] : '' ); ?>> <?php - foreach($options AS $key=>$value) + foreach($settings['options'] AS $option_key=>$option_value) { - if($key == $value) + if($option_key == $value) { $selected = ' selected="selected"'; } @@ -158,7 +161,7 @@ { $selected = ''; } - echo '<option value="'.$key.'"'.$selected.'>'.$value.'</option>'; + echo '<option value="'.$option_key.'"'.$selected.'>'.$option_value.'</option>'; } ?> </select> Modified: trunk/linpha2/lib/classes/linpha.image.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.image.class.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/classes/linpha.image.class.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -592,6 +592,7 @@ * it works on firefox, but it does not on my IE */ header("Content-Disposition: inline; filename=".basename($this->src_file).";" ); + readfile( $this->output_file ); } Modified: trunk/linpha2/lib/classes/linpha.import.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.import.class.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/classes/linpha.import.class.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -423,13 +423,15 @@ /** * get date */ - $time_exif = MetaData::convertExifDateToUnix( $meta[0][34665]['Data'][0][36867]['Data'][0] ); + if( isset($meta[0][34665]['Data'][0][36867]['Data'][0]) ) { + $time_exif = MetaData::convertExifDateToUnix( $meta[0][34665]['Data'][0][36867]['Data'][0] ); + } /** * get rotate information * turn off exif autorotate using 'sys_import_exif_autorot' */ - if( $GLOBALS['linpha']->sql->config->value['sys_import_exif_autorot'] ) + if( $GLOBALS['linpha']->sql->config->value['sys_import_exif_autorot'] && isset($meta[0][274]['Data'][0]) ) { $rotate = MetaData::getRotationByExifTag( $meta[0][274]['Data'][0] ); } Modified: trunk/linpha2/lib/classes/linpha.sql.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.sql.class.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/classes/linpha.sql.class.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -176,6 +176,16 @@ $this->dbConnect(); } + /** + * start template + * this must be at execatly this place, because: + * 1. it needs to be after the database is connected, because + * in the constructor of linTemplate() are configs from the db read + * 2. we need the template already in startSession(), because of the + * syslog after loggin in + */ + $GLOBALS['linpha']->template = new linTemplate(); + session_name('linpha2'); session_start(); Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -26,9 +26,11 @@ { public $template_name, $layout_name; public $layoutimagespath; - public $bgcolor, $bodybgcolor; public $output; public $URL_base, $URL_full; + + public $bgcolor, $bodybgcolor, $fontcolor, $albumsbgcolor, $linkscolor, $linkshovercolor; + private $body_name; private $head_name; @@ -38,14 +40,16 @@ { $this->template_name = $GLOBALS['linpha']->sql->config->value['sys_style_layout_template']; $this->layout_name = $GLOBALS['linpha']->sql->config->value['sys_style_layout_theme']; - $this->bgcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_elembgcolor']; - $this->bodybgcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_bodybgcolor']; - $this->fontcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_fontcolor']; $this->linpha_title = $GLOBALS['linpha']->sql->config->value['sys_style_layout_title']; + $this->layoutsimagespath = LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/images'; - $this->layoutsimagespath = LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/images'; - + $this->bgcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_color_elembg']; + $this->bodybgcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_color_bodybg']; + $this->fontcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_color_font']; + $this->albumsbgcolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_color_albumsbg']; + $this->linkscolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_color_links']; + $this->linkshovercolor = $GLOBALS['linpha']->sql->config->value['sys_style_layout_color_linkshover']; } /** @@ -53,10 +57,17 @@ */ function includeFile($what) { + global $tpl; + switch($what) { case 'body': $filename = LINPHA_DIR.'/templates/'.$this->template_name.'/'.$this->body_name.'.html.php'; + if(file_exists($filename)) + { + include_once( $filename ); + } + break; case 'head': /** @@ -64,9 +75,17 @@ */ ?> <!-- css includes --> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/colorsettings.php?bgcolor='.$this->bgcolor.'&bodybgcolor='.$this->bodybgcolor.'&fontcolor='.$this->fontcolor; ?>' type='text/css'> +<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name. + '/colorsettings.php?bg='.$this->bgcolor.'&bodybg='.$this->bodybgcolor.'&font='.$this->fontcolor. + '&albumsbg='.$this->albumsbgcolor.'&links='.$this->linkscolor.'&linkshover='.$this->linkshovercolor; ?>' type='text/css'> <link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'> -<link rel='stylesheet' href='<?php $this->includeFile('css'); ?>' type='text/css'> +<?php +$filename = LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/'.$this->css_name.'.css'; +if(file_exists($filename)) +{ + echo "<link rel='stylesheet' href='".$filename."' type='text/css'>\n"; +} +?> <!-- IE hack for the menu--> <!--[if IE]> <style type="text/css" media="screen"> @@ -93,25 +112,26 @@ <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 if(! isset($_SESSION['use_js']) && ! isset($_SESSION['disable_ajax'])) { + echo "checkAjaxCompatibility();"; +} ?> -<script type="text/javascript" language="JavaScript">var LINPHA_DIR = '<?php echo LINPHA_DIR; ?>'; checkAjaxCompatibility();</script> -<?php -} +</script> +<?php $filename = LINPHA_DIR.'/templates/'.$this->template_name.'/'.$this->head_name.'.head.php'; + if(file_exists($filename)) + { + include_once( $filename ); + } + break; - case 'css': - echo LINPHA_DIR.'/templates/'.$this->template_name.'/themes/'.$this->layout_name.'/css/'.$this->css_name.'.css'; - break; + } - - if($what != 'css' && file_exists($filename)) - { - include_once( $filename ); - } } function setModuleName($name) @@ -207,35 +227,47 @@ } } - function divRoundCorners($top_bottom,$alpha='') + /** + * rounded corner stuff + */ + function divRoundCorners($top_bottom,$alpha='',$type='') { - if(empty($alpha)) + $size = 15; + + if(empty($type)) // default { - if($top_bottom == 'top') - { - $str = '<div class="roundtop">'; - $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=tl" alt="" width="15" height="15" class="corner" style="display: none" />'; - $str .= '</div>'; - } - elseif($top_bottom == 'bottom') - { - $str = '<div class="roundbottom">'; - $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=bl" alt="" width="15" height="15" class="corner" style="display: none" />'; - $str .= '</div>'; - } + $color = $this->bgcolor; + $bgcolor = $this->bodybgcolor; } + elseif($type=='albums') + { + $color = $this->albumsbgcolor; + $bgcolor = $this->bgcolor; + } + + if($top_bottom == 'top') + { + $alignleft = 'tl'; + $alignright = 'tr'; + } + elseif($top_bottom == 'bottom') + { + $alignleft = 'bl'; + $alignright = 'br'; + } + + if(empty($alpha)) // default + { + $str = '<div style="background: url('.LINPHA_DIR.'/templates/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignright.') no-repeat top right;">'; + $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'" alt="" width="'.$size.'" height="'.$size.'" class="corner" />'; + $str .= '</div>'; + } else // currently only used in slideshow, does not work well in internet explorer { - if($top_bottom == 'top') - { - } - elseif($top_bottom == 'bottom') - { - $str = '<div class="roundAlphabottom">'; - $str .= '<div class="roundAlphabottomInner"> </div>'; - $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$this->bgcolor.'&bgcolor='.$this->bodybgcolor.'&size=15&align=bl&alpha" alt="" width="15" height="15" class="AlphaCorner" style="display: none" />'; - $str .= '</div>'; - } + $str = '<div style="position: relative; background: url('.LINPHA_DIR.'/templates/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&alpha&align='.$alignright.') no-repeat top right;">'; + $str .= '<div class="roundAlphabottomInner"> </div>'; + $str .= '<img src="'.LINPHA_DIR.'/templates/roundcorners.php?color='.$color.'&bgcolor='.$bgcolor.'&size='.$size.'&align='.$alignleft.'&alpha" alt="" width="'.$size.'" height="'.$size.'" class="AlphaCorner" />'; + $str .= '</div>'; } return $str; Modified: trunk/linpha2/lib/include/basket_build_mail.php =================================================================== --- trunk/linpha2/lib/include/basket_build_mail.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/include/basket_build_mail.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -163,7 +163,7 @@ $mail = new PHPMailer(); $mail->IsSmtp(); - $mail->Host = "localhost"; + $mail->Host = $GLOBALS['linpha']->sql->config->value['sys_basket_mail_smpthost']; $mail->From = $_POST['sender_address']; $mail->FromName = $_POST['sender_address']; // otherwise, a default name like "Root User" is taken $mail->AddAddress($_POST['mail_address']); @@ -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.")); + linSysLog(i18n("Error: E-Mail couldn't be sent. Contact the Administrator.").'<br />'); } $mail->ClearAddresses(); Modified: trunk/linpha2/lib/js/LinGlobal.js =================================================================== --- trunk/linpha2/lib/js/LinGlobal.js 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/js/LinGlobal.js 2006-10-28 16:34:50 UTC (rev 4604) @@ -37,7 +37,7 @@ */ function checkAjaxCompatibilitySuccess(t) { - location.reload(); + location.href = document.location; linSyslog('Ajax enabled'); } Modified: trunk/linpha2/lib/js/LinImage.js =================================================================== --- trunk/linpha2/lib/js/LinImage.js 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/js/LinImage.js 2006-10-28 16:34:50 UTC (rev 4604) @@ -3,7 +3,7 @@ alert('Error ' + t.status + ' -- ' + t.statusText); } -var curImgId; +var curImgId = startImgId; var nextThumbs = new Array(); var prevThumbs = new Array(); @@ -70,18 +70,39 @@ }, movePrev: function() { + if( slideshowActive ) + { + clearTimeout(ssCurrentTimerID); + } + if(prevThumbs[ prevThumbs.length - 1 ]) { Element.setOpacity('ssImgPrev',0.7); new Effect.Appear('ssImgPrev', { duration: 0.5, from: 0.7, to: 1.0 }); myLinImage.loadImage(prevThumbs[ prevThumbs.length - 1 ]); + + if( slideshowActive ) + { + clearTimeout(ssCurrentTimerID); + ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); + } } else // end reached, do nothing but enable keyboard navigation again { myLinImage.enableKeyboardNav(); } + + if( slideshowActive ) + { + ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); + } }, moveNext: function() { + if( slideshowActive ) + { + clearTimeout(ssCurrentTimerID); + } + if(nextThumbs[0]) { Element.setOpacity('ssImgNext',0.7); @@ -98,16 +119,41 @@ { myLinImage.enableKeyboardNav(); } + + if( slideshowActive ) + { + ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); + } }, moveFirst: function() { + if( slideshowActive ) + { + clearTimeout(ssCurrentTimerID); + } + Element.setOpacity('ssImgFirst',0.7); new Effect.Appear('ssImgFirst', { duration: 0.5, from: 0.7, to: 1.0 }); myLinImage.loadImage( firstImgId ); + + if( slideshowActive ) + { + ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); + } }, moveLast: function() { + if( slideshowActive ) + { + clearTimeout(ssCurrentTimerID); + } + Element.setOpacity('ssImgLast',0.7); new Effect.Appear('ssImgLast', { duration: 0.5, from: 0.7, to: 1.0 }); myLinImage.loadImage( lastImgId ); + + if( slideshowActive ) + { + ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); + } }, // @@ -565,8 +611,14 @@ }, preloadImageFinished: function(imgId) { - new Effect.Appear('thumb'+imgId, { duration: 0.5, from: 0.5, to: 1.0 }); + preloadImageFinished[imgId] = true; + + if( $('thumb'+imgId) ) // maybe its not here anymore + { + new Effect.Appear('thumb'+imgId, { duration: 0.5, from: 0.5, to: 1.0 }); + } + }, fullscreenStart: function() @@ -664,7 +716,7 @@ if(nextThumbs[0] || ssLoop) { this.moveNext(); - ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); + //ssCurrentTimerID = setTimeout("myLinImage.slideshowPlay()", ssCurrentDelay); } else { @@ -738,10 +790,18 @@ $('divimage').style.height = startImgHeight; // initial sets correct height at begin and not after the image is loaded $('mainImage').style.height = startImgHeight; // initial sets correct height at begin and not after the image is loaded myLinImage = new LinImage(); - myLinImage.loadImage(startImgId); -// setMainHeight(); // defined in LinGlobal.js - window.onresize = onWindowResize; + // automatically start slideshow if requested (coming from thumbview) + if( document.location.toString().indexOf('slideshow') != -1 ) + { + myLinImage.fullscreenStart(); + } + else + { + myLinImage.loadImage(startImgId); + // setMainHeight(); // defined in LinGlobal.js + window.onresize = onWindowResize; + } } Event.observe(window, 'load', initLinImage, false); Modified: trunk/linpha2/lib/modules/module.basket.php =================================================================== --- trunk/linpha2/lib/modules/module.basket.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/modules/module.basket.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -174,6 +174,6 @@ $linpha->template->setModuleName('basket'); $linpha->template->URL_full = LINPHA_DIR.'/?cat=basket'; -$linpha->template->output['title'] = i18n("Basket"); +$linpha->template->output['title'] = '<a href="'.$linpha->template->URL_full.'">'.i18n("Basket").'</a>'; include_once(LINPHA_DIR.'/templates/'.$GLOBALS['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-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/modules/module.filemanager.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -931,9 +931,7 @@ <?php $linpha->template->output['default'] = ob_get_clean(); -?> -<?php $linpha->template->setModuleName('default'); $linpha->template->overrideModule('css','filemanager'); $linpha->template->URL_full = LINPHA_DIR.'/?cat=filemanager&id='.$parent_id; Modified: trunk/linpha2/lib/modules/module.settings.php =================================================================== --- trunk/linpha2/lib/modules/module.settings.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/modules/module.settings.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -248,9 +248,8 @@ <hr /> <?php -$linpha->template->output['settings'] = ob_get_clean(); - -$linpha->template->setModuleName('settings'); +$linpha->template->output['default'] = ob_get_clean(); +$linpha->template->setModuleName('default'); $linpha->template->URL_full = LINPHA_DIR.'/?cat=settings'; $linpha->template->output['title'] = i18n("Settings"); include_once(LINPHA_DIR.'/templates/'.$linpha->template->template_name.'/global.html.php'); Modified: trunk/linpha2/lib/plugins/watermark/func.watermark.php =================================================================== --- trunk/linpha2/lib/plugins/watermark/func.watermark.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/lib/plugins/watermark/func.watermark.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -779,7 +779,7 @@ else { - return '#000000'; + return 'ffffff'; } } } Modified: trunk/linpha2/templates/default/basket.html.php =================================================================== --- trunk/linpha2/templates/default/basket.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/basket.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,11 +1,11 @@ <div id="divnavigation"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <?php echo $tpl->divRoundCorners('top'); ?> <div id="navigation"> <a style="float: left; margin-right: 2px;" class="button" href="<?php echo $_SESSION['basket_ref_url']; ?>"><?php echo i18n("Go Back"); ?></a> - <form name="basket_checkout" style="float: left; margin-right: 2px;" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> - <select class="button" name="checkout_as" onchange="document.basket_checkout.submit()"> + <form name="basket_checkout" style="float: left; margin-right: 2px;" action="<?php echo $tpl->URL_full; ?>" method="POST"> + <select name="checkout_as" class="linforms" onchange="document.basket_checkout.submit()"> <option value=""><?php echo i18n("Checkout"); ?></option> <option value="download"><?php echo i18n("Download"); ?></option> <option value="mail"><?php echo i18n("Send As Mail"); ?></option> @@ -24,7 +24,7 @@ echo i18n("Select Type Of Archive"); ?> - <form name="zip_selected" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> + <form name="zip_selected" action="<?php echo $tpl->URL_full; ?>" method="POST"> <select name="ziptype" size="1"> <?php include_once(LINPHA_DIR.'/lib/classes/archiver.class.php'); @@ -74,7 +74,7 @@ $checked_txt = ''; } ?> - <form name="mail_selected" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> + <form name="mail_selected" action="<?php echo $tpl->URL_full; ?>" method="POST"> <table> <tr> <td width="170"><?php echo i18n("Recipient"); ?>:</td> @@ -136,7 +136,7 @@ } } </script> - <form name="print_selected" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST" target="_blank"> + <form name="print_selected" action="<?php echo $tpl->URL_full; ?>" method="POST" target="_blank"> <br/><select name="images" size="1" onchange="update_quality_settings()"> <option value="2">2 <?php echo i18n("Images/Page"); ?></option> <option value="4" selected>4 <?php echo i18n("Images/Page"); ?></option> @@ -163,27 +163,27 @@ ?> </div> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> + <?php echo $tpl->divRoundCorners('bottom'); ?> </div> <div id="divmain"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <?php echo $tpl->divRoundCorners('top'); ?> + <div id="main"> - <div id="main"> - <form name="basket_remove" action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>&cmd=remove_selected" method="POST"> + <form name="basket_remove" action="<?php echo $tpl->URL_full; ?>&cmd=remove_selected" method="POST"> <?php if( count($_SESSION['basket_ids']) > 0 ) { ?> <?php $i = 1; - foreach($GLOBALS['linpha']->template->output['basket_folders'] AS $value) + foreach($tpl->output['basket_folders'] AS $value) { echo setNavigationLine( $value, LINPHA_DIR.'/?cat=alb&id=' ).'<br />'; - foreach($GLOBALS['linpha']->template->output['basket_folder_contents'][$value] AS $sub_value) + foreach($tpl->output['basket_folder_contents'][$value] AS $sub_value) { ?> - <div class='imgdiv'> + <div style='float: left;'> <label for='<?php echo $i; ?>'><img style='cursor: pointer;' src='<?php echo LINPHA_DIR.'/get_thumb.php?id='.$sub_value; ?>' class='img_thumbnail' /></label> <br /> <input type='checkbox' id='<?php echo $i; ?>' name='img_id[]' value='<?php echo $sub_value; ?>'> @@ -194,17 +194,18 @@ echo '<div style="clear: both;"></div><br /><br />'; } ?> + <a class="button" href="<?php echo $tpl->URL_full; ?>&cmd=remove_all"><?php echo i18n("Remove all"); ?></a> + <input class="button" type="submit" name="submit" value="<?php echo i18n("Remove selected"); ?>" /> + <?php } else { echo i18n("Empty Basket"); } ?> - </div> - <a class="button" href="<?php echo $GLOBALS['linpha']->template->URL_full; ?>&cmd=remove_all"><?php echo i18n("Remove all"); ?></a> - <input class="button" type="submit" name="submit" value="<?php echo i18n("Remove selected"); ?>" /> </form> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> + </div> + <?php echo $tpl->divRoundCorners('bottom'); ?> </div> </form> \ No newline at end of file Deleted: trunk/linpha2/templates/default/colorsettings.php =================================================================== --- trunk/linpha2/templates/default/colorsettings.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/colorsettings.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,52 +0,0 @@ -<?php -header("Content-Type: text/css"); - -/* - * Created on 26.10.2006 - * - * To change the template for this generated file go to - * Window - Preferences - PHPeclipse - PHP - Code Templates - */ -?> - -/** - * background color - * #divthumbnavi amd #divSlideshowControlsInner used in view_img.html.php - */ - body { - background-color: #<?php echo $_GET['bodybgcolor']; ?>; - } - - #divleft, #divmain, #divright, #divthumbnavi, #divnavigation, #divSlideshowControlsInner, .roundAlphabottomInner { - background-color: #<?php echo $_GET['bgcolor']; ?>; - } - -/** - * font color - */ - body { - color: #<?php echo $_GET['fontcolor']; ?>; - } - -/** - * rounded corner stuff - */ - .roundtop { - background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&bgcolor=<?php echo $_GET['bodybgcolor']; ?>&size=15&align=tr) no-repeat top right; - } - - .roundbottom { - background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&bgcolor=<?php echo $_GET['bodybgcolor']; ?>&size=15&align=br) no-repeat top right; - } - - .roundAlphatop { - position: relative; - /*background: url(../images/tr_alpha.gif) no-repeat top right;*/ - background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&alpha&size=15&align=tr) no-repeat top right; - } - - .roundAlphabottom { - position: relative; - /*background: url(../images/br_alpha.gif) no-repeat top right;*/ - background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&alpha&size=15&align=br) no-repeat top right; - } \ No newline at end of file Modified: trunk/linpha2/templates/default/default.html.php =================================================================== --- trunk/linpha2/templates/default/default.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/default.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,11 +1,11 @@ <div id="divmain"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <?php echo $tpl->divRoundCorners('top'); ?> <div id="main"> <?php -echo $GLOBALS['linpha']->template->output['default']; +echo $tpl->output['default']; ?> </div> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> + <?php echo $tpl->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/global.html.php =================================================================== --- trunk/linpha2/templates/default/global.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/global.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -2,14 +2,16 @@ /** * first output starts here */ +global $tpl; +$tpl = $GLOBALS['linpha']->template; /* @todo */ ?> <?php /*header('Content-type: text/html; charset='.$html_charset);*/ ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> -<title><?php echo $GLOBALS['linpha']->template->linpha_title; ?></title> +<title><?php echo $tpl->linpha_title; ?></title> -<?php $GLOBALS['linpha']->template->includeFile('head'); ?> +<?php $tpl->includeFile('head'); ?> </head> @@ -17,17 +19,15 @@ <body id="linBody"> <!-- syslog --> -<div id="divSyslog"<?php if( ! isset($GLOBALS['linpha']->template->output['sys_log']) ) { echo ' style="display: none;"'; } ?>> +<div id="divSyslog"<?php if( ! isset($tpl->output['sys_log']) ) { echo ' style="display: none;"'; } ?>> <div id="divSyslogClose"><a href="javascript:closeSyslog();">X</a></div> <?php echo i18n("Linpha Syslog"); ?>:<br /> - <div id="divSyslogText"> - <?php echo $GLOBALS['linpha']->template->output['sys_log']; ?> - </div> + <div id="divSyslogText"><?php echo (isset($tpl->output['sys_log']) ? $tpl->output['sys_log'] : ''); ?></div> </div> <!-- title/navigation --> <div id="title"> - <?php echo $GLOBALS['linpha']->template->linpha_title." :: ".$GLOBALS['linpha']->template->output['title']; ?> + <?php echo $tpl->linpha_title." :: ".$tpl->output['title']; ?> </div> <!-- menu --> @@ -59,7 +59,7 @@ <ul> <li> <div> - <form action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> + <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 />'; ?> @@ -79,14 +79,14 @@ </ul> </li> </ul> - <?php if( isset( $GLOBALS['linpha']->template->output['menu_More'] ) ) { - $GLOBALS['linpha']->template->printMenu("More"); + <?php if( isset( $tpl->output['menu_More'] ) ) { + $tpl->printMenu("More"); } ?> <!-- icons --> <div> - <?php if( isset( $GLOBALS['linpha']->template->output['menu_Icons'] ) ) { - echo $GLOBALS['linpha']->template->output['menu_Icons']; + <?php if( isset( $tpl->output['menu_Icons'] ) ) { + echo $tpl->output['menu_Icons']; } ?> </div> @@ -95,13 +95,13 @@ <ul> <li><a href="<?php echo LINPHA_DIR; ?>/?cat=settings"><?php echo i18n("My Settings"); ?></a></li> </ul> - <?php $GLOBALS['linpha']->template->printMenu("Admin",LINPHA_DIR."/admin/"); ?> + <?php $tpl->printMenu("Admin",LINPHA_DIR."/admin/"); ?> <?php } ?> </div> <div style="clear: both;"></div> <!-- end menu --> -<?php $GLOBALS['linpha']->template->includeFile('body'); ?> +<?php $tpl->includeFile('body'); ?> </body> </html> \ No newline at end of file Modified: trunk/linpha2/templates/default/home.html.php =================================================================== --- trunk/linpha2/templates/default/home.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/home.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,17 +1,17 @@ <div id="divmain"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <?php echo $tpl->divRoundCorners('top'); ?> <div id="main"> - <?php echo $GLOBALS['linpha']->template->output['welcome']; ?> + <?php echo $tpl->output['welcome']; ?> <br /> <!-- Random Images --> - <?php if( count($GLOBALS['linpha']->template->output['random_images']) > 0 ) { ?> + <?php if( count($tpl->output['random_images']) > 0 ) { ?> <hr /> <h1><?php echo i18n("Random Images"); ?></h1> <?php - foreach($GLOBALS['linpha']->template->output['random_images'] AS $key=>$value) + foreach($tpl->output['random_images'] AS $key=>$value) { ?> <div class="div_random_img"> @@ -26,11 +26,11 @@ <?php } ?> <!-- New Images --> - <?php if( count($GLOBALS['linpha']->template->output['new_images']) > 0 ) { ?> + <?php if( count($tpl->output['new_images']) > 0 ) { ?> <hr /> <h1><?php echo i18n("New Images"); ?></h1> <?php - foreach($GLOBALS['linpha']->template->output['new_images'] AS $key=>$value) + foreach($tpl->output['new_images'] AS $key=>$value) { ?> <div class="div_new_img"> @@ -48,9 +48,9 @@ <!-- Browse by Date --> <?php if($GLOBALS['linpha']->sql->config->value['sys_style_home_showbrowsebydate'] && - !empty($GLOBALS['linpha']->template->output['browse_by_date'])) { + !empty($tpl->output['browse_by_date'])) { echo "<hr />"; - echo i18n("Browse by Date").': '.$GLOBALS['linpha']->template->output['browse_by_date']; + echo i18n("Browse by Date").': '.$tpl->output['browse_by_date']; echo "<br />"; } ?> @@ -65,6 +65,8 @@ { ?> <div class="div_folder"> + <?php echo $tpl->divRoundCorners('top','','albums'); ?> + <?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'] .'" alt="thumbnail_album" /></a>'; ?> @@ -77,10 +79,12 @@ <?php echo linStrftime($value['time_add']); ?> </div> + + <?php echo $tpl->divRoundCorners('bottom','','albums'); ?> </div> <?php } ?> <?php } ?> </div> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> + <?php echo $tpl->divRoundCorners('bottom'); ?> </div> \ No newline at end of file Modified: trunk/linpha2/templates/default/search.html.php =================================================================== --- trunk/linpha2/templates/default/search.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/search.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -14,10 +14,10 @@ <font size="+1"><?php echo i18n("LinPHA Search Page"); ?></font> <hr noshade> <?php -if(isset($GLOBALS['linpha']->template->output['search_error'])) +if(isset($tpl->output['search_error'])) { echo '<div align="center"><b>'; - switch($GLOBALS['linpha']->template->output['search_error']) + switch($tpl->output['search_error']) { case 1: echo i18n("Search string to short, must be at least 2 characters long!"); break; case 2: echo i18n("Error, please check input!"); break; @@ -26,7 +26,7 @@ } ?> <div id="divmain"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <?php echo $tpl->divRoundCorners('top'); ?> <div id="main"> @@ -94,7 +94,7 @@ ?> <br /><b><?php echo i18n("Search").strtoupper($meta_type); ?></b><br /> <input type="checkbox" id="b_<?php echo $meta_type; ?>_all" name="button[<?php echo $meta_type; ?>][all]" value="1"<?php echo isset($_REQUEST['b_'.$meta_type.'_all']) ? ' checked' : ''; ?> onClick="check_all('b_<?php echo $meta_type; ?>_all','<?php echo $meta_type; ?>')"><label for="b_<?php echo $meta_type; ?>_all"><b><?php echo i18n("All"); ?></b></label> - <a href="javascript:div_expand('div_<?php echo $meta_type; ?>');"><img border="0" src="<?php echo $GLOBALS['linpha']->template->layoutsimagespath.'/expand.gif'; ?>" /></a> + <a href="javascript:div_expand('div_<?php echo $meta_type; ?>');"><img border="0" src="<?php echo $tpl->layoutsimagespath.'/expand.gif'; ?>" /></a> <br /> <div id="div_<?php echo $meta_type; ?>" style="border: 1px solid black; width: 200px;"> <?php @@ -228,7 +228,7 @@ </div> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> + <?php echo $tpl->divRoundCorners('bottom'); ?> </div> <script language="JavaScript" type="text/javascript"> Deleted: trunk/linpha2/templates/default/settings.html.php =================================================================== --- trunk/linpha2/templates/default/settings.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/settings.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,15 +0,0 @@ -<div id="divmain"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> - - <div id="main"> - - -<?php -echo $GLOBALS['linpha']->template->output['settings']; -?> - - - </div> - - <?php echo $GLOBALS['linpha']->template->divRoundCorners('bottom'); ?> -</div> \ No newline at end of file Copied: trunk/linpha2/templates/default/themes/default/colorsettings.php (from rev 4601, trunk/linpha2/templates/default/colorsettings.php) =================================================================== --- trunk/linpha2/templates/default/themes/default/colorsettings.php (rev 0) +++ trunk/linpha2/templates/default/themes/default/colorsettings.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -0,0 +1,61 @@ +<?php +header("Content-Type: text/css"); + +/** + * force caching in browser + * works in firefox and internet explorer + */ +Header("Last-Modified: " . gmdate("D, d M Y H:i:s",mktime (0,0,0,1,1,2000)) . " GMT"); // Date in the past +Header("Expires: Mon, 26 Jul 2100 05:00:00 GMT"); // In other words... never expire the image +Header("Cache-Control: max-age=10000000, s-maxage=1000000, proxy-revalidate, must-revalidate"); + + +/* + * Created on 26.10.2006 + * + * To change the template for this generated file go to + * Window - Preferences - PHPeclipse - PHP - Code Templates + */ +?> + +/** + * background color + * #divthumbnavi amd #divSlideshowControlsInner used in view_img.html.php + */ + body { + background-color: #<?php echo $_GET['bodybg']; ?>; + } + + #divleft, #divmain, #divright, #divthumbnavi, #divnavigation, #divSlideshowControlsInner, .roundAlphabottomInner, .button { + background-color: #<?php echo $_GET['bg']; ?>; + } + +/** + * font color + */ + body { + color: #<?php echo $_GET['font']; ?>; + } + +/** + * albums color + */ + .div_folder { + background-color: #<?php echo $_GET['albumsbg']; ?>; + /*border: 1px solid #<?php echo $_GET['albumsborder']; ?>;*/ + } + +/** + * link/form colors + */ + a:link, a:visited, .button { + color: #<?php echo $_GET['links']; ?>; + } + a:hover, .button:hover { + color: #<?php echo $_GET['linkshover']; ?>; + } + + .linforms { + background-color: #d5eeff; + border: 1px solid grey; + } Deleted: trunk/linpha2/templates/default/themes/default/css/basket.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/basket.css 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/themes/default/css/basket.css 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,18 +0,0 @@ -#main { - margin-left: 10px; -} - -.imgdiv { - border: 1px #000000 solid; - margin: 3px; - text-align: center; - float: left; - width: 150px; - height: 150px; -} - -.img_thumbnail { - border: 0; - width: auto; - height: 130px; -} \ 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-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/themes/default/css/global.css 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,49 +1,40 @@ <!-- /** * common definitions + * All 'em' calculations are based on 1 px = 0.0626em */ body { font-family: arial, helvetica, sans-serif; margin: 0px; padding: 0px; } + + + h1 { + font-size: 18pt; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0px; + margin-bottom: 5px; + padding: 0px; + } - a:link { - color: #666666; - text-decoration: underline; + h2 { + font-size: 14pt; + font-family: Verdana, Arial, Helvetica, sans-serif; + margin: 0px; + margin-bottom: 5px; + padding: 0px; } - a:visited { - color:#666666; - text-decoration: underline; - } - a:hover { - color:#0080D0; - text-decoration: underline; - } /** * link button */ .button, a.button { cursor: pointer; - border: 1px solid #000000; - background-color: #9ACD32; - color: #000000; - padding: 5px; - text-decoration: none; + border: 0; font-size: 10pt; + text-decoration: underline; } - a.button { /* adjust height to same as html element button, it works at least in firefox */ - padding: 6px; - padding-bottom: 7px; - } - - .button:visited, a.button:visited { - color: #000000; - } - .button:hover, a.button:hover { - color: #00FF00; - } /** @@ -103,7 +94,7 @@ padding: 0px; } #main { - padding: 5px; + padding: 10px; } /** @@ -148,7 +139,37 @@ border: 1px solid #f09; } +/** + * folder (used in home view, and maybe as subfolders) + * background-color and border-color are set in colorsettings.php + */ + .div_folder { + margin: 2px; + margin-left: 15px; + margin-bottom: 15px; + width: 700px; + } + + .div_folder_text { + height: 140px; + padding: 5px; + } + + .img_folder_thumbnail { + float: left; + + margin-left: 20px; + margin-right: 30px; + margin-top: 5px; + + width: 130px; + height: 130px; + + border: 0; + } + + /** * menu */ @@ -279,33 +300,4 @@ * end menu */ -/** - * round corners stuff - * (the color and image settings are in the file "colorsettings.php" - */ - img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; - } - - .roundAlphabottomInner { - margin: 0px; - padding: 0px; - margin-left: 15px; - margin-right: 15px; - height: 15px; - } - - img.AlphaCorner { - position: absolute; - top: 0px; - left: 0px; - width: 15px; - height: 15px; - border: none; - display: block !important; - } - --> \ No newline at end of file Modified: trunk/linpha2/templates/default/themes/default/css/home.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/home.css 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/themes/default/css/home.css 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,21 +1,4 @@ -#main { - margin-left: 10px; -} - - -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; } @@ -35,33 +18,7 @@ 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: 130px; - - border: 0; +.div_folder a +{ + text-decoration: none; } \ No newline at end of file Modified: trunk/linpha2/templates/default/themes/default/css/view_img.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/view_img.css 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/themes/default/css/view_img.css 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,14 +1,11 @@ #navigation { -/* margin: 10px 237px 10px 10px;*/ margin: 10px 10px 10px 10px; } #divmain { -/* margin: 10px 237px 10px 10px;*/ margin: 10px 10px 10px 10px; } #main { -/* text-align: center;*/ position: relative; } @@ -65,7 +62,6 @@ } .thumbnavi_prevnextthumb { - /*border: 1px solid #000000;*/ float: left; width: 80px; height: 80px; @@ -73,7 +69,6 @@ } .thumbnavi_currentthumb { - /*border: 1px solid #000000;*/ position: absolute; left: 50%; margin: 2px; @@ -98,17 +93,12 @@ * comment stuff */ .add_comment { -/* color: #036;*/ width: 600px; text-align: left; margin-left: 100px; font-size: 8pt; } - .add_comment input, .add_comment textarea { - background-color: #d5eeff; - border: 1px solid grey; - } - + .comments { width: 70%; margin-left: 100px; @@ -117,7 +107,6 @@ .comments hr { padding: 0px; margin: 0px; -/* color: #f00;*/ background-color: #f00; height: 1px; } @@ -179,4 +168,20 @@ border: 20px solid white; } +/** + * round corners stuff (only for alpha -> currently only slideshow...) (@todo) + */ + .roundAlphabottomInner { + margin: 0px; + padding: 0px; + margin-left: 15px; + margin-right: 15px; + height: 15px; + } + + img.AlphaCorner { + position: absolute; + top: 0px; + left: 0px; + } Modified: trunk/linpha2/templates/default/themes/default/css/view_thumb.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/view_thumb.css 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/themes/default/css/view_thumb.css 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,18 +1,5 @@ /** - * not used anymore - - need this to calculate heigh of main div - * if you're gettings scrollbars, adjust the height! - * height: 12.52em; dosent work, it increases to much if we adjust browsers font-size - -#spacer_height { - height: 208px; - position: absolute; - visibility: hidden; -}*/ - -/** * page nr */ #divpage_nr { Deleted: trunk/linpha2/templates/default/themes/default/css/view_thumbdetail.css =================================================================== --- trunk/linpha2/templates/default/themes/default/css/view_thumbdetail.css 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/themes/default/css/view_thumbdetail.css 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,39 +0,0 @@ -/* deprecated */ - -#navigation { - background-color: #d5fcf4; - padding: 0; - border: 1px solid #0c9; - margin: 10px 10px 10px 237px; -} - -.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/default/view_albcomment.html.php =================================================================== --- trunk/linpha2/templates/default/view_albcomment.html.php 2006-10-27 21:10:23 UTC (rev 4603) +++ trunk/linpha2/templates/default/view_albcomment.html.php 2006-10-28 16:34:50 UTC (rev 4604) @@ -1,19 +1,19 @@ <div id="divmain"> - <?php echo $GLOBALS['linpha']->template->divRoundCorners('top'); ?> + <?php echo $tpl->divRoundCorners('top'); ?> <div id="main"> - <form action="<?php echo $GLOBALS['linpha']->template->URL_full; ?>" method="POST"> + <form action="<?php echo $tpl->URL_full; ?>" method="POST"> Author: - <input type="text" name="author" value="<?php echo $GLOBALS['linpha']->template->output['comment_author']; ?>" size="40" maxlength="255" /> + <input type="text" name="author" value="<?php echo $tpl->output['comment_author']; ?>" size="40" maxlength="255" /> <br /> - <textarea name="comment" rows="10" cols="50"><?php echo $GLOBALS['linpha']->template->output['comment_text']; ?></textarea> + <textarea name="comment" rows="10" cols="50"><?php echo $tpl->output['comment_text']; ?></textarea> <br /> <input type="hidden" name="cmd" value="add_comment" /> - <a class="button" href="<?php echo $GLOBALS['linpha']->template->URL_full.'&view=thumb'; ?>">... [truncated message content] |