|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:26
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb Modified Files: db_install.php db_upgrade.php dload.php dload_lists.php dload_quickdl.php Log Message: Finalizing module Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** db_upgrade.php 2 May 2006 23:28:15 -0000 1.14 --- db_upgrade.php 17 Jun 2006 20:13:22 -0000 1.15 *************** *** 30,34 **** } ! $mx_module_version = '2.0.2'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; *************** *** 49,52 **** --- 49,53 ---- $upgrade_103 = 0; $upgrade_201 = 0; + $upgrade_280 = 0; // mxBB 2.8 branch -> $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 85,88 **** --- 86,101 ---- } + // validate before 2.8.0 + $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "pa_config WHERE config_name = 'comments_forum_id'" ); + if ( $db->sql_numrows( $result ) == 0 || true) + { + $upgrade_280 = 1; + $message .= "<b>Upgrading to v. 2.8.0...ok</b><br/><br/>"; + } + else + { + $message .= "<b>Validating v. 2.8.0...ok</b><br/><br/>"; + } + // ------------------------------------------------------------------------------------------------------ if ( $upgrade_103 == 1 ) *************** *** 140,144 **** $sql[] = "DELETE FROM " . $mx_table_prefix . "pa_config" . " WHERE config_name = 'validator'"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('use_comments', '1')"; --- 153,157 ---- $sql[] = "DELETE FROM " . $mx_table_prefix . "pa_config" . " WHERE config_name = 'validator'"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/mx_shared/')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('use_comments', '1')"; *************** *** 190,193 **** --- 203,216 ---- // add fields to pa_files table $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_files ADD topic_id mediumint(8) unsigned NOT NULL default '0'"; + + } + + if ( $upgrade_280 == 1 ) + { + $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('comments_forum_id', '0')"; + } + else + { + $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } Index: dload_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_lists.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dload_lists.php 2 May 2006 23:28:15 -0000 1.17 --- dload_lists.php 17 Jun 2006 20:13:22 -0000 1.18 *************** *** 9,46 **** */ - function this_pa_mxurl( $args = '', $force_standalone_mode = false, $page_id = 1 ) - { - global $mx_root_path, $module_root_path, $phpEx, $is_block; - - if ( $force_standalone_mode || !$is_block ) - { - $mxurl = $module_root_path . 'dload.' . $phpEx . ( $args == '' ? '' : '?' . $args ); - } - else - { - $mxurl = $mx_root_path . 'index.' . $phpEx; - if ( is_numeric( $page_id ) ) - { - $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : '&' . $args ); - } - else - { - $mxurl .= ( $args == '' ? '' : '?' . $args ); - } - } - return $mxurl; - } - - function paImageRating( $rating ) - { - global $db, $album_sp_config, $module_root_path; - - if ( !$rating ) - return( "<i>Not Rated</i>" ); - else - return ( round( $rating, 2 ) ); - } - - // MX if ( !function_exists( 'read_block_config' ) ) { --- 9,12 ---- *************** *** 50,58 **** include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $mx_user->init($user_ip, PAGE_INDEX); ! // End session management $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; --- 16,26 ---- include_once( $mx_root_path . 'common.' . $phpEx ); + // // Start session management ! // $mx_user->init($user_ip, PAGE_INDEX); ! // // End session management + // $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; *************** *** 81,90 **** } define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_auth.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); // --- 49,62 ---- } + // + // Definitions + // define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! // =================================================== ! // Include the common file ! // =================================================== ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); // *************** *** 111,120 **** $pafiledb_page_id = $pafiledb_block_id > 0 ? get_page_id( $pafiledb_block_id ) : get_page_id( 'dload.php', true ); ! /* ! +---------------------------------------------------------- ! | Build Categories Index ! +---------------------------------------------------------- ! */ ! $sql = "SELECT c.*, COUNT(p.file_id) AS count FROM " . PA_CATEGORY_TABLE . " AS c --- 83,89 ---- $pafiledb_page_id = $pafiledb_block_id > 0 ? get_page_id( $pafiledb_block_id ) : get_page_id( 'dload.php', true ); ! // ! // Build Categories Index ! // $sql = "SELECT c.*, COUNT(p.file_id) AS count FROM " . PA_CATEGORY_TABLE . " AS c *************** *** 199,208 **** $file_screenshot_url = trim( $recentrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ! ); if ( ( $recentrow[$j]['user_id'] == ALBUM_GUEST ) or ( $recentrow[$j]['username'] == '' ) ) --- 168,176 ---- $file_screenshot_url = trim( $recentrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $recentrow[$j]['user_id'] == ALBUM_GUEST ) or ( $recentrow[$j]['username'] == '' ) ) *************** *** 217,233 **** $rating_image = paImageRating( $recentrow[$j]['rating'] ); ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_detail', array( 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $recentrow[$j]['file_desc'], ! 'POSTER' => $recent_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $recentrow[$j]['file_dls'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $recentrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 185,199 ---- $rating_image = paImageRating( $recentrow[$j]['rating'] ); ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_detail', array( ! 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $recentrow[$j]['file_desc'], ! 'POSTER' => $recent_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'VIEW' => $recentrow[$j]['file_dls'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $recentrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 235,241 **** else { ! // No Pics Found ! $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } --- 201,207 ---- else { ! // // No Pics Found ! // $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } *************** *** 243,249 **** else { ! // No Cats Found ! $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } --- 209,215 ---- else { ! // // No Cats Found ! // $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } *************** *** 297,306 **** $file_screenshot_url = trim( $mostrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'most_pics_block.most_pics.most_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ! ); if ( ( $mostrow[$j]['user_id'] == ALBUM_GUEST ) or ( $mostrow[$j]['username'] == '' ) ) --- 263,271 ---- $file_screenshot_url = trim( $mostrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'most_pics_block.most_pics.most_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $mostrow[$j]['user_id'] == ALBUM_GUEST ) or ( $mostrow[$j]['username'] == '' ) ) *************** *** 315,331 **** $rating_image = paImageRating( $mostrow[$j]['rating'] ); ! $template->assign_block_vars( 'most_pics_block.most_pics.most_detail', array( 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $mostrow[$j]['file_desc'], ! 'POSTER' => $most_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $mostrow[$j]['file_dls'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $mostrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 280,294 ---- $rating_image = paImageRating( $mostrow[$j]['rating'] ); ! $template->assign_block_vars( 'most_pics_block.most_pics.most_detail', array( ! 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $mostrow[$j]['file_desc'], ! 'POSTER' => $most_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'VIEW' => $mostrow[$j]['file_dls'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $mostrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 333,339 **** else { ! // No Pics Found ! $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } --- 296,302 ---- else { ! // // No Pics Found ! // $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } *************** *** 341,347 **** else { ! // No Cats Found ! $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } --- 304,310 ---- else { ! // // No Cats Found ! // $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } *************** *** 396,405 **** $file_screenshot_url = trim( $highestrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $highestrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $highestrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $highestrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $highestrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ! ); if ( ( $highestrow[$j]['user_id'] == ALBUM_GUEST ) or ( $highestrow[$j]['username'] == '' ) ) --- 359,367 ---- $file_screenshot_url = trim( $highestrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $highestrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $highestrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $highestrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $highestrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $highestrow[$j]['user_id'] == ALBUM_GUEST ) or ( $highestrow[$j]['username'] == '' ) ) *************** *** 414,430 **** $rating_image = paImageRating( $highestrow[$j]['rating'] ); ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_detail', array( 'H_TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></b><br />' : '', ! 'H_DESC' => $highestrow[$j]['file_desc'], ! 'H_POSTER' => $highest_poster, ! 'H_TIME' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'H_VIEW' => $highestrow[$j]['file_dls'], ! ! 'H_RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'H_COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $highestrow[$j]['comments'] . '<br />' ) : '' ! // 'H_IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($highestrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($highestrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 376,390 ---- $rating_image = paImageRating( $highestrow[$j]['rating'] ); ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_detail', array( ! 'H_TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></b><br />' : '', ! 'H_DESC' => $highestrow[$j]['file_desc'], ! 'H_POSTER' => $highest_poster, ! 'H_TIME' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'H_VIEW' => $highestrow[$j]['file_dls'], ! 'H_RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'H_COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $highestrow[$j]['comments'] . '<br />' ) : '' ! // 'H_IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($highestrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($highestrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 496,504 **** $file_screenshot_url = trim( $randrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'random_pics_block.rand_pics.rand_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_pa_mxurl("smartor_mode=album_pic&pic_id=". $randrow[$j]['pic_id'])) : append_sid(this_pa_mxurl("smartor_mode=album_showpage&pic_id=". $randrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_pa_mxurl("smartor_mode=album_thumbnail&pic_id=". $randrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $randrow[$j]['file_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ); if ( ( $randrow[$j]['user_id'] == ALBUM_GUEST ) or ( $randrow[$j]['username'] == '' ) ) --- 456,464 ---- $file_screenshot_url = trim( $randrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'random_pics_block.rand_pics.rand_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(pa_this_mxurl_list("smartor_mode=album_pic&pic_id=". $randrow[$j]['pic_id'])) : append_sid(pa_this_mxurl_list("smartor_mode=album_showpage&pic_id=". $randrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(pa_this_mxurl_list("smartor_mode=album_thumbnail&pic_id=". $randrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $randrow[$j]['file_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $randrow[$j]['user_id'] == ALBUM_GUEST ) or ( $randrow[$j]['username'] == '' ) ) *************** *** 513,530 **** $rating_image = paImageRating( $randrow[$j]['rating'] ); ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_detail', array( 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $randrow[$j]['file_desc'], ! 'POSTER' => $rand_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $randrow[$j]['file_dls'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $randrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($randrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($randrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 473,487 ---- $rating_image = paImageRating( $randrow[$j]['rating'] ); ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_detail', array( ! 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $randrow[$j]['file_desc'], ! 'POSTER' => $rand_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'VIEW' => $randrow[$j]['file_dls'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $randrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($randrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($randrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 532,538 **** else { ! // No Pics Found ! $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } --- 489,495 ---- else { ! // // No Pics Found ! // $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } *************** *** 540,546 **** else { ! // No Cats Found ! $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } --- 497,503 ---- else { ! // // No Cats Found ! // $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } *************** *** 559,594 **** } ! $template->set_filenames( array( 'body' => 'pa_lists.tpl' ) ! ); ! $template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], ! 'L_PICS' => $lang['Pics'], ! 'L_LAST_PIC' => $lang['Last_Pic'], ! 'U_YOUR_PERSONAL_GALLERY' => append_sid( this_pa_mxurl( "smartor_mode=album_personal&user_id=" . $userdata['user_id'] ) ), ! 'L_YOUR_PERSONAL_GALLERY' => $lang['Your_Personal_Gallery'], ! 'U_USERS_PERSONAL_GALLERIES' => append_sid( this_pa_mxurl( "smartor_mode=album_personal_index" ) ), ! 'L_USERS_PERSONAL_GALLERIES' => $lang['Users_Personal_Galleries'], ! 'S_COLS' => $album_sp_config['img_cols'], ! 'S_COL_WIDTH' => ( 100 / $album_sp_config['img_cols'] ) . '%', ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Files'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Files'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Files'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Files'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_FILE_TITLE' => $lang['File_Title'], ! 'L_FILE_DESC' => $lang['File_Desc'], ! 'L_VIEW' => $lang['Dls'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_PUBLIC_CATS' => $lang['Public_Categories'] ) ! ); // Generate the page ! $template->pparse( 'body' ); --- 516,552 ---- } ! $template->set_filenames( array( 'body' => 'pa_lists.tpl' ) ); ! $template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_PICS' => $lang['Pics'], ! 'L_LAST_PIC' => $lang['Last_Pic'], ! 'U_YOUR_PERSONAL_GALLERY' => append_sid( pa_this_mxurl_list( "smartor_mode=album_personal&user_id=" . $userdata['user_id'] ) ), ! 'L_YOUR_PERSONAL_GALLERY' => $lang['Your_Personal_Gallery'], ! 'U_USERS_PERSONAL_GALLERIES' => append_sid( pa_this_mxurl_list( "smartor_mode=album_personal_index" ) ), ! 'L_USERS_PERSONAL_GALLERIES' => $lang['Users_Personal_Galleries'], ! 'S_COLS' => $album_sp_config['img_cols'], ! 'S_COL_WIDTH' => ( 100 / $album_sp_config['img_cols'] ) . '%', ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Files'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Files'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Files'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Files'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_FILE_TITLE' => $lang['File_Title'], ! 'L_FILE_DESC' => $lang['File_Desc'], ! 'L_VIEW' => $lang['Dls'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_PUBLIC_CATS' => $lang['Public_Categories'] ) ! ); + // // Generate the page ! // $template->pparse( 'body' ); *************** *** 597,604 **** include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } - // +--------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | - // +--------------------------------------------------------+ - ?> \ No newline at end of file --- 555,557 ---- Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_install.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** db_install.php 2 May 2006 23:28:15 -0000 1.20 --- db_install.php 17 Jun 2006 20:13:22 -0000 1.21 *************** *** 30,34 **** } ! $mx_module_version = '2.0.2'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; *************** *** 273,277 **** "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('enable_module', '0')", // settings_disable "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('module_name', 'Download Database')", // settings_dbname ! "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('upload_dir','pafiledb/uploads/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('screenshots_dir','pafiledb/images/screenshots/')", --- 273,277 ---- "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('enable_module', '0')", // settings_disable "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('module_name', 'Download Database')", // settings_dbname ! "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/mx_shared/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('upload_dir','pafiledb/uploads/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('screenshots_dir','pafiledb/images/screenshots/')", *************** *** 315,318 **** --- 315,319 ---- "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('autogenerate_comments', '1')", // NEW "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('comments_pagination', '5')", + "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('comments_forum_id', '0')", // New // Ratings Index: dload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dload.php 2 May 2006 23:28:15 -0000 1.19 --- dload.php 17 Jun 2006 20:13:22 -0000 1.20 *************** *** 81,84 **** --- 81,86 ---- // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- + // Start + // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- *************** *** 95,102 **** // =================================================== ! // Get action variable other wise set it to the main // =================================================== $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; --- 97,107 ---- // =================================================== ! // Get action variable otherwise set it to the main // =================================================== $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); + // =================================================== + // Is admin? + // =================================================== $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; Index: dload_quickdl.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_quickdl.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dload_quickdl.php 2 May 2006 23:28:15 -0000 1.9 --- dload_quickdl.php 17 Jun 2006 20:13:22 -0000 1.10 *************** *** 16,24 **** include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $mx_user->init($user_ip, PAGE_INDEX); ! // End session management $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; --- 16,26 ---- include_once( $mx_root_path . 'common.' . $phpEx ); + // // Start session management ! // $mx_user->init($user_ip, PAGE_INDEX); ! // // End session management + // $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; *************** *** 50,54 **** --- 52,58 ---- $mx_script_name = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $mx_script_name_temp ) ); + // // Setup config parameters + // $config_name = array( 'pa_mapping', 'pa_quick_cat' ); *************** *** 62,74 **** // Include the common file // =================================================== - /* - orig - include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); - */ - // MX include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); // =================================================== // Get action variable other wise set it to the main // =================================================== $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'quickdl'; // =================================================== // if the database disabled give them a nice message --- 66,76 ---- // Include the common file // =================================================== include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); + // =================================================== // Get action variable other wise set it to the main // =================================================== $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'quickdl'; + // =================================================== // if the database disabled give them a nice message *************** *** 78,86 **** mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } // =================================================== // an array of all expected actions // =================================================== ! $actions = array( 'quickdl' => 'quickdl', ! 'download' => 'download' ); // =================================================== // Lets Build the page --- 80,89 ---- mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } + // =================================================== // an array of all expected actions // =================================================== ! $actions = array( 'quickdl' => 'quickdl', 'download' => 'download' ); ! // =================================================== // Lets Build the page *************** *** 90,97 **** if ( $action != 'download' ) { - /* - orig - include($phpbb_root_path . 'includes/page_header.'.$phpEx); - */ - // MX if ( !$is_block ) { --- 93,96 ---- *************** *** 105,112 **** if ( $action != 'download' ) { - /* - orig - include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - */ - // MX if ( !$is_block ) { --- 104,107 ---- *************** *** 114,117 **** } } - ?> \ No newline at end of file --- 109,111 ---- |