|
From: FlorinCB <ory...@us...> - 2008-12-28 20:43:26
|
Update of /cvsroot/mxbb/mx_contact/includes In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12286/includes Modified Files: contact_constants.php functions_newsletter.php Log Message: fix Index: functions_newsletter.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/functions_newsletter.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_newsletter.php 28 Dec 2008 17:10:01 -0000 1.4 --- functions_newsletter.php 28 Dec 2008 20:43:18 -0000 1.5 *************** *** 62,88 **** } ! function this_contact_mxurl($args = '', $force_standalone_mode = false) { ! global $mx_root_path, $module_root_path, $page_id, $phpEx, $mx_block; ! if($force_standalone_mode) ! { ! $mxurl = $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); ! //$mxurl = PORTAL_URL . 'index.' . $phpEx . ($args == '' ? '' : '?' . $args); ! } ! else ! { ! $mxurl = PORTAL_URL . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } else { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } } - return $mxurl; } --- 62,114 ---- } ! // MX add-on ! // Generate paths for page and standalone mode ! // ...function based on original function written by Markus :-) ! // This has mod_rewrite disabled ! if (!function_exists('this_contact_mxurl')) { ! function this_contact_mxurl($args = '', $force_standalone_mode = false, $new_pageid = '') ! { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $mx_request_vars, $page_id; ! global $phpEx, $integration_enabled, $mx_mod_rewrite; + if (!$mx_request_vars->is_empty_request('dynamic_block')) + { + $dynamic_block = $mx_request_vars->request('dynamic_block', MX_TYPE_INT, ''); + } + elseif (!$mx_request_vars->is_empty_get('dynamic_block')) + { + $dynamic_block = $mx_request_vars->get('dynamic_block', MX_TYPE_INT, 0); + } + { + $dynamic_block = ''; + } + + $pageid = ($new_pageid) ? intval($new_pageid) : ($page_id && is_numeric($page_id)) ? intval($page_id) : $mx_request_vars->request('page', MX_TYPE_INT, 25); ! $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; ! ! $dynamicId = !empty($dynamic_block) ? ( $non_html_amp ? '&dynamic_block=' : '&dynamic_block=' ) . $dynamic_block : ''; ! ! ! if($force_standalone_mode) { ! $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); } else { ! $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($pageid) && !empty($pageid) ) ! { ! $mxurl .= '?page=' . $pageid . $dynamicId. ($args == '' ? '' : '&' . $args); ! } ! else ! { ! $mxurl .= '?page=' . '25' . ($args == '' ? '' : '&' . $args); ! } } + + return $mxurl; } } Index: contact_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_contact/includes/contact_constants.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** contact_constants.php 28 Dec 2008 17:10:01 -0000 1.4 --- contact_constants.php 28 Dec 2008 20:43:18 -0000 1.5 *************** *** 81,89 **** } } if ($mx_request_vars->is_post('submit')) { $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid(this_contact_mxurl()) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); ! mx_message_die(GENERAL_MESSAGE, $message); } } --- 81,140 ---- } } + + // MX add-on + // Generate paths for page and standalone mode + // ...function based on original function written by Markus :-) + // This has mod_rewrite disabled + if (!function_exists('this_contact_mxurl')) + { + function this_contact_mxurl($args = '', $force_standalone_mode = false, $new_pageid = '') + { + global $mx_root_path, $phpbb_root_path, $module_root_path, $mx_request_vars, $page_id; + global $phpEx, $integration_enabled, $mx_mod_rewrite; + + if (!$mx_request_vars->is_empty_request('dynamic_block')) + { + $dynamic_block = $mx_request_vars->request('dynamic_block', MX_TYPE_INT, ''); + } + elseif (!$mx_request_vars->is_empty_get('dynamic_block')) + { + $dynamic_block = $mx_request_vars->get('dynamic_block', MX_TYPE_INT, 0); + } + { + $dynamic_block = ''; + } + + $pageid = ($new_pageid) ? intval($new_pageid) : ($page_id && is_numeric($page_id)) ? intval($page_id) : $mx_request_vars->request('page', MX_TYPE_INT, 25); + + $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; + + $dynamicId = !empty($dynamic_block) ? ( $non_html_amp ? '&dynamic_block=' : '&dynamic_block=' ) . $dynamic_block : ''; + + + if($force_standalone_mode) + { + $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_contact/' . 'contact.' . $phpEx . ($args == '' ? '' : '?' . $args); + } + else + { + $mxurl = $mx_root_path . 'index.' . $phpEx; + if( is_numeric($pageid) && !empty($pageid) ) + { + $mxurl .= '?page=' . $pageid . $dynamicId. ($args == '' ? '' : '&' . $args); + } + else + { + $mxurl .= '?page=' . '25' . ($args == '' ? '' : '&' . $args); + } + } + + return $mxurl; + } + } if ($mx_request_vars->is_post('submit')) { $message = $lang['Contact_updated'] . "<br /><br />" . sprintf($lang['Click_return_contact'], "<a href=\"" . mx_append_sid(this_contact_mxurl()) . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . mx_append_sid("index.$phpEx?pane=right") . "\">", "</a>"); ! //mx_message_die(GENERAL_MESSAGE, $message); } } |