|
From: FlorinCB <ory...@us...> - 2008-10-09 02:41:47
|
Update of /cvsroot/mxbb/core/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16187 Modified Files: mx_functions_style.php Log Message: user_style for phpBB3 backend fixed Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.101 retrieving revision 1.102 diff -C2 -d -r1.101 -r1.102 *** mx_functions_style.php 8 Oct 2008 03:36:38 -0000 1.101 --- mx_functions_style.php 9 Oct 2008 02:41:36 -0000 1.102 *************** *** 582,586 **** $this->data['user_lang'] = $phpBB2->phpbb_ltrim(basename($phpBB2->phpbb_rtrim($this->decode_lang($this->data['user_lang']))), "'"); ! if ( $this->data['session_logged_in'] ) { if ( !empty($this->data['user_lang'])) --- 582,586 ---- $this->data['user_lang'] = $phpBB2->phpbb_ltrim(basename($phpBB2->phpbb_rtrim($this->decode_lang($this->data['user_lang']))), "'"); ! if ( $this->data['user_id'] != ANONYMOUS ) { if ( !empty($this->data['user_lang'])) *************** *** 787,791 **** if ( $this->data['user_id'] != ANONYMOUS && $this->data['user_style'] > 0 ) { ! $style = $mx_request_vars->post('user_style', MX_TYPE_INT, $this->data['user_style']); if ( $theme = $this->_setup_style($style) ) { --- 787,823 ---- if ( $this->data['user_id'] != ANONYMOUS && $this->data['user_style'] > 0 ) { ! // ! // Get Style data. ! // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! $style = $mx_request_vars->post('user_style', MX_TYPE_INT, $this->data['user_style']); ! break; ! case 'phpbb2': ! $style = $mx_request_vars->post('user_style', MX_TYPE_INT, $this->data['user_style']); ! break; ! case 'phpbb3': ! $user_style = $mx_request_vars->post('user_style', MX_TYPE_INT, $this->data['user_style']); ! //If user have other style in mxp then the one from phpBB not to have forum page and modules graphics will be messaed up ! //Anonymouse users should see all block graphic corect ! //Query phpBB style_id corepondent to mxp themes_id ! $sql = "SELECT m.themes_id ! FROM " . MX_THEMES_TABLE . " AS m, " . STYLES_TABLE . " AS s, " . STYLES_TEMPLATE_TABLE . " AS t ! WHERE s.style_id = " . (int) $user_style . " ! AND t.template_path = m.template_name ! AND t.template_id = s.template_id"; ! ! if ($row = $db->sql_fetchrow($db->sql_query($sql))) ! { ! $style = $row['themes_id']; //User style ! } ! else ! { ! $style = $portal_config['default_style']; ! } ! break; ! } ! if ( $theme = $this->_setup_style($style) ) { *************** *** 794,798 **** } } - $style = $mx_request_vars->post('default_style', MX_TYPE_INT, $init_style); $theme = $this->_setup_style($style); --- 826,829 ---- |