[Linpha-cvs] SF.net SVN: linpha: [4597] trunk/linpha2
Status: Inactive
Brought to you by:
bzrudi
From: <fan...@us...> - 2006-10-27 19:28:45
|
Revision: 4597 http://svn.sourceforge.net/linpha/?rev=4597&view=rev Author: fangehrn Date: 2006-10-27 12:28:12 -0700 (Fri, 27 Oct 2006) Log Message: ----------- 2006-10-27 flo * working on admin settings need to reset database Modified Paths: -------------- trunk/linpha2/ChangeLog 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.class.php trunk/linpha2/lib/classes/linpha.functions.php trunk/linpha2/lib/classes/linpha.imgview.class.php trunk/linpha2/lib/classes/linpha.template.class.php trunk/linpha2/templates/default/colorsettings.php trunk/linpha2/templates/default/layouts/default/css/global.css Modified: trunk/linpha2/ChangeLog =================================================================== --- trunk/linpha2/ChangeLog 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/ChangeLog 2006-10-27 19:28:12 UTC (rev 4597) @@ -1,3 +1,7 @@ +2006-10-27 flo + * working on admin settings + need to reset database + 2006-10-26 flo * playing around with different style colors, currently a blue one... * created gdlib script which will generate the nice round corners on the fly Modified: trunk/linpha2/admin/settings_layout.php =================================================================== --- trunk/linpha2/admin/settings_layout.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/admin/settings_layout.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -7,6 +7,7 @@ } $array_menu = Array( + 'layout' => Array('name' => 'Layout', 'link' => 'settings_layout_layout'), 'home' => Array('name' => 'Home Site', 'link' => 'settings_layout_home'), 'thumb' => Array('name' => 'Thumb View', 'link' => 'settings_layout_thumb'), 'image' => Array('name' => 'Image View', 'link' => 'settings_layout_image'), @@ -21,6 +22,30 @@ switch($cat3) { +case 'layout': + + if(isset($_POST['cmd']) && $_POST['cmd']=='saveconfig') + { + $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' + )); + } + + print_r(LinAdmin::getTemplates()); + + $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_layout'),'sys_style_layout_layout',$LinAdmin->option_value_system['sys_style_layout_layout'],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']); + + break; case 'home': $welcometxt = i18n("Add Your Own Welcome Text Here"); $data = $GLOBALS['linpha']->db->GetRow("SELECT meta_comment FROM ".PREFIX."meta_comments WHERE md5sum='welcometext'"); Modified: trunk/linpha2/index.php =================================================================== --- trunk/linpha2/index.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/index.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -9,6 +9,7 @@ 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-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/install/sql/sql.data.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -27,6 +27,7 @@ */ $options = array( 'sys_db_version' => '2', + 'sys_im_bracket_support' => $_SESSION['sys_im_bracket_support'], 'sys_im_imagemagick_path' => $_SESSION['sys_im_convert_path'], 'sys_im_use_imagemagick' => $_SESSION['sys_im_use_convert'], @@ -48,10 +49,9 @@ 'sys_basket_mail_max_size' => (1024*1024*2), 'sys_basket_download_limit' => '0', - 'sys_style_dates' => '%a %m/%d/%Y', - 'sys_style_times' => '%I:%M:%S %p', - 'sys_style_sortorder' => 'nameasc', - 'sys_style_template' => 'default', + 'sys_style_datetime_dates' => '%a %m/%d/%Y', + 'sys_style_datetime_times' => '%I:%M:%S %p', + 'sys_style_home_showbrowsebydate' => '1', 'sys_style_home_nrrandomimages' => '4', 'sys_style_home_newimagesnr' => '4', @@ -59,6 +59,7 @@ 'sys_style_home_showalbums' => '1', 'sys_style_home_usedefaultwelcometext' => '1', 'sys_style_home_firstsortorder' => 'nameasc', + 'sys_style_thumb_size_max' => '200', 'sys_style_thumb_size_display' => '150', 'sys_style_thumb_showsubfoldersseparate' => '0', @@ -66,11 +67,22 @@ 'sys_style_thumb_selectnrimages' => 'auto,10,25,50,100,200,all', 'sys_style_thumb_nojsnrrows' => '3', 'sys_style_thumb_nojsnrcols' => '4', + 'sys_style_image_quality' => '75', 'sys_style_image_width' => '700', '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_layout' => 'default', + 'sys_style_layout_template' => 'default', + 'sys_style_layout_title' => 'Linpha 2.0', + + 'sys_style_others_sortorder' => 'nameasc', + + 'sys_user_autologin' => '1', 'plugins_filemanager_enable' => '0', @@ -80,7 +92,7 @@ $options_user_overridable = Array( 'sys_lang', 'sys_lang_autolang', - 'sys_style_sortorder', + 'sys_style_others_sortorder', 'sys_style_template', 'sys_style_home_showbrowsebydate', 'sys_style_home_nrrandomimages', Modified: trunk/linpha2/lib/classes/linpha.admin.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/lib/classes/linpha.admin.class.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -48,21 +48,31 @@ 'sys_image_exif' => "Use EXIF", 'sys_image_iptc' => "Use IPTC", 'sys_image_xmp' => "Use XMP", + 'sys_lang' => "Language", + 'sys_lang_autolang' => "Autodetection of language", + 'sys_style_home_nrrandomimages' => "Nr Of Random Images (0 to disable)", 'sys_style_home_showbrowsebydate' => "Show Browse By Date", 'sys_style_home_showalbums' => "Show Albums On Home Site", 'sys_style_home_firstsortorder' => "Sort Order Of First Level Albums", - 'sys_style_thumb_showsubfoldersseparate' => "Show Subfolders Separate", + 'sys_style_image_nrprevnextthumbs' => "Nr Of Previous/Next Thumbnails", - 'sys_lang' => "Language", - 'sys_lang_autolang' => "Autodetection of language", 'sys_style_image_width' => "Max Image Width", 'sys_style_image_height' => "Max Image Height", - 'sys_style_sortorder' => "Sort order", - 'sys_style_template' => "Template", + + 'sys_style_thumb_showsubfoldersseparate' => "Show Subfolders Separate", 'sys_style_thumb_nojsnrcols' => "Nr Cols if Javascript deactivated", 'sys_style_thumb_nojsnrrows' => "Nr Rows if Javascript deactivated", - 'sys_style_thumb_size_display' => "Thumb size" + 'sys_style_thumb_size_display' => "Thumb size", + + 'sys_style_others_sortorder' => "Sort order", + + 'sys_style_layout_title' => "Linpha Title", + 'sys_style_layout_template' => "Template", + 'sys_style_layout_layout' => "Layout", + 'sys_style_layout_bodybgcolor' => "Main Background Color", + 'sys_style_layout_elembgcolor' => "Elements Background Color", + 'sys_style_layout_fontcolor' => "Fonts Color" ); } @@ -304,6 +314,34 @@ } } +function getTemplates() +{ + $templatesdir = LINPHA_DIR."/templates/"; + + $file_handle = opendir($templatesdir); + $all_themes = array(); + + while( ($file = readdir($file_handle)) !== false ) + { + echo $file.'<br />'; + if(is_dir($templatesdir.$file)) + { + $all_themes[$file] = $file; + } + } + + closedir($file_handle); + + /* Sort theme files aphabetically */ + asort($all_themes); + + return $all_themes; +} + +function getThemes($template) +{ +} + } // end class LinAdmin ?> \ No newline at end of file Modified: trunk/linpha2/lib/classes/linpha.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.class.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/lib/classes/linpha.class.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -65,7 +65,6 @@ function __construct() { $this->sql = new linSql(); - $this->template = new linTemplate(); } } // end class Linpha Modified: trunk/linpha2/lib/classes/linpha.functions.php =================================================================== --- trunk/linpha2/lib/classes/linpha.functions.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/lib/classes/linpha.functions.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -575,7 +575,7 @@ function getDateFormat() { if( i18n('special_date_format') == 'special_date_format') { - return $GLOBALS['linpha']->sql->config->value['sys_style_dates']; + return $GLOBALS['linpha']->sql->config->value['sys_style_datetime_dates']; } else { return i18n('special_date_format'); } @@ -593,7 +593,7 @@ function getTimeFormat() { if( i18n('special_time_format') == 'special_time_format') { - return $GLOBALS['linpha']->sql->config->value['sys_style_times']; + return $GLOBALS['linpha']->sql->config->value['sys_style_datetime_times']; } else { return i18n('special_time_format'); } Modified: trunk/linpha2/lib/classes/linpha.imgview.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/lib/classes/linpha.imgview.class.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -50,7 +50,7 @@ */ function setCurrentView($modulename) { - $this->orderby = getSqlSortOrder($GLOBALS['linpha']->sql->config->value['sys_style_sortorder']); + $this->orderby = getSqlSortOrder($GLOBALS['linpha']->sql->config->value['sys_style_others_sortorder']); if(isset($_GET['id']) && $_GET['id'] != 0) { Modified: trunk/linpha2/lib/classes/linpha.template.class.php =================================================================== --- trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/lib/classes/linpha.template.class.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -36,11 +36,12 @@ function __construct() { - $this->template_name = 'default'; - $this->layout_name = 'default'; - $this->bgcolor = '87cefa'; // without '#' - $this->bodybgcolor = 'dddddd'; // without '#' - $this->linpha_title = "Linpha 2.0"; + $this->template_name = $GLOBALS['linpha']->sql->config->value['sys_style_template']; + $this->layout_name = $GLOBALS['linpha']->sql->config->value['sys_style_layout']; + $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.'/layouts/'.$this->layout_name.'/images'; @@ -63,7 +64,7 @@ */ ?> <!-- css includes --> -<link rel='stylesheet' href='<?php echo LINPHA_DIR.'/templates/'.$this->template_name.'/backgroundcolor.php?bgcolor='.$this->bgcolor.'&bodybgcolor='.$this->bodybgcolor; ?>' type='text/css'> +<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.'/layouts/'.$this->layout_name.'/css/global.css'; ?>' type='text/css'> <link rel='stylesheet' href='<?php $this->includeFile('css'); ?>' type='text/css'> <!-- IE hack for the menu--> Modified: trunk/linpha2/templates/default/colorsettings.php =================================================================== --- trunk/linpha2/templates/default/colorsettings.php 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/templates/default/colorsettings.php 2006-10-27 19:28:12 UTC (rev 4597) @@ -22,6 +22,13 @@ } /** + * font color + */ + body { + color: #<?php echo $_GET['fontcolor']; ?>; + } + +/** * rounded corner stuff */ .roundtop { @@ -32,13 +39,6 @@ background: url(../roundcorners.php?color=<?php echo $_GET['bgcolor']; ?>&bgcolor=<?php echo $_GET['bodybgcolor']; ?>&size=15&align=br) no-repeat top right; } - img.corner { - width: 15px; - height: 15px; - border: none; - display: block !important; - } - .roundAlphatop { position: relative; /*background: url(../images/tr_alpha.gif) no-repeat top right;*/ @@ -49,23 +49,4 @@ 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; - } - - - .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/layouts/default/css/global.css =================================================================== --- trunk/linpha2/templates/default/layouts/default/css/global.css 2006-10-26 21:53:15 UTC (rev 4596) +++ trunk/linpha2/templates/default/layouts/default/css/global.css 2006-10-27 19:28:12 UTC (rev 4597) @@ -205,7 +205,7 @@ text-decoration: none; color: #000000; - background: #FFFFFF; + /*background: #FFFFFF;*/ } /** @@ -240,7 +240,7 @@ } #menu ul span { - background: #ffffff url(../images/expand.gif) no-repeat 100% 100%; + background: url(../images/expand.gif) no-repeat 100% 100%; } #menu ul ul span { background: #eeeeee url(../images/expand.gif) no-repeat 100% 100%; @@ -279,5 +279,33 @@ * 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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |