|
From: Jon O. <jon...@us...> - 2007-06-04 21:14:14
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14991/admin Modified Files: admin_mx_page_cp.php admin_mx_portal.php Log Message: Added custom styles for pages Added style selection for the adminCP Index: admin_mx_portal.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_portal.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** admin_mx_portal.php 13 May 2007 20:33:03 -0000 1.31 --- admin_mx_portal.php 4 Jun 2007 21:14:01 -0000 1.32 *************** *** 39,42 **** --- 39,45 ---- $new['portal_url'] = $mx_request_vars->post('portal_url', MX_TYPE_NO_TAGS, ''); $new['portal_phpbb_url'] = $mx_request_vars->post('portal_phpbb_url', MX_TYPE_NO_TAGS, ''); + $new['default_admin_style'] = $mx_request_vars->post('mx_default_admin_style', MX_TYPE_NO_TAGS, '-1'); + $new['default_style'] = $mx_request_vars->post('mx_default_style', MX_TYPE_NO_TAGS, '-1'); + $new['override_user_style'] = $mx_request_vars->post('mx_override_user_style', MX_TYPE_NO_TAGS, '1'); $new['overall_header'] = $mx_request_vars->post('overall_header', MX_TYPE_NO_TAGS, 'overall_header.tpl'); $new['overall_footer'] = $mx_request_vars->post('overall_footer', MX_TYPE_NO_TAGS, 'overall_footer.tpl'); *************** *** 51,54 **** --- 54,60 ---- portal_url = '" . str_replace("\'", "''", $new['portal_url']) . "', portal_phpbb_url = '" . str_replace("\'", "''", $new['portal_phpbb_url']) . "', + default_admin_style = '" . str_replace("\'", "''", $new['default_admin_style']) . "', + default_style = '" . str_replace("\'", "''", $new['default_style']) . "', + override_user_style = '" . str_replace("\'", "''", $new['override_user_style']) . "', overall_header = '" . str_replace("\'", "''", $new['overall_header']) . "', overall_footer = '" . str_replace("\'", "''", $new['overall_footer']) . "', *************** *** 90,93 **** --- 96,109 ---- $phpbb_server_name = $board_config['server_name']; + // Default to phpBB default + $portal_config['default_admin_style'] = $portal_config['default_admin_style'] == -1 ? $board_config['default_style'] : $portal_config['default_admin_style']; + $portal_config['default_style'] = $portal_config['default_style'] == -1 ? $board_config['default_style'] : $portal_config['default_style']; + $portal_config['override_user_style'] = $portal_config['override_user_style'] == -1 ? $board_config['override_user_style'] : $portal_config['override_user_style']; + + $style_select = mx_style_select($portal_config['default_style'], 'mx_default_style'); + $style_admin_select = mx_style_select($portal_config['default_admin_style'], 'mx_default_admin_style'); + $override_user_style_yes = ( $portal_config['override_user_style'] ) ? "checked=\"checked\"" : ""; + $override_user_style_no = ( !$portal_config['override_user_style'] ) ? "checked=\"checked\"" : ""; + $template->assign_vars(array( "S_CONFIG_ACTION" => append_sid("admin_mx_portal.$phpEx"), *************** *** 100,103 **** --- 116,120 ---- "L_GENERAL_SETTINGS" => $lang['Portal_General_settings'], "L_GENERAL_CONFIG_INFO" => $lang['Portal_General_config_info'] . "<br />" . $lang['Portal_General_config_info_explain'], + "L_STYLE_SETTINGS" => $lang['Portal_Style_settings'], "L_PORTAL_NAME" => $lang['Portal_Name'], *************** *** 145,148 **** --- 162,175 ---- "MX_USE_CACHE" => $portal_config['mx_use_cache'], + "L_DEFAULT_STYLE" => $lang['Default_style'], + "L_DEFAULT_ADMIN_STYLE" => $lang['Default_admin_style'], + "L_OVERRIDE_STYLE" => $lang['Override_style'], + "L_OVERRIDE_STYLE_EXPLAIN" => $lang['Override_style_explain'], + + "STYLE_SELECT" => $style_select, + "ADMIN_STYLE_SELECT" => $style_admin_select, + "OVERRIDE_STYLE_YES" => $override_user_style_yes, + "OVERRIDE_STYLE_NO" => $override_user_style_no, + "L_MX_MOD_REWRITE" => $lang['Mx_mod_rewrite'], "L_MX_MOD_REWRITE_EXPLAIN" => $lang['Mx_mod_rewrite_explain'], Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** admin_mx_page_cp.php 13 May 2007 20:33:03 -0000 1.22 --- admin_mx_page_cp.php 4 Jun 2007 21:14:01 -0000 1.23 *************** *** 251,254 **** --- 251,257 ---- 'L_PAGE_ID' => empty($lang['Page_Id']) ? "Page Id" : $lang['Page_Id'], 'L_PAGE_ICON' => empty($lang['Page_icon']) ? "Page Icon" : $lang['Page_icon'], + "L_DEFAULT_STYLE" => empty($lang['Default_page_style']) ? "Default page style" : $lang['Default_page_style'], + "L_OVERRIDE_STYLE" => empty($lang['Override_page_style']) ? "Override page style" : $lang['Override_page_style'], + "L_OVERRIDE_STYLE_EXPLAIN" => empty($lang['Override_page_style_explain']) ? "Override page style explain" : $lang['Override_page_style_explain'], 'L_PAGE_HEADER' => empty($lang['Page_header']) ? "Page header file" : $lang['Page_header'], 'L_PAGE_FOOTER' => empty($lang['Page_footer']) ? "Page footer file" : $lang['Page_footer'], *************** *** 670,673 **** --- 673,682 ---- $navigation_block_list = get_list_formatted('block_list', $page_rows[$page_count]['navigation_block'], 'navigation_block', 'mx_menu_nav.php'); + $style_select = mx_style_select($page_rows[$page_count]['default_style'], 'mx_default_style', 'templates', true); + + $override_user_style_yes = !$new_page ? ( $page_rows[$page_count]['override_user_style'] == 1 ? "checked=\"checked\"" : "" ) : ""; + $override_user_style_no = !$new_page ? ( $page_rows[$page_count]['override_user_style'] == 0 ? "checked=\"checked\"" : "" ) : ""; + $override_user_style_default = !$new_page ? ( $page_rows[$page_count]['override_user_style'] == -1 ? "checked=\"checked\"" : "" ) : "checked=\"checked\""; + $icon_tmp = ( !empty($page_icon) && $page_icon != 'none' && file_exists($mx_root_path . TEMPLATE_ROOT_PATH . "images/page_icons/" . $page_icon)) ? '<img align="absmiddle" src="' . PORTAL_URL . TEMPLATE_ROOT_PATH . "images/page_icons/" . $page_icon . '" />' : ''; *************** *** 753,756 **** --- 762,773 ---- // + // Style + // + "STYLE_SELECT" => $style_select, + "OVERRIDE_STYLE_YES" => $override_user_style_yes, + "OVERRIDE_STYLE_NO" => $override_user_style_no, + "OVERRIDE_STYLE_DEFAULT" => $override_user_style_default, + + // // IP filter // |