You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:39
|
Update of /cvsroot/mxbb/core/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/language/lang_english Modified Files: lang_main.php Log Message: updated mxBB search block and utilities Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/core/language/lang_english/lang_main.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** lang_main.php 9 Dec 2005 23:22:03 -0000 1.23 --- lang_main.php 13 Dec 2005 20:04:27 -0000 1.24 *************** *** 100,103 **** --- 100,104 ---- $lang['Mx_search_kb'] = "KB articles"; $lang['Mx_search_google'] = "Google"; + $lang['Mx_new_search'] = 'New Search'; $lang['Block_updated_by'] = "Updated by "; |
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:38
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/modules/mx_coreblocks Modified Files: mx_search.php mx_site_log.php Log Message: updated mxBB search block and utilities Index: mx_site_log.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_site_log.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_site_log.php 23 Oct 2005 18:48:21 -0000 1.5 --- mx_site_log.php 13 Dec 2005 20:04:27 -0000 1.6 *************** *** 25,28 **** --- 25,35 ---- // + // Block Info + // + // This block does 3 db queries to find latest standard, dynamic and sub block. Then it sorts the result arrays and display by offset. + // - not very efficient atm + // - to be optimized + + // // Read Block Settings // *************** *** 34,39 **** $template->set_filenames( array( "sitelog" => "mx_site_log.tpl" ) ); // Read block Configuration ! $log_numberOfEvents = $mx_block->get_parameters( 'numOfEvents' ) > 0 ? intval( $mx_block->get_parameters( 'numOfEvents' ) ) : '5'; $log_filter_time = $mx_block->get_parameters( 'log_filter_date' ); // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, --- 41,47 ---- $template->set_filenames( array( "sitelog" => "mx_site_log.tpl" ) ); + // // Read block Configuration ! // $log_numberOfEvents = $mx_block->get_parameters( 'numOfEvents' ) > 0 ? intval( $mx_block->get_parameters( 'numOfEvents' ) ) : '5'; $log_filter_time = $mx_block->get_parameters( 'log_filter_date' ); // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, *************** *** 55,62 **** $searchset = ''; - while ( $page_row = $db->sql_fetchrow( $result )) { // Page auth $page_auth_ary = array(); $page_auth_ary = page_auth( AUTH_VIEW, $userdata, $page_row['auth_view'], $page_row['auth_view_group'] ); --- 63,71 ---- $searchset = ''; while ( $page_row = $db->sql_fetchrow( $result )) { + // // Page auth + // $page_auth_ary = array(); $page_auth_ary = page_auth( AUTH_VIEW, $userdata, $page_row['auth_view'], $page_row['auth_view_group'] ); *************** *** 115,141 **** } // Generate page_blocks data // Find all Block Page_ids $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, blk.block_id, blk.block_title, blk.block_time, blk.block_editor_id FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col, ! " . BLOCK_TABLE . " blk WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! ! AND bct.block_id = blk.block_id ! ! AND blk.show_stats = '1' ! AND blk.block_time <> '' ! AND blk.block_editor_id > 0 ! AND col.page_id IN ($valid_page_ids)"; if ( $log_time_filter_lo != 'no' && !empty($log_time_filter_lo) ) ! { ! $sql .= " AND blk.block_time > " . $log_time_filter_lo ; ! } if ( !$result = $db->sql_query( $sql ) ) --- 124,152 ---- } + // // Generate page_blocks data + // + // // Find all Block Page_ids + // $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, blk.block_id, blk.block_title, blk.block_time, blk.block_editor_id FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col, ! " . BLOCK_TABLE . " blk WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! AND bct.block_id = blk.block_id ! AND blk.show_stats = '1' ! AND blk.block_time <> '' ! AND blk.block_editor_id > 0 ! AND col.page_id IN ($valid_page_ids)"; if ( $log_time_filter_lo != 'no' && !empty($log_time_filter_lo) ) ! { ! $sql .= " AND blk.block_time > " . $log_time_filter_lo ; ! } if ( !$result = $db->sql_query( $sql ) ) *************** *** 144,162 **** } ! $postrow_blocks = $db->sql_fetchrowset( $result ); ! //echo(var_export($postrow_blocks) . '<br>'. '<br>'); // Find all dynamic block Page_ids $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, blk.block_id, blk.block_title, blk.block_time, blk.block_editor_id, nav.menu_name ! FROM " . PAGE_TABLE . " pag, " . BLOCK_TABLE . " blk, " . MENU_NAV_TABLE . " nav, " . MENU_CAT_TABLE . " nac ! ! WHERE pag.page_id = nav.page_id ! AND nac.cat_id = nav.cat_id AND nav.block_id = blk.block_id - AND blk.show_stats = '1' AND blk.block_time <> '' --- 155,175 ---- } ! $postrow_blocks = array(); ! if( $total_rows = $db->sql_numrows($result) ) ! { ! $postrow_blocks = $db->sql_fetchrowset( $result ); ! } + // // Find all dynamic block Page_ids + // $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, blk.block_id, blk.block_title, blk.block_time, blk.block_editor_id, nav.menu_name ! FROM " . PAGE_TABLE . " pag, " . BLOCK_TABLE . " blk, " . MENU_NAV_TABLE . " nav, " . MENU_CAT_TABLE . " nac ! WHERE pag.page_id = nav.page_id AND nac.cat_id = nav.cat_id AND nav.block_id = blk.block_id AND blk.show_stats = '1' AND blk.block_time <> '' *************** *** 165,171 **** if ( $log_time_filter_lo != 'no' && !empty($log_time_filter_lo) ) ! { ! $sql .= " AND blk.block_time > " . $log_time_filter_lo ; ! } if ( !$result = $db->sql_query( $sql ) ) --- 178,184 ---- if ( $log_time_filter_lo != 'no' && !empty($log_time_filter_lo) ) ! { ! $sql .= " AND blk.block_time > " . $log_time_filter_lo ; ! } if ( !$result = $db->sql_query( $sql ) ) *************** *** 174,187 **** } ! $postrow_dynamic = $db->sql_fetchrowset( $result ); ! //echo(var_export($postrow_dynamic) . '<br>'. '<br>'); ! // Merge common and dynamic blocks ! $postrow = array_merge($postrow_blocks, $postrow_dynamic); ! //echo(var_export($postrow) . '<br>'. '<br>'); // Sort by block_time ! $postrow = qsort_multiarray($postrow, $num = 'block_time', $order = "DESC", $left = 0, $right = -1); ! //echo(var_export($postrow) . '<br>'. '<br>'); $dynamic_ids = ''; --- 187,241 ---- } ! $postrow_dynamic = array(); ! if( $total_rows = $db->sql_numrows($result) ) ! { ! $postrow_dynamic = $db->sql_fetchrowset( $result ); ! } ! // ! // Find all subblock page_ids ! // ! $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, blk.block_id, blk.block_title, blk.block_time, blk.block_editor_id ! FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col, ! " . BLOCK_TABLE . " blk, ! " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, ! " . PARAMETER_TABLE . " par ! WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! AND bct.block_id = sys.block_id ! AND sys.parameter_id = par.parameter_id ! AND par.parameter_name = 'block_ids' ! AND blk.show_stats = '1' ! AND blk.block_time <> '' ! AND blk.block_editor_id > 0 ! AND col.page_id IN ($valid_page_ids)"; ! ! if ( $log_time_filter_lo != 'no' && !empty($log_time_filter_lo) ) ! { ! $sql .= " AND blk.block_time > " . $log_time_filter_lo ; ! } ! ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql ); ! } ! ! $postrow_sub = array(); ! if( $total_rows = $db->sql_numrows($result) ) ! { ! $postrow_sub = $db->sql_fetchrowset( $result ); ! } + // + // Merge common, dynamic and sub blocks + // + $postrow = array_merge($postrow_blocks, $postrow_dynamic, $postrow_sub); + + // // Sort by block_time ! // ! $postrow = qsort_multiarray($postrow, 'block_time', "DESC"); $dynamic_ids = ''; *************** *** 194,210 **** $log_total_match_count = intval( count( $postrow ) ); $base_url = mx_this_url(); $template->assign_vars( array( ! 'L_TITLE' => ( !empty( $title ) ? $title : 'Last Message' ), ! 'BLOCK_SIZE' => $block_size, ! 'U_URL_NEXT' => $url_next, ! 'U_URL_PREV' => $url_prev, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_MSG_PREV' => $lang['Previous'], ! 'L_MSG_NEXT' => $lang['Next'], ! 'PAGINATION' => mx_generate_pagination( $base_url, $log_total_match_count, $log_numberOfEvents, $log_start,true,true, true,false,'log_start' ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $log_start / $log_numberOfEvents ) + 1 ), ceil( $log_total_match_count / $log_numberOfEvents ) ) ! ) ); if ( $log_total_match_count == 0 || $log_total_match_count == '') --- 248,265 ---- $log_total_match_count = intval( count( $postrow ) ); $base_url = mx_this_url(); + $template->assign_vars( array( ! 'L_TITLE' => ( !empty( $title ) ? $title : 'Last Message' ), ! 'BLOCK_SIZE' => $block_size, ! 'U_URL_NEXT' => $url_next, ! 'U_URL_PREV' => $url_prev, ! 'U_PHPBB_ROOT_PATH' => PHPBB_URL, ! 'U_PORTAL_ROOT_PATH' => PORTAL_URL, ! 'TEMPLATE_ROOT_PATH' => TEMPLATE_ROOT_PATH, ! 'L_MSG_PREV' => $lang['Previous'], ! 'L_MSG_NEXT' => $lang['Next'], ! 'PAGINATION' => mx_generate_pagination( $base_url, $log_total_match_count, $log_numberOfEvents, $log_start,true,true, true,false,'log_start' ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $log_start / $log_numberOfEvents ) + 1 ), ceil( $log_total_match_count / $log_numberOfEvents ) ) ! )); if ( $log_total_match_count == 0 || $log_total_match_count == '') *************** *** 212,217 **** $template->assign_block_vars("no_row", array( 'L_NO_ITEMS' => $lang['No_items_found'] ! ) ! ); } --- 267,271 ---- $template->assign_block_vars("no_row", array( 'L_NO_ITEMS' => $lang['No_items_found'] ! )); } *************** *** 245,265 **** $edit_time = create_date( $board_config['default_dateformat'], $postrow[$row_count]['block_time'], $board_config['board_timezone'] ); - - $template->assign_block_vars("msg_row", array( ! 'L_BLOCK_UPDATED' => $lang['Block_updated_by'], ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "EDIT_TIME" => $edit_time, ! "LAST_PAGE" => $sitelog_page, ! "LAST_BLOCK" => $sitelog_block, ! "EXTRA" => $x_title, ! "U_PAGE" => $sitelog_page_url, ! "U_BLOCK" => $sitelog_page_url , ! 'FOLDER_IMG' => $folder_image, ! 'EDITOR' => $editor_name ! ) ! ); } --- 299,316 ---- $edit_time = create_date( $board_config['default_dateformat'], $postrow[$row_count]['block_time'], $board_config['board_timezone'] ); $template->assign_block_vars("msg_row", array( ! 'L_BLOCK_UPDATED' => $lang['Block_updated_by'], ! "ROW_COLOR" => "#" . $row_color, ! "ROW_CLASS" => $row_class, ! "EDIT_TIME" => $edit_time, ! "LAST_PAGE" => $sitelog_page, ! "LAST_BLOCK" => $sitelog_block, ! "EXTRA" => $x_title, ! "U_PAGE" => $sitelog_page_url, ! "U_BLOCK" => $sitelog_page_url , ! 'FOLDER_IMG' => $folder_image, ! 'EDITOR' => $editor_name ! )); } Index: mx_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_search.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_search.php 11 Dec 2005 16:13:40 -0000 1.9 --- mx_search.php 13 Dec 2005 20:04:27 -0000 1.10 *************** *** 18,66 **** * (at your option) any later version. */ - - define( 'IN_PORTAL', true ); - $mx_root_path = '../../'; - - include( $mx_root_path . 'extension.inc' ); - include( $mx_root_path . 'common.' . $phpEx ); - - include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); - include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); - - // Start session management ! $userdata = session_pagestart( $user_ip, PAGE_INDEX ); ! mx_init_userprefs( $userdata ); ! ! // End session management ! ! $mx_mode = 'mx'; ! ! switch ( $mx_mode ) { ! case 'mx': ! $search_match_table = MX_MATCH_TABLE; ! $search_word_table = MX_WORD_TABLE; ! $search_results_table = MX_SEARCH_TABLE; ! $db_key = 'block_id'; ! break; ! case 'kb': ! $search_match_table = $search_match_table; ! $search_word_table = $search_word_table; ! $search_results_table = $search_results_table; ! $db_key = 'article_id'; ! break; } ! // Define initial vars ! if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) ! { ! $mode = ( isset( $HTTP_POST_VARS['mode'] ) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode']; ! } ! else ! { ! $mode = ''; ! } if ( isset( $HTTP_POST_VARS['search_keywords'] ) || isset( $HTTP_GET_VARS['search_keywords'] ) ) --- 18,39 ---- * (at your option) any later version. */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } ! // ! // Read Block Settings ! // ! $title = $mx_block->block_info['block_title']; ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! ! // ! // Define initial vars ! // ! $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); if ( isset( $HTTP_POST_VARS['search_keywords'] ) || isset( $HTTP_GET_VARS['search_keywords'] ) ) *************** *** 78,82 **** } ! $search_id = ( isset( $HTTP_GET_VARS['search_id'] ) ) ? $HTTP_GET_VARS['search_id'] : ''; if ( $search_id ) --- 51,55 ---- } ! $search_id = $mx_request_vars->get('search_id', MX_TYPE_INT, ''); if ( $search_id ) *************** *** 118,532 **** $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; switch ( $mode ) { case "results": ! $store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars'); ! if ( $search_id == '' || $search_keywords != '' ) ! { ! $stopword_array = @file( $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_stopwords.txt' ); ! $synonym_array = @file( $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_synonyms.txt' ); ! $split_search = array(); ! $split_search = ( !strstr( $multibyte_charset, $lang['ENCODING'] ) ) ? split_words( clean_words( 'search', stripslashes( $search_keywords ), $stopword_array, $synonym_array ), 'search' ) : split( ' ', $search_keywords ); ! $search_msg_only = ( !$search_fields ) ? "AND m.title_match = 0" : ( ( strstr( $multibyte_charset, $lang['ENCODING'] ) ) ? '' : '' ); ! $word_count = 0; ! $current_match_type = 'or'; ! $word_match = array(); ! $result_list = array(); ! for( $i = 0; $i < count( $split_search ); $i++ ) { ! if (preg_match('#^[\*%]+$#', trim($split_search[$i])) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($split_search[$i])))) ! { ! $split_search[$i] = ''; ! continue; ! } ! switch ( $split_search[$i] ) ! { ! case 'and': ! $current_match_type = 'and'; ! break; ! case 'or': ! $current_match_type = 'or'; ! break; ! case 'not': ! $current_match_type = 'not'; ! break; ! default: ! if ( !empty( $search_terms ) ) ! { ! $current_match_type = 'and'; ! } ! if ( !strstr( $multibyte_charset, $lang['ENCODING'] ) ) ! { ! $match_word = str_replace( '*', '%', $split_search[$i] ); ! $sql = "SELECT m.block_id ! FROM " . $search_word_table . " w, " . $search_match_table . " m ! WHERE w.word_text LIKE '$match_word' ! AND m.word_id = w.word_id ! AND w.word_common <> 1 ! $search_msg_only"; ! } ! else { ! die('wrong charset'); ! // $match_word = addslashes( '%' . str_replace( '*', '', $split_search[$i] ) . '%' ); ! // $search_msg_only = ( $search_fields ) ? "OR article_title LIKE '$match_word'" : ''; ! // $sql = "SELECT article_id ! // FROM " . KB_ARTICLE_TABLE . " ! // WHERE article_body LIKE '$match_word' ! // $search_msg_only"; } ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not obtain matched articles list', '', __LINE__, __FILE__, $sql ); } ! ! $row = array(); ! while ( $temp_row = $db->sql_fetchrow( $result ) ) { ! $row[$temp_row['post_id']] = 1; ! ! if ( !$word_count ) ! { ! $result_list[$temp_row[$db_key]] = 1; ! } ! else if ( $current_match_type == 'or' ) ! { ! $result_list[$temp_row[$db_key]] = 1; ! } ! else if ( $current_match_type == 'not' ) ! { ! $result_list[$temp_row[$db_key]] = 0; ! } } ! if ( $current_match_type == 'and' && $word_count ) { ! @reset( $result_list ); ! while ( list( $article_id, $match_count ) = @each( $result_list ) ) { ! if ( !$row[$post_id] ) ! { ! $result_list[$post_id] = 0; ! } } } ! $word_count++; ! $db->sql_freeresult( $result ); ! } } ! @reset( $result_list ); ! $search_ids = array(); ! while ( list( $article_id, $matches ) = each( $result_list ) ) { ! if ( $matches ) ! { ! $search_ids[] = $article_id; ! } } ! unset( $result_list ); ! // $total_match_count = count( $search_ids ); // Added below after mx query ! ! // Store new result data ! $search_results = implode( ', ', $search_ids ); ! $per_page = $board_config['topics_per_page']; ! // Combine both results and search data (apart from original query) ! // so we can serialize it and place it in the DB ! $store_search_data = array(); ! // Limit the character length (and with this the results displayed at all following pages) to prevent ! // truncated result arrays. Normally, search results above 12000 are affected. ! // - to include or not to include ! /* ! $max_result_length = 60000; ! if (strlen($search_results) > $max_result_length) ! { ! $search_results = substr($search_results, 0, $max_result_length); ! $search_results = substr($search_results, 0, strrpos($search_results, ',')); ! $total_match_count = count(explode(', ', $search_results)); ! } ! */ ! ! for( $i = 0; $i < count( $store_vars ); $i++ ) { ! $store_search_data[$store_vars[$i]] = $$store_vars[$i]; ! } ! $result_array = serialize( $store_search_data ); ! unset( $store_search_data ); ! mt_srand ( ( double ) microtime() * 1000000 ); ! $search_id = mt_rand(); ! $sql = "UPDATE " . $search_results_table . " ! SET search_id = $search_id, search_array = '" . str_replace( "\'", "''", $result_array ) . "' ! WHERE session_id = '" . $userdata['session_id'] . "'"; ! if ( !( $result = $db->sql_query( $sql ) ) || !$db->sql_affectedrows() ) ! { ! $sql = "INSERT INTO " . $search_results_table . " (search_id, session_id, search_array) ! VALUES($search_id, '" . $userdata['session_id'] . "', '" . str_replace( "\'", "''", $result_array ) . "')"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not insert search results', '', __LINE__, __FILE__, $sql ); ! } ! } ! } ! else { ! $search_id = intval($search_id); ! if ( $search_id ) { ! $sql = "SELECT search_array ! FROM " . $search_results_table . " ! WHERE search_id = $search_id ! AND session_id = '" . $userdata['session_id'] . "'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql ); ! } ! ! if ( $row = $db->sql_fetchrow( $result ) ) ! { ! $search_data = unserialize( $row['search_array'] ); ! for( $i = 0; $i < count( $store_vars ); $i++ ) ! { ! $$store_vars[$i] = $search_data[$store_vars[$i]]; ! } ! } } ! } ! ! // Look up data ... ! if ( count($search_ids) > 0 ) { ! // ! // Get all pages with view access ! // ! $sql = "SELECT * FROM " . PAGE_TABLE; if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't get list of page", "", __LINE__, __FILE__, $sql ); } ! ! ! $valid_page_ids = ''; ! while ( $page_row = $db->sql_fetchrow( $result )) { ! // Page auth ! $page_auth_ary = array(); ! $page_auth_ary = page_auth( AUTH_VIEW, $userdata, $page_row['auth_view'], $page_row['auth_view_group'] ); ! ! if ( $page_auth_ary[auth_view] ) { ! $valid_page_ids[] = $page_row['page_id']; } } // ! // Now find the associated pages // ! $page_ids = array(); ! foreach($search_ids as $key => $block_id) ! { ! $temp_page_id = get_page_id($block_id); ! if (in_array($temp_page_id, $valid_page_ids)) ! { ! $page_ids[$block_id] = $temp_page_id; ! } ! } ! ! /* ! $valid_page_ids = implode( ', ', $searchset ); ! ! // Generate page_blocks data ! $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, bct.block_id, blk.block_title, blk.block_time ! FROM " . COLUMN_BLOCK_TABLE . " bct, ! " . PAGE_TABLE . " pag, ! " . COLUMN_TABLE . " col, ! " . BLOCK_TABLE . " blk ! WHERE pag.page_id = col.page_id ! AND bct.column_id = col.column_id ! AND bct.block_id = blk.block_id ! AND bct.block_id IN (" . $search_results . ") ! AND col.page_id IN ($valid_page_ids)"; ! ! // $per_page = $board_config['topics_per_page']; ! // $per_page = 3; ! ! //$sql .= " ORDER BY pag.page_name LIMIT $start, " . $per_page; ! $sql .= " ORDER BY blk.block_time"; ! ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql ); ! } ! $searchset = array(); ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $searchset[] = $row; } ! ! $db->sql_freeresult( $result ); ! ! // Find all dynamic block Page_ids ! $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, blk.block_id, blk.block_title, blk.block_time, blk.block_editor_id, nav.menu_name ! FROM " . PAGE_TABLE . " pag, ! " . BLOCK_TABLE . " blk, ! " . MENU_NAV_TABLE . " nav, ! " . MENU_CAT_TABLE . " nac ! ! WHERE pag.page_id = nav.page_id AND nav.page_id > 0 ! ! AND nac.cat_id = nav.cat_id ! AND nav.block_id = blk.block_id ! ! AND nav.block_id IN (" . $search_results . ") ! AND nav.page_id IN ($valid_page_ids)"; ! //$sql .= " ORDER BY pag.page_name LIMIT $start, " . $per_page; ! $sql .= " ORDER BY blk.block_time"; ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql ); ! } ! ! while ( $row = $db->sql_fetchrow( $result ) ) { ! $searchset[] = $row; } ! ! // Sort by block_time ! $searchset = qsort_multiarray($searchset, $num = 'block_time', $order = "DESC", $left = 0, $right = -1); ! ! $db->sql_freeresult( $result ); ! // Define censored word matches ! $orig_word = array(); ! $replacement_word = array(); ! obtain_word_list( $orig_word, $replacement_word ); ! */ ! } ! // Output header ! ! $mx_page->page_title = $lang['Search']; ! ! include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! ! $template->set_filenames( array( 'body' => 'mx_search_results.tpl' ) ); ! $total_match_count = count( $searchset ); ! ! $l_search_matches = ( $total_match_count == 1 ) ? sprintf( $lang['Found_search_match'], $total_match_count ) : sprintf( $lang['Found_search_matches'], $total_match_count ); ! $template->assign_vars( array( ! 'L_SEARCH_MATCHES' => $l_search_matches, ! 'L_ARTICLE' => $lang['Mx_Page'] ) ! ); ! $highlight_active = ''; ! $highlight_match = array(); ! for( $j = 0; $j < count( $split_search ); $j++ ) { ! $split_word = $split_search[$j]; ! if ( $split_word != 'and' && $split_word != 'or' && $split_word != 'not' ) { ! $highlight_match[] = '#\b(' . str_replace( "*", "([\w]+)?", $split_word ) . ')\b#is'; ! $highlight_active .= " " . $split_word; ! for ( $k = 0; $k < count( $synonym_array ); $k++ ) { ! list( $replace_synonym, $match_synonym ) = split( ' ', trim( strtolower( $synonym_array[$k] ) ) ); ! ! if ( $replace_synonym == $split_word ) ! { ! $highlight_match[] = '#\b(' . str_replace( "*", "([\w]+)?", $replace_synonym ) . ')\b#is'; ! $highlight_active .= ' ' . $match_synonym; ! } } } } ! $highlight_active = urlencode( trim( $highlight_active ) ); ! ! // die( var_export($searchset) . var_export($search_ids) ); ! // die ( 'f'.count( $searchset ) ); ! // for( $i = 0; $i < count( $searchset ); $i++ ) ! for( $i = $start; $i < $start + $per_page && $i < count( $searchset ); $i++ ) { ! $page_id = $searchset[$i]['page_id']; ! $article_url = append_sid( mx_this_url() ); ! ! $post_date = create_date( $board_config['default_dateformat'], $searchset[$i]['article_date'], $board_config['board_timezone'] ); ! ! $message = $searchset[$i]['article_body']; ! $article_title = $searchset[$i]['page_name']; ! $article_id = $searchset[$i]['article_id']; ! ! // $kb_cat = mx_get_info(BLOCK_TABLE, 'block_id', $searchset[$i]['block_id'] ); ! $temp_url = !empty($searchset[$i]['menu_name']) ? append_sid( PORTAL_URL . 'index.php?page=' . $page_id . '&dynamic_block=' . $searchset[$i]['block_id'] ) : append_sid( PORTAL_URL . 'index.php?page=' . $page_id ); ! $category = '<a href="' . $temp_url . '" class="name">' .$searchset[$i]['block_title'] . '</a>' . ( !empty($searchset[$i]['menu_name']) ? ' (' . $searchset[$i]['menu_name'] . ')': '' ); ! ! // $type = get_kb_type( $searchset[$i]['article_type'] ); ! ! $message = ''; ! ! if ( count( $orig_word ) ) ! { ! $article_title = preg_replace( $orig_word, $replacement_word, $searchset[$i]['article_title'] ); ! } ! $article_author = '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchset[$i]['user_id']) . '" class="name">'; ! $article_author .= $searchset[$i]['username']; ! $article_author .= '</a>'; ! $template->assign_block_vars( 'searchresults', array( 'ARTICLE_ID' => $article_id, ! 'ARTICLE_AUTHOR' => $article_author, ! 'ARTICLE_TITLE' => $article_title, ! 'ARTICLE_DESCRIPTION' => $searchset[$i]['article_description'], ! 'ARTICLE_CATEGORY' => $category, ! 'ARTICLE_TYPE' => $type, ! 'U_VIEW_ARTICLE' => $article_url ) ! ); } ! $base_url = mx_this_url( "search_id=$search_id", true, 'mx_search.php' ); ! $template->assign_vars( array( 'PAGINATION' => generate_pagination( $base_url, $total_match_count, $per_page, $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page ) ), ! 'L_AUTHOR' => $lang['Author'], ! 'L_MESSAGE' => $lang['Message'], ! 'L_TOPICS' => $lang['Article'], ! 'L_TYPE' => $lang['Article_type'], ! 'L_CATEGORY' => $lang['Mx_Block'] ) ! ); break; --- 91,483 ---- $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; + $per_page = $board_config['topics_per_page']; + switch ( $mode ) { case "results": ! $store_vars = array('search_results', 'total_match_count', 'split_search', 'sort_by', 'sort_dir', 'show_results', 'return_chars'); ! if ( $search_id == '' || $search_keywords != '' ) ! { ! $stopword_array = @file( $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_stopwords.txt' ); ! $synonym_array = @file( $phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/search_synonyms.txt' ); ! $split_search = array(); ! $split_search = ( !strstr( $multibyte_charset, $lang['ENCODING'] ) ) ? split_words( clean_words( 'search', stripslashes( $search_keywords ), $stopword_array, $synonym_array ), 'search' ) : split( ' ', $search_keywords ); ! $search_msg_only = ( !$search_fields ) ? "AND m.title_match = 0" : ( ( strstr( $multibyte_charset, $lang['ENCODING'] ) ) ? '' : '' ); ! $word_count = 0; ! $current_match_type = 'or'; ! $word_match = array(); ! $result_list = array(); ! for( $i = 0; $i < count( $split_search ); $i++ ) ! { ! if (preg_match('#^[\*%]+$#', trim($split_search[$i])) || preg_match('#^[^\*]{1,2}$#', str_replace(array('*', '%'), '', trim($split_search[$i])))) { ! $split_search[$i] = ''; ! continue; ! } ! switch ( $split_search[$i] ) ! { ! case 'and': ! $current_match_type = 'and'; ! break; ! case 'or': ! $current_match_type = 'or'; ! break; ! case 'not': ! $current_match_type = 'not'; ! break; ! default: ! if ( !empty( $search_terms ) ) ! { ! $current_match_type = 'and'; ! } ! if ( !strstr( $multibyte_charset, $lang['ENCODING'] ) ) ! { ! $match_word = str_replace( '*', '%', $split_search[$i] ); ! $sql = "SELECT m.block_id ! FROM " . MX_WORD_TABLE . " w, " . MX_MATCH_TABLE . " m ! WHERE w.word_text LIKE '$match_word' ! AND m.word_id = w.word_id ! AND w.word_common <> 1 ! $search_msg_only"; ! } ! else ! { ! die('wrong charset'); ! // $match_word = addslashes( '%' . str_replace( '*', '', $split_search[$i] ) . '%' ); ! // $search_msg_only = ( $search_fields ) ? "OR article_title LIKE '$match_word'" : ''; ! // $sql = "SELECT article_id ! // FROM " . KB_ARTICLE_TABLE . " ! // WHERE article_body LIKE '$match_word' ! // $search_msg_only"; ! } ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain matched articles list', '', __LINE__, __FILE__, $sql ); ! } ! ! $row = array(); ! while ( $temp_row = $db->sql_fetchrow( $result ) ) ! { ! $row[$temp_row['post_id']] = 1; ! ! if ( !$word_count ) { ! $result_list[$temp_row['block_id']] = 1; } ! else if ( $current_match_type == 'or' ) { ! $result_list[$temp_row['block_id']] = 1; } ! else if ( $current_match_type == 'not' ) { ! $result_list[$temp_row['block_id']] = 0; } + } ! if ( $current_match_type == 'and' && $word_count ) ! { ! @reset( $result_list ); ! while ( list( $block_id, $match_count ) = @each( $result_list ) ) { ! if ( !$row[$post_id] ) { ! $result_list[$post_id] = 0; } } + } ! $word_count++; ! $db->sql_freeresult( $result ); } + } ! @reset( $result_list ); ! $search_ids = array(); ! while ( list( $block_id, $matches ) = each( $result_list ) ) ! { ! if ( $matches ) { ! $search_ids[] = $block_id; } + } ! unset( $result_list ); ! // $total_match_count = count( $search_ids ); // Added below after mx query ! // Store new result data ! $search_results = implode( ',', $search_ids ); ! ! // Combine both results and search data (apart from original query) ! // so we can serialize it and place it in the DB ! $store_search_data = array(); ! // Limit the character length (and with this the results displayed at all following pages) to prevent ! // truncated result arrays. Normally, search results above 12000 are affected. ! // - to include or not to include ! /* ! $max_result_length = 60000; ! if (strlen($search_results) > $max_result_length) { ! $search_results = substr($search_results, 0, $max_result_length); ! $search_results = substr($search_results, 0, strrpos($search_results, ',')); ! $total_match_count = count(explode(', ', $search_results)); ! } ! */ ! for( $i = 0; $i < count( $store_vars ); $i++ ) ! { ! $store_search_data[$store_vars[$i]] = $$store_vars[$i]; ! } ! $result_array = serialize( $store_search_data ); ! unset( $store_search_data ); ! mt_srand ( ( double ) microtime() * 1000000 ); ! $search_id = mt_rand(); ! ! $sql = "UPDATE " . MX_SEARCH_TABLE . " ! SET search_id = $search_id, search_array = '" . str_replace( "\'", "''", $result_array ) . "' ! WHERE session_id = '" . $userdata['session_id'] . "'"; ! if ( !( $result = $db->sql_query( $sql ) ) || !$db->sql_affectedrows() ) { ! $sql = "INSERT INTO " . MX_SEARCH_TABLE . " (search_id, session_id, search_array) ! VALUES($search_id, '" . $userdata['session_id'] . "', '" . str_replace( "\'", "''", $result_array ) . "')"; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not insert search results', '', __LINE__, __FILE__, $sql ); } ! } ! } ! else ! { ! $search_id = intval($search_id); ! if ( $search_id ) { ! $sql = "SELECT search_array ! FROM " . MX_SEARCH_TABLE . " ! WHERE search_id = $search_id ! AND session_id = '" . $userdata['session_id'] . "'"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql ); } ! ! if ( $row = $db->sql_fetchrow( $result ) ) { ! $search_data = unserialize( $row['search_array'] ); ! for( $i = 0; $i < count( $store_vars ); $i++ ) { ! $$store_vars[$i] = $search_data[$store_vars[$i]]; } } + } + + $search_ids = explode(',', $search_results); + } + + // + // Look up data ... + // + if ( count($search_ids) > 0 ) + { + // + // Get all pages with view access + // + $sql = "SELECT * FROM " . PAGE_TABLE; + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, "Couldn't get list of page", "", __LINE__, __FILE__, $sql ); + } + $valid_page_ids_array = array(); + while ( $page_row = $db->sql_fetchrow( $result )) + { // ! // Page auth // ! $page_auth_ary = array(); ! $page_auth_ary = page_auth( AUTH_VIEW, $userdata, $page_row['auth_view'], $page_row['auth_view_group'] ); ! if ( $page_auth_ary['auth_view'] ) { ! $valid_page_ids_array[] = $page_row['page_id']; } ! } ! // ! // Now find the associated pages ! // ! $page_ids = array(); ! $block_ids = array(); ! $valid_page_ids = ''; ! foreach($search_ids as $key => $block_id) ! { ! $page_id_array = get_page_id($block_id, false, true); ! if (in_array($page_id_array['page_id'], $valid_page_ids_array)) { ! $page_ids[$block_id] = $page_id_array; ! $block_ids[] = $block_id; } ! } ! $valid_block_ids = implode( ', ', $block_ids ); ! // ! // Generate page_blocks data ! // ! $sql = "SELECT block_id, block_desc, block_title, block_time, block_editor_id ! FROM " . BLOCK_TABLE . " ! WHERE block_id IN (" . $valid_block_ids . ") ! ORDER BY block_time DESC ! LIMIT ".$start.", ".$per_page; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql ); ! } ! ! } + // + // Output header + // + $mx_page->page_title = $lang['Search']; + $template->set_filenames( array( 'body' => 'mx_search_results.tpl' ) ); ! $total_match_count = count($block_ids); ! ! $l_search_matches = ( $total_match_count == 1 ) ? sprintf( $lang['Found_search_match'], $total_match_count ) : sprintf( $lang['Found_search_matches'], $total_match_count ); ! $template->assign_vars( array( ! 'L_SEARCH_MATCHES' => $l_search_matches, ! 'L_ARTICLE' => $lang['Mx_Page'] ) ! ); ! $highlight_active = ''; ! $highlight_match = array(); ! for( $j = 0; $j < count( $split_search ); $j++ ) ! { ! $split_word = $split_search[$j]; ! if ( $split_word != 'and' && $split_word != 'or' && $split_word != 'not' ) { ! $highlight_match[] = '#\b(' . str_replace( "*", "([\w]+)?", $split_word ) . ')\b#is'; ! $highlight_active .= " " . $split_word; ! for ( $k = 0; $k < count( $synonym_array ); $k++ ) { ! list( $replace_synonym, $match_synonym ) = split( ' ', trim( strtolower( $synonym_array[$k] ) ) ); ! if ( $replace_synonym == $split_word ) { ! $highlight_match[] = '#\b(' . str_replace( "*", "([\w]+)?", $replace_synonym ) . ')\b#is'; ! $highlight_active .= ' ' . $match_synonym; } } } + } ! $highlight_active = urlencode( trim( $highlight_active ) ); ! // ! // Dump out the results ! // ! while( $searchdata = $db->sql_fetchrow($result) ) ! { ! $search_block_id = $searchdata['block_id']; ! ! if (is_array($page_ids[$search_block_id]) && !empty($page_ids[$search_block_id]['block_id'])) { ! $dynamic_block_id = $page_ids[$search_block_id]['block_id']; ! $pageid = $page_ids[$search_block_id]['page_id']; ! } ! else if (is_array($page_ids[$search_block_id])) ! { ! $dynamic_block_id = ''; ! $pageid = $page_ids[$search_block_id]['page_id']; ! } ! else ! { ! $dynamic_block_id = ''; ! $pageid = $page_ids[$search_block_id]; ! } ! $page_title = $page_ids[$search_block_id]['page_name']; ! $page_desc = $page_ids[$search_block_id]['page_desc']; ! ! $temp_url = !empty($dynamic_block_id) ? append_sid( PORTAL_URL . 'index.php?page=' . $pageid . '&dynamic_block=' . $dynamic_block_id ) : append_sid( PORTAL_URL . 'index.php?page=' . $pageid ); ! ! $editor_name_tmp = get_userdata( $searchdata['block_editor_id'] ); ! $editor_name = $editor_name_tmp['username']; ! ! $edit_time = !empty($searchdata['block_time']) ? '(' . create_date( $board_config['default_dateformat'], $searchdata['block_time'], $board_config['board_timezone'] ) . ')' : ''; ! $block_editor = '<a href="' . append_sid(PHPBB_URL . "profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . '=' . $searchdata['block_editor_id']) . '" class="name">'; ! $block_editor .= $editor_name; ! $block_editor .= '</a>'; ! ! $block_title = $searchdata['block_title']; ! $block_desc = $searchdata['block_desc']; ! ! $block_title_url = '<a href="' . $temp_url . '" class="name">' . $block_title . '</a>'; ! $page_title_url = '<a href="' . $temp_url . '" class="name">' .$page_title . '</a>'; ! /* ! $message = ''; ! if ( count( $orig_word ) ) ! { ! $article_title = preg_replace( $orig_word, $replacement_word, $searchset[$i]['article_title'] ); } + */ ! $template->assign_block_vars( 'searchresults', array( ! 'BLOCK_ID' => $block_id, ! ! 'L_BLOCK_UPDATED' => !empty($edit_time) ? '<br />' . $lang['Block_updated_by'] : '', ! 'BLOCK_EDITOR' => !empty($edit_time) ? $block_editor : '', ! "EDIT_TIME" => !empty($edit_time) ? $edit_time : '', ! ! 'BLOCK_TITLE_URL' => $block_title_url, ! 'BLOCK_DESC' => !empty($block_desc) ? '<br />' . $block_desc : '', ! ! 'PAGE_TITLE_URL' => $page_title_url, ! 'PAGE_DESC' => !empty($page_desc) ? '<br />' . $page_desc : '', ! )); ! } ! $base_url = mx_this_url( "search_id=$search_id" ); ! $new_search_url = append_sid( PORTAL_URL . 'index.php?page=' . $page_id ); ! $template->assign_vars( array( ! 'PAGINATION' => generate_pagination( $base_url, $total_match_count, $per_page, $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page ) ), ! ! 'L_AUTHOR' => $lang['Author'], ! 'L_PAGE' => $lang['Mx_Page'], ! 'L_BLOCK' => $lang['Mx_Block'], ! 'L_NEW_SEARCH' => $lang['Mx_new_search'], ! ! 'U_NEW_SEARCH' => $new_search_url ! )); break; *************** *** 534,555 **** default: // Output the basic page ! $mx_page->page_title = $lang['Search']; - - include( $mx_root_path . 'includes/page_header.' . $phpEx ); $template->set_filenames( array( 'body' => 'mx_search_body.tpl' ) ); ! $template->assign_vars( array( 'L_SEARCH_QUERY' => $lang['Search_query'], ! 'L_SEARCH_KEYWORDS' => $lang['Search_keywords'], ! 'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'], ! 'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'], ! 'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'], ! 'S_SEARCH_ACTION' => append_sid( mx_this_url( "mode=results", true, 'mx_search.php' ) ), ! 'S_HIDDEN_FIELDS' => '', ! 'S_SEARCH' => $lang['Search'] ) ! ); break; --- 485,506 ---- default: + // // Output the basic page ! // $mx_page->page_title = $lang['Search']; $template->set_filenames( array( 'body' => 'mx_search_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_SEARCH_QUERY' => $lang['Search_query'], ! 'L_SEARCH_KEYWORDS' => $lang['Search_keywords'], ! 'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'], ! 'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'], ! 'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'], ! 'S_SEARCH_ACTION' => append_sid( mx_this_url( "mode=results" ) ), ! 'S_HIDDEN_FIELDS' => '', ! 'S_SEARCH' => $lang['Search'] ! )); break; *************** *** 557,563 **** $template->pparse( 'body' ); - // load footer - - include( $phpbb_root_path . 'includes/page_tail.' . $phpEx ); ?> \ No newline at end of file --- 508,511 ---- |
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:36
|
Update of /cvsroot/mxbb/core/modules/mx_rebuild_search_tables/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/modules/mx_rebuild_search_tables/admin Modified Files: admin_rebuild_search.php Added Files: admin_rebuild_mx_search.php Log Message: updated mxBB search block and utilities --- NEW FILE: admin_rebuild_mx_search.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette * Copyright : (C) 2002-2005 mxBB Portal, phpMiX (c) 2004 * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: admin_rebuild_mx_search.php,v 1.1 2005/12/13 20:04:27 jonohlsson Exp $ */ /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ $start_time = time (); $time_limit = $HTTP_GET_VARS['time_limit']; define ('IN_PORTAL', 1); if(!empty ($setmodules)) { $filename = basename(__FILE__); $module['Rebuild Search']['Optimize mxBB tables'] = 'modules/mx_rebuild_search_tables/admin/' . $filename; return; } $no_page_header = true; $module_root_path = '../'; $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); require ($phpbb_root_path . 'includes/functions_search.'.$phpEx); // ********************************************************************** // Read language definition // ********************************************************************** if ( file_exists( $module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx ) ) { include ($module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx); } else { include ($module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx); } $page_title = $lang['Page_title']; if (isset ($HTTP_GET_VARS['start'])) { function onTime () { global $start_time, $time_limit; static $max_execution_time; $current_time = time (); if (empty ($max_execution_time)) { if (ini_get ('safe_mode') == false) { set_time_limit (0); $max_execution_time = $time_limit; } else { $max_execution_time = ini_get ('max_execution_time'); } } return (($current_time - $start_time) < $max_execution_time) ? true : false; } $start = $HTTP_GET_VARS['start']; if ($start == 0) { $sql = "DELETE FROM ". MX_SEARCH_TABLE; $result = $db->sql_query ($sql); $sql = "DELETE FROM ". MX_WORD_TABLE; $result = $db->sql_query ($sql); $sql = "DELETE FROM ". MX_MATCH_TABLE; $result = $db->sql_query ($sql); // // Now find all textblocks // $sql = "SELECT blk.block_id FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . BLOCK_TABLE . " blk, " . PARAMETER_TABLE . " par WHERE blk.block_id = sys.block_id AND sys.parameter_id = par.parameter_id AND ( par.parameter_type = 'phpBBTextBlock' OR par.parameter_type = 'CustomizedTextBlock' OR par.parameter_type = 'WysiwygTextBlock' ) AND sys.sub_id = 0"; /* $sql = "SELECT post_id FROM ". POSTS_TEXT_TABLE; */ if ( !$result = $db->sql_query ($sql) ) { mx_message_die( GENERAL_ERROR, 'Could not obtain block_ids', '', __LINE__, __FILE__, $sql ); } $total_num_rows = $db->sql_numrows ($result); } $total_num_rows = (isset ($HTTP_GET_VARS['total_num_rows'])) ? $HTTP_GET_VARS['total_num_rows'] : $total_num_rows; // // Now find all textblocks // $sql = "SELECT blk.block_id, blk.block_title, sys.parameter_value FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . BLOCK_TABLE . " blk, " . PARAMETER_TABLE . " par WHERE blk.block_id = sys.block_id AND sys.parameter_id = par.parameter_id AND ( par.parameter_type = 'phpBBTextBlock' OR par.parameter_type = 'CustomizedTextBlock' OR par.parameter_type = 'WysiwygTextBlock' ) AND sys.sub_id = 0 LIMIT ".$start.", ". $HTTP_GET_VARS['post_limit']; /* $sql = "SELECT post_id, post_subject, post_text FROM ". POSTS_TEXT_TABLE ." LIMIT $start, ". $HTTP_GET_VARS['post_limit']; */ if ( !$result = $db->sql_query ($sql) ) { mx_message_die( GENERAL_ERROR, 'Could not obtain block_ids data', '', __LINE__, __FILE__, $sql ); } $num_rows = 0; while (($row = $db->sql_fetchrow ($result)) ) { //add_search_words('single', $row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject'])); mx_add_search_words('single', $row['block_id'], stripslashes($row['parameter_value']), stripslashes($row['block_title'])); $num_rows++; } $template->set_filenames(array( "body" => "admin/admin_message_body.tpl") ); if (($start + $num_rows) != $total_num_rows) { $form_action = append_sid ("admin_rebuild_mx_search.$phpEx?start=". ($start + $num_rows) ."&total_num_rows=$total_num_rows&post_limit=". $HTTP_GET_VARS['post_limit'] ."&time_limit=$time_limit&refresh_rate=". $HTTP_GET_VARS['refresh_rate']); $next = $lang['Next']; $template->assign_vars(array( "META" => '<meta http-equiv="refresh" content="'. $HTTP_GET_VARS['refresh_rate'] .';url='. $form_action .'">') ); } else { $next = $lang['Finished']; $form_action = append_sid ("admin_rebuild_mx_search.$phpEx"); } include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( 'PERCENT' => round ((($start + $num_rows) / $total_num_rows) * 100), 'L_NEXT' => $next, 'START' => $start + $num_rows, 'TOTAL_NUM_ROWS' => $total_num_rows, 'S_REBUILD_SEARCH_ACTION' => $form_action) ); $template->set_filenames (array ( "body" => "admin/rebuild_search_progress.tpl") ); } else { include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( 'L_REBUILD_SEARCH' => $lang['Rebuild_mx_search'], 'L_REBUILD_SEARCH_DESC' => $lang['Rebuild_mx_search_desc'], 'L_POST_LIMIT' => $lang['Post_limit'], 'L_TIME_LIMIT' => $lang['Time_limit'], 'L_REFRESH_RATE' => $lang['Refresh_rate'], 'SESSION_ID' => $userdata['session_id'], 'S_REBUILD_SEARCH_ACTION' => append_sid ("admin_rebuild_mx_search.$phpEx")) ); $template->set_filenames (array ( "body" => "admin/rebuild_search.tpl") ); } $template->pparse ('body'); // // Page Footer // include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); ?> Index: admin_rebuild_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_rebuild_search_tables/admin/admin_rebuild_search.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_rebuild_search.php 23 Oct 2005 21:58:24 -0000 1.3 --- admin_rebuild_search.php 13 Dec 2005 20:04:27 -0000 1.4 *************** *** 31,46 **** } - // - // Let's set the root dir for phpBB - // - - /* - $no_page_header = true; - $phpbb_root_path = "./../"; - require ($phpbb_root_path . 'extension.inc'); - require ('./pagestart.' . $phpEx); - require ($phpbb_root_path . 'includes/functions_search.'.$phpEx); - */ - $no_page_header = true; $module_root_path = '../'; --- 31,34 ---- *************** *** 53,69 **** // Read language definition // ********************************************************************** ! if ( !file_exists( $module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx ) ) { ! include ($module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx); } else { ! include ($module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx); } $page_title = $lang['Page_title']; ! if (isset ($HTTP_GET_VARS['start'])) { ! function onTime () { global $start_time, $time_limit; static $max_execution_time; --- 41,59 ---- // Read language definition // ********************************************************************** ! if ( file_exists( $module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx ) ) { ! include ($module_root_path.'language/lang_' . $board_config['default_lang'] . '/lang_admin_rebuild_search.'.$phpEx); } else { ! include ($module_root_path.'language/lang_english/lang_admin_rebuild_search.'.$phpEx); } $page_title = $lang['Page_title']; ! if (isset ($HTTP_GET_VARS['start'])) ! { ! function onTime () ! { global $start_time, $time_limit; static $max_execution_time; *************** *** 86,90 **** $start = $HTTP_GET_VARS['start']; ! if ($start == 0) { $sql = "DELETE FROM ". SEARCH_TABLE; $result = $db->sql_query ($sql); --- 76,81 ---- $start = $HTTP_GET_VARS['start']; ! if ($start == 0) ! { $sql = "DELETE FROM ". SEARCH_TABLE; $result = $db->sql_query ($sql); *************** *** 97,101 **** $sql = "SELECT post_id FROM ". POSTS_TEXT_TABLE; ! $result = $db->sql_query ($sql); $total_num_rows = $db->sql_numrows ($result); } --- 88,97 ---- $sql = "SELECT post_id FROM ". POSTS_TEXT_TABLE; ! ! if ( !$result = $db->sql_query ($sql) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain post ids', '', __LINE__, __FILE__, $sql ); ! } ! $total_num_rows = $db->sql_numrows ($result); } *************** *** 104,111 **** $sql = "SELECT post_id, post_subject, post_text FROM ". POSTS_TEXT_TABLE ." LIMIT $start, ". $HTTP_GET_VARS['post_limit']; ! $result = $db->sql_query ($sql); $num_rows = 0; ! while (($row = $db->sql_fetchrow ($result)) ) { add_search_words('single', $row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject'])); $num_rows++; --- 100,113 ---- $sql = "SELECT post_id, post_subject, post_text FROM ". POSTS_TEXT_TABLE ." LIMIT $start, ". $HTTP_GET_VARS['post_limit']; ! ! if ( !$result = $db->sql_query ($sql) ) ! { ! mx_message_die( GENERAL_ERROR, 'Could not obtain post ids data', '', __LINE__, __FILE__, $sql ); ! } $num_rows = 0; ! ! while (($row = $db->sql_fetchrow ($result)) ) ! { add_search_words('single', $row['post_id'], stripslashes($row['post_text']), stripslashes($row['post_subject'])); $num_rows++; *************** *** 116,120 **** ); ! if (($start + $num_rows) != $total_num_rows) { $form_action = append_sid ("admin_rebuild_search.$phpEx?start=". ($start + $num_rows) ."&total_num_rows=$total_num_rows&post_limit=". $HTTP_GET_VARS['post_limit'] ."&time_limit=$time_limit&refresh_rate=". $HTTP_GET_VARS['refresh_rate']); $next = $lang['Next']; --- 118,123 ---- ); ! if (($start + $num_rows) != $total_num_rows) ! { $form_action = append_sid ("admin_rebuild_search.$phpEx?start=". ($start + $num_rows) ."&total_num_rows=$total_num_rows&post_limit=". $HTTP_GET_VARS['post_limit'] ."&time_limit=$time_limit&refresh_rate=". $HTTP_GET_VARS['refresh_rate']); $next = $lang['Next']; *************** *** 122,132 **** "META" => '<meta http-equiv="refresh" content="'. $HTTP_GET_VARS['refresh_rate'] .';url='. $form_action .'">') ); ! } else { $next = $lang['Finished']; $form_action = append_sid ("admin_rebuild_search.$phpEx"); } ! // include ('./page_header_admin.'.$phpEx); ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( --- 125,136 ---- "META" => '<meta http-equiv="refresh" content="'. $HTTP_GET_VARS['refresh_rate'] .';url='. $form_action .'">') ); ! } ! else ! { $next = $lang['Finished']; $form_action = append_sid ("admin_rebuild_search.$phpEx"); } ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( *************** *** 141,147 **** "body" => "admin/rebuild_search_progress.tpl") ); ! } else { ! // include('./page_header_admin.'.$phpEx); ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( --- 145,152 ---- "body" => "admin/rebuild_search_progress.tpl") ); ! } ! else ! { ! include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $template->assign_vars (array ( *************** *** 166,170 **** // Page Footer // - // include('./page_footer_admin.'.$phpEx); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); --- 171,174 ---- |
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:35
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996 Modified Files: index.php Log Message: updated mxBB search block and utilities Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** index.php 11 Dec 2005 16:13:39 -0000 1.47 --- index.php 13 Dec 2005 20:04:27 -0000 1.48 *************** *** 126,130 **** // $mx_dynamic_block = new mx_block(); ! $mx_dynamic_block->init( $block_id ); // --- 126,130 ---- // $mx_dynamic_block = new mx_block(); ! $mx_dynamic_block->init( $mx_block->block_id ); // *************** *** 140,144 **** // $mx_parent_block = new mx_block(); ! $mx_parent_block->init( $block_id ); $total_subs = $mx_parent_block->total_subs; --- 140,144 ---- // $mx_parent_block = new mx_block(); ! $mx_parent_block->init( $mx_block->block_id ); $total_subs = $mx_parent_block->total_subs; |
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:35
|
Update of /cvsroot/mxbb/core/modules/mx_rebuild_search_tables/language/lang_english In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/modules/mx_rebuild_search_tables/language/lang_english Modified Files: lang_admin_rebuild_search.php Log Message: updated mxBB search block and utilities Index: lang_admin_rebuild_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_rebuild_search_tables/language/lang_english/lang_admin_rebuild_search.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** lang_admin_rebuild_search.php 1 Oct 2005 14:10:45 -0000 1.2 --- lang_admin_rebuild_search.php 13 Dec 2005 20:04:27 -0000 1.3 *************** *** 21,24 **** --- 21,28 ---- $lang['Rebuild_search'] = 'Rebuild Search'; $lang['Rebuild_search_desc'] = 'This will index every post in your phpBB, rebuilding the search tables. It may take a long time to process, so please do not move from this page until it is complete.'; + + $lang['Rebuild_mx_search'] = 'Rebuild mxBB Site Search'; + $lang['Rebuild_mx_search_desc'] = 'This will index every textblock in your mxBB portal, rebuilding the search tables. It may take a long time to process, so please do not move from this page until it is complete.'; + $lang['Post_limit'] = 'Post limit'; $lang['Time_limit'] = 'Time limit'; |
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:35
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/modules/mx_coreblocks/templates/subSilver Modified Files: mx_search_results.tpl Log Message: updated mxBB search block and utilities Index: mx_search_results.tpl =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver/mx_search_results.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_search_results.tpl 19 Apr 2005 18:29:14 -0000 1.3 --- mx_search_results.tpl 13 Dec 2005 20:04:27 -0000 1.4 *************** *** 7,11 **** <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="left"><span class="nav"><a href="{U_KB}" class="nav">{L_KB}</a></span></td> </tr> </table> --- 7,11 ---- <table width="100%" cellspacing="2" cellpadding="2" border="0" align="center"> <tr> ! <td align="left"><span class="nav"><a href="{U_NEW_SEARCH}" class="nav">{L_NEW_SEARCH}</a></span></td> </tr> </table> *************** *** 13,23 **** <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th align="left" class="thCornerL" nowrap="nowrap" width="30%"> {L_ARTICLE} </th> ! <th align="left" class="thHead" nowrap="nowrap"> {L_CATEGORY} </th> </tr> <!-- BEGIN searchresults --> <tr> ! <td class="row1"><span class="forumlink"><a href="{searchresults.U_VIEW_ARTICLE}" class="forumlink">{searchresults.ARTICLE_TITLE}</a></span><br /><span class="gen">{searchresults.ARTICLE_DESCRIPTION}</span></td> ! <td class="row2" align="left" valign="middle"><span class="name">{searchresults.ARTICLE_CATEGORY}</span></td> </tr> <!-- END searchresults --> --- 13,30 ---- <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> ! <th align="left" class="thCornerL" nowrap="nowrap" width="20%"> {L_PAGE} </th> ! <th align="left" class="thHead" nowrap="nowrap"> {L_BLOCK} </th> </tr> <!-- BEGIN searchresults --> <tr> ! <td class="row1"> ! <span class="name">{searchresults.PAGE_TITLE_URL}</span> ! <span class="gensmall">{searchresults.PAGE_DESC}</span> ! </td> ! <td class="row2" align="left" valign="middle"> ! <span class="forumlink">{searchresults.BLOCK_TITLE_URL}</span> ! <span class="gensmall">{searchresults.BLOCK_DESC}</span> ! <span class="gensmall">{searchresults.L_BLOCK_UPDATED}{searchresults.BLOCK_EDITOR} {searchresults.EDIT_TIME}</span> ! </td> </tr> <!-- END searchresults --> |
|
From: Jon O. <jon...@us...> - 2005-12-13 20:04:34
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8996/includes Modified Files: mx_functions.php Log Message: updated mxBB search block and utilities Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** mx_functions.php 11 Dec 2005 16:13:39 -0000 1.54 --- mx_functions.php 13 Dec 2005 20:04:26 -0000 1.55 *************** *** 569,573 **** | Eg: get_page_id('dload.php', true) \********************************************************************************/ ! function get_page_id($search_item, $use_function_file = false) { global $db, $userdata, $mx_config_cache; --- 569,573 ---- | Eg: get_page_id('dload.php', true) \********************************************************************************/ ! function get_page_id($search_item, $use_function_file = false, $get_page_data_array = false) { global $db, $userdata, $mx_config_cache; *************** *** 578,587 **** $cache_key = 'pagemap_block' . $search_item; if ( $mx_config_cache->exists( $cache_key ) ) { ! $page_id = $mx_config_cache->get( $cache_key ); ! return $page_id; } ! else { if( $use_function_file ) --- 578,589 ---- $cache_key = 'pagemap_block' . $search_item; + $page_id_array = array(); if ( $mx_config_cache->exists( $cache_key ) ) { ! $page_id_array = unserialize( $mx_config_cache->get( $cache_key ) ); } ! ! ! if (empty($page_id_array['page_id'])) { if( $use_function_file ) *************** *** 607,611 **** // First, see if we can get the page_id from ordinary blocks // ! $sql = "SELECT pag.page_id FROM " . COLUMN_BLOCK_TABLE . " bct, " . PAGE_TABLE . " pag, --- 609,613 ---- // First, see if we can get the page_id from ordinary blocks // ! $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc FROM " . COLUMN_BLOCK_TABLE . " bct, " . PAGE_TABLE . " pag, *************** *** 614,618 **** AND bct.column_id = col.column_id AND bct.block_id = '" . $search_item . "' ! ORDER BY pag.page_id"; if( !($p_result = $db->sql_query($sql)) ) --- 616,621 ---- AND bct.column_id = col.column_id AND bct.block_id = '" . $search_item . "' ! ORDER BY pag.page_id ! LIMIT 1"; if( !($p_result = $db->sql_query($sql)) ) *************** *** 627,631 **** // Find all dynamic block Page_ids, if not present as ordinary block // ! $sql = "SELECT pag.page_id FROM " . PAGE_TABLE . " pag, " . BLOCK_TABLE . " blk, --- 630,634 ---- // Find all dynamic block Page_ids, if not present as ordinary block // ! $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, nav.block_id FROM " . PAGE_TABLE . " pag, " . BLOCK_TABLE . " blk, *************** *** 636,640 **** AND nav.block_id = blk.block_id AND nav.block_id = '" . $search_item . "' ! ORDER BY blk.block_id"; if( !($p_result = $db->sql_query($sql)) ) --- 639,644 ---- AND nav.block_id = blk.block_id AND nav.block_id = '" . $search_item . "' ! ORDER BY blk.block_id ! LIMIT 1"; if( !($p_result = $db->sql_query($sql)) ) *************** *** 648,652 **** if( empty($p_row['page_id']) ) { ! $sql = "SELECT pag.page_id, sys.parameter_value FROM " . COLUMN_BLOCK_TABLE . " bct, " . PAGE_TABLE . " pag, --- 652,659 ---- if( empty($p_row['page_id']) ) { ! // ! // Find all subblock page_ids ! // ! $sql = "SELECT pag.page_id, pag.page_name, pag.page_desc, sys.parameter_value FROM " . COLUMN_BLOCK_TABLE . " bct, " . PAGE_TABLE . " pag, *************** *** 674,678 **** if ($block_id = $search_item) { ! $p_row['page_id'] = $temp_row['page_id']; continue; } --- 681,685 ---- if ($block_id = $search_item) { ! $p_row = $temp_row; continue; } *************** *** 686,695 **** } ! $page_id = ( !empty($p_row['page_id']) ) ? $p_row['page_id'] : ''; ! $mx_config_cache->put( $cache_key, $page_id ); } ! return $page_id; } --- 693,722 ---- } ! $page_id_array = array(); ! if (!empty($p_row['page_id'])) ! { ! $page_id_array['page_id'] = $p_row['page_id']; ! $page_id_array['page_name'] = $p_row['page_name']; ! $page_id_array['page_desc'] = $p_row['page_desc']; ! $page_id_array['block_id'] = $p_row['block_id']; ! } ! $mx_config_cache->put( $cache_key, serialize($page_id_array) ); } ! if ( $get_page_data_array && !empty($page_id_array['page_id']) ) ! { ! $return = $page_id_array; ! } ! else if(!empty($page_id_array['page_id'])) ! { ! $return = $page_id_array['page_id']; ! } ! else ! { ! $return = ''; ! } ! ! return $return; } |
Update of /cvsroot/mxbb/mx_smartor/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18918/modules/mx_smartor/admin Modified Files: admin_album_auth.php admin_album_cat.php admin_album_clearcache.php admin_album_clown_SP.php admin_album_config.php admin_album_personal.php Log Message: adding php5 support Index: admin_album_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_auth.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_album_auth.php 1 Oct 2005 14:17:36 -0000 1.5 --- admin_album_auth.php 11 Dec 2005 16:22:07 -0000 1.6 *************** *** 30,40 **** // Let's set the root dir for phpBB ! $module_root_path = '../'; ! $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_constants.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); $album_user_id = ALBUM_PUBLIC_GALLERY; --- 30,39 ---- // Let's set the root dir for phpBB ! $module_root_path = './../'; ! $mx_root_path = './../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); $album_user_id = ALBUM_PUBLIC_GALLERY; Index: admin_album_clearcache.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_clearcache.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_album_clearcache.php 1 Oct 2005 14:17:36 -0000 1.5 --- admin_album_clearcache.php 11 Dec 2005 16:22:07 -0000 1.6 *************** *** 30,40 **** // Let's set the root dir for phpBB ! $module_root_path = '../'; ! $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_constants.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); if ( !isset( $HTTP_POST_VARS['confirm'] ) ) --- 30,39 ---- // Let's set the root dir for phpBB ! $module_root_path = './../'; ! $mx_root_path = './../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); if ( !isset( $HTTP_POST_VARS['confirm'] ) ) Index: admin_album_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_cat.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_album_cat.php 1 Oct 2005 14:17:36 -0000 1.5 --- admin_album_cat.php 11 Dec 2005 16:22:07 -0000 1.6 *************** *** 24,28 **** { $filename = basename( __FILE__ ); ! $module['Smartor_Album']['Categories'] = "modules/mx_smartor/admin/" . $filename; return; } --- 24,28 ---- { $filename = basename( __FILE__ ); ! $module['Smartor_Album']['Categories'] = 'modules/mx_smartor/admin/' . $filename; return; } *************** *** 30,40 **** // Let's set the root dir for phpBB ! $module_root_path = '../'; ! $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_constants.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); /* --- 30,40 ---- // Let's set the root dir for phpBB ! $module_root_path = './../'; ! $mx_root_path = './../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); /* Index: admin_album_personal.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_personal.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_album_personal.php 1 Oct 2005 14:17:36 -0000 1.5 --- admin_album_personal.php 11 Dec 2005 16:22:07 -0000 1.6 *************** *** 30,40 **** // Let's set the root dir for phpBB ! $module_root_path = '../'; ! $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_constants.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); if ( !isset( $HTTP_POST_VARS['submit'] ) ) --- 30,39 ---- // Let's set the root dir for phpBB ! $module_root_path = './../'; ! $mx_root_path = './../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); if ( !isset( $HTTP_POST_VARS['submit'] ) ) Index: admin_album_config.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_config.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin_album_config.php 1 Oct 2005 14:17:36 -0000 1.5 --- admin_album_config.php 11 Dec 2005 16:22:07 -0000 1.6 *************** *** 24,28 **** { $filename = basename( __FILE__ ); ! $module['Smartor_Album']['Configuration std'] = "modules/mx_smartor/admin/" . $filename; return; } --- 24,28 ---- { $filename = basename( __FILE__ ); ! $module['Smartor_Album']['Configuration_std'] = 'modules/mx_smartor/admin/' . $filename; return; } *************** *** 30,40 **** // Let's set the root dir for phpBB ! $module_root_path = '../'; ! $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_constants.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); // Pull all config data --- 30,44 ---- // Let's set the root dir for phpBB ! $module_root_path = './../'; ! $mx_root_path = './../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! // ------------------------------ ! // DEBUG ONLY ;-) ! // ! error_reporting(E_ALL); ! // ------------------------------ ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); // Pull all config data Index: admin_album_clown_SP.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_clown_SP.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** admin_album_clown_SP.php 1 Oct 2005 14:17:36 -0000 1.7 --- admin_album_clown_SP.php 11 Dec 2005 16:22:07 -0000 1.8 *************** *** 24,28 **** { $filename = basename( __FILE__ ); ! $module['Smartor_Album']['Configuration adv'] = "modules/mx_smartor/admin/" . $filename; return; } --- 24,28 ---- { $filename = basename( __FILE__ ); ! $module['Smartor_Album']['Configuration_adv'] = "modules/mx_smartor/admin/" . $filename; return; } *************** *** 30,40 **** // Let's set the root dir for phpBB ! $module_root_path = '../'; ! $mx_root_path = '../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_constants.' . $phpEx ); ! require( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); /* --- 30,39 ---- // Let's set the root dir for phpBB ! $module_root_path = './../'; ! $mx_root_path = './../../../'; require( $mx_root_path . 'extension.inc' ); require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'album_mod/album_common.' . $phpEx ); ! include_once( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); /* |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:22:16
|
Update of /cvsroot/mxbb/mx_smartor/album_mod In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18918/modules/mx_smartor/album_mod Modified Files: album_common.php album_hierarchy_functions.php album_hierarchy_sql.php Log Message: adding php5 support Index: album_hierarchy_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** album_hierarchy_functions.php 1 Oct 2005 14:17:36 -0000 1.2 --- album_hierarchy_functions.php 11 Dec 2005 16:22:07 -0000 1.3 *************** *** 66,72 **** $album_data = array(); ! require_once( $album_root_path . 'album_hierarchy_debug.' . $phpEx ); ! require_once( $album_root_path . 'album_hierarchy_auth.' . $phpEx ); ! require_once( $album_root_path . 'album_hierarchy_sql.' . $phpEx ); // ----------------------------------------------- // build the album category administration panel --- 66,72 ---- $album_data = array(); ! include_once( $album_root_path . 'album_hierarchy_debug.' . $phpEx ); ! include_once( $album_root_path . 'album_hierarchy_auth.' . $phpEx ); ! include_once( $album_root_path . 'album_hierarchy_sql.' . $phpEx ); // ----------------------------------------------- // build the album category administration panel *************** *** 78,82 **** static $username = ''; // display 'the' level ! $this = isset( $album_data['keys'][$cur] ) ? $album_data['keys'][$cur] : ALBUM_ROOT_CATEGORY; //-1; if ( defined( 'IN_ADMIN' ) ) --- 78,82 ---- static $username = ''; // display 'the' level ! $thisdata = isset( $album_data['keys'][$cur] ) ? $album_data['keys'][$cur] : ALBUM_ROOT_CATEGORY; //-1; if ( defined( 'IN_ADMIN' ) ) *************** *** 88,95 **** { $admin_url = this_smartor_mxurl( "smartor_mode=album_personal_cat_admin" . "&" ); ! $is_root = ( ( $this == ALBUM_ROOT_CATEGORY || $this == 0 ) ) ? true : false; } // root level ! if ( $this == ALBUM_ROOT_CATEGORY ) { $level = ALBUM_ROOT_CATEGORY; --- 88,95 ---- { $admin_url = this_smartor_mxurl( "smartor_mode=album_personal_cat_admin" . "&" ); ! $is_root = ( ( $thisdata == ALBUM_ROOT_CATEGORY || $thisdata == 0 ) ) ? true : false; } // root level ! if ( $thisdata == ALBUM_ROOT_CATEGORY ) { $level = ALBUM_ROOT_CATEGORY; *************** *** 115,123 **** } // if we are above the 'root' level, thenadd it to the template (root level is -1) ! if ( $this > ALBUM_ROOT_CATEGORY ) { // display a cat row ! $cat = $album_data['data'][$this]; ! $cat_id = $album_data['id'][$this]; // get the class colors $class_catLeft = "cat"; --- 115,123 ---- } // if we are above the 'root' level, thenadd it to the template (root level is -1) ! if ( $thisdata > ALBUM_ROOT_CATEGORY ) { // display a cat row ! $cat = $album_data['data'][$thisdata]; ! $cat_id = $album_data['id'][$thisdata]; // get the class colors $class_catLeft = "cat"; *************** *** 176,180 **** } // if we are 'above' the root level then add the add category 'footer' ! if ( $this > ALBUM_ROOT_CATEGORY ) { // cat footer, add the footer --- 176,180 ---- } // if we are 'above' the root level then add the add category 'footer' ! if ( $thisdata > ALBUM_ROOT_CATEGORY ) { // cat footer, add the footer *************** *** 212,216 **** $album_show_pic_url = ( ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) ? "smartor_mode=album_showpage" : "smartor_mode=album_page" ); // display the level ! $this = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; // root level head if ( $real_level == ALBUM_ROOT_CATEGORY || !is_array( $keys ) ) --- 212,216 ---- $album_show_pic_url = ( ( defined( 'ALBUM_SP_CONFIG_TABLE' ) ) ? "smartor_mode=album_showpage" : "smartor_mode=album_page" ); // display the level ! $thisdata = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; // root level head if ( $real_level == ALBUM_ROOT_CATEGORY || !is_array( $keys ) ) *************** *** 235,239 **** $total_comments = 0; // display a cat row ! $cat = $album_data['data'][$this]; $cat_id = $cat['cat_id']; // sub categories for current category --- 235,239 ---- $total_comments = 0; // display a cat row ! $cat = $album_data['data'][$thisdata]; $cat_id = $cat['cat_id']; // sub categories for current category *************** *** 518,525 **** for ( $i = 0; $i < count( $album_data_level['data'] ); $i++ ) { ! $this = count( $album_data['data'] ); $key = $album_data_level['id'][$i]; $album_data['sub'][$parent][] = $key; ! $album_data['keys'][$key] = $this; $album_data['parent'][] = $parent; $album_data['id'][] = $album_data_level['id'][$i]; --- 518,525 ---- for ( $i = 0; $i < count( $album_data_level['data'] ); $i++ ) { ! $thisdata = count( $album_data['data'] ); $key = $album_data_level['id'][$i]; $album_data['sub'][$parent][] = $key; ! $album_data['keys'][$key] = $thisdata; $album_data['parent'][] = $parent; $album_data['id'][] = $album_data_level['id'][$i]; *************** *** 641,645 **** for ( $i = 0; $i < count( $album_data['sub'][$cur_cat_id] ); $i++ ) { ! album_get_sub_cat_ids( $album_data['sub'][$cur_cat_id][$i], &$cats ); } } --- 641,648 ---- for ( $i = 0; $i < count( $album_data['sub'][$cur_cat_id] ); $i++ ) { ! // ! // Call by reference removed - php5 fix ! // ! album_get_sub_cat_ids( $album_data['sub'][$cur_cat_id][$i], $cats ); } } *************** *** 652,656 **** $res = ''; ! $this = $album_data['keys'][$cur_cat_id]; switch ( $field ) --- 655,659 ---- $res = ''; ! $thisdata = $album_data['keys'][$cur_cat_id]; switch ( $field ) *************** *** 660,664 **** if ( album_is_personal_gallery( $cur_cat_id ) == true && album_get_personal_root_id( $album_user_id ) == $cur_cat_id ) { ! return sprintf( $lang['Personal_Gallery_Of_User'], $album_data['data'][$this]['username'] ); } --- 663,667 ---- if ( album_is_personal_gallery( $cur_cat_id ) == true && album_get_personal_root_id( $album_user_id ) == $cur_cat_id ) { ! return sprintf( $lang['Personal_Gallery_Of_User'], $album_data['data'][$thisdata]['username'] ); } *************** *** 675,679 **** } ! $res = $album_data['data'][$this][$field]; if ( isset( $lang[$res] ) ) $res = $lang[$res]; return $res; --- 678,682 ---- } ! $res = $album_data['data'][$thisdata][$field]; if ( isset( $lang[$res] ) ) $res = $lang[$res]; return $res; *************** *** 695,706 **** } // find the object ! $this = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; $res = ''; ! while ( ( $this >= 0 ) || ( $fcur != '' ) ) { $field_name = album_get_object_lang( $cur_cat_id, 'name' ); $param_type = 'cat_id'; ! $param_value = $album_data['id'][$this]; if ( $pgm != '' ) --- 698,709 ---- } // find the object ! $thisdata = isset( $album_data['keys'][$cur_cat_id] ) ? $album_data['keys'][$cur_cat_id] : ALBUM_ROOT_CATEGORY; $res = ''; ! while ( ( $thisdata >= 0 ) || ( $fcur != '' ) ) { $field_name = album_get_object_lang( $cur_cat_id, 'name' ); $param_type = 'cat_id'; ! $param_value = $album_data['id'][$thisdata]; if ( $pgm != '' ) *************** *** 720,733 **** else { ! $cur_cat_id = $album_data['parent'][$this]; } if ( isset( $album_data['keys'][$cur_cat_id] ) ) { ! $this = $album_data['keys'][$cur_cat_id]; } else { ! $this = ALBUM_ROOT_CATEGORY; } } // while --- 723,736 ---- else { ! $cur_cat_id = $album_data['parent'][$thisdata]; } if ( isset( $album_data['keys'][$cur_cat_id] ) ) { ! $thisdata = $album_data['keys'][$cur_cat_id]; } else { ! $thisdata = ALBUM_ROOT_CATEGORY; } } // while Index: album_hierarchy_sql.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_hierarchy_sql.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** album_hierarchy_sql.php 1 Oct 2005 14:17:36 -0000 1.2 --- album_hierarchy_sql.php 11 Dec 2005 16:22:07 -0000 1.3 *************** *** 433,439 **** } // 'search' the object ! $this = ( isset( $album_data['keys'][$cat_id] ) ) ? $album_data['keys'][$cat_id] : ALBUM_ROOT_CATEGORY; // get the root or parent cat id ! $parent = ( $this < 0 ) ? ALBUM_ROOT_CATEGORY : $album_data['parent'][$this]; // renum objects of the same level and regenerate all $order = 0; --- 433,439 ---- } // 'search' the object ! $thisdata = ( isset( $album_data['keys'][$cat_id] ) ) ? $album_data['keys'][$cat_id] : ALBUM_ROOT_CATEGORY; // get the root or parent cat id ! $parent = ( $thisdata < 0 ) ? ALBUM_ROOT_CATEGORY : $album_data['parent'][$thisdata]; // renum objects of the same level and regenerate all $order = 0; *************** *** 453,457 **** { $order = $order + 10; ! $neworder = ( $i == $this ) ? $order + $move : $order; $album_data['data'][$i]['cat_order'] = $neworder; } --- 453,457 ---- { $order = $order + 10; ! $neworder = ( $i == $thisdata ) ? $order + $move : $order; $album_data['data'][$i]['cat_order'] = $neworder; } *************** *** 657,662 **** $categories = implode( ",", $cats ); ! $this = isset( $album_data['keys'][$cats[0]] ) ? $album_data['keys'][$cats[0]] : ALBUM_ROOT_CATEGORY; ! $cat = $album_data['data'][$this]; // Check Pic Approval // the cat array should be the 'current' category (data)... --- 657,662 ---- $categories = implode( ",", $cats ); ! $thisdata = isset( $album_data['keys'][$cats[0]] ) ? $album_data['keys'][$cats[0]] : ALBUM_ROOT_CATEGORY; ! $cat = $album_data['data'][$thisdata]; // Check Pic Approval // the cat array should be the 'current' category (data)... Index: album_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/album_common.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** album_common.php 1 Oct 2005 14:17:36 -0000 1.10 --- album_common.php 11 Dec 2005 16:22:07 -0000 1.11 *************** *** 130,133 **** --- 130,134 ---- // $album_config['fullpic_popup'] = '0'; // get SP config info + $sql = "SELECT * FROM " . ALBUM_SP_CONFIG_TABLE; *************** *** 143,146 **** --- 144,148 ---- $album_sp_config[$album_sp_config_name] = $album_sp_config_value; } + // end get SP config info include_once( $album_root_path . 'album_functions.' . $phpEx ); |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:20:54
|
Update of /cvsroot/mxbb/mx_sitestats/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18732/modules/mx_sitestats/admin Modified Files: admin_referers.php Log Message: minor query fix Index: admin_referers.php =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/admin/admin_referers.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_referers.php 24 Oct 2005 20:19:01 -0000 1.3 --- admin_referers.php 11 Dec 2005 16:20:44 -0000 1.4 *************** *** 99,104 **** // Get TopReferers Block Settings... ! /* ! $sql = "SELECT block_id FROM " . BLOCK_TABLE . " WHERE block_title = 'SiteStats TopReferers' LIMIT 1"; if ( !$result = $db->sql_query( $sql ) ) { --- 99,103 ---- // Get TopReferers Block Settings... ! $sql = "SELECT block_id FROM " . BLOCK_TABLE . " WHERE block_title = 'Top_Referers' LIMIT 1"; if ( !$result = $db->sql_query( $sql ) ) { *************** *** 107,114 **** $row = $db->sql_fetchrow( $result ); $block_id = $row['block_id']; - $block_config = read_block_config( $block_id ); - $rows_per_page = $block_config[$block_id]['SiteStats_TopReferers_Count']['parameter_value']; - */ $rows_per_page = $mx_block->get_parameters( 'SiteStats_TopReferers_Count' ); --- 106,114 ---- $row = $db->sql_fetchrow( $result ); $block_id = $row['block_id']; + //$block_config = read_block_config( $block_id ); + //$rows_per_page = $block_config[$block_id]['SiteStats_TopReferers_Count']['parameter_value']; + $mx_block = new mx_block(); + $mx_block->init($block_id); $rows_per_page = $mx_block->get_parameters( 'SiteStats_TopReferers_Count' ); |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:19:29
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18427/modules/mx_pafiledb/admin Modified Files: admin_pa_catauth.php admin_pa_category.php admin_pa_custom.php admin_pa_fchecker.php admin_pa_file.php admin_pa_license.php admin_pa_settings.php admin_pa_ug_auth.php Log Message: adding php5 support Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_pa_category.php 8 Dec 2005 15:15:11 -0000 1.13 --- admin_pa_category.php 11 Dec 2005 16:19:20 -0000 1.14 *************** *** 45,50 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } --- 45,51 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); } *************** *** 75,79 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } --- 76,81 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); } *************** *** 440,505 **** include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - function admin_cat_main( $cat_parent = 0, $depth = 0 ) - { - global $pafiledb, $phpbb_root_path, $pafiledb_template, $phpEx; - - $pre = str_repeat( ' ', $depth ); - if ( isset( $pafiledb->subcat_rowset[$cat_parent] ) ) - { - foreach( $pafiledb->subcat_rowset[$cat_parent] as $subcat_id => $cat_data ) - { - $pafiledb_template->assign_block_vars( 'cat_row', array( 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] == PA_CAT_ALLOW_FILE ) ? false : true, - 'U_CAT' => append_sid( 'admin_pa_category.php?cat_id=' . $subcat_id ), - 'U_CAT_EDIT' => append_sid( "admin_pa_category.$phpEx?mode=edit&cat_id=$subcat_id" ), - 'U_CAT_DELETE' => append_sid( "admin_pa_category.$phpEx?mode=delete&cat_id=$subcat_id" ), - 'U_CAT_MOVE_UP' => append_sid( "admin_pa_category.$phpEx?mode=cat_order&move=-15&cat_id_other=$subcat_id" ), - 'U_CAT_MOVE_DOWN' => append_sid( "admin_pa_category.$phpEx?mode=cat_order&move=15&cat_id_other=$subcat_id" ), - 'U_CAT_RESYNC' => append_sid( "admin_pa_category.$phpEx?mode=sync&cat_id_other=$subcat_id" ), - 'CAT_NAME' => $cat_data['cat_name'], - 'PRE' => $pre ) - ); - admin_cat_main( $subcat_id, $depth + 1 ); - } - return; - } - return; - } - - function get_forums( $sel_id = 0 ) - { - global $db; - - $sql = "SELECT forum_id, forum_name - FROM " . FORUMS_TABLE; - - if ( !$result = $db->sql_query( $sql ) ) - { - mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); - } - - $forumlist = '<select name="forum_id">'; - - if ( $sel_id == 0 ) - { - $forumlist .= '<option value="0" selected > Select a Forum !</option>'; - } - - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $sel_id == $row['forum_id'] ) - { - $status = "selected"; - } - else - { - $status = ''; - } - $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; - } - - $forumlist .= '</select>'; - - return $forumlist; - } - ?> \ No newline at end of file --- 442,444 ---- Index: admin_pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_file.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** admin_pa_file.php 8 Dec 2005 15:15:11 -0000 1.16 --- admin_pa_file.php 11 Dec 2005 16:19:20 -0000 1.17 *************** *** 45,51 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } else --- 45,51 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } else *************** *** 75,80 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } --- 75,80 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } Index: admin_pa_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_settings.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** admin_pa_settings.php 8 Dec 2005 15:15:11 -0000 1.14 --- admin_pa_settings.php 11 Dec 2005 16:19:20 -0000 1.15 *************** *** 45,50 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } else --- 45,51 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); } else *************** *** 74,78 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } --- 75,81 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); ! } *************** *** 589,613 **** include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - - function pa_size_select( $select_name, $size_compare ) - { - global $lang; - - $size_types_text = array( $lang['Bytes'], $lang['KB'], $lang['MB'] ); - $size_types = array( 'b', 'kb', 'mb' ); - - $select_field = '<select name="' . $select_name . '">'; - - for ( $i = 0; $i < count( $size_types_text ); $i++ ) - { - $selected = ( $size_compare == $size_types[$i] ) ? ' selected="selected"' : ''; - - $select_field .= '<option value="' . $size_types[$i] . '"' . $selected . '>' . $size_types_text[$i] . '</option>'; - } - - $select_field .= '</select>'; - - return ( $select_field ); - } - ?> \ No newline at end of file --- 592,594 ---- Index: admin_pa_catauth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_catauth.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin_pa_catauth.php 8 Dec 2005 15:15:11 -0000 1.12 --- admin_pa_catauth.php 11 Dec 2005 16:19:20 -0000 1.13 *************** *** 45,50 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } else --- 45,51 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); } else *************** *** 74,78 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } --- 75,80 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); } *************** *** 229,267 **** include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) - { - global $pafiledb, $phpbb_root_path, $pafiledb_template, $phpEx; - global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $lang; - $pre = str_repeat( ' ', $depth ); - if ( isset( $pafiledb->subcat_rowset[$cat_parent] ) ) - { - foreach( $pafiledb->subcat_rowset[$cat_parent] as $sub_cat_id => $cat_data ) - { - $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $cat_data['cat_name'], - 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] ) ? false : true, - 'PRE' => $pre, - 'U_CAT' => append_sid( "admin_pa_catauth.$phpEx?cat_parent=$sub_cat_id" ) ) - ); - - for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) - { - $custom_auth[$j] = ' <select name="' . $cat_auth_fields[$j] . '[' . $sub_cat_id . ']' . '">'; - - for( $k = 0; $k < count( $cat_auth_levels ); $k++ ) - { - $selected = ( $cat_data[$cat_auth_fields[$j]] == $cat_auth_const[$k] ) ? ' selected="selected"' : ''; - $custom_auth[$j] .= '<option value="' . $cat_auth_const[$k] . '"' . $selected . '>' . $lang['Category_' . $cat_auth_levels[$k]] . '</option>'; - } - $custom_auth[$j] .= '</select> '; - - $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) - ); - } - admin_display_cat_auth( $sub_cat_id, $depth + 1 ); - } - return; - } - return; - } - ?> \ No newline at end of file --- 231,233 ---- Index: admin_pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_license.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** admin_pa_license.php 1 Oct 2005 14:15:19 -0000 1.12 --- admin_pa_license.php 11 Dec 2005 16:19:20 -0000 1.13 *************** *** 45,50 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } else --- 45,50 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } else *************** *** 74,78 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } --- 74,78 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } Index: admin_pa_fchecker.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_fchecker.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** admin_pa_fchecker.php 24 Oct 2005 20:16:56 -0000 1.13 --- admin_pa_fchecker.php 11 Dec 2005 16:19:20 -0000 1.14 *************** *** 45,50 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } else --- 45,50 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); } else *************** *** 74,78 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } --- 74,78 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); } Index: admin_pa_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_custom.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** admin_pa_custom.php 8 Dec 2005 15:15:11 -0000 1.14 --- admin_pa_custom.php 11 Dec 2005 16:19:20 -0000 1.15 *************** *** 45,51 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } --- 45,51 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } *************** *** 76,81 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } --- 76,81 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); } Index: admin_pa_ug_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_ug_auth.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** admin_pa_ug_auth.php 8 Dec 2005 15:15:11 -0000 1.10 --- admin_pa_ug_auth.php 11 Dec 2005 16:19:20 -0000 1.11 *************** *** 43,49 **** require( './pagestart.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); } --- 43,50 ---- require( './pagestart.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_admin.'.$phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $phpbb_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); } *************** *** 68,72 **** require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); --- 69,74 ---- require( $mx_root_path . 'admin/pagestart.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_admin.' . $phpEx ); include_once( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); *************** *** 542,546 **** $optionlist_mod[$cat_id] .= '</select>'; } ! admin_display_cat_auth(); if ( $mode == 'user' ) --- 544,548 ---- $optionlist_mod[$cat_id] .= '</select>'; } ! admin_display_cat_auth_ug(); if ( $mode == 'user' ) *************** *** 949,1035 **** include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) - { - global $pafiledb, $phpbb_root_path, $pafiledb_template, $phpEx; - global $cat_auth_fields, $optionlist_mod, $optionlist_acl_adv; - $pre = str_repeat( ' ', $depth ); - if ( isset( $pafiledb->subcat_rowset[$cat_parent] ) ) - { - foreach( $pafiledb->subcat_rowset[$cat_parent] as $sub_cat_id => $cat_data ) - { - $pafiledb_template->assign_block_vars( 'cat_row', array( 'CAT_NAME' => $cat_data['cat_name'], - 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] ) ? false : true, - 'PRE' => $pre, - - 'U_CAT' => append_sid( "admin_pa_catauth.$phpEx?cat_id=$sub_cat_id" ), - - 'S_MOD_SELECT' => $optionlist_mod[$sub_cat_id] ) - ); - - for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) - { - $pafiledb_template->assign_block_vars( 'cat_row.aclvalues', array( 'S_ACL_SELECT' => $optionlist_acl_adv[$sub_cat_id][$j] ) - ); - } - admin_display_cat_auth( $sub_cat_id, $depth + 1 ); - } - return; - } - return; - } - - function global_auth_check_user( $type, $key, $global_u_access, $is_admin ) - { - $auth_user = 0; - - if ( !empty( $global_u_access ) ) - { - $result = 0; - switch ( $type ) - { - case AUTH_ACL: - $result = $global_u_access[$key]; - - case AUTH_MOD: - $result = $result || is_moderator( $global_u_access['group_id'] ); - - case AUTH_ADMIN: - $result = $result || $is_admin; - break; - } - - $auth_user = $auth_user || $result; - } - else - { - $auth_user = $is_admin; - } - - return $auth_user; - } - - function is_moderator( $group_id ) - { - static $is_mod = false; - - if ( $is_mod !== false ) - { - return $is_mod; - } - - global $db; - - $sql = "SELECT * - FROM " . PA_AUTH_ACCESS_TABLE . " - WHERE group_id = $group_id - AND auth_mod = '1'"; - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, "Couldn't check for moderator $sql", "", __LINE__, __FILE__, $sql ); - } - - return ( $is_mod = ( $db->sql_fetchrow( $result ) ) ? 1 : 0 ); - } - ?> \ No newline at end of file --- 951,953 ---- |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:19:28
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18427/modules/mx_pafiledb/pafiledb/includes Modified Files: pafiledb_constants.php Added Files: functions_admin.php Log Message: adding php5 support Index: pafiledb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/pafiledb_constants.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pafiledb_constants.php 1 Oct 2005 14:15:20 -0000 1.13 --- pafiledb_constants.php 11 Dec 2005 16:19:20 -0000 1.14 *************** *** 84,98 **** // Read language definition // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_pafiledb.' . $phpEx ) ) { $link_language = 'lang_english'; ! include( $module_root_path . 'language/' . $link_language . '/lang_pafiledb.' . $phpEx ); ! include( $module_root_path . 'language/' . $link_language . '/lang_pafiledb_admin.' . $phpEx ); } else { $link_language = 'lang_' . $board_config['default_lang']; ! include( $module_root_path . 'language/' . $link_language . '/lang_pafiledb.' . $phpEx ); ! include( $module_root_path . 'language/' . $link_language . '/lang_pafiledb_admin.' . $phpEx ); } --- 84,98 ---- // Read language definition // ********************************************************************** ! if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { $link_language = 'lang_english'; ! include( $module_root_path . 'language/' . $link_language . '/lang_main.' . $phpEx ); ! include( $module_root_path . 'language/' . $link_language . '/lang_admin.' . $phpEx ); } else { $link_language = 'lang_' . $board_config['default_lang']; ! include( $module_root_path . 'language/' . $link_language . '/lang_main.' . $phpEx ); ! include( $module_root_path . 'language/' . $link_language . '/lang_admin.' . $phpEx ); } --- NEW FILE: functions_admin.php --- (This appears to be a binary file; contents omitted.) |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:19:28
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18427/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_stats.php Log Message: adding php5 support Index: pa_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_stats.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_stats.php 8 Dec 2005 15:15:13 -0000 1.14 --- pa_stats.php 11 Dec 2005 16:19:20 -0000 1.15 *************** *** 168,172 **** $avgdls = @round( $totaldls / $num['files'] ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_pafiledb.' . $phpEx ); $lang['Stats_text'] = str_replace( "{total_files}", $num['files'], $lang['Stats_text'] ); --- 168,172 ---- $avgdls = @round( $totaldls / $num['files'] ); ! require( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); $lang['Stats_text'] = str_replace( "{total_files}", $num['files'], $lang['Stats_text'] ); |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:18:15
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/modules/mx_kb/kb/includes Added Files: functions_admin.php Log Message: adding php5 support --- NEW FILE: functions_admin.php --- <?php /** ------------------------------------------------------------------------ * Subject : mxBB - a fully modular portal and CMS (for phpBB) * Author : Jon Ohlsson and the mxBB Team * Credits : The phpBB Group & Marc Morisette, wGeric * Copyright : (C) 2002-2005 mxBB Portal * Email : jo...@mx... * Project site : www.mxbb-portal.com * ------------------------------------------------------------------------- * * $Id: functions_admin.php,v 1.1 2005/12/11 16:18:04 jonohlsson Exp $ */ /** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } function admin_cat_main( $cat_parent = 0, $depth = 0 ) { global $mx_kb, $phpbb_root_path, $template, $phpEx, $lang, $images, $module_root_path; $pre = str_repeat( ' ', $depth ); if ( isset( $mx_kb->subcat_rowset[$cat_parent] ) ) { foreach( $mx_kb->subcat_rowset[$cat_parent] as $category_id => $category ) { $category_details = $category['category_details']; $category_articles = $category['number_articles']; $category_id = $category['category_id']; $category_name = $category['category_name']; $temp_url = append_sid( $module_root_path . "kb.$phpEx?mode=cat&cat=$category_id" ); $category_link = '<a href="' . $temp_url . '" class="gen">' . $category_name . '</a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=edit&cat=$category_id" ); $edit = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_edit'] . '" border="0" alt="' . $lang['Edit'] . '"></a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=delete&cat=$category_id" ); $delete = '<a href="' . $temp_url . '" class="gen"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=up&cat=$category_id" ); $up = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_up'] . '</a>'; $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=down&cat=$category_id" ); $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; $row_color = ( !( $ss % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; $row_class = ( !( $ss % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category_link, 'CAT_DESCRIPTION' => $category_details, 'CAT_ARTICLES' => $category_articles, 'U_EDIT' => $edit, 'U_DELETE' => $delete, 'U_UP' => $up, 'U_DOWN' => $down, 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'PRE' => $pre )); admin_cat_main( $category_id, $depth + 1 ); } return; } return; } function get_forums( $sel_id = 0 ) { global $db; $sql = "SELECT forum_id, forum_name FROM " . FORUMS_TABLE; if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); } $forumlist = '<select name="forum_id">'; if ( $sel_id == 0 ) { $forumlist .= '<option value="0" selected > Select a Forum !</option>'; } while ( $row = $db->sql_fetchrow( $result ) ) { if ( $sel_id == $row['forum_id'] ) { $status = "selected"; } else { $status = ''; } $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; } $forumlist .= '</select>'; return $forumlist; } ?> |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:18:14
|
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18250/modules/mx_kb/admin Modified Files: admin_kb_cat.php Log Message: adding php5 support Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** admin_kb_cat.php 8 Dec 2005 15:04:25 -0000 1.20 --- admin_kb_cat.php 11 Dec 2005 16:18:03 -0000 1.21 *************** *** 42,45 **** --- 42,46 ---- include( $phpbb_root_path . 'kb/kb_common.' . $phpEx ); + include( $phpbb_root_path . 'kb/includes/functions_admin.' . $phpEx ); } else *************** *** 70,73 **** --- 71,75 ---- include( $module_root_path . 'kb/kb_common.' . $phpEx ); + include( $module_root_path . 'kb/includes/functions_admin.' . $phpEx ); } *************** *** 867,959 **** include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - function admin_cat_main( $cat_parent = 0, $depth = 0 ) - { - global $mx_kb, $phpbb_root_path, $template, $phpEx, $lang, $images, $module_root_path; - - $pre = str_repeat( ' ', $depth ); - if ( isset( $mx_kb->subcat_rowset[$cat_parent] ) ) - { - foreach( $mx_kb->subcat_rowset[$cat_parent] as $category_id => $category ) - { - $category_details = $category['category_details']; - $category_articles = $category['number_articles']; - - $category_id = $category['category_id']; - $category_name = $category['category_name']; - $temp_url = append_sid( $module_root_path . "kb.$phpEx?mode=cat&cat=$category_id" ); - $category_link = '<a href="' . $temp_url . '" class="gen">' . $category_name . '</a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=edit&cat=$category_id" ); - $edit = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_edit'] . '" border="0" alt="' . $lang['Edit'] . '"></a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=delete&cat=$category_id" ); - $delete = '<a href="' . $temp_url . '" class="gen"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=up&cat=$category_id" ); - $up = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_up'] . '</a>'; - - $temp_url = append_sid( $module_root_path . "admin/admin_kb_cat.$phpEx?mode=down&cat=$category_id" ); - $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; - - $row_color = ( !( $ss % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; - $row_class = ( !( $ss % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; - - $template->assign_block_vars( 'catrow', array( - 'CATEGORY' => $category_link, - 'CAT_DESCRIPTION' => $category_details, - 'CAT_ARTICLES' => $category_articles, - - 'U_EDIT' => $edit, - 'U_DELETE' => $delete, - 'U_UP' => $up, - 'U_DOWN' => $down, - - 'ROW_COLOR' => '#' . $row_color, - 'ROW_CLASS' => $row_class, - 'PRE' => $pre - )); - - admin_cat_main( $category_id, $depth + 1 ); - } - return; - } - return; - } - - function get_forums( $sel_id = 0 ) - { - global $db; - - $sql = "SELECT forum_id, forum_name - FROM " . FORUMS_TABLE; - - if ( !$result = $db->sql_query( $sql ) ) - { - mx_message_die( GENERAL_ERROR, "Couldn't get list of forums", "", __LINE__, __FILE__, $sql ); - } - - $forumlist = '<select name="forum_id">'; - - if ( $sel_id == 0 ) - { - $forumlist .= '<option value="0" selected > Select a Forum !</option>'; - } - - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $sel_id == $row['forum_id'] ) - { - $status = "selected"; - } - else - { - $status = ''; - } - $forumlist .= '<option value="' . $row['forum_id'] . '" ' . $status . '>' . $row['forum_name'] . '</option>'; - } - - $forumlist .= '</select>'; - - return $forumlist; - } ?> \ No newline at end of file --- 869,871 ---- |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:17:28
|
Update of /cvsroot/mxbb/mx_dev_startkit/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18091/modules/mx_dev_startkit/admin Modified Files: mx_module_defs.php Log Message: something... Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_dev_startkit/admin/mx_module_defs.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_module_defs.php 22 Oct 2005 22:42:31 -0000 1.2 --- mx_module_defs.php 11 Dec 2005 16:17:19 -0000 1.3 *************** *** 109,113 **** // Get varaibles // ! $parameter_datas = get_list($parameter_id, MODULE_TABLE, 'module_id', 'module_name', $parameter_data['parameter_value'], true); // --- 109,113 ---- // Get varaibles // ! $parameter_datas = mx_get_list($parameter_id, MODULE_TABLE, 'module_id', 'module_name', $parameter_data['parameter_value'], true); // |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:16:09
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17790/modules/mx_calsnails Modified Files: calendar.php Log Message: adding php5 support Index: calendar.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/calendar.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** calendar.php 8 Dec 2005 14:43:10 -0000 1.20 --- calendar.php 11 Dec 2005 16:16:01 -0000 1.21 *************** *** 423,1749 **** // +MX007: Begin - function this_mxurl( $args = '', $jump_to_standalone_mode = false, $cal_page_id = '' ) - { - global $thisscript, $generate_headers, $module_root_path, $page_id, $phpEx; - - if ( $generate_headers || $jump_to_standalone_mode ) - { - $mxurl = $module_root_path . 'calendar.' . $phpEx . ( $args == '' ? '' : '?' . $args ); - } [...1299 lines suppressed...] - $omega--; - } - } - if ( $alpha > $omega ) - { - break; - } - $temporary = $array[$alpha]; - $array[$alpha++] = $array[$omega]; - $array[$omega--] = $temporary; - } - array_qsort2 ( $array, $column, $order, $first, $omega ); - array_qsort2 ( $array, $column, $order, $alpha, $last ); - } - return $array; - } - ?> \ No newline at end of file --- 423,425 ---- |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:16:09
|
Update of /cvsroot/mxbb/mx_calsnails/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17790/modules/mx_calsnails/includes Modified Files: mx_common.php Log Message: adding php5 support Index: mx_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/includes/mx_common.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_common.php 24 Oct 2005 20:13:55 -0000 1.8 --- mx_common.php 11 Dec 2005 16:16:01 -0000 1.9 *************** *** 22,25 **** --- 22,26 ---- include_once( $module_root_path . 'includes/cal_settings.' . $phpEx ); + include_once( $module_root_path . 'includes/cal_functions.' . $phpEx ); // Load language files. |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:51
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207/modules/mx_navmenu Modified Files: mx_menu_nav.php Log Message: Adding php5 support + minor fixes Index: mx_menu_nav.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/mx_menu_nav.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_menu_nav.php 8 Dec 2005 14:41:48 -0000 1.6 --- mx_menu_nav.php 11 Dec 2005 16:13:40 -0000 1.7 *************** *** 153,158 **** } ! $row_color = ( !( $row_count % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $row_count % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $action = $mx_nav_data[$menu_count]['menu_name']; --- 153,158 ---- } ! $row_color = ( !( $menu_count % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $menu_count % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $action = $mx_nav_data[$menu_count]['menu_name']; *************** *** 259,268 **** 'L_TITLE' => $title, 'L_DESC' => $b_description, - 'S_ACTION' => $edit_url, - 'EDIT_IMG' => $edit_img, 'NUM_OF_CATS' => $num_of_cats, 'NUM_OF_CATS_EDIT' => $num_of_cats - 1, ! 'CAT_WIDTH' => $cat_width, ! 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields )); --- 259,265 ---- 'L_TITLE' => $title, 'L_DESC' => $b_description, 'NUM_OF_CATS' => $num_of_cats, 'NUM_OF_CATS_EDIT' => $num_of_cats - 1, ! 'CAT_WIDTH' => $cat_width )); |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:51
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207/includes Modified Files: mx_functions.php mx_functions_admincp.php mx_functions_auth.php mx_functions_core.php Log Message: Adding php5 support + minor fixes Index: mx_functions_auth.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_auth.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mx_functions_auth.php 8 Dec 2005 14:41:48 -0000 1.5 --- mx_functions_auth.php 11 Dec 2005 16:13:39 -0000 1.6 *************** *** 211,215 **** case AUTH_ALL: $auth_user[$key] = TRUE; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; --- 211,215 ---- case AUTH_ALL: $auth_user[$key] = TRUE; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users']; break; *************** *** 221,225 **** case AUTH_ANONYMOUS: $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? TRUE : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; --- 221,225 ---- case AUTH_ANONYMOUS: $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? TRUE : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users']; break; *************** *** 303,307 **** case AUTH_ALL: $auth_user[$key] = TRUE; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; --- 303,307 ---- case AUTH_ALL: $auth_user[$key] = TRUE; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users']; break; *************** *** 313,317 **** case AUTH_ANONYMOUS: $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? TRUE : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_users']; break; --- 313,317 ---- case AUTH_ANONYMOUS: $auth_user[$key] = ( ! $userdata['session_logged_in'] ) ? TRUE : 0; ! $auth_user[$key . '_type'] = $lang['Auth_Anonymous_Users']; break; Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mx_functions_core.php 9 Dec 2005 23:22:03 -0000 1.18 --- mx_functions_core.php 11 Dec 2005 16:13:39 -0000 1.19 *************** *** 256,260 **** $cache_file = $cache_dir . "block_" . $id . ".xml"; ! $block_config = ''; if ( file_exists( $cache_file ) && !empty($id) && $cache == true && $sub_id == 0 && $portal_config['mx_use_cache'] == 1 ) { --- 256,260 ---- $cache_file = $cache_dir . "block_" . $id . ".xml"; ! $block_config = array(); if ( file_exists( $cache_file ) && !empty($id) && $cache == true && $sub_id == 0 && $portal_config['mx_use_cache'] == 1 ) { *************** *** 275,279 **** $cache_file = $cache_dir . "page_" . $id . ".xml"; ! $pages_config = ''; if ( file_exists( $cache_file ) && !empty($id) && $cache == true && $portal_config['mx_use_cache'] == 1 ) { --- 275,279 ---- $cache_file = $cache_dir . "page_" . $id . ".xml"; ! $pages_config = array(); if ( file_exists( $cache_file ) && !empty($id) && $cache == true && $portal_config['mx_use_cache'] == 1 ) { *************** *** 499,503 **** par.parameter_name, par.parameter_type, par.parameter_function, par.parameter_default, par.parameter_order, mdl.module_path, ! fnc.function_file, fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . PARAMETER_TABLE . " par, --- 499,503 ---- par.parameter_name, par.parameter_type, par.parameter_function, par.parameter_default, par.parameter_order, mdl.module_path, ! fnc.function_file, fnc.function_id, fnc.function_admin FROM " . BLOCK_SYSTEM_PARAMETER_TABLE . " sys, " . PARAMETER_TABLE . " par, *************** *** 543,547 **** "module_root_path" => $row['module_path'], "block_file" => $row['function_file'], ! "block_edit_file" => $row['function_admin'] ); --- 543,548 ---- "module_root_path" => $row['module_path'], "block_file" => $row['function_file'], ! "block_edit_file" => $row['function_admin'], ! "function_id" => $row['function_id'] ); *************** *** 869,879 **** // ! function _set_all( $block_id, $unset = false ) { global $userdata; ! ! $this->block_info = $this->block_config[$block_id]['block_info']; ! $this->block_parameters = $this->block_config[$block_id]['block_parameters']; ! $this->block_id = $this->block_info['block_id']; $this->block_title = $this->block_info['block_title']; --- 870,889 ---- // ! function _set_all( $unset = false ) { global $userdata; ! ! // ! // Weird rewrite for php5 - anyone explaining why wins a medal ;) ! // ! $temp = $this->block_config[$this->block_id]; ! $this->block_info = $temp['block_info']; ! $this->block_parameters = $temp['block_parameters']; ! ! /* ! $this->block_info = $this->block_config[$this->block_id]['block_info']; ! $this->block_parameters = $this->block_config[$this->block_id]['block_parameters']; ! */ ! $this->block_id = $this->block_info['block_id']; $this->block_title = $this->block_info['block_title']; *************** *** 885,893 **** $mx_is_auth_ary = array(); ! $mx_is_auth_ary = block_auth( AUTH_VIEW, $block_id, $userdata, $this->block_info['auth_view'], $this->block_info['auth_view_group'] ); $this->auth_view = $unset ? false : $mx_is_auth_ary['auth_view']; $mx_is_auth_ary = array(); ! $mx_is_auth_ary = block_auth( AUTH_EDIT, $block_id, $userdata, $this->block_info['auth_edit'], $this->block_info['auth_edit_group'] ); $this->auth_edit = $unset ? false : $mx_is_auth_ary['auth_edit']; $this->auth_mod = $unset ? false : $mx_is_auth_ary['auth_mod']; --- 895,903 ---- $mx_is_auth_ary = array(); ! $mx_is_auth_ary = block_auth( AUTH_VIEW, $this->block_id, $userdata, $this->block_info['auth_view'], $this->block_info['auth_view_group'] ); $this->auth_view = $unset ? false : $mx_is_auth_ary['auth_view']; $mx_is_auth_ary = array(); ! $mx_is_auth_ary = block_auth( AUTH_EDIT, $this->block_id, $userdata, $this->block_info['auth_edit'], $this->block_info['auth_edit_group'] ); $this->auth_edit = $unset ? false : $mx_is_auth_ary['auth_edit']; $this->auth_mod = $unset ? false : $mx_is_auth_ary['auth_mod']; *************** *** 901,910 **** $this->function_id = $this->block_info['function_id']; ! $this->is_dynamic = $unset ? false : $this->_is_dynamic( $block_id ); ! $this->is_sub = $unset ? false : $this->_is_sub( $block_id ); } ! function _is_dynamic( $block_id ) { global $mx_request_vars; --- 911,920 ---- $this->function_id = $this->block_info['function_id']; ! $this->is_dynamic = $unset ? false : $this->_is_dynamic(); ! $this->is_sub = $unset ? false : $this->_is_sub(); } ! function _is_dynamic() { global $mx_request_vars; *************** *** 926,930 **** } ! function _is_sub( $block_id ) { $is_sub = ( ( $this->block_file == 'mx_multiple_blocks.php' ) ? true : false ); --- 936,940 ---- } ! function _is_sub() { $is_sub = ( ( $this->block_file == 'mx_multiple_blocks.php' ) ? true : false ); *************** *** 966,971 **** global $mx_cache; ! $this->block_config = $mx_cache->read( $block_id, MX_CACHE_BLOCK_TYPE, $force_query ); ! $this->_set_all( $block_id ); } --- 976,982 ---- global $mx_cache; ! $this->block_id = $block_id; ! $this->block_config = $mx_cache->read( $this->block_id, MX_CACHE_BLOCK_TYPE, $force_query ); ! $this->_set_all(); } *************** *** 975,984 **** } ! function kill_me($block_id) { global $mx_cache; $this->block_config = ''; ! $this->_set_all( $block_id, true ); } --- 986,995 ---- } ! function kill_me() { global $mx_cache; $this->block_config = ''; ! $this->_set_all( true ); } *************** *** 1889,1892 **** --- 1900,1904 ---- var $blocks = array(); + var $page_id = '1'; var $page_title = ''; var $page_icon = ''; *************** *** 1919,1927 **** // ! function _set_all( $page_id ) { global $userdata, $mx_root_path, $HTTP_GET_VARS, $HTTP_COOKIE_VARS, $portal_config; ! $this->info = $this->page_config[$page_id]['page_info']; // --- 1931,1939 ---- // ! function _set_all() { global $userdata, $mx_root_path, $HTTP_GET_VARS, $HTTP_COOKIE_VARS, $portal_config; ! $this->info = $this->page_config[$this->page_id]['page_info']; // *************** *** 1950,1957 **** $this->auth_ip = $mx_ip->auth($this->info['ip_filter']); ! $this->columns = $this->page_config[$page_id]['columns']; $this->total_column = count($this->columns); ! $this->blocks = $this->page_config[$page_id]['blocks']; $this->total_block = count($this->blocks); --- 1962,1969 ---- $this->auth_ip = $mx_ip->auth($this->info['ip_filter']); ! $this->columns = $this->page_config[$this->page_id]['columns']; $this->total_column = count($this->columns); ! $this->blocks = $this->page_config[$this->page_id]['blocks']; $this->total_block = count($this->blocks); *************** *** 1959,1963 **** $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $page_id . '" />'; $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; $s_hidden_fields .= '<input type="hidden" name="f" value="' . intval( $HTTP_GET_VARS['f'] ) . '" />'; --- 1971,1975 ---- $s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; ! $s_hidden_fields .= '<input type="hidden" name="portalpage" value="' . $this->page_id . '" />'; $s_hidden_fields .= '<input type="hidden" name="mode" value="setting" />'; $s_hidden_fields .= '<input type="hidden" name="f" value="' . intval( $HTTP_GET_VARS['f'] ) . '" />'; *************** *** 2013,2021 **** global $mx_cache; ! $this->page_config = $mx_cache->read( $page_id, MX_CACHE_PAGE_TYPE, $force_query ); ! $this->_set_all( $page_id ); } ! function kill_me( $page_id ) { global $mx_cache; --- 2025,2034 ---- global $mx_cache; ! $this->page_id = $page_id; ! $this->page_config = $mx_cache->read( $this->page_id, MX_CACHE_PAGE_TYPE, $force_query ); ! $this->_set_all(); } ! function kill_me() { global $mx_cache; Index: mx_functions_admincp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_admincp.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** mx_functions_admincp.php 9 Dec 2005 23:22:03 -0000 1.14 --- mx_functions_admincp.php 11 Dec 2005 16:13:39 -0000 1.15 *************** *** 2318,2322 **** $exists_fnc_ids = array(); ! $safe_row = get_info(MODULE_TABLE, 'module_path', $module_data[3]); // --- 2318,2322 ---- $exists_fnc_ids = array(); ! $safe_row = mx_get_info(MODULE_TABLE, 'module_path', $module_data[3]); // *************** *** 2353,2357 **** } ! $safe_row = get_info(FUNCTION_TABLE, 'module_id', $module_id, 'function_file', $module_data['5']); if( $module_data['4'] == 'endoflist' ) --- 2353,2357 ---- } ! $safe_row = mx_get_info(FUNCTION_TABLE, 'module_id', $module_id, 'function_file', $module_data['5']); if( $module_data['4'] == 'endoflist' ) *************** *** 2397,2401 **** } ! $safe_row = get_info(PARAMETER_TABLE, 'function_id', $function_id, 'parameter_name', $module_data['3']); if( $module_data['4'] == 'endoflist' ) --- 2397,2401 ---- } ! $safe_row = mx_get_info(PARAMETER_TABLE, 'function_id', $function_id, 'parameter_name', $module_data['3']); if( $module_data['4'] == 'endoflist' ) *************** *** 2441,2445 **** } ! $safe_row = get_info(PARAMETER_OPTION_TABLE, 'parameter_id', $parameter_id, 'option_code', $module_data['3']); if( $module_data['4'] == 'endoflist' ) { --- 2441,2445 ---- } ! $safe_row = mx_get_info(PARAMETER_OPTION_TABLE, 'parameter_id', $parameter_id, 'option_code', $module_data['3']); if( $module_data['4'] == 'endoflist' ) { *************** *** 2473,2477 **** // case 'block': ! $safe_row = get_info(BLOCK_TABLE, 'function_id', $function_id); if( $safe_row ) { --- 2473,2477 ---- // case 'block': ! $safe_row = mx_get_info(BLOCK_TABLE, 'function_id', $function_id); if( $safe_row ) { Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** mx_functions.php 9 Dec 2005 23:22:03 -0000 1.53 --- mx_functions.php 11 Dec 2005 16:13:39 -0000 1.54 *************** *** 54,58 **** | \********************************************************************************/ ! function get_info($table, $idfield = '', $id = 0, $idfield2 = '', $id2 = 0) { global $db; --- 54,58 ---- | \********************************************************************************/ ! function mx_get_info($table, $idfield = '', $id = 0, $idfield2 = '', $id2 = 0) { global $db; *************** *** 95,99 **** | \********************************************************************************/ ! function get_list($name_select, $table, $idfield, $namefield, $id, $select = false, $idfield2 = '' , $id2 = '') { global $db; --- 95,99 ---- | \********************************************************************************/ ! function mx_get_list($name_select, $table, $idfield, $namefield, $id, $select = false, $idfield2 = '' , $id2 = '') { global $db; *************** *** 441,445 **** } ! $url = $url[path]; // Build the parameter list if( !strpos($url, '?') ) --- 441,445 ---- } ! $url = $url['path']; // Build the parameter list if( !strpos($url, '?') ) |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:49
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207/modules/mx_textblocks Modified Files: mx_textblock_bbcode.php mx_textblock_blog.php mx_textblock_html.php mx_textblock_multi.php Log Message: Adding php5 support + minor fixes Index: mx_textblock_html.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_html.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_textblock_html.php 23 Oct 2005 18:48:21 -0000 1.10 --- mx_textblock_html.php 11 Dec 2005 16:13:40 -0000 1.11 *************** *** 40,53 **** 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => ( !empty($lang[$title]) ? $lang[$title] : $title ), - 'S_ACTION' => $edit_url, 'U_URL' => append_sid(PORTAL_URL . 'index.' . $phpEx . '?block_id=' . $block_id), 'U_TEXT' => $message, - 'EDIT_IMG' => $edit_img, - 'MOVE_L_IMG' => $move_l_img, - 'MOVE_R_IMG' => $move_r_img, - 'MOVE_U_IMG' => $move_u_img, - 'MOVE_D_IMG' => $move_d_img, - 'CACHE_IMG' => $cache_img, - 'DELETE_IMG' => $delete_img, 'BLOCK_ID' => $block_id, 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields) --- 40,45 ---- Index: mx_textblock_multi.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_multi.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_textblock_multi.php 23 Oct 2005 18:48:21 -0000 1.12 --- mx_textblock_multi.php 11 Dec 2005 16:13:40 -0000 1.13 *************** *** 107,119 **** 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => ( !empty($lang[$title]) ? $lang[$title] : $title ), - 'S_ACTION' => $edit_url, 'U_TEXT' => $message, - 'EDIT_IMG' => $edit_img, - 'MOVE_L_IMG' => $move_l_img, - 'MOVE_R_IMG' => $move_r_img, - 'MOVE_U_IMG' => $move_u_img, - 'MOVE_D_IMG' => $move_d_img, - 'CACHE_IMG' => $cache_img, - 'DELETE_IMG' => $delete_img, 'BLOCK_ID' => $block_id, 'BLOCK_STYLE' => $block_style, --- 107,111 ---- Index: mx_textblock_blog.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_blog.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_textblock_blog.php 23 Oct 2005 18:48:21 -0000 1.10 --- mx_textblock_blog.php 11 Dec 2005 16:13:40 -0000 1.11 *************** *** 154,166 **** 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => ( !empty($lang[$title]) ? $lang[$title] : $title ), - 'S_ACTION' => $edit_url, 'U_TEXT' => $message, - 'EDIT_IMG' => $edit_img, - 'MOVE_L_IMG' => $move_l_img, - 'MOVE_R_IMG' => $move_r_img, - 'MOVE_U_IMG' => $move_u_img, - 'MOVE_D_IMG' => $move_d_img, - 'CACHE_IMG' => $cache_img, - 'DELETE_IMG' => $delete_img, 'BLOCK_ID' => $block_id, 'BLOCK_STYLE' => $block_style, --- 154,158 ---- Index: mx_textblock_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_bbcode.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** mx_textblock_bbcode.php 23 Oct 2005 18:48:21 -0000 1.11 --- mx_textblock_bbcode.php 11 Dec 2005 16:13:40 -0000 1.12 *************** *** 55,67 **** 'BLOCK_SIZE' => ( !empty($block_size) ? $block_size : '100%' ), 'L_TITLE' => ( !empty($lang[$title]) ? $lang[$title] : $title ), - 'S_ACTION' => $edit_url, 'U_TEXT' => $message, - 'EDIT_IMG' => $edit_img, - 'MOVE_L_IMG' => $move_l_img, - 'MOVE_R_IMG' => $move_r_img, - 'MOVE_U_IMG' => $move_u_img, - 'MOVE_D_IMG' => $move_d_img, - 'CACHE_IMG' => $cache_img, - 'DELETE_IMG' => $delete_img, 'BLOCK_ID' => $block_id, 'S_HIDDEN_FORM_FIELDS' => $s_hidden_fields --- 55,59 ---- |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:49
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207/modules/mx_navmenu/admin Modified Files: mx_module_defs.php Log Message: Adding php5 support + minor fixes Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/admin/mx_module_defs.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_module_defs.php 8 Dec 2005 14:41:48 -0000 1.12 --- mx_module_defs.php 11 Dec 2005 16:13:40 -0000 1.13 *************** *** 414,418 **** { $buttonvalue = $lang['Move_and_or_Delete']; ! $catinfo = get_info(MENU_CAT_TABLE, 'cat_id', $cat_id); $name = $catinfo['cat_title']; --- 414,418 ---- { $buttonvalue = $lang['Move_and_or_Delete']; ! $catinfo = mx_get_info(MENU_CAT_TABLE, 'cat_id', $cat_id); $name = $catinfo['cat_title']; *************** *** 439,443 **** else { ! $select_to = get_list('to_id', MENU_CAT_TABLE, 'cat_id', 'cat_title', $cat_id, false, 'block_id', $block_id); } } --- 439,443 ---- else { ! $select_to = mx_get_list('to_id', MENU_CAT_TABLE, 'cat_id', 'cat_title', $cat_id, false, 'block_id', $block_id); } } *************** *** 1165,1169 **** $buttonvalue = $lang['Move_and_Delete']; $newmode = 'movedelcat'; ! $catinfo = get_info(MENU_CAT_TABLE, 'cat_id', $cat_id); $name = $catinfo['cat_title']; --- 1165,1169 ---- $buttonvalue = $lang['Move_and_Delete']; $newmode = 'movedelcat'; ! $catinfo = mx_get_info(MENU_CAT_TABLE, 'cat_id', $cat_id); $name = $catinfo['cat_title']; *************** *** 1190,1194 **** else { ! $select_to .= get_list('to_id', MENU_CAT_TABLE, 'cat_id', 'cat_title', $cat_id, false); } --- 1190,1194 ---- else { ! $select_to .= mx_get_list('to_id', MENU_CAT_TABLE, 'cat_id', 'cat_title', $cat_id, false); } |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:48
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207 Modified Files: index.php Log Message: Adding php5 support + minor fixes Index: index.php =================================================================== RCS file: /cvsroot/mxbb/core/index.php,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** index.php 9 Dec 2005 23:22:03 -0000 1.46 --- index.php 11 Dec 2005 16:13:39 -0000 1.47 *************** *** 24,27 **** --- 24,38 ---- include($mx_root_path . 'common.' . $phpEx); + // ------------------------------ + // DEBUG ONLY ;-) + // + //error_reporting(E_ALL); + // ------------------------------ + + // + // Page selector + // + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); + // // Start session management *************** *** 34,42 **** // - // Page selector - // - $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); - - // // Show copyrights // --- 45,48 ---- *************** *** 116,133 **** if ( $mx_block->is_dynamic ) { $mx_dynamic_block = new mx_block(); ! $mx_dynamic_block = $mx_block; ! $block_id = $mx_block->dynamic_block_id; ! $mx_block->init( $block_id ); } if ( $mx_block->is_sub ) { ! $total_subs = $mx_block->total_subs; ! $mx_parent_block = new mx_block(); ! $mx_parent_block = $mx_block; ! } else --- 122,146 ---- if ( $mx_block->is_dynamic ) { + // + // Create a parent block + // $mx_dynamic_block = new mx_block(); ! $mx_dynamic_block->init( $block_id ); ! // ! // Instatiate the dynamic block ! // ! $mx_block->init( $mx_dynamic_block->dynamic_block_id ); } if ( $mx_block->is_sub ) { ! // ! // Create a parent block ! // $mx_parent_block = new mx_block(); ! $mx_parent_block->init( $block_id ); ! ! $total_subs = $mx_parent_block->total_subs; } else *************** *** 135,139 **** $total_subs = 1; } ! // // Additional loop for subblocks - split block --- 148,152 ---- $total_subs = 1; } ! // // Additional loop for subblocks - split block *************** *** 141,149 **** for( $subblock = 0; $subblock < $total_subs; $subblock++ ) { ! if ( $mx_parent_block->is_sub ) { ! $block_id = intval( $mx_parent_block->sub_block_ids[$subblock] ); ! $mx_block->init( $block_id ); ! } // --- 154,170 ---- for( $subblock = 0; $subblock < $total_subs; $subblock++ ) { ! if ( is_object($mx_parent_block) ) { ! if ($mx_parent_block->is_sub) ! { ! $block_id = intval( $mx_parent_block->sub_block_ids[$subblock] ); ! ! // ! // Instatiate the sub block ! // ! $mx_block->init( $block_id ); ! } ! } ! // *************** *** 206,212 **** // Output editcp controls/buttons // ! if ( $mx_dynamic_block->dynamic_block_id > 0 && $subblock == $total_subs - 1 && $mx_dynamic_block->auth_edit ) { ! $mx_dynamic_block->output_cp_button(); } --- 227,236 ---- // Output editcp controls/buttons // ! if ( is_object($mx_dynamic_block) && $subblock == $total_subs - 1 ) { ! if ($mx_dynamic_block->dynamic_block_id > 0 && $mx_dynamic_block->auth_edit) ! { ! $mx_dynamic_block->output_cp_button(); ! } } *************** *** 246,250 **** // Output some subblock wrappers // ! if (isset($mx_parent_block)) { if ( $mx_parent_block->is_sub ) --- 270,274 ---- // Output some subblock wrappers // ! if (is_object($mx_parent_block)) { if ( $mx_parent_block->is_sub ) *************** *** 278,287 **** // Destroy parent block data // ! if ( isset($mx_parent_block) && $mx_parent_block->is_sub ) { unset( $mx_parent_block ); } ! if ( isset($mx_dynamic_block) && is_object($mx_dynamic_block) ) { unset( $mx_dynamic_block ); --- 302,311 ---- // Destroy parent block data // ! if ( is_object($mx_parent_block) && $mx_parent_block->is_sub ) { unset( $mx_parent_block ); } ! if ( is_object($mx_dynamic_block) ) { unset( $mx_dynamic_block ); |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:48
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207/modules/mx_coreblocks Modified Files: mx_search.php Log Message: Adding php5 support + minor fixes Index: mx_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_search.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_search.php 9 Dec 2005 23:22:04 -0000 1.8 --- mx_search.php 11 Dec 2005 16:13:40 -0000 1.9 *************** *** 490,494 **** $article_id = $searchset[$i]['article_id']; ! // $kb_cat = get_info(BLOCK_TABLE, 'block_id', $searchset[$i]['block_id'] ); $temp_url = !empty($searchset[$i]['menu_name']) ? append_sid( PORTAL_URL . 'index.php?page=' . $page_id . '&dynamic_block=' . $searchset[$i]['block_id'] ) : append_sid( PORTAL_URL . 'index.php?page=' . $page_id ); $category = '<a href="' . $temp_url . '" class="name">' .$searchset[$i]['block_title'] . '</a>' . ( !empty($searchset[$i]['menu_name']) ? ' (' . $searchset[$i]['menu_name'] . ')': '' ); --- 490,494 ---- $article_id = $searchset[$i]['article_id']; ! // $kb_cat = mx_get_info(BLOCK_TABLE, 'block_id', $searchset[$i]['block_id'] ); $temp_url = !empty($searchset[$i]['menu_name']) ? append_sid( PORTAL_URL . 'index.php?page=' . $page_id . '&dynamic_block=' . $searchset[$i]['block_id'] ) : append_sid( PORTAL_URL . 'index.php?page=' . $page_id ); $category = '<a href="' . $temp_url . '" class="name">' .$searchset[$i]['block_title'] . '</a>' . ( !empty($searchset[$i]['menu_name']) ? ' (' . $searchset[$i]['menu_name'] . ')': '' ); |
|
From: Jon O. <jon...@us...> - 2005-12-11 16:13:47
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17207/admin Modified Files: admin_mx_module_cp.php admin_mx_page_cp.php Log Message: Adding php5 support + minor fixes Index: admin_mx_module_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_module_cp.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** admin_mx_module_cp.php 22 Oct 2005 23:07:00 -0000 1.8 --- admin_mx_module_cp.php 11 Dec 2005 16:13:38 -0000 1.9 *************** *** 571,575 **** // Function loop // ! //$modulelist = get_list('module_id', MODULE_TABLE, 'module_id', 'module_name', $module_id, true); for( $function_count = 0; $function_count < $total_functions + 1; $function_count++ ) { --- 571,575 ---- // Function loop // ! //$modulelist = mx_get_list('module_id', MODULE_TABLE, 'module_id', 'module_name', $module_id, true); for( $function_count = 0; $function_count < $total_functions + 1; $function_count++ ) { Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** admin_mx_page_cp.php 9 Dec 2005 23:22:03 -0000 1.9 --- admin_mx_page_cp.php 11 Dec 2005 16:13:38 -0000 1.10 *************** *** 695,699 **** // Page templates dropdown // ! $template_list = !$new_page ? '' : get_list('use_template', PAGE_TEMPLATES, 'page_template_id', 'template_name', 1, true); $l_choose_page_template = !$new_page ? '' : empty($lang['Choose_page_template']) ? "Choose page template" : $lang['Choose_page_template']; --- 695,699 ---- // Page templates dropdown // ! $template_list = !$new_page ? '' : mx_get_list('use_template', PAGE_TEMPLATES, 'page_template_id', 'template_name', 1, true); $l_choose_page_template = !$new_page ? '' : empty($lang['Choose_page_template']) ? "Choose page template" : $lang['Choose_page_template']; |