|
From: OryNider <ory...@us...> - 2008-02-22 11:36:44
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14260 Modified Files: forum_hack.php Log Message: I will post some comment on forum today. Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** forum_hack.php 21 Feb 2008 19:57:49 -0000 1.44 --- forum_hack.php 22 Feb 2008 11:36:34 -0000 1.45 *************** *** 62,69 **** if(!function_exists('smilies_pass')) { ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); } ! /* //Check for mx_smartor fap version // We need to check the DB too, since we can have the files there but not installed !! --- 62,69 ---- if(!function_exists('smilies_pass')) { ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); //This never work and youtube tag is parsed since bbcode is vannila } ! //Check for mx_smartor fap version // We need to check the DB too, since we can have the files there but not installed !! *************** *** 77,81 **** $db->sql_freeresult($result); } ! */ // --- 77,89 ---- $db->sql_freeresult($result); } ! ! // ! //Check for color groups ! // ! if (file_exists($phpbb_root_path . 'includes/functions_color_groups.'.$phpEx)) ! { ! // Color Groups Table ! !defined('COLOR_GROUPS_TABLE') ? define('COLOR_GROUPS_TABLE', $table_prefix.'color_groups') : false; ! } // *************** *** 98,101 **** --- 106,110 ---- */ + // -------------------------------------------------------------------------------- // Class: mx_forum *************** *** 1612,1616 **** // Main method // ! function read_file( $phpbb_file, $sub_call = false ) { global $phpbb_root_path, $mx_root_path, $phpEx, $template, $HTTP_POST_VARS, $HTTP_POST_FILES, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $db, $userdata, $mode, $theme, $lang, $table_prefix, $mx_table_prefix, $board_config, $portal_config; --- 1621,1625 ---- // Main method // ! function read_file($phpbb_file, $sub_call = false) { global $phpbb_root_path, $mx_root_path, $phpEx, $template, $HTTP_POST_VARS, $HTTP_POST_FILES, $HTTP_COOKIE_VARS, $HTTP_GET_VARS, $db, $userdata, $mode, $theme, $lang, $table_prefix, $mx_table_prefix, $board_config, $portal_config; *************** *** 1626,1630 **** global $cash, $cm_groups; // allways used globally by cash mod ! switch ( $phpbb_file ) { case 'memberlist': --- 1635,1639 ---- global $cash, $cm_groups; // allways used globally by cash mod ! switch ($phpbb_file) { case 'memberlist': *************** *** 1645,1697 **** break; } ! /* // ! // [Remove?] // This code is already present below for subcalls of includes. // ! $cashcode=file_get_contents($phpbb_root_path . 'includes/functions_cash.'.$phpEx); ! ! // ! // Remove php tags ! // ! $cashcode = str_replace('<?php','',$cashcode); ! $cashcode = str_replace('?>','',$cashcode); ! ! // ! // Commment out the main includes ! // ! $cashcode = preg_replace('#^(.?include).*(extension).*(\r\n?|\n)#m','// mxBB: Removed include extension.inc' . "\n", $cashcode); ! $cashcode = preg_replace('#^(.?include).*(common).*(\r\n?|\n)#m','// mxBB: Removed include common.php' . "\n", $cashcode); ! ! // ! // Remove some includes already included by mxBB ! // ! $cashcode = preg_replace ("/include(.*)bbcode/", "//", $cashcode); ! $cashcode = preg_replace ("/include(.*)functions_post/", "//", $cashcode); ! ! // ! // NOTE: This regex will only work if "global" is stated on a new line... ! // ! //$cashcode = preg_replace('#^(.?).*(global)(.*?)($)(.*?)(\r\n?|\n)#m', '// mxBB rewrite of global, to instance $this in this function' . "\n " . 'global $phpbb_root_path, \\3', $cashcode); ! ! // ! // Rewrite the $template ! // ! $cashcode = preg_replace ("/$template = (.*)\;/", "$template = '" . $template . "';", $cashcode); ! ! ! // ! // Rewrite the phpbb_root_path ! // ! $cashcode = preg_replace ("/phpbb_root_path = (.*)\;/", "phpbb_root_path = '" . $phpbb_root_path . "';", $cashcode); ! ! ! // ! // Add the phpbb_root_path to the append_sid function - if not already there ! // ! // ! $template = new mx_Template( $phpbb_root_path . 'templates/'. $theme['template_name'] ); ! eval($cashcode); ! */ } --- 1654,1664 ---- break; } ! ! //From phpBB2 common.php // ! // [Remove?] No! since we don't include phpBB2 common.php :) // This code is already present below for subcalls of includes. // ! //$this->read_file('functions_cash', true); } *************** *** 1718,1723 **** // $code = preg_replace('#^(.?include).*(extension).*(\r\n?|\n)#m','// mxBB: Removed include extension.inc' . "\n", $code); ! $code = preg_replace('#^(.?include).*(common).*(\r\n?|\n)#m','// mxBB: Removed include common.php' . "\n", $code); ! // --- 1685,1697 ---- // $code = preg_replace('#^(.?include).*(extension).*(\r\n?|\n)#m','// mxBB: Removed include extension.inc' . "\n", $code); ! ! if (!defined('IN_CASHMOD')) ! { ! $code = preg_replace('#^(.?include).*(common).*(\r\n?|\n)#m','// mxBB: Removed include common.php' . "\n", $code); ! } ! else ! { ! $code = preg_replace('#^(.?include).*(common).*(\r\n?|\n)#m','$mx_forum->read_file(\'includes/functions_cash\', true);' . "\n", $code); ! } // *************** *** 1756,1763 **** // $code = preg_replace ("/include(.*)functions\./", "//", $code); ! $code = preg_replace ("/include(.*)functions_select\./", "//", $code); ! $code = preg_replace ("/include(.*)functions_post\./", "//", $code); ! $code = preg_replace ("/include(.*)bbcode\./", "//", $code); ! $code = preg_replace ("/include(.*)auth\./", "//", $code); // --- 1730,1741 ---- // $code = preg_replace ("/include(.*)functions\./", "//", $code); ! //$code = preg_replace ("/include(.*)functions_select\./", "//", $code); //This does not work and profile/register will be blank again ! //$code = preg_replace ("/include(.*)functions_post\./", "//", $code); //This does not work and profile/register will be blank again ! //$code = preg_replace ("/include(.*)bbcode\./", "//", $code); //This does not work and profile/register will be blank again ! //$code = preg_replace ("/include(.*)auth\./", "//", $code); //This does not work and profile/register will be blank again ! $code = preg_replace ("/include(.*)functions_select/", "//", $code); ! $code = preg_replace ("/include(.*)functions_post/", "//", $code); ! $code = preg_replace ("/include(.*)bbcode/", "//", $code); ! $code = preg_replace ("/include(.*)auth/", "//", $code); // *************** *** 1864,1868 **** case 'includes/functions_cash': ! // Tweaks to this file should go here!!! Please, do not break the module logic. break; --- 1842,1848 ---- case 'includes/functions_cash': ! $code = preg_replace ("/phpbb_root_path = (.*)\;/", "phpbb_root_path = '" . $phpbb_root_path . "';", $code); ! $code = preg_replace ("/$template = (.*)\;/", "$template = '" . $template . "';", $code); ! $template = new mx_Template($phpbb_root_path . 'templates/'. $theme['template_name']); break; |