Index: /extensions/Random_Header/admin/rh_admin.css =================================================================== --- /extensions/Random_Header/admin/rh_admin.css (revision 7357) +++ /extensions/Random_Header/admin/rh_admin.css (revision 7358) @@ -1,10 +1,3 @@ -.randomHeader_fieldset legend{color:#ff3363;font-weight:bold;} -.randomHeader_fieldset{overflow-x:auto;} -.rh_input{width:335px;} -.rhconf{float:left;} -.rhactive{background-color:lightgreen;} -.rhinactive{border-color:red;} - - +.randomHeader_fieldset legend{color:#ff3363;font-weight:bold;} .black_overlay{ Index: /extensions/Random_Header/admin/rh_admin.php =================================================================== --- /extensions/Random_Header/admin/rh_admin.php (revision 7357) +++ /extensions/Random_Header/admin/rh_admin.php (revision 7358) @@ -6,8 +6,19 @@ include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php'); +// delete conf for deleted themes (but not for deactivated themes) +foreach ($me->rh_config as $theme_in_rh_conf => $test) { + if (!file_exists($conf['themes_dir'].'/'.$theme_in_rh_conf.'/'.'themeconf.inc.php')) { + unset($me->rh_config[$theme_in_rh_conf]); + } +} +$me->save_config(); + + $template->set_filenames( array('plugin_admin_content' => dirname(__FILE__).'/rh_admin.tpl') ); +$template->assign("RH_VERSION",RH_VERSION); +$template->assign("RH_confpanel",realpath( dirname(__FILE__).'/rh_theme_conf.tpl')); $rhthemes = new themes(); - +$rh_vierge=0; foreach (get_pwg_themes() as $pwg_templateID => $pwg_template) { @@ -21,9 +32,10 @@ $me->rh_config[$pwg_templateID]['mode_background'] = (isset( $_POST[$pwg_templateID.'mode_background'] )) ? $_POST[$pwg_templateID.'mode_background'] : 'off' ; $me->save_config(); + } $rhscreenshot=(file_exists(PHPWG_THEMES_PATH.$pwg_templateID . '/screenshot.png')) ? PHPWG_THEMES_PATH.$pwg_templateID . '/screenshot.png' : PHPWG_ROOT_PATH.'admin/themes/'.$conf['admin_theme'].'/images/missing_screenshot.png'; - $rhthemboxclass=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? 'themeDefault' : 'toto'; - + $rhthemboxclass=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? 'themeDefault' : ''; + $rh_vierge=($me->rh_config[$pwg_templateID]['selected_cat']!=0) ? $rh_vierge+1 : $rh_vierge; $template->append('rhthemes', array( 'CURRENT_THEME_NAME'=> $pwg_template, @@ -40,5 +52,5 @@ )); } - +$template->assign('rh_vierge',$rh_vierge); display_select_cat_wrapper( 'SELECT id,name,uppercats,global_rank FROM '.CATEGORIES_TABLE, Index: /extensions/Random_Header/admin/rh_admin.tpl =================================================================== --- /extensions/Random_Header/admin/rh_admin.tpl (revision 7357) +++ /extensions/Random_Header/admin/rh_admin.tpl (revision 7358) @@ -3,176 +3,41 @@ {/html_head} - -
{'rh_description'|@translate}
{'rh_aide'|@translate}
Index: /extensions/Random_Header/admin/rh_theme_conf.tpl =================================================================== --- /extensions/Random_Header/admin/rh_theme_conf.tpl (revision 7358) +++ /extensions/Random_Header/admin/rh_theme_conf.tpl (revision 7358) @@ -0,0 +1,57 @@ +