|
From: Florin C B. <ory...@us...> - 2010-04-23 19:40:05
|
Update of /cvsroot/mxbb/core/includes In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv29641 Modified Files: mx_functions_core.php mx_functions_style.php page_header.php template.php Log Message: some fixes I made to the other repository @ mxpcms Committed on the Free edition of March Hare Software CVSNT Server. Upgrade to CVS Suite for more features and support: http://march-hare.com/cvsnt/ Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.120 retrieving revision 1.121 diff -C2 -d -r1.120 -r1.121 *** mx_functions_core.php 23 Oct 2009 07:46:35 -0000 1.120 --- mx_functions_core.php 23 Apr 2010 19:39:53 -0000 1.121 *************** *** 61,65 **** * */ ! function load_backend($portal_backend = false) { global $db, $portal_config, $phpbb_root_path, $mx_root_path; --- 61,65 ---- * */ ! function load_backend() { global $db, $portal_config, $phpbb_root_path, $mx_root_path; *************** *** 76,88 **** $portal_config = $this->obtain_mxbb_config(false); } ! ! // ! // Overwrite Backend ! // ! if ($portal_backend) ! { ! $portal_config['portal_backend'] = $portal_backend; ! } ! // // Load backend --- 76,80 ---- $portal_config = $this->obtain_mxbb_config(false); } ! // // Load backend *************** *** 3101,3105 **** { global $userdata, $mx_root_path, $mx_request_vars, $portal_config, $theme, $lang; ! global $mx_block, $tplEx, $_GET; $this->info = $this->page_config[$this->page_id]['page_info']; --- 3093,3097 ---- { global $userdata, $mx_root_path, $mx_request_vars, $portal_config, $theme, $lang; ! global $mx_block; $this->info = $this->page_config[$this->page_id]['page_info']; *************** *** 3119,3133 **** $this->default_style = $this->info['default_style'] == -1 ? ($portal_config['default_style']) : ( $this->info['default_style'] ); $this->override_user_style = $this->info['override_user_style'] == -1 ? ($portal_config['override_user_style'] == 1 ? 1 : 0 ) : ( $this->info['override_user_style'] == 1 ? 1 : 0 ); ! // ! // Setup demo style ! // ! if (isset($_GET['strip']) && ($_GET['strip'] == true)) ! { ! $this->page_ov_header = 'overall_header_print.'.$tplEx; ! } ! else ! { ! $this->page_ov_header = !empty($this->info['page_header']) ? $this->info['page_header'] : $portal_config['overall_header']; ! } $this->page_ov_footer = !empty($this->info['page_footer']) ? $this->info['page_footer'] : $portal_config['overall_footer']; $this->page_main_layout = !empty($this->info['page_main_layout']) ? $this->info['page_main_layout'] : $portal_config['main_layout']; --- 3111,3116 ---- $this->default_style = $this->info['default_style'] == -1 ? ($portal_config['default_style']) : ( $this->info['default_style'] ); $this->override_user_style = $this->info['override_user_style'] == -1 ? ($portal_config['override_user_style'] == 1 ? 1 : 0 ) : ( $this->info['override_user_style'] == 1 ? 1 : 0 ); ! ! $this->page_ov_header = !empty($this->info['page_header']) ? $this->info['page_header'] : $portal_config['overall_header']; $this->page_ov_footer = !empty($this->info['page_footer']) ? $this->info['page_footer'] : $portal_config['overall_footer']; $this->page_main_layout = !empty($this->info['page_main_layout']) ? $this->info['page_main_layout'] : $portal_config['main_layout']; Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** template.php 4 Nov 2009 09:03:47 -0000 1.38 --- template.php 23 Apr 2010 19:39:53 -0000 1.39 *************** *** 1190,1194 **** function assign_block_vars($blockname, $vararray) { ! if (strstr($blockname, '.') == true) { // Nested block. --- 1190,1194 ---- function assign_block_vars($blockname, $vararray) { ! if (strstr($blockname, '.')) { // Nested block. *************** *** 1202,1223 **** $str = &$str[sizeof($str)-1]; } - - $s_row_count = isset($str[$blocks[$blockcount] . '.']) ? sizeof($str[$blocks[$blockcount] . '.']) : 0; - $vararray['S_ROW_COUNT'] = $s_row_count; - - // Assign S_FIRST_ROW - if( !$s_row_count) - { - $vararray['S_FIRST_ROW'] = true; - } - - // Now the tricky part, we always assign S_LAST_ROW and remove the entry before - // This is much more clever than going through the complete template data on display (phew) - $vararray['S_LAST_ROW'] = true; - if( $s_row_count > 0) - { - unset($str[$blocks[$blockcount] . '.'][($s_row_count - 1)]['S_LAST_ROW']); - } - // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given --- 1202,1205 ---- *************** *** 1227,1245 **** else { - $s_row_count = (isset($this->_tpldata[$blockname . '.'])) ? sizeof($this->_tpldata[$blockname .'.']) : 0; - $vararray['S_ROW_COUNT'] = $s_row_count; - - // Assign S_FIRST_ROW - if (!$s_row_count) - { - $vararray['S_FIRST_ROW'] = true; - } - - // We always assign S_LAST_ROW and remove the entry before - $vararray['S_LAST_ROW'] = true; - if ($s_row_count > 0) - { - unset($this->_tpldata[$blockname . '.'][($s_row_count - 1)]['S_LAST_ROW']); - } // Top-level block. // Add a new iteration to this block with the variable assignments --- 1209,1212 ---- Index: page_header.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_header.php,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** page_header.php 23 Oct 2009 07:46:36 -0000 1.71 --- page_header.php 23 Apr 2010 19:39:53 -0000 1.72 *************** *** 444,449 **** $meta_str .= '<meta name="author" content="' . $author .'" />' . "\n"; $meta_str .= '<meta name="copyright" content="' . $copyright .'" />' . "\n"; - $meta_str .= '<meta name="imagetoolbar" content="' . $imagetoolbar .'" />' . "\n"; - $meta_str .= '<meta name="distribution" content="' . $distribution .'" />' . "\n"; $meta_str .= '<meta name="keywords" content="' . $keywords .'" />' . "\n"; $meta_str .= '<meta name="description" lang="' . $langcode .'" content="'. $description .'" />' . "\n"; --- 444,447 ---- Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** mx_functions_style.php 1 Jan 2010 17:39:20 -0000 1.115 --- mx_functions_style.php 23 Apr 2010 19:39:53 -0000 1.116 *************** *** 659,663 **** global $userdata, $board_config, $portal_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; ! global $mx_page, $mx_request_vars; // --- 659,663 ---- global $userdata, $board_config, $portal_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $mx_root_path, $db; ! global $mx_page, $mx_request_vars, $_GET, $_COOKIE; // *************** *** 689,692 **** --- 689,707 ---- $init_override = 1; } + + if (!empty($_GET['style']) || isset($_COOKIE['style'])) + { + global $SID, $_EXTRA_URL; + + $style = phpBB3::request_var('style', 0); + $SID .= '&style=' . $style; + $_EXTRA_URL = array('style=' . $style); + + if ( $theme = $this->_setup_style($style) ) + { + setcookie('style', $style, (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); + return; + } + } // *************** *** 700,706 **** setcookie('demo_theme', $style, (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); return; ! } } ! // // Setup MXP Style --- 715,721 ---- setcookie('demo_theme', $style, (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']); return; ! } } ! // // Setup MXP Style |