|
From: FlorinCB <ory...@us...> - 2008-09-01 01:12:26
|
Update of /cvsroot/mxbb/mx_smartor/album_mod/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7189/album_mod/includes Modified Files: album_functions.php album_hierarchy_functions.php album_hierarchy_sql.php album_integration.php Log Message: some solved issues Index: album_integration.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_integration.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_integration.php 31 Aug 2008 13:28:56 -0000 1.5 --- album_integration.php 1 Sep 2008 01:11:49 -0000 1.6 *************** *** 45,53 **** // Generate paths for page and standalone mode // ...function based on original function written by Markus :-) if (!function_exists('this_smartor_mxurl')) { ! function this_smartor_mxurl($args = '', $force_standalone_mode = false) { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block, $mx_mod_rewrite; if( $force_standalone_mode || !$is_block ) --- 45,74 ---- // Generate paths for page and standalone mode // ...function based on original function written by Markus :-) + // This has mod_rewrite disabled if (!function_exists('this_smartor_mxurl')) { ! function this_smartor_mxurl($args = '', $force_standalone_mode = false, $new_pageid = '') { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $mx_request_vars; ! global $album_index, $phpEx, $integration_enabled, $is_block, $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) : $mx_request_vars->request('page', MX_TYPE_INT, 1); ! ! $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; ! ! $dynamicId = !empty($dynamic_block) ? ( $non_html_amp ? '&dynamic_block=' : '&dynamic_block=' ) . $dynamic_block : ''; ! if( $force_standalone_mode || !$is_block ) *************** *** 60,64 **** if( is_numeric($page_id) && !empty($page_id) ) { ! $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); } else --- 81,85 ---- if( is_numeric($page_id) && !empty($page_id) ) { ! $mxurl .= '?page=' . $pageid . $dynamicId. ($args == '' ? '' : '&' . $args); } else *************** *** 67,83 **** } } - // Is mod_rewrite enabled? If so, do some url rewrites... - if (is_object($mx_mod_rewrite)) - { - //$mxurl = $mx_mod_rewrite->encode(PORTAL_URL . $mxurl); - } return $mxurl; } } function this_fap_addonurl($args = '', $force_standalone_mode = false) { global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block,$mx_mod_rewrite; $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_smartor/' . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args); --- 88,102 ---- } } return $mxurl; } } + function this_fap_addonurl($args = '', $force_standalone_mode = false) { global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block,$mx_mod_rewrite; + $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; + $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_smartor/' . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args); *************** *** 85,89 **** if (is_object($mx_mod_rewrite)) { ! //$mxurl = $mx_mod_rewrite->encode(PORTAL_URL . $mxurl); } --- 104,108 ---- if (is_object($mx_mod_rewrite)) { ! $mxurl = $mx_mod_rewrite->encode(PORTAL_URL . $mxurl); } *************** *** 91,99 **** } ! function this_fap_portalurl($args = '') { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block, $mx_mod_rewrite; ! if( $integration_enabled != "1" ) { $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_smartor/' . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args); --- 110,127 ---- } ! function this_fap_portalurl($args = '', $force_standalone_mode = false, $new_pageid = '', $modrewrite = 'no') { ! global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $mx_request_vars; ! global $album_index, $phpEx, $integration_enabled, $is_block, $mx_mod_rewrite; ! $mod_rewrite = $mx_request_vars->get('modrewrite', MX_TYPE_INT, $modrewrite); ! ! // Is mod_rewrite enabled? If so, do some url rewrites... ! if ($mod_rewrite === 'no') ! { ! $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; ! } ! ! if($force_standalone_mode || !$integration_enabled) { $mxurl = ( !MXBB_MODULE ) ? $phpbb_root_path . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args) : $mx_root_path . 'modules/mx_smartor/' . 'album.' . $phpEx . ($args == '' ? '' : '?' . $args); *************** *** 102,106 **** { $mxurl = $mx_root_path . 'index.' . $phpEx; ! if( is_numeric($page_id) && !empty($page_id) ) { $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); --- 130,134 ---- { $mxurl = $mx_root_path . 'index.' . $phpEx; ! if($page_id && is_numeric($page_id)) { $mxurl .= '?page=' . $page_id . ($args == '' ? '' : '&' . $args); *************** *** 113,117 **** } // Is mod_rewrite enabled? If so, do some url rewrites... ! if (is_object($mx_mod_rewrite)) { $mxurl = $mx_mod_rewrite->encode(PORTAL_URL . $mxurl); --- 141,145 ---- } // Is mod_rewrite enabled? If so, do some url rewrites... ! if (is_object($mx_mod_rewrite) && !($mod_rewrite === 'no')) { $mxurl = $mx_mod_rewrite->encode(PORTAL_URL . $mxurl); *************** *** 124,127 **** --- 152,157 ---- global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $mx_mod_rewrite; + $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; + if( $force_standalone_mode ) { *************** *** 132,140 **** $mxurl = $mx_root_path . 'index.' . $phpEx . '?page=' . $album_index . ($args == '' ? '' : '&' . $args); } - // Is mod_rewrite enabled? If so, do some url rewrites... - if (is_object($mx_mod_rewrite)) - { - //$mxurl = $mx_mod_rewrite->encode($mxurl); - } return $mxurl; --- 162,165 ---- *************** *** 144,147 **** --- 169,173 ---- global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block; + $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; $mxurl = $mx_root_path . 'index.' . $phpEx; *************** *** 159,162 **** --- 185,190 ---- { global $mx_root_path, $phpbb_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block; + + $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; if( $integration_enabled != "1" ) *************** *** 175,179 **** global $mx_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block, $mx_mod_rewrite; ! if( $force_standalone_mode || !$is_block ) { --- 203,208 ---- global $mx_root_path, $module_root_path, $page_id, $album_index, $phpEx, $integration_enabled, $is_block, $mx_mod_rewrite; ! $args .= ($args == '' ? '' : '&' ) . 'modrewrite=no'; ! if( $force_standalone_mode || !$is_block ) { Index: album_hierarchy_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_hierarchy_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** album_hierarchy_functions.php 13 Mar 2008 08:35:54 -0000 1.3 --- album_hierarchy_functions.php 1 Sep 2008 01:11:48 -0000 1.4 *************** *** 527,530 **** --- 527,531 ---- 'L_MODERATORS' => empty($moderators) ? '' : $lang['Moderators'] . ' :', 'MODERATORS' => $moderators, + 'S_ROW_COUNT'=> $j ) ); Index: album_hierarchy_sql.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_hierarchy_sql.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** album_hierarchy_sql.php 30 Aug 2008 22:33:41 -0000 1.7 --- album_hierarchy_sql.php 1 Sep 2008 01:11:49 -0000 1.8 *************** *** 813,817 **** $info .= '<br />' . $lang['Pic_Image'] . ': <a href="'; ! $info .= ($album_config['fullpic_popup']) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=" . $row['pic_id'], true)) . '" target="_blank">' : mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic" . '&pic_id=' . $row['pic_id'], true)) . '">' ; $info .= $row['pic_title'] . '</a>'; --- 813,817 ---- $info .= '<br />' . $lang['Pic_Image'] . ': <a href="'; ! $info .= ($album_config['fullpic_popup']) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=" . $row['pic_id'], false)) . '" target="_blank">' : mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage" . '&pic_id=' . $row['pic_id'], false)) . '">' ; $info .= $row['pic_title'] . '</a>'; *************** *** 962,966 **** } ! $info .= '<br />' . $lang['Pic_Image'] . ': <a href="' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic" . '?pic_id=' . $row['pic_id'], true)) . '">' . $row['pic_title'] . '</a>'; return $info; --- 962,966 ---- } ! $info .= '<br />' . $lang['Pic_Image'] . ': <a href="' . mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic" . '?pic_id=' . $row['pic_id'], false)) . '">' . $row['pic_title'] . '</a>'; return $info; Index: album_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_functions.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_functions.php 29 Aug 2008 05:58:23 -0000 1.5 --- album_functions.php 1 Sep 2008 01:11:48 -0000 1.6 *************** *** 35,53 **** // Create date/time from format and timezone // ! function album_create_date($format, $gmepoch, $tz) { ! global $board_config, $lang; static $translate; ! ! if ( empty($translate) && $board_config['default_lang'] != 'english' ) { ! @reset($lang['datetime']); ! while ( list($match, $replace) = @each($lang['datetime']) ) ! { ! $translate[$match] = $replace; ! } ! } ! return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); } --- 35,68 ---- // Create date/time from format and timezone // ! function album_create_date($format = false, $gmepoch, $tz, $forcedate = false) { ! global $board_config, $lang, $mx_user; static $translate; ! ! switch (PORTAL_BACKEND) { ! case 'internal': ! ! case 'phpbb2': ! if (empty($translate) && ($mx_user->lang['default_lang'] != 'english')) ! { ! @reset($lang['datetime']); ! while ( list($match, $replace) = @each($lang['datetime']) ) ! { ! $translate[$match] = $replace; ! } ! } ! ! return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); ! ! break; ! ! case 'phpbb3': ! ! return $mx_user->format_date($gmepoch, $format, $forcedate); ! ! break; ! } } *************** *** 157,161 **** function album_get_profile_url($mode, $user_id, $username = false, $user_color = false) { ! global $userdata; switch (PORTAL_BACKEND) --- 172,176 ---- function album_get_profile_url($mode, $user_id, $username = false, $user_color = false) { ! global $lang, $userdata; switch (PORTAL_BACKEND) |