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: OryNider <ory...@us...> - 2008-01-15 05:18:30
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28104 Modified Files: Tag: core28x mx_functions_style.php Log Message: http://www.mx-system.com/forum/viewtopic.php?t=10483 Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.6 retrieving revision 1.17.2.7 diff -C2 -d -r1.17.2.6 -r1.17.2.7 *** mx_functions_style.php 13 Jan 2008 18:38:40 -0000 1.17.2.6 --- mx_functions_style.php 15 Jan 2008 05:18:24 -0000 1.17.2.7 *************** *** 693,697 **** function _load_mxbb_images($module_root_path = '') { ! global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $theme; //unset($GLOBALS['MX_TEMPLATE_CONFIG']); --- 693,697 ---- function _load_mxbb_images($module_root_path = '') { ! global $images, $board_config, $template, $phpbb_root_path, $mx_root_path, $theme, $current_module_images; //unset($GLOBALS['MX_TEMPLATE_CONFIG']); *************** *** 708,712 **** $template_name = $this->template_name; ! @include($mx_root_path . $module_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); // --- 708,715 ---- $template_name = $this->template_name; ! if (file_exists($mx_root_path . $module_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg')) ! { ! include($mx_root_path . $module_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); ! } // |
|
From: OryNider <ory...@us...> - 2008-01-14 13:05:48
|
Update of /cvsroot/mxbb/mx_online_adv/templates/subSilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23255 Modified Files: Tag: core28x mx_online_adv.tpl Log Message: Index: mx_online_adv.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/templates/subSilver/mx_online_adv.tpl,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -C2 -d -r1.1 -r1.1.2.1 *** mx_online_adv.tpl 26 Jun 2007 16:02:14 -0000 1.1 --- mx_online_adv.tpl 14 Jan 2008 13:05:39 -0000 1.1.2.1 *************** *** 12,16 **** <!-- BEGIN show_today_mode_top --> <tr> ! <td class="row1" align="left"><span class="gensmall">{show_today_mode_top.UOT_TITLE}: {show_today_mode_top.UOT_LIST} </span></td> </tr> <!-- END show_today_mode_top --> --- 12,16 ---- <!-- BEGIN show_today_mode_top --> <tr> ! <td class="row1" align="left"><span class="gensmall">{UOT_TITLE}: {UOT_LIST} </span></td> </tr> <!-- END show_today_mode_top --> *************** *** 22,26 **** <!-- BEGIN show_today_mode_bottom --> <tr> ! <td class="row1" align="left"><span class="gensmall">{show_today_mode_bottom.UOT_TITLE}: {show_today_mode_bottom.UOT_LIST} </span></td> </tr> <!-- END show_today_mode_bottom --> --- 22,26 ---- <!-- BEGIN show_today_mode_bottom --> <tr> ! <td class="row1" align="left"><span class="gensmall">{UOT_TITLE}: {UOT_LIST} </span></td> </tr> <!-- END show_today_mode_bottom --> |
|
From: OryNider <ory...@us...> - 2008-01-14 13:05:19
|
Update of /cvsroot/mxbb/mx_online_adv/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20626/includes Modified Files: Tag: core28x functions.php online_adv_hack.php online_common.php Log Message: Index: online_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/includes/online_common.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** online_common.php 28 Jun 2007 16:56:20 -0000 1.3 --- online_common.php 14 Jan 2008 13:04:34 -0000 1.3.2.1 *************** *** 31,34 **** --- 31,36 ---- // ********************************************************************** + $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); + /* if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ) ) { *************** *** 41,44 **** --- 43,47 ---- $link_language='lang_' . $board_config['default_lang']; } + */ include_once($module_root_path . 'includes/functions.'.$phpEx); *************** *** 51,55 **** $period = $board_config['session_length']; - // //Get The User Agent --- 54,57 ---- *************** *** 180,187 **** case 'adsbot-google ': case 'mediapartners-google ': - case 'adsense ': $agent = 'google'; $bot_id = '1'; break; case 'yahoo-verticalcrawler ': --- 182,193 ---- case 'adsbot-google ': case 'mediapartners-google ': $agent = 'google'; $bot_id = '1'; break; + + case 'adsense ': + $agent = 'adsense'; + $bot_id = '1'; + break; case 'yahoo-verticalcrawler ': *************** *** 195,198 **** --- 201,210 ---- break; + case 'yahoo! slurp ': + case 'slurp ': + $agent = 'slurp'; + $bot_id = '2'; + break; + case 'lycosbot ': case 'lycos ': *************** *** 234,238 **** break; - case 'slurp ': case 'fast-webcrawler ': case 'teoma ': --- 246,249 ---- *************** *** 255,261 **** case 'sohu-search ': case 'sohu ': - case 'iltrovatore-setaccio ': case 'il-set ': ! $agent = 'BOT'; $bot_id = '9'; break; --- 266,272 ---- case 'sohu-search ': case 'sohu ': case 'il-set ': ! case 'iltrovatore-setaccio ': ! $agent = $matches[1]; $bot_id = '9'; break; Index: online_adv_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/includes/online_adv_hack.php,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -C2 -d -r1.3 -r1.3.2.1 *** online_adv_hack.php 28 Jun 2007 16:56:20 -0000 1.3 --- online_adv_hack.php 14 Jan 2008 13:04:33 -0000 1.3.2.1 *************** *** 188,194 **** case 'adsbot-google ': case 'mediapartners-google ': case 'adsense ': ! $this_agent = 'google'; ! $this_bot_id = '1'; break; --- 188,198 ---- case 'adsbot-google ': case 'mediapartners-google ': + $agent = 'google'; + $bot_id = '1'; + break; + case 'adsense ': ! $agent = 'adsense'; ! $bot_id = '1'; break; *************** *** 199,216 **** case 'yahoomm ': case 'inktomi ': ! $this_agent = 'yahoo'; ! $this_bot_id = '2'; break; case 'lycosbot ': case 'lycos ': ! $this_agent = 'lycos'; ! $this_bot_id = '3'; break; case 'infoseekbot ': case 'infoseek ': ! $this_agent = 'infoseek'; ! $this_bot_id = '4'; break; --- 203,226 ---- case 'yahoomm ': case 'inktomi ': ! $agent = 'yahoo'; ! $bot_id = '2'; ! break; ! ! case 'yahoo! slurp ': ! case 'slurp ': ! $agent = 'slurp'; ! $bot_id = '2'; break; case 'lycosbot ': case 'lycos ': ! $agent = 'lycos'; ! $bot_id = '3'; break; case 'infoseekbot ': case 'infoseek ': ! $agent = 'infoseek'; ! $bot_id = '4'; break; *************** *** 220,246 **** case 'msnbot-products ': case 'msnbot-academic ': ! $this_agent = 'msn'; ! $this_bot_id = '5'; break; case 'altavistabot ': case 'altavista ': ! $this_agent = 'altavista'; ! $this_bot_id = '6'; break; case 'excitebot ': case 'excite ': ! $this_agent = 'excite'; ! $this_bot_id = '7'; break; case 'ask jeeves ': case 'ask ': ! $this_agent = 'askjeeves'; ! $this_bot_id = '8'; break; - case 'slurp ': case 'fast-webcrawler ': case 'teoma ': --- 230,255 ---- case 'msnbot-products ': case 'msnbot-academic ': ! $agent = 'msn'; ! $bot_id = '5'; break; case 'altavistabot ': case 'altavista ': ! $agent = 'altavista'; ! $bot_id = '6'; break; case 'excitebot ': case 'excite ': ! $agent = 'excite'; ! $bot_id = '7'; break; case 'ask jeeves ': case 'ask ': ! $agent = 'askjeeves'; ! $bot_id = '8'; break; case 'fast-webcrawler ': case 'teoma ': *************** *** 263,277 **** case 'sohu-search ': case 'sohu ': - case 'iltrovatore-setaccio ': case 'il-set ': ! $this_agent = 'BOT'; ! $this_bot_id = '9'; break; default: ! $this_agent = 'browser'; ! $this_bot_id = ''; ! } // Determine platform // This is very incomplete for platforms other than Win/Mac --- 272,286 ---- case 'sohu-search ': case 'sohu ': case 'il-set ': ! case 'iltrovatore-setaccio ': ! $agent = $matches[1]; ! $bot_id = '9'; break; default: ! $agent = 'browser'; ! $bot_id = ''; } + // Determine platform // This is very incomplete for platforms other than Win/Mac Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/includes/functions.php,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -C2 -d -r1.4 -r1.4.2.1 *** functions.php 28 Jun 2007 16:58:34 -0000 1.4 --- functions.php 14 Jan 2008 13:04:32 -0000 1.4.2.1 *************** *** 59,67 **** $sql = "DELETE FROM " . ONLINE_ADV_SESSION_TABLE . " ! WHERE time<'$max_time'"; if( !$result = $db->sql_query($sql) ) { ! mx_message_die(GENERAL_ERROR, 'SQL Error in function drop_spiders_surfing()', '', __LINE__, __FILE__, $sql); } } --- 59,67 ---- $sql = "DELETE FROM " . ONLINE_ADV_SESSION_TABLE . " ! WHERE time < '$max_time'"; if( !$result = $db->sql_query($sql) ) { ! mx_message_die(GENERAL_ERROR, 'SQL Error in function drop_spiders_surfing()', '', __LINE__, __FILE__, $sql); } } |
|
From: OryNider <ory...@us...> - 2008-01-14 13:04:47
|
Update of /cvsroot/mxbb/mx_online_adv In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20626 Modified Files: Tag: core28x mx_online_adv.php Log Message: Index: mx_online_adv.php =================================================================== RCS file: /cvsroot/mxbb/mx_online_adv/mx_online_adv.php,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -C2 -d -r1.5 -r1.5.2.1 *** mx_online_adv.php 2 Aug 2007 11:59:31 -0000 1.5 --- mx_online_adv.php 14 Jan 2008 13:04:37 -0000 1.5.2.1 *************** *** 15,27 **** } - // - // Start session management - // - //$mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // ! include_once($module_root_path . 'includes/online_common.'.$phpEx); --- 15,22 ---- } ! include($module_root_path . 'includes/online_common.'.$phpEx); ! ! include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); *************** *** 179,188 **** } ! if ($parm2_put_today_bottom == 'TRUE') { $template->assign_block_vars('show_today_mode_bottom', array( - 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), - 'UOT_COUNT' => $uot_count, - 'UOT_LIST' => implode(", ",$users_online_today) ) ); --- 174,180 ---- } ! if ($parm2_put_today_bottom) { $template->assign_block_vars('show_today_mode_bottom', array( ) ); *************** *** 190,197 **** else { ! $template->assign_block_vars('show_today_mode_top', array( ! 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), ! 'UOT_COUNT' => $uot_count, ! 'UOT_LIST' => implode(", ",$users_online_today) ) ); --- 182,186 ---- else { ! $template->assign_block_vars('show_today_mode_top', array( ) ); *************** *** 495,498 **** --- 484,490 ---- 'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid(PHPBB_URL."profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'), + 'UOT_TITLE' => sprintf($lang['UOT_title'], $uot_count), + 'UOT_COUNT' => $uot_count, + 'UOT_LIST' => implode(", ",$users_online_today) )); |
|
From: OryNider <ory...@us...> - 2008-01-14 11:45:53
|
Update of /cvsroot/mxbb/core/templates/prosilver/images/menu_icons In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18099/menu_icons Modified Files: contract.gif expand.gif icon_faq.gif icon_help.gif icon_home.gif icon_login.gif icon_mail.gif icon_members.gif icon_profile.gif icon_register.gif Log Message: Index: icon_help.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_help.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsxlmyAQ and /tmp/cvsHeIxV3 differ Index: icon_profile.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_profile.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvssbjHiT and /tmp/cvsvmodZ8 differ Index: icon_home.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_home.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsIab35D and /tmp/cvsQTYIGV differ Index: icon_login.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_login.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvseG5s77 and /tmp/cvssgDeCq differ Index: expand.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/expand.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsZdCsmn and /tmp/cvs9DiWlG differ Index: icon_members.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_members.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvssiuaTF and /tmp/cvsilpnXZ differ Index: contract.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/contract.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsVNaj21 and /tmp/cvsbLMzJm differ Index: icon_register.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_register.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsI3qx9L and /tmp/cvsktpqB8 differ Index: icon_faq.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_faq.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsC3EVn0 and /tmp/cvsflzmmn differ Index: icon_mail.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/menu_icons/icon_mail.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsFDGDQB and /tmp/cvs52rSXZ differ |
|
From: OryNider <ory...@us...> - 2008-01-14 11:45:51
|
Update of /cvsroot/mxbb/core/templates/prosilver/images/page_icons In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18099/page_icons Modified Files: icon_home.gif Log Message: Index: icon_home.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/page_icons/icon_home.gif,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvsIEWKHQ and /tmp/cvshOIEn6 differ |
|
From: OryNider <ory...@us...> - 2008-01-13 21:42:30
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6382 Modified Files: mx_functions_phpbb.php Log Message: mx_message_die upgrade again ;) Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** mx_functions_phpbb.php 13 Jan 2008 18:36:28 -0000 1.36 --- mx_functions_phpbb.php 13 Jan 2008 21:42:25 -0000 1.37 *************** *** 313,317 **** if(defined('HAS_DIED')) { ! die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?"); } --- 313,317 ---- if(defined('HAS_DIED')) { ! print_r("mx_message_die() was called multiple times. This isn't supposed to happen. Was mx_message_die() used in page_tail.php? <br /><br />"); } |
|
From: OryNider <ory...@us...> - 2008-01-13 21:41:19
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv4863 Modified Files: Tag: core28x mx_functions_phpbb.php mx_functions_tools.php Log Message: more message_die() removed... Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.32.2.2 retrieving revision 1.32.2.3 diff -C2 -d -r1.32.2.2 -r1.32.2.3 *** mx_functions_phpbb.php 13 Jan 2008 18:38:40 -0000 1.32.2.2 --- mx_functions_phpbb.php 13 Jan 2008 21:41:12 -0000 1.32.2.3 *************** *** 123,127 **** if(defined('HAS_DIED')) { ! die("mx_message_die() was called multiple times. This isn't supposed to happen. Was mx_message_die() used in page_tail.php?"); } --- 123,127 ---- if(defined('HAS_DIED')) { ! print_r("mx_message_die() was called multiple times. This isn't supposed to happen. Was mx_message_die() used in page_tail.php? <br /><br />"); } Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.15 retrieving revision 1.15.2.1 diff -C2 -d -r1.15 -r1.15.2.1 *** mx_functions_tools.php 6 Aug 2007 20:07:05 -0000 1.15 --- mx_functions_tools.php 13 Jan 2008 21:41:13 -0000 1.15.2.1 *************** *** 1185,1189 **** if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } --- 1185,1189 ---- if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } *************** *** 1224,1228 **** if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } --- 1224,1228 ---- if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } *************** *** 1245,1249 **** if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't delete $table information", "", __LINE__, __FILE__, $sql ); } } --- 1245,1249 ---- if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't delete $table information", "", __LINE__, __FILE__, $sql ); } } |
|
From: OryNider <ory...@us...> - 2008-01-13 21:39:02
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1717/includes Modified Files: forum_hack.php Log Message: avatar and cash :) Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** forum_hack.php 9 Sep 2007 20:19:43 -0000 1.25 --- forum_hack.php 13 Jan 2008 21:38:57 -0000 1.26 *************** *** 21,40 **** define( 'MX_FORUM_DEBUG', 1 ); ! include_once($phpbb_root_path . 'includes/functions.' . $phpEx); ! if (!function_exists('language_select')) ! { ! include_once($phpbb_root_path . 'includes/functions_selects.' . $phpEx); ! } ! if (!function_exists('prepare_message')) ! { ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! } ! if (!function_exists('bbencode_second_pass')) ! { ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); } ! if (!function_exists('auth_check_user')) { ! include_once($phpbb_root_path . 'includes/auth.' . $phpEx); } --- 21,49 ---- define( 'MX_FORUM_DEBUG', 1 ); ! include_once($phpbb_root_path . 'includes/functions_selects.' . $phpEx); ! include_once($phpbb_root_path . 'includes/functions_post.' . $phpEx); ! ! //Check for mx_smartor fap version ! if (file_exists($mx_root_path . 'modules/mx_smartor/album_mod/album_bbconstants.' . $phpEx)) ! { ! include_once($mx_root_path . 'modules/mx_smartor/album_mod/album_bbconstants.' . $phpEx); } ! ! include_once($phpbb_root_path . 'includes/bbcode.' . $phpEx); ! include_once($phpbb_root_path . 'includes/auth.' . $phpEx); ! ! //Check for cash mod ! if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { ! define('IN_CASHMOD', true); ! ! if ( !file_exists(@phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_cash.'.$phpEx)) ) ! { ! include_once($phpbb_root_path . 'language/lang_english/lang_cash.' . $phpEx); ! } ! else ! { ! include_once($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_cash.' . $phpEx); ! } } *************** *** 156,160 **** function init_paths() { ! global $mx_root_path, $db, $phpEx, $board_config; if ( defined( PHPBB_URL ) && defined( PORTAL_URL ) ) --- 165,169 ---- function init_paths() { ! global $mx_root_path, $db, $phpEx; if ( defined( PHPBB_URL ) && defined( PORTAL_URL ) ) *************** *** 175,193 **** { $row = $db->sql_fetchrow( $result ); ! ! // ! // Define some general Defs ! // ! $script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($row['script_path'])); ! $server_name = trim($row['server_name']); ! $server_protocol = ( $row['cookie_secure'] ) ? 'https://' : 'http://'; ! $server_port = ( $row['server_port'] <> 80 ) ? ':' . trim($row['server_port']) . '/' : '/'; ! $server_url = $server_protocol . $server_name . $server_port . $script_name; ! ! $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; ! $server_url_phpbb = $server_protocol . $server_name . $server_port . $script_name_phpbb; ! ! $this->phpbb_url = $server_url_phpbb; ! $this->portal_url = $server_url; } $db->sql_freeresult($result); --- 184,189 ---- { $row = $db->sql_fetchrow( $result ); ! $this->phpbb_url = $row['portal_phpbb_url']; ! $this->portal_url = $row['portal_url']; } $db->sql_freeresult($result); *************** *** 348,351 **** --- 344,348 ---- 'search' => $this->phpbb_config['search'], 'viewonline' => $this->phpbb_config['viewonline'], + 'cash' => $this->phpbb_config['other'], 'other' => $this->phpbb_config['other'], ); *************** *** 372,376 **** 'viewforum' => 0, 'viewonline' => 0, ! 'viewtopic' => 0 ); } --- 369,374 ---- 'viewforum' => 0, 'viewonline' => 0, ! 'viewtopic' => 0, ! 'cash' => 0 ); } *************** *** 644,652 **** { case 'index': ! //global $s_last_visit; // declared here: includes/page_header.php ! $s_last_visit = ( $userdata['session_logged_in'] ) ? phpBB2::create_date($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : ''; $script_vars = array( 'LAST_VISIT_DATE' => sprintf( $lang['You_last_visit'], $s_last_visit ), ! 'CURRENT_TIME' => sprintf( $lang['Current_time'], phpBB2::create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], --- 642,649 ---- { case 'index': ! global $s_last_visit; // declared here: includes/page_header.php $script_vars = array( 'LAST_VISIT_DATE' => sprintf( $lang['You_last_visit'], $s_last_visit ), ! 'CURRENT_TIME' => sprintf( $lang['Current_time'], create_date( $board_config['default_dateformat'], time(), $board_config['board_timezone'] ) ), 'L_SEARCH_NEW' => $lang['Search_new'], 'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'], *************** *** 657,661 **** 'L_AUTO_LOGIN' => $lang['Log_me_in'], 'L_LOGIN_LOGOUT' => $lang['Login'], ! 'S_LOGIN_ACTION' => mx_append_sid('login.'.$phpEx) ); // --- 654,658 ---- 'L_AUTO_LOGIN' => $lang['Log_me_in'], 'L_LOGIN_LOGOUT' => $lang['Login'], ! 'S_LOGIN_ACTION' => append_sid('login.'.$phpEx) ); // *************** *** 694,698 **** // Replaces same function in sessions.php // ! return mx_append_sid( $this->full_url( $url, $non_html_amp, $portal_url ), $non_html_amp ); } --- 691,695 ---- // Replaces same function in sessions.php // ! return append_sid( $this->full_url( $url, $non_html_amp, $portal_url ), $non_html_amp ); } *************** *** 1272,1276 **** 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], phpBB2::create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], --- 1269,1273 ---- 'TOTAL_USERS_ONLINE' => $l_online_users, 'LOGGED_IN_USER_LIST' => $online_userlist, ! 'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])), 'L_WHO_IS_ONLINE' => $lang['Who_is_Online'], *************** *** 1313,1316 **** --- 1310,1382 ---- global $server_url; // used globally by usercp_register.php + //Check for cash mod + if (defined('IN_CASHMOD')) + { + global $cash, $cm_groups; // allways used globally by cash mod + + switch ( $phpbb_file ) + { + case 'memberlist': + define('CM_MEMBERLIST', true); + global $cm_memberlist; + break; + case 'posting': + define('CM_POSTING', true); + global $cm_posting; + break; + case 'viewtopic': + define('CM_VIEWTOPIC', true); + global $cm_viewtopic; + break; + case 'viewprofile': + define('CM_VIEWPROFILE', true); + global $cm_viewprofile; + break; + } + $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); + } + $code=file_get_contents($phpbb_root_path . $phpbb_file . ".$phpEx"); *************** *** 1393,1396 **** --- 1459,1463 ---- $code = str_replace('$is_auth_ary[$forum_data[$i][\'forum_id\']][\'auth_view\']', '$is_auth_ary[$forum_data[$i][\'forum_id\']][\'auth_view\'] && $mx_forum->phpbb2_auth_cat($forum_data[$i][\'forum_id\'])', $code); // For phpBB 2.0.21 and later $code = str_replace('$is_auth_ary[$forum_id][\'auth_view\']', '$is_auth_ary[$forum_id][\'auth_view\'] && $mx_forum->phpbb2_auth_cat($forum_data[$i][\'forum_id\'])', $code); // For phpBB 2.0.21 and later + // Hack for XS/Simple SubForum $code = str_replace('$images = unserialize($item[\'FORUM_FOLDERS\'])', '$mx_forum->images = unserialize($item[\'FORUM_FOLDERS\'])', $code); *************** *** 1411,1415 **** $code = str_replace('$temp_url = "modcp.', '$temp_url = "' . $phpbb_root_path . 'modcp.', $code); $code = str_replace('$temp_url = "posting.', '$temp_url = "' . $phpbb_root_path . 'posting.', $code); ! // // Avatars and ranks --- 1478,1482 ---- $code = str_replace('$temp_url = "modcp.', '$temp_url = "' . $phpbb_root_path . 'modcp.', $code); $code = str_replace('$temp_url = "posting.', '$temp_url = "' . $phpbb_root_path . 'posting.', $code); ! // // Avatars and ranks *************** *** 1447,1467 **** // Avatars and ranks // ! $code = str_replace('\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code); ! $code = str_replace('\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code); ! $code = str_replace('$board_config[\'avatar_gallery_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_gallery_path\']', $code); ! $code = str_replace('$board_config[\'avatar_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_path\']', $code); break; ! case 'includes/usercp_viewprofile': ! // ! // Avatars and ranks ! // ! $code = str_replace('\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code); ! $code = str_replace('\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code); ! ! $code = str_replace('$board_config[\'avatar_gallery_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_gallery_path\']', $code); ! $code = str_replace('$board_config[\'avatar_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_path\']', $code); ! break; } --- 1514,1543 ---- // Avatars and ranks // ! $code = str_replace( '\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code ); ! ! $code = str_replace( '$board_config[\'avatar_gallery_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '$board_config[\'avatar_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_path\']', $code ); ! $code = str_replace( '$error = true;', 'return;', $code); ! $code = str_replace( 'if (!is_uploaded_file($avatar_filename))', 'if (!file_exists($avatar_filename))', $code); ! $code = str_replace( '$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename");','$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename"); @unlink( $avatar_filename);', $code); break; + + case 'includes/usercp_viewprofile': + // + // Avatars and ranks + // + $code = str_replace('\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code); + $code = str_replace('\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code); ! $code = str_replace('$board_config[\'avatar_gallery_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_gallery_path\']', $code); ! $code = str_replace('$board_config[\'avatar_path\']', '\''.$phpbb_root_path.'\' . $board_config[\'avatar_path\']', $code); ! break; ! ! case 'cash': ! ! $code = str_replace('exit;', 'return;', $code); ! break; } *************** *** 1523,1526 **** --- 1599,1612 ---- if ($mx_forum->phpbb_config['enable_module']) { + if ( isset( $HTTP_POST_FILES ) && !empty( $HTTP_POST_FILES ) ) + { + $up_files_keys = array_keys( $HTTP_POST_FILES ); + foreach( $up_files_keys as $up_file ) + { + @rename( $HTTP_POST_FILES[$up_file]['tmp_name'], $HTTP_POST_FILES[$up_file]['tmp_name'] . '.mxbb' ); + $HTTP_POST_FILES[$up_file]['tmp_name'] .= '.mxbb'; + $_FILES[$up_file]['tmp_name'] .= '.mxbb'; + } + } $http_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://'; $http_server = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $board_config['server_name'] ) ); |
|
From: OryNider <ory...@us...> - 2008-01-13 21:39:02
|
Update of /cvsroot/mxbb/mx_phpbb/contrib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1717/contrib Added Files: classes_cash.php Log Message: avatar and cash :) --- NEW FILE: classes_cash.php --- <?php /*************************************************************************** * classes_cash.php * ------------------- * begin : Tuesday, Oct 07, 2003 * copyright : (C) 2003 Xore * email : mo...@xo... * * $Id: classes_cash.php,v 1.2 2008/01/13 21:38:57 orynider 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_PHPBB') ) { die("Hacking attempt"); } if ( defined('CASH_CLASSES_INCLUDE') ) { return; } define('CASH_CLASSES_INCLUDE',TRUE); // //=============[ Template extended functionality ]========================= // class Template_plus extends Template { var $classname = "Template"; var $_tpldata = array(); var $files = array(); var $root = ""; var $compiled_code = array(); var $uncompiled_code = array(); function set(&$template) { $this->classname = &$template->classname; $this->_tpldata = &$template->_tpldata; $this->files = &$template->files; $this->root = &$template->root; $this->compiled_code = &$template->compiled_code; $this->uncompiled_code = &$template->uncompiled_code; } /** * Inserts the uncompiled code for $handle as the * value of $varname in the block-level. This can be used * to effectively include a template in the middle of another * template. * Note that all desired assignments to the variables in $handle should be done * BEFORE calling this function. */ function assign_block_var_from_handle($varname, $handle) { if (!$this->loadfile($handle)) { die("Template->assign_var_from_handle(): Couldn't load template file for handle $handle"); } // Compile it, with the "no echo statements" option on. $_str = ""; $code = $this->compile($this->uncompiled_code[$handle], true, '_str'); // evaluate the variable assignment. eval($code); // assign the value of the generated variable to the given varname. if (strstr($varname, '.')) { $lastposition = strrpos($varname,'.'); $blockname = substr($varname,0,$lastposition); $varname = substr($varname,$lastposition+1); $this->reassign_block_vars($blockname,array($varname => $_str)); } else { $this->assign_var($varname, $_str); } return true; } /** * Block-level variable re-assignment. Prevents new block iteration with the given * variable assignments. Note that once you've iterated to a new block via assign_block_vars, * you won't be able to come back to an old block. */ function reassign_block_vars($blockname, $vararray) { if (strstr($blockname, '.')) { // Nested block. $blocks = explode('.', $blockname); $blockcount = sizeof($blocks); $str = '$this->_tpldata'; for ($i = 0; $i < $blockcount; $i++) { $str .= '[\'' . $blocks[$i] . '.\']'; eval('$lastiteration = sizeof(' . $str . ') - 1;'); $str .= '[' . $lastiteration . ']'; } // Now we add the block that we're actually assigning to. reset ($vararray); while (list($key,$val) = each($vararray)) { $current_string = $str . '[$key] = $val'; // Now we evaluate this assignment we've built up. eval($current_string); } } else { // Top-level block. // Add a new iteration to this block with the variable assignments // we were given. $lastiteration = sizeof($this->_tpldata[$blockname . '.']) - 1; reset ($vararray); while (list($key,$val) = each($vararray)) { $this->_tpldata[$blockname . '.'][$lastiteration][$key] = $val; } } return true; } /** * Block-level variable clearing. Removes a block of data so it can be re-written * fresh (for iterative file handled arrays, when different data is needed) */ function clear_block_var($blockname) { if (strstr($blockname, '.')) { // i don't know how the heck this would be used, if ever. // i can't think of a situation where it would be useful personally // but, who knows... Only the top-level block makes sense to me // Nested block. $blocks = explode('.', $blockname); $blockcount = sizeof($blocks) - 1; $str = '$this->_tpldata'; for ($i = 0; $i < $blockcount; $i++) { $str .= '[\'' . $blocks[$i] . '.\']'; eval('$lastiteration = sizeof(' . $str . ') - 1;'); $str .= '[' . $lastiteration . ']'; } // Now we add the block that we're actually assigning to. // We're adding a new iteration to this block with the given // variable assignments. $str .= '[\'' . $blocks[$blockcount] . '.\'] = array();'; // Now we evaluate this assignment we've built up. eval($str); } else { // Top-level block. // Add a new iteration to this block with the variable assignments // we were given. $this->_tpldata[$blockname . '.'] = array(); } return true; } } // //=============[ Events handler ]========================= // if ( defined('CM_EVENT') ) { class cash_events { var $events; function cash_events() { global $db; $this->events = array(); $sql = "SELECT * FROM " . CASH_EVENTS_TABLE; if ( !$result = $db->sql_query($sql) ) { message_die(CRITICAL_ERROR, "Could not query events information", "", __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { $this->events[$row['event_name']] = $row['event_data']; } } function get_event_data($string) { global $board_config; if ( $board_config['cash_disable']) { return array(); } if ( isset($this->events[$string]) ) { return cash_event_unpack($this->events[$string]); } else { return array(); } } } $cm_events = new cash_events(); } // //=============[ Memberlist handler ]========================= // if ( defined('CM_MEMBERLIST') ) { class cash_memberlist { function droplists(&$mode_types_text,&$mode_types) { global $board_config, $cash; if ( $board_config['cash_disable']) { return; } while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) ) { $mode_types_text[] = $c_cur->name(true); $mode_types[] = 'cash_' . $c_cur->id(); } } function modecheck($mode) { global $board_config, $cash; if ( $board_config['cash_disable']) { return 'cash_mod'; } while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) ) { if ( $mode == 'cash_' . $c_cur->id() ) { return $mode; } } return 'cash_mod'; } function getfield($mode) { global $cash; $id = substr($mode,5); $c_cur = &$cash->currency($id); return $c_cur->db(); } function generate_columns(&$template,&$sql,$num_columns = 8) { global $board_config, $cash; if ( $board_config['cash_disable'] ) { $template->assign_var('NUM_COLUMNS',$num_columns); return; } // whee! now that we have the $template, we can do whatever we want with it! yay! $cash_field = ""; $count = $cash->currency_count(CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST); $template->assign_var('NUM_COLUMNS',$count + $num_columns); while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) ) { $template->assign_block_vars('cashrow',array('NAME' => $c_cur->name())); $cash_field .= $c_cur->db() . ', '; } if ( strstr($sql,'*') ) { return; } $insertpoint = strpos($sql,'user_id'); $sql = substr($sql,0,$insertpoint) . $cash_field . substr($sql,$insertpoint); } function listing(&$template,&$row) { global $board_config, $cash; if ( $board_config['cash_disable']) { return; } while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWMEMBERLIST) ) { $template->assign_block_vars('memberrow.cashrow', array('CASH_DISPLAY' => $c_cur->display($row[$c_cur->db()]))); } } } $cm_memberlist = new cash_memberlist(); } // //=============[ Viewtopic handler ]========================= // if ( defined('CM_VIEWTOPIC') ) { class cash_viewtopic { var $template; function generate_columns(&$template,$forum_id,&$sql) { global $board_config, $cash; if ( $board_config['cash_disable']) { return ''; } $this->template = new Template_plus(); $this->template->set($template); $this->template->set_filenames(array( 'cm_viewtopic' => 'cash_viewtopic.tpl') ); if ( strstr($sql,'u.*') ) { return; } $cash_field = ""; while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED | CURRENCY_VIEWTOPIC,$forum_id) ) { $cash_field .= 'u.' . $c_cur->db() . ', '; } $insertpoint = strpos($sql,'u.user_id'); $sql = substr($sql,0,$insertpoint) . $cash_field . substr($sql,$insertpoint); } function post_vars(&$postdata,&$userdata,$forum_id) { $template = &$this->template; global $board_config, $lang, $phpEx, $cash, $phpbb_root_path; if ( $board_config['cash_disable']) { return; } $mask = false; if ( $userdata['user_level'] != ADMIN ) { $mask = CURRENCY_ENABLED; if ( $postdata['user_id'] != $userdata['user_id'] ) { $mask &= CURRENCY_VIEWTOPIC; } } else { $forum_id = false; } while ( $c_cur = &$cash->currency_next($cm_i,$mask,$forum_id) ) { $template->assign_block_vars('cashrow', array( 'CASH_DISPLAY' => $c_cur->display($postdata[$c_cur->db()]))); } if ( ($cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) >= 2) && $userdata['session_logged_in'] ) { $template->assign_block_vars('cashlinks',array( 'U_LINK' => append_sid($phpbb_root_path."cash.$phpEx"), 'L_NAME' => $lang['Exchange'])); } if ( $cash->currency_count(CURRENCY_ENABLED | CURRENCY_DONATE,$forum_id) && ($userdata['user_id'] != $postdata['user_id']) && $userdata['session_logged_in'] ) { $template->assign_block_vars('cashlinks',array( 'U_LINK' => append_sid($phpbb_root_path.'cash.'.$phpEx.'?mode=donate&ref=viewtopic&'.POST_USERS_URL.'='.$postdata['user_id'].'&'.POST_POST_URL.'='.$postdata['post_id']), 'L_NAME' => $lang['Donate'])); } if ( $cash->currency_count() && (($userdata['user_level'] == ADMIN) || (($userdata['user_level'] == MOD) && $cash->currency_count(CURRENCY_ENABLED | CURRENCY_MODEDIT | CURRENCY_VIEWTOPIC, $forum_id))) ) { $template->assign_block_vars('cashlinks',array( 'U_LINK' => append_sid($phpbb_root_path.'cash.'.$phpEx.'?mode=modedit&ref=viewtopic&'.POST_USERS_URL.'='.$postdata['user_id'].'&'.POST_POST_URL.'='.$postdata['post_id']), 'L_NAME' => sprintf($lang['Mod_usercash'],$postdata['username']))); } $template->assign_block_var_from_handle('postrow.CASH', 'cm_viewtopic'); $template->clear_block_var('cashrow'); $template->clear_block_var('cashlinks'); } } $cm_viewtopic = new cash_viewtopic(); } // //=============[ Viewprofile handler ]========================= // if ( defined('CM_VIEWPROFILE') ) { class cash_viewprofile { function post_vars(&$old_template,&$profiledata,&$userdata) { global $board_config, $lang, $phpEx, $cash, $phpbb_root_path; if ( $board_config['cash_disable']) { return; } $template = new Template_plus(); $template->set($old_template); $mask = false; if ( $userdata['user_level'] != ADMIN ) { $mask = CURRENCY_ENABLED; if ( $profiledata['user_id'] != $userdata['user_id'] ) { $mask &= CURRENCY_VIEWPROFILE; } } $template->set_filenames(array( 'cm_viewprofile' => 'cash_viewprofile.tpl') ); while ( $c_cur = &$cash->currency_next($cm_i,$mask) ) { $template->assign_block_vars('cashrow', array( 'CASH_NAME' => $c_cur->name(), 'CASH_AMOUNT' => $profiledata[$c_cur->db()])); } if ( $userdata['session_logged_in'] && (($cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) >= 2) || ($cash->currency_count(CURRENCY_ENABLED | CURRENCY_DONATE) && ($userdata['user_id'] != $profiledata['user_id'])) || ($cash->currency_count() && (($userdata['user_level'] == ADMIN) || (($userdata['user_level'] == MOD) && $cash->currency_count(CURRENCY_ENABLED | CURRENCY_MODEDIT))))) ) { $template->assign_block_vars('switch_cashlinkson',array()); if ( $cash->currency_count(CURRENCY_ENABLED | CURRENCY_EXCHANGEABLE) >= 2 ) { $template->assign_block_vars('switch_cashlinkson.cashlinks',array( 'U_LINK' => append_sid($phpbb_root_path."cash.$phpEx"), 'L_NAME' => $lang['Exchange'])); } if ( $cash->currency_count(CURRENCY_ENABLED | CURRENCY_DONATE) && ($userdata['user_id'] != $profiledata['user_id']) ) { $template->assign_block_vars('switch_cashlinkson.cashlinks',array( 'U_LINK' => append_sid($phpbb_root_path.'cash.'.$phpEx.'?mode=donate&ref=viewprofile&'.POST_USERS_URL.'='.$profiledata['user_id']), 'L_NAME' => $lang['Donate'])); } if ( $cash->currency_count() && (($userdata['user_level'] == ADMIN) || (($userdata['user_level'] == MOD) && $cash->currency_count(CURRENCY_ENABLED | CURRENCY_MODEDIT))) ) { $template->assign_block_vars('switch_cashlinkson.cashlinks',array( 'U_LINK' => append_sid($phpbb_root_path.'cash.'.$phpEx.'?mode=modedit&ref=viewprofile&'.POST_USERS_URL.'='.$profiledata['user_id']), 'L_NAME' => sprintf($lang['Mod_usercash'],$profiledata['username']))); } } $template->assign_block_var_from_handle('CASH', 'cm_viewprofile'); } } $cm_viewprofile = new cash_viewprofile(); } // //=============[ Posting handler ]========================= // if ( defined('CM_POSTING') ) { class cash_posting { function update_post($mode, &$post_data, $forum_id, $topic_id, $post_id, $topic_type, $bbcode_uid, $post_username, &$post_message) { global $board_config, $userdata; if ( $board_config['cash_disable'] || (($mode != 'newtopic') && ($mode != 'reply') && ($mode != 'editpost')) ) { return ''; } $first_post = $post_data['first_post']; $poster_id = $userdata['user_id']; $old_message = ''; $new_bbcode = $bbcode_uid; $old_bbcode = ''; if ( $mode == 'editpost' ) { $poster_id = $post_data['poster_id']; $old_message = &$post_data['post_text']; $old_bbcode = $post_data['bbcode_uid']; } if ( $mode == 'reply' ) { $topic_starter = $post_data['topic_poster']; } else { $topic_starter = false; } return $this->cash_update($mode, $poster_id, $first_post, $old_message, $post_message, $forum_id, $topic_id, $post_id, $new_bbcode, $topic_starter, $old_bbcode); } function update_delete($mode, &$post_data, $forum_id, $topic_id, $post_id) { global $board_config; if ( $board_config['cash_disable'] || ($mode != 'delete') ) { return; } $first_post = $post_data['first_post']; $poster_id = $post_data['poster_id']; $new_message = ''; $new_bbcode = ''; $old_bbcode = $post_data['bbcode_uid']; $topic_starter = ANONYMOUS; $this->cash_update($mode, $poster_id, $first_post, $post_data['post_text'], $new_message, $forum_id, $topic_id, $post_id, $new_bbcode, $topic_starter, $old_bbcode); } function cash_update($mode, $poster_id, $first_post, &$old_message, &$new_message, $forum_id, $topic_id, $post_id, $new_bbcode, $topic_starter, $old_bbcode) { global $board_config, $lang, $db, $phpbb_root_path, $phpEx, $userdata, $cash; if ( ($mode == 'reply') && ($poster_id != $topic_starter) && ($topic_userdata = get_userdata($topic_starter)) ) { $topic_creator = new cash_user($topic_starter,$topic_userdata); $topic_creator->give_bonus($topic_id); } if ( $poster_id == ANONYMOUS ) { return; } if ( $userdata['user_id'] == $poster_id ) { $posting_user = new cash_user($userdata['user_id'], $userdata); } else { $posting_user = new cash_user($poster_id); } $all_active = true; $forumcount = array(); $forumlist = array(); if ( (($mode == 'newtopic') || ($mode == 'reply')) && (intval($board_config['cash_disable_spam_num']) > 0) ) { $all_active = false; $interval = time() - (3600 * intval($board_config['cash_disable_spam_time'])); $sum = 0; $sql = "SELECT forum_id, count(post_id) as postcount FROM " . POSTS_TABLE . " WHERE poster_id = $poster_id AND post_time > $interval GROUP BY forum_id"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Error retrieving post data', '', __LINE__, __FILE__, $sql); } while ( $row = $db->sql_fetchrow($result) ) { $forumlist[] = $row['forum_id']; $forumcount[$row['forum_id']] = $row['postcount']; $sum += $row['postcount']; } if ( $sum < $board_config['cash_disable_spam_num'] ) { $all_active = true; } } $new_len = array(strlen($new_message),cash_quotematch($new_message,$new_bbcode)); $old_len = array(strlen($old_message),cash_quotematch($old_message,$old_bbcode)); $sql_clause = array(); $message_clause = array(); $reply_bonus = array(); $all_spam = !$all_active; while ( $c_cur = &$cash->currency_next($cm_i,CURRENCY_ENABLED,$forum_id) ) { $this_enabled = $all_active; if ( !$all_active ) { $sum = 0; for ( $i = 0; $i < count($forumlist); $i++ ) { if ( $c_cur->forum_active($forumlist[$i]) ) { $sum += $forumcount[$forumlist[$i]]; } } if ( $sum < $board_config['cash_disable_spam_num'] ) { $this_enabled = true; $all_spam = false; } } if ( $this_enabled ) { $base = ( $first_post ) ? $posting_user->get_setting($c_cur->id(),'cash_perpost') : $posting_user->get_setting($c_cur->id(),'cash_perreply'); $perchar = $posting_user->get_setting($c_cur->id(),'cash_perchar',PERCHAR_DEC_BONUS); $max = $posting_user->get_setting($c_cur->id(),'cash_maxearn'); $quotes = ( $c_cur->mask(CURRENCY_INCLUDEQUOTES) ) ? 0 : 1; $total_added = ( $mode != 'delete' ) ? min($max,$base + ($perchar * $new_len[$quotes])) : 0; $total_removed = ( ($mode != 'newtopic') && ($mode != 'reply') ) ? min($max,$base + ($perchar * $old_len[$quotes])) : 0; $total_change = $total_added - $total_removed; if ( $total_change != 0 ) { $change_sign = ($total_change > 0); $change_amount = ( ( $change_sign ) ? $total_change : (-$total_change) ); $change_sign = ( ( $change_sign ) ? " + " : " - " ); $sql_clause[] = $c_cur->db() . " = " . $c_cur->db() . $change_sign . $change_amount; $message_clause[] = $c_cur->display($change_amount); } } } if ( $all_spam ) { return $board_config['cash_disable_spam_message']; } if ( count($sql_clause) > 0 ) { $sql = "UPDATE " . USERS_TABLE . " SET " . implode(', ',$sql_clause) . " WHERE user_id = " . $poster_id; if ( !$db->sql_query($sql) ) { message_die(GENERAL_ERROR, 'Error in updating cash', '', __LINE__, __FILE__, $sql); } } return ( ($userdata['user_id'] == $poster_id) && ($board_config['cash_display_after_posts'] == 1) ) ? sprintf($board_config['cash_post_message'],implode(', ',$message_clause)) : ''; } } $cm_posting = new cash_posting(); } // //=============[ END Page-Specific Classes ]========================= // ?> |
|
From: OryNider <ory...@us...> - 2008-01-13 21:35:19
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28632 Modified Files: Tag: core28x forum_hack.php Log Message: This will supress error wile uploading avatar not succed. Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.24.2.1 retrieving revision 1.24.2.2 diff -C2 -d -r1.24.2.1 -r1.24.2.2 *** forum_hack.php 20 Dec 2007 10:57:57 -0000 1.24.2.1 --- forum_hack.php 13 Jan 2008 21:35:15 -0000 1.24.2.2 *************** *** 1512,1526 **** case 'includes/usercp_avatar': // ! // Avatars and ranks // ! $code = str_replace( '\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code ); $code = str_replace( '$board_config[\'avatar_gallery_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '$board_config[\'avatar_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_path\']', $code ); ! $code = str_replace( 'if (!is_uploaded_file($avatar_filename))', 'if (!file_exists($avatar_filename))', $code); ! $code = str_replace( '$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename");','$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename"); ! @unlink( $avatar_filename);', $code); break; --- 1512,1526 ---- case 'includes/usercp_avatar': // ! // Avatars and ranks // ! $code = str_replace( '\'./\' . $board_config[\'avatar_gallery_path\']', '$board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '\'./\' . $board_config[\'avatar_path\']', '$board_config[\'avatar_path\']', $code ); $code = str_replace( '$board_config[\'avatar_gallery_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_gallery_path\']', $code ); ! $code = str_replace( '$board_config[\'avatar_path\']', '\'' . $phpbb_root_path . '\' . $board_config[\'avatar_path\']', $code ); ! $code = str_replace( '$error = true;', 'return;', $code); ! $code = str_replace( 'if (!is_uploaded_file($avatar_filename))', 'if (!file_exists($avatar_filename))', $code); ! $code = str_replace( '$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename");','$move_file($avatar_filename, \'' . $phpbb_root_path .'\' . $board_config[\'avatar_path\'] . "/$new_filename"); @unlink( $avatar_filename);', $code); break; |
|
From: OryNider <ory...@us...> - 2008-01-13 18:38:46
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv26168 Modified Files: Tag: core28x mx_functions_ch.php mx_functions_core.php mx_functions_phpbb.php mx_functions_style.php page_header.php page_tail.php template.php Log Message: replaceing message_die with mx_message_die Index: mx_functions_ch.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_ch.php,v retrieving revision 1.8 retrieving revision 1.8.2.1 diff -C2 -d -r1.8 -r1.8.2.1 *** mx_functions_ch.php 30 Jan 2007 16:26:07 -0000 1.8 --- mx_functions_ch.php 13 Jan 2008 18:38:40 -0000 1.8.2.1 *************** *** 58,62 **** if ( file_exists($phpbb_root_path.'install_cat') && !defined('IN_LOGIN') && !defined('IN_INSTALL') ) { ! message_die(GENERAL_MESSAGE, 'Please ensure the install_cat/ directory is deleted'); } --- 58,62 ---- if ( file_exists($phpbb_root_path.'install_cat') && !defined('IN_LOGIN') && !defined('IN_INSTALL') ) { ! mx_message_die(GENERAL_MESSAGE, 'Please ensure the install_cat/ directory is deleted'); } Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.52.2.1 retrieving revision 1.52.2.2 diff -C2 -d -r1.52.2.1 -r1.52.2.2 *** mx_functions_core.php 12 Aug 2007 22:29:16 -0000 1.52.2.1 --- mx_functions_core.php 13 Jan 2008 18:38:40 -0000 1.52.2.2 *************** *** 74,80 **** FROM " . CONFIG_TABLE; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); } --- 74,80 ---- FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); } *************** *** 126,130 **** $db->sql_freeresult( $result ); $this->put('mxbb_config', $config); - return ( $config ); } --- 126,129 ---- Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.32.2.1 retrieving revision 1.32.2.2 diff -C2 -d -r1.32.2.1 -r1.32.2.2 *** mx_functions_phpbb.php 6 Jan 2008 22:27:08 -0000 1.32.2.1 --- mx_functions_phpbb.php 13 Jan 2008 18:38:40 -0000 1.32.2.2 *************** *** 118,124 **** global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache; if(defined('HAS_DIED')) { ! die("message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?"); } --- 118,127 ---- global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache; + //$default_lang = $board_config['default_lang']; + $default_lang = $mx_user->lang['default_lang']; + if(defined('HAS_DIED')) { ! die("mx_message_die() was called multiple times. This isn't supposed to happen. Was mx_message_die() used in page_tail.php?"); } *************** *** 153,165 **** } if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR )) { - if( !is_object($mx_user)) - { - die("This hosting or server is using a cache optimizer not currently supported by mxBB."); - } $mx_user->init($user_ip, - ( 1000 + $page_id )); } ! // // If the header hasn't been output then do it --- 156,192 ---- } + + if( !is_object($mx_user)) + { + $mx_user = new mx_user(); + } + + if( !is_object($mx_page)) + { + $mx_page = new mx_page(); + } + + if( !is_object($mx_request_vars)) + { + $mx_request_vars = new mx_request_vars(); + } + + if ( empty($page_id) ) + { + $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); + } + if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR )) { $mx_user->init($user_ip, - ( 1000 + $page_id )); } ! ! if ( empty($theme) ) ! { ! // - populate $theme ! //$theme = $mx_user->_setup_style($board_config['default_style']); ! } ! //$default_lang = $board_config['default_lang']; ! $default_lang = $mx_user->lang['default_lang']; // // If the header hasn't been output then do it *************** *** 167,181 **** if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { ! if ( empty($lang) ) { ! if ( !empty($board_config['default_lang']) ) { ! include($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); } else { include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); } } --- 194,208 ---- if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { ! if ( empty($lang) || empty($lang['Board_disable']) ) { ! if ( !empty($default_lang) && file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { ! include($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx); ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys } else { include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_english/lang_main.'.$phpEx); } } *************** *** 183,197 **** $mx_page->page_title = !empty($msg_title) ? $msg_title : $lang['Information']; ! if ( empty($template) ) ! { ! //$template = new mx_Template($mx_root_path . 'templates/' . $board_config['board_template']); ! $template = new mx_Template($mx_root_path . 'templates/' . $mx_user->template_name); ! } ! if ( empty($theme) ) { ! // ! // instatiate the mx_user class ! // ! $mx_user = new mx_user(); } --- 210,225 ---- $mx_page->page_title = !empty($msg_title) ? $msg_title : $lang['Information']; ! if( !is_object($template) ) { ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $template = new mx_Template($mx_root_path . 'templates/' . $mx_user->template_name); ! break; ! case 'phpbb3': ! $mx_user->init_style(); ! break; ! } } *************** *** 242,247 **** // available so we're going to dump out a simple echo'd statement // ! include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); if ( $msg_text == '' ) --- 270,283 ---- // available so we're going to dump out a simple echo'd statement // ! @include($mx_root_path . 'language/lang_english/lang_main.'.$phpEx); ! ! if (file_exists($phpbb_root_path . 'language/lang_' .$default_lang . '/lang_main.' . $phpEx)) ! { ! include($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys ! } ! else ! { ! include($mx_root_path . 'includes/shared/phpbb2/language/lang_' . $default_lang . '/lang_main.' . $phpEx); // Also include phpBB lang keys ! } if ( $msg_text == '' ) *************** *** 252,256 **** if ( $msg_title == '' ) { ! $msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; --- 288,292 ---- if ( $msg_title == '' ) { ! $msg_title = 'mxBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; *************** *** 721,725 **** if ( !($result = $db->sql_query($sql, 600)) ) { ! message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); } --- 757,761 ---- if ( !($result = $db->sql_query($sql, 600)) ) { ! mx_message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); } *************** *** 791,795 **** if ( !($result = $db->sql_query($sql, 300)) ) { ! message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); } --- 827,831 ---- if ( !($result = $db->sql_query($sql, 300)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't query themes table", "", __LINE__, __FILE__, $sql); } *************** *** 993,997 **** if( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, "Couldn't get list of groups", '', __LINE__, __FILE__, $sql); } --- 1029,1033 ---- if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, "Couldn't get list of groups", '', __LINE__, __FILE__, $sql); } Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.18.2.2 retrieving revision 1.18.2.3 diff -C2 -d -r1.18.2.2 -r1.18.2.3 *** template.php 12 Sep 2007 19:36:09 -0000 1.18.2.2 --- template.php 13 Jan 2008 18:38:41 -0000 1.18.2.3 *************** *** 499,503 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Wasn\'t able to access posts', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) --- 499,503 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Wasn\'t able to access posts', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) *************** *** 512,516 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Wasn\'t able to access topics', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) --- 512,516 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Wasn\'t able to access topics', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) *************** *** 537,541 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(GENERAL_ERROR, 'Wasn\'t able to access forums', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) --- 537,541 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(GENERAL_ERROR, 'Wasn\'t able to access forums', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.17.2.5 retrieving revision 1.17.2.6 diff -C2 -d -r1.17.2.5 -r1.17.2.6 *** mx_functions_style.php 28 Oct 2007 17:18:00 -0000 1.17.2.5 --- mx_functions_style.php 13 Jan 2008 18:38:40 -0000 1.17.2.6 *************** *** 326,330 **** if ( !file_exists(@phpbb_realpath($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { ! message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); } } --- 326,330 ---- if ( !file_exists(@phpbb_realpath($mx_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); } } *************** *** 340,344 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not update user language info'); } --- 340,344 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not update user language info'); } *************** *** 353,357 **** if ( !($result = $db->sql_query($sql)) ) { ! message_die(CRITICAL_ERROR, 'Could not update user language info'); } } --- 353,357 ---- if ( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, 'Could not update user language info'); } } |
|
From: OryNider <ory...@us...> - 2008-01-13 18:36:32
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25281/includes Modified Files: mx_functions_core.php mx_functions_phpbb.php Log Message: Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** mx_functions_core.php 13 Jan 2008 13:14:38 -0000 1.57 --- mx_functions_core.php 13 Jan 2008 18:36:28 -0000 1.58 *************** *** 65,69 **** global $db; ! if (($config = $this->get('phpbb_config')) && $use_cache) { return $config; --- 65,69 ---- global $db; ! if (($config = $this->get('phpbb_config')) && $use_cache ) { return $config; *************** *** 74,80 **** FROM " . CONFIG_TABLE; ! if( !($result = $db->sql_query($sql)) ) { ! mx_message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql); } --- 74,87 ---- FROM " . CONFIG_TABLE; ! if ( !( $result = $db->sql_query( $sql ) ) ) { ! if (!function_exists('mx_message_die')) ! { ! die("Couldnt query config information, Allso this hosting or server is using a cache optimizer not compatible with mxBB or just lost connection to database wile query."); ! } ! else ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); ! } } *************** *** 104,108 **** global $db; ! if ($config = $this->get('mxbb_config')) { return $config; --- 111,115 ---- global $db; ! if ($config = $this->get('mxbb_config') && $portal_config['portal_version']) { return $config; Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** mx_functions_phpbb.php 6 Jan 2008 22:28:57 -0000 1.35 --- mx_functions_phpbb.php 13 Jan 2008 18:36:28 -0000 1.36 *************** *** 308,312 **** global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache, $tplEx; ! $default_lang = $mx_user->get_old_lang($board_config['default_lang']); if(defined('HAS_DIED')) --- 308,313 ---- global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache, $tplEx; ! //$default_lang = $mx_user->get_old_lang($board_config['default_lang']); ! $default_lang = $mx_user->lang['default_lang']; if(defined('HAS_DIED')) *************** *** 476,480 **** if ( $msg_title == '' ) { ! $msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; --- 477,481 ---- if ( $msg_title == '' ) { ! $msg_title = 'mxBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; |
|
From: OryNider <ory...@us...> - 2008-01-13 18:36:32
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25281/admin Modified Files: pagestart.php Log Message: Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** pagestart.php 13 Jan 2008 12:08:25 -0000 1.25 --- pagestart.php 13 Jan 2008 18:36:28 -0000 1.26 *************** *** 37,42 **** if (PORTAL_BACKEND == 'phpbb3') { ! //$mx_user->setup('acp/common', false); //To do ! include_once( $mx_user->lang_path . 'acp/common.'.$phpEx); } --- 37,41 ---- if (PORTAL_BACKEND == 'phpbb3') { ! $mx_user->setup('acp/common', false); //Include phpBB3 AdminCP common language file } |
|
From: OryNider <ory...@us...> - 2008-01-13 13:14:47
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23441 Modified Files: mx_functions_core.php Log Message: Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** mx_functions_core.php 9 Jan 2008 02:15:03 -0000 1.56 --- mx_functions_core.php 13 Jan 2008 13:14:38 -0000 1.57 *************** *** 114,127 **** WHERE portal_id = '1'"; - if (!function_exists('mx_message_die')) - { - //die("This hosting or server is using a cache optimizer not compatible with phpBB and mxBB :("); - } - if ( !( $result = $db->sql_query( $sql ) ) ) { ! mx_message_die( GENERAL_ERROR, 'Couldnt query portal configuration', '', __LINE__, __FILE__, $sql ); } - $row = $db->sql_fetchrow( $result ); foreach ( $row as $config_name => $config_value ) --- 114,128 ---- WHERE portal_id = '1'"; if ( !( $result = $db->sql_query( $sql ) ) ) { ! if (!function_exists('mx_message_die')) ! { ! die("Couldnt query portal configuration, Allso this hosting or server is using a cache optimizer not compatible with mxBB or just lost connection to database wile query."); ! } ! else ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt query portal configuration', '', __LINE__, __FILE__, $sql ); ! } } $row = $db->sql_fetchrow( $result ); foreach ( $row as $config_name => $config_value ) |
|
From: OryNider <ory...@us...> - 2008-01-13 12:09:26
|
Update of /cvsroot/mxbb/core/includes/shared/phpbb3/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31872 Added Files: functions_module.php Log Message: Stuff for the new AdminCP :) --- NEW FILE: functions_module.php --- <?php /** * * @package phpBB3 * @version $Id: functions_module.php,v 1.1 2008/01/13 12:09:21 orynider Exp $ * @copyright (c) 2005 phpBB Group * @license http://opensource.org/licenses/gpl-license.php GNU Public License * */ /** * @ignore */ if (!defined('IN_PORTAL')) { exit; } // // Common global functions // Fixes for mxBB: // $config -> $board_config // $cache -> $mx_cache // $user -> $mx_user // $auth -> $phpbb_auth // Added $mx_root_path // append_sid -> mx3_append_sid // /** * Class handling all types of 'plugins' (a future term) * @package phpBB3 */ class p_master { var $p_id; var $p_class; var $p_name; var $p_mode; var $p_parent; var $active_module = false; var $active_module_row_id = false; var $acl_forum_id = false; var $module_ary = array(); /** * List modules * * This creates a list, stored in $this->module_ary of all available * modules for the given class (ucp, mcp and acp). Additionally * $this->module_y_ary is created with indentation information for * displaying the module list appropriately. Only modules for which * the user has access rights are included in these lists. */ function list_modules($p_class) { global $phpbb_auth, $db, $mx_user, $mx_cache; global $board_config, $mx_root_path, $phpbb_root_path, $phpEx; // Sanitise for future path use, it's escaped as appropriate for queries $this->p_class = str_replace(array('.', '/', '\\'), '', basename($p_class)); // Get cached modules if (($this->module_cache = $mx_cache->get('_modules_' . $this->p_class)) === false) { // Get modules $sql = 'SELECT * FROM ' . MODULES_TABLE . " WHERE module_class = '" . $db->sql_escape($this->p_class) . "' ORDER BY left_id ASC"; $result = $db->sql_query($sql); $rows = array(); while ($row = $db->sql_fetchrow($result)) { $rows[$row['module_id']] = $row; } $db->sql_freeresult($result); $this->module_cache = array(); foreach ($rows as $module_id => $row) { $this->module_cache['modules'][] = $row; $this->module_cache['parents'][$row['module_id']] = $this->get_parents($row['parent_id'], $row['left_id'], $row['right_id'], $rows); } unset($rows); $mx_cache->put('_modules_' . $this->p_class, $this->module_cache); } if (empty($this->module_cache)) { $this->module_cache = array('modules' => array(), 'parents' => array()); } // We "could" build a true tree with this function - maybe mod authors want to use this... // Functions for traversing and manipulating the tree are not available though // We might re-structure the module system to use true trees in 3.2.x... // $tree = $this->build_tree($this->module_cache['modules'], $this->module_cache['parents']); // Clean up module cache array to only let survive modules the user can access $right_id = false; foreach ($this->module_cache['modules'] as $key => $row) { // Not allowed to view module? if (!$this->module_auth($row['module_auth'])) { unset($this->module_cache['modules'][$key]); continue; } // Category with no members, ignore if (!$row['module_basename'] && ($row['left_id'] + 1 == $row['right_id'])) { unset($this->module_cache['modules'][$key]); continue; } // Skip branch if ($right_id !== false) { if ($row['left_id'] < $right_id) { unset($this->module_cache['modules'][$key]); continue; } $right_id = false; } // Not enabled? if (!$row['module_enabled']) { // If category is disabled then disable every child too unset($this->module_cache['modules'][$key]); $right_id = $row['right_id']; continue; } } // Re-index (this is needed, else we are not able to array_slice later) $this->module_cache['modules'] = array_merge($this->module_cache['modules']); // Include MOD _info files for populating language entries within the menus $this->add_mod_info($this->p_class); // Now build the module array, but exclude completely empty categories... $right_id = false; $names = array(); foreach ($this->module_cache['modules'] as $key => $row) { // Skip branch if ($right_id !== false) { if ($row['left_id'] < $right_id) { continue; } $right_id = false; } // Category with no members on their way down (we have to check every level) if (!$row['module_basename']) { $empty_category = true; // We go through the branch and look for an activated module foreach (array_slice($this->module_cache['modules'], $key + 1) as $temp_row) { if ($temp_row['left_id'] > $row['left_id'] && $temp_row['left_id'] < $row['right_id']) { // Module there if ($temp_row['module_basename'] && $temp_row['module_enabled']) { $empty_category = false; break; } continue; } break; } // Skip the branch if ($empty_category) { $right_id = $row['right_id']; continue; } } $depth = sizeof($this->module_cache['parents'][$row['module_id']]); // We need to prefix the functions to not create a naming conflict // Function for building 'url_extra' $url_func = '_module_' . $row['module_basename'] . '_url'; // Function for building the language name $lang_func = '_module_' . $row['module_basename'] . '_lang'; // Custom function for calling parameters on module init (for example assigning template variables) $custom_func = '_module_' . $row['module_basename']; $names[$row['module_basename'] . '_' . $row['module_mode']][] = true; $module_row = array( 'depth' => $depth, 'id' => (int) $row['module_id'], 'parent' => (int) $row['parent_id'], 'cat' => ($row['right_id'] > $row['left_id'] + 1) ? true : false, 'is_duplicate' => ($row['module_basename'] && sizeof($names[$row['module_basename'] . '_' . $row['module_mode']]) > 1) ? true : false, 'name' => (string) $row['module_basename'], 'mode' => (string) $row['module_mode'], 'display' => (int) $row['module_display'], 'url_extra' => (function_exists($url_func)) ? $url_func($row['module_mode'], $row) : '', 'lang' => ($row['module_basename'] && function_exists($lang_func)) ? $lang_func($row['module_mode'], $row['module_langname']) : ((!empty($mx_user->lang[$row['module_langname']])) ? $mx_user->lang[$row['module_langname']] : $row['module_langname']), 'langname' => $row['module_langname'], 'left' => $row['left_id'], 'right' => $row['right_id'], ); if (function_exists($custom_func)) { $custom_func($row['module_mode'], $module_row); } $this->module_ary[] = $module_row; } unset($this->module_cache['modules'], $names); } /** * Check if a certain main module is accessible/loaded * By giving the module mode you are able to additionally check for only one mode within the main module * * @param string $module_basename The module base name, for example logs, reports, main (for the mcp). * @param mixed $module_mode The module mode to check. If provided the mode will be checked in addition for presence. * * @return bool Returns true if module is loaded and accessible, else returns false */ function loaded($module_basename, $module_mode = false) { if (empty($this->loaded_cache)) { $this->loaded_cache = array(); foreach ($this->module_ary as $row) { if (!$row['name']) { continue; } if (!isset($this->loaded_cache[$row['name']])) { $this->loaded_cache[$row['name']] = array(); } if (!$row['mode']) { continue; } $this->loaded_cache[$row['name']][$row['mode']] = true; } } if ($module_mode === false) { return (isset($this->loaded_cache[$module_basename])) ? true : false; } return (!empty($this->loaded_cache[$module_basename][$module_mode])) ? true : false; } /** * Check module authorisation */ function module_auth($module_auth, $forum_id = false) { global $phpbb_auth, $board_config; $module_auth = trim($module_auth); // Generally allowed to access module if module_auth is empty if (!$module_auth) { return true; } // With the code below we make sure only those elements get eval'd we really want to be checked preg_match_all('/(?: "[^"\\\\]*(?:\\\\.[^"\\\\]*)*" | \'[^\'\\\\]*(?:\\\\.[^\'\\\\]*)*\' | [(),] | [^\s(),]+)/x', $module_auth, $match); $tokens = $match[0]; for ($i = 0, $size = sizeof($tokens); $i < $size; $i++) { $token = &$tokens[$i]; switch ($token) { case ')': case '(': case '&&': case '||': case ',': break; default: if (!preg_match('#(?:acl_([a-z_]+)(,\$id)?)|(?:\$id)|(?:aclf_([a-z_]+))|(?:cfg_([a-z_]+))|(?:request_([a-z_]+))#', $token)) { $token = ''; } break; } } $module_auth = implode(' ', $tokens); // Make sure $id seperation is working fine $module_auth = str_replace(' , ', ',', $module_auth); $forum_id = ($forum_id === false) ? $this->acl_forum_id : $forum_id; $is_auth = false; eval('$is_auth = (int) (' . preg_replace(array('#acl_([a-z_]+)(,\$id)?#', '#\$id#', '#aclf_([a-z_]+)#', '#cfg_([a-z_]+)#', '#request_([a-z_]+)#'), array('(int) $phpbb_auth->acl_get(\'\\1\'\\2)', '(int) $forum_id', '(int) $phpbb_auth->acl_getf_global(\'\\1\')', '(int) $board_config[\'\\1\']', '!empty($_REQUEST[\'\\1\'])'), $module_auth) . ');'); return $is_auth; } /** * Set active module */ function set_active($id = false, $mode = false) { $icat = false; $this->active_module = false; if (request_var('icat', '')) { $icat = $id; $id = request_var('icat', ''); } $category = false; foreach ($this->module_ary as $row_id => $item_ary) { // If this is a module and it's selected, active // If this is a category and the module is the first within it, active // If this is a module and no mode selected, select first mode // If no category or module selected, go active for first module in first category if ( (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (($item_ary['mode'] == $mode && !$item_ary['cat']) || ($icat && $item_ary['cat']))) || ($item_ary['parent'] === $category && !$item_ary['cat'] && !$icat && $item_ary['display']) || (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && !$mode && !$item_ary['cat']) || (!$id && !$mode && !$item_ary['cat'] && $item_ary['display']) ) { if ($item_ary['cat']) { $id = $icat; $icat = false; continue; } $this->p_id = $item_ary['id']; $this->p_parent = $item_ary['parent']; $this->p_name = $item_ary['name']; $this->p_mode = $item_ary['mode']; $this->p_left = $item_ary['left']; $this->p_right = $item_ary['right']; $this->module_cache['parents'] = $this->module_cache['parents'][$this->p_id]; $this->active_module = $item_ary['id']; $this->active_module_row_id = $row_id; break; } else if (($item_ary['cat'] && $item_ary['id'] === (int) $id) || ($item_ary['parent'] === $category && $item_ary['cat'])) { $category = $item_ary['id']; } } } /** * Loads currently active module * * This method loads a given module, passing it the relevant id and mode. */ function load_active($mode = false, $module_url = false, $execute_module = true) { global $mx_root_path, $phpbb_root_path, $phpbb_admin_path, $phpEx, $mx_user; $module_path = $mx_root_path, $phpbb_root_path . 'includes/' . $this->p_class; $icat = request_var('icat', ''); if ($this->active_module === false) { trigger_error('Module not accessible', E_USER_ERROR); } if (!class_exists("{$this->p_class}_$this->p_name")) { if (!file_exists("$module_path/{$this->p_class}_$this->p_name.$phpEx")) { trigger_error("Cannot find module $module_path/{$this->p_class}_$this->p_name.$phpEx", E_USER_ERROR); } include("$module_path/{$this->p_class}_$this->p_name.$phpEx"); if (!class_exists("{$this->p_class}_$this->p_name")) { trigger_error("Module file $module_path/{$this->p_class}_$this->p_name.$phpEx does not contain correct class [{$this->p_class}_$this->p_name]", E_USER_ERROR); } if (!empty($mode)) { $this->p_mode = $mode; } // Create a new instance of the desired module ... if it has a // constructor it will of course be executed $instance = "{$this->p_class}_$this->p_name"; $this->module = new $instance($this); // We pre-define the action parameter we are using all over the place if (defined('IN_ADMIN')) { // Is first module automatically enabled a duplicate and the category not passed yet? if (!$icat && $this->module_ary[$this->active_module_row_id]['is_duplicate']) { $icat = $this->module_ary[$this->active_module_row_id]['parent']; } // Not being able to overwrite ;) $this->module->u_action = mx3_append_sid("{$phpbb_admin_path}index.$phpEx", "i={$this->p_name}") . (($icat) ? '&icat=' . $icat : '') . "&mode={$this->p_mode}"; } else { // If user specified the module url we will use it... if ($module_url !== false) { $this->module->u_action = $module_url; } else { $this->module->u_action = $mx_root_path, $phpbb_root_path . (($mx_user->page['page_dir']) ? $mx_user->page['page_dir'] . '/' : '') . $mx_user->page['page_name']; } $this->module->u_action = mx3_append_sid($this->module->u_action, "i={$this->p_name}") . (($icat) ? '&icat=' . $icat : '') . "&mode={$this->p_mode}"; } // Add url_extra parameter to u_action url if (!empty($this->module_ary) && $this->active_module !== false && $this->module_ary[$this->active_module_row_id]['url_extra']) { $this->module->u_action .= $this->module_ary[$this->active_module_row_id]['url_extra']; } // Assign the module path for re-usage $this->module->module_path = $module_path . '/'; // Execute the main method for the new instance, we send the module id and mode as parameters // Users are able to call the main method after this function to be able to assign additional parameters manually if ($execute_module) { $this->module->main($this->p_name, $this->p_mode); } return; } } /** * Appending url parameter to the currently active module. * * This function is called for adding specific url parameters while executing the current module. * It is doing the same as the _module_{name}_url() function, apart from being able to be called after * having dynamically parsed specific parameters. This allows more freedom in choosing additional parameters. * One example can be seen in /includes/mcp/mcp_notes.php - $this->p_master->adjust_url() call. * * @param string $url_extra Extra url parameters, e.g.: &u=$mx_user_id * */ function adjust_url($url_extra) { if (empty($this->module_ary[$this->active_module_row_id])) { return; } $row = &$this->module_ary[$this->active_module_row_id]; // We check for the same url_extra in $row['url_extra'] to overcome doubled additions... if (strpos($row['url_extra'], $url_extra) === false) { $row['url_extra'] .= $url_extra; } } /** * Check if a module is active */ function is_active($id, $mode = false) { // If we find a name by this id and being enabled we have our active one... foreach ($this->module_ary as $row_id => $item_ary) { if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && $item_ary['display']) { if ($mode === false || $mode === $item_ary['mode']) { return true; } } } return false; } /** * Get parents */ function get_parents($parent_id, $left_id, $right_id, &$all_parents) { global $db; $parents = array(); if ($parent_id > 0) { foreach ($all_parents as $module_id => $row) { if ($row['left_id'] < $left_id && $row['right_id'] > $right_id) { $parents[$module_id] = $row['parent_id']; } if ($row['left_id'] > $left_id) { break; } } } return $parents; } /** * Get tree branch */ function get_branch($left_id, $right_id, $remaining) { $branch = array(); foreach ($remaining as $key => $row) { if ($row['left_id'] > $left_id && $row['left_id'] < $right_id) { $branch[] = $row; continue; } break; } return $branch; } /** * Build true binary tree from given array * Not in use */ function build_tree(&$modules, &$parents) { $tree = array(); foreach ($modules as $row) { $branch = &$tree; if ($row['parent_id']) { // Go through the tree to find our branch $parent_tree = $parents[$row['module_id']]; foreach ($parent_tree as $id => $value) { if (!isset($branch[$id]) && isset($branch['child'])) { $branch = &$branch['child']; } $branch = &$branch[$id]; } $branch = &$branch['child']; } $branch[$row['module_id']] = $row; if (!isset($branch[$row['module_id']]['child'])) { $branch[$row['module_id']]['child'] = array(); } } return $tree; } /** * Build navigation structure */ function assign_tpl_vars($module_url) { global $template; $current_id = $right_id = false; // Make sure the module_url has a question mark set, effectively determining the delimiter to use $delim = (strpos($module_url, '?') === false) ? '?' : '&'; $current_padding = $current_depth = 0; $linear_offset = 'l_block1'; $tabular_offset = 't_block2'; // Generate the list of modules, we'll do this in two ways ... // 1) In a linear fashion // 2) In a combined tabbed + linear fashion ... tabs for the categories // and a linear list for subcategories/items foreach ($this->module_ary as $row_id => $item_ary) { // Skip hidden modules if (!$item_ary['display']) { continue; } // Skip branch if ($right_id !== false) { if ($item_ary['left'] < $right_id) { continue; } $right_id = false; } // Category with no members on their way down (we have to check every level) if (!$item_ary['name']) { $empty_category = true; // We go through the branch and look for an activated module foreach (array_slice($this->module_ary, $row_id + 1) as $temp_row) { if ($temp_row['left'] > $item_ary['left'] && $temp_row['left'] < $item_ary['right']) { // Module there and displayed? if ($temp_row['name'] && $temp_row['display']) { $empty_category = false; break; } continue; } break; } // Skip the branch if ($empty_category) { $right_id = $item_ary['right']; continue; } } // Select first id we can get if (!$current_id && (in_array($item_ary['id'], array_keys($this->module_cache['parents'])) || $item_ary['id'] == $this->p_id)) { $current_id = $item_ary['id']; } $depth = $item_ary['depth']; if ($depth > $current_depth) { $linear_offset = $linear_offset . '.l_block' . ($depth + 1); $tabular_offset = ($depth + 1 > 2) ? $tabular_offset . '.t_block' . ($depth + 1) : $tabular_offset; } else if ($depth < $current_depth) { for ($i = $current_depth - $depth; $i > 0; $i--) { $linear_offset = substr($linear_offset, 0, strrpos($linear_offset, '.')); $tabular_offset = ($i + $depth > 1) ? substr($tabular_offset, 0, strrpos($tabular_offset, '.')) : $tabular_offset; } } $u_title = $module_url . $delim . 'i=' . (($item_ary['cat']) ? $item_ary['id'] : $item_ary['name'] . (($item_ary['is_duplicate']) ? '&icat=' . $current_id : '') . '&mode=' . $item_ary['mode']); // Was not allowed in categories before - /*!$item_ary['cat'] && */ $u_title .= (isset($item_ary['url_extra'])) ? $item_ary['url_extra'] : ''; // Only output a categories items if it's currently selected if (!$depth || ($depth && (in_array($item_ary['parent'], array_values($this->module_cache['parents'])) || $item_ary['parent'] == $this->p_parent))) { $use_tabular_offset = (!$depth) ? 't_block1' : $tabular_offset; $tpl_ary = array( 'L_TITLE' => $item_ary['lang'], 'S_SELECTED' => (in_array($item_ary['id'], array_keys($this->module_cache['parents'])) || $item_ary['id'] == $this->p_id) ? true : false, 'U_TITLE' => $u_title ); $template->assign_block_vars($use_tabular_offset, array_merge($tpl_ary, array_change_key_case($item_ary, CASE_UPPER))); } $tpl_ary = array( 'L_TITLE' => $item_ary['lang'], 'S_SELECTED' => (in_array($item_ary['id'], array_keys($this->module_cache['parents'])) || $item_ary['id'] == $this->p_id) ? true : false, 'U_TITLE' => $u_title ); $template->assign_block_vars($linear_offset, array_merge($tpl_ary, array_change_key_case($item_ary, CASE_UPPER))); $current_depth = $depth; } } /** * Returns desired template name */ function get_tpl_name() { return $this->module->tpl_name . '.html'; } /** * Returns the desired page title */ function get_page_title() { global $mx_user; if (!isset($this->module->page_title)) { return ''; } return (isset($mx_user->lang[$this->module->page_title])) ? $mx_user->lang[$this->module->page_title] : $this->module->page_title; } /** * Load module as the current active one without the need for registering it */ function load($class, $name, $mode = false) { $this->p_class = $class; $this->p_name = $name; // Set active module to true instead of using the id $this->active_module = true; $this->load_active($mode); } /** * Display module */ function display($page_title, $display_online_list = true) { global $template, $mx_user; // Generate the page if (defined('IN_ADMIN') && isset($mx_user->data['session_admin']) && $mx_user->data['session_admin']) { adm_page_header($page_title); } else { page_header($page_title, $display_online_list); } $template->set_filenames(array( 'body' => $this->get_tpl_name()) ); if (defined('IN_ADMIN') && isset($mx_user->data['session_admin']) && $mx_user->data['session_admin']) { adm_page_footer(); } else { page_footer(); } } /** * Toggle whether this module will be displayed or not */ function set_display($id, $mode = false, $display = true) { foreach ($this->module_ary as $row_id => $item_ary) { if (($item_ary['name'] === $id || $item_ary['id'] === (int) $id) && (!$mode || $item_ary['mode'] === $mode)) { $this->module_ary[$row_id]['display'] = (int) $display; } } } /** * Add custom MOD info language file */ function add_mod_info($module_class) { global $mx_user, $phpEx; if (file_exists($mx_user->lang_path . 'mods')) { $add_files = array(); $dir = @opendir($mx_user->lang_path . 'mods'); if ($dir) { while (($entry = readdir($dir)) !== false) { if (strpos($entry, 'info_' . strtolower($module_class) . '_') === 0 && substr(strrchr($entry, '.'), 1) == $phpEx) { $add_files[] = 'mods/' . substr(basename($entry), 0, -(strlen($phpEx) + 1)); } } closedir($dir); } if (sizeof($add_files)) { $mx_user->add_lang($add_files); } } } } ?> |
|
From: OryNider <ory...@us...> - 2008-01-13 12:09:10
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31374 Modified Files: session.php Log Message: Stuff for the new AdminCP :) Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/session.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** session.php 16 Dec 2007 16:15:49 -0000 1.3 --- session.php 13 Jan 2008 12:09:01 -0000 1.4 *************** *** 246,250 **** // Validate IP length according to admin ... enforces an IP // check on bots if admin requires this ! // $quadcheck = ($board_config['ip_check_bot'] && $this->data['user_type'] & USER_BOT) ? 4 : $board_config['ip_check']; if (strpos($this->ip, ':') !== false && strpos($this->data['session_ip'], ':') !== false) --- 246,250 ---- // Validate IP length according to admin ... enforces an IP // check on bots if admin requires this ! //$quadcheck = ($board_config['ip_check_bot'] && $this->data['user_type'] & USER_BOT) ? 4 : $board_config['ip_check']; if (strpos($this->ip, ':') !== false && strpos($this->data['session_ip'], ':') !== false) *************** *** 1266,1269 **** --- 1266,1285 ---- } + //mxBB + //To do + // We include acp language file here to not load it every time a custom language file is included + /* + if (defined('IN_ADMIN')) + { + if ((include $this->lang_path . "acp/common.$phpEx") === false) + { + //this will fix the path for anonymouse users + if ((include $phpbb_root_path . $this->lang_path . "acp/common.$phpEx") === false) + { + die('Language file ' . $phpbb_root_path . $this->lang_path . "acp/common.$phpEx" . " couldn't be opened."); + } + } + }*/ + $this->add_lang($lang_set); unset($lang_set); *************** *** 1425,1429 **** if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg")) { ! $cfg_data_imageset_data = parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"); foreach ($cfg_data_imageset_data as $image_name => $value) { --- 1441,1445 ---- if (@file_exists("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg")) { ! $cfg_data_imageset_data = phpBB3::parse_cfg_file("{$phpbb_root_path}styles/{$this->theme['imageset_path']}/imageset/{$this->img_lang}/imageset.cfg"); foreach ($cfg_data_imageset_data as $image_name => $value) { *************** *** 1584,1588 **** function add_lang($lang_set, $use_db = false, $use_help = false) { ! global $phpEx; if (is_array($lang_set)) --- 1600,1604 ---- function add_lang($lang_set, $use_db = false, $use_help = false) { ! global $lang, $phpEx; if (is_array($lang_set)) |
|
From: OryNider <ory...@us...> - 2008-01-13 12:08:34
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv31137 Modified Files: pagestart.php Added Files: admin_mx_preview.php Log Message: Stuff for the new AdminCP :) --- NEW FILE: admin_mx_preview.php --- <?php /** * * @package mxBB Portal Core * @version $Id: admin_mx_preview.php,v 1.1 2008/01/13 12:08:26 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if( !empty($setmodules) ) { return; $module['Administration']['Preview_portal'] = 'admin/' . basename(__FILE__) . '?mode=portal'; $module['Administration']['Preview_forum'] = 'admin/' . basename(__FILE__) . '?mode=forum'; return; } // // Security and Page header // define('IN_PORTAL', 1); $mx_root_path = './../'; $phpEx = substr(strrchr(__FILE__, '.'), 1); require('./pagestart.' . $phpEx); // // Set mode // 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']; $mode = htmlspecialchars($mode); } else { $mode = ''; } $preview_action = ($mode == 'portal') ? mx_append_sid(PORTAL_URL . "index.$phpEx") : mx_append_sid(PHPBB_URL . "index.$phpEx"); $template->set_filenames(array( 'admin_preview' => 'admin/admin_mx_preview.tpl') ); $template->assign_vars(array( 'U_PHPBB_ROOT_PATH' => PHPBB_URL, 'U_PORTAL_ROOT_PATH' => PORTAL_URL, "U_PHPBB_INDEX" => mx_append_sid(PHPBB_URL . "index.$phpEx"), "U_PORTAL_INDEX" => mx_append_sid(PORTAL_URL . "index.$phpEx"), "L_PORTAL_INDEX" => $lang['Portal_index'], "L_PREVIEW_PORTAL" => $lang['Preview_portal'], "S_PREVIEW_ACTION" => $preview_action, "L_PREVIEW_FORUM" => $lang['Preview_forum']) ); $template->pparse('admin_preview'); include_once('page_footer_admin.' . $phpEx); ?> Index: pagestart.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/pagestart.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** pagestart.php 9 Sep 2007 16:48:16 -0000 1.24 --- pagestart.php 13 Jan 2008 12:08:25 -0000 1.25 *************** *** 35,38 **** --- 35,44 ---- $mx_user->init($user_ip, PAGE_INDEX); + if (PORTAL_BACKEND == 'phpbb3') + { + //$mx_user->setup('acp/common', false); //To do + include_once( $mx_user->lang_path . 'acp/common.'.$phpEx); + } + if ( !$userdata['session_logged_in'] ) { |
|
From: OryNider <ory...@us...> - 2008-01-12 11:55:41
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20221 Modified Files: mx_search.php Log Message: Index: mx_search.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_search.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** mx_search.php 9 Sep 2007 16:49:36 -0000 1.21 --- mx_search.php 12 Jan 2008 11:55:37 -0000 1.22 *************** *** 20,24 **** $title = $mx_block->block_info['block_title']; ! include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); // --- 20,26 ---- $title = $mx_block->block_info['block_title']; ! //include_once( $phpbb_root_path . 'includes/functions_search.' . $phpEx ); ! ! mx_page::load_file('functions_search', 'phpbb2'); // |
|
From: OryNider <ory...@us...> - 2008-01-12 10:43:51
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22295 Modified Files: mx_functions.php mx_functions_style.php page_tail.php Log Message: SiteName Index: mx_functions_style.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_style.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** mx_functions_style.php 27 Dec 2007 02:20:20 -0000 1.29 --- mx_functions_style.php 12 Jan 2008 10:43:45 -0000 1.30 *************** *** 651,655 **** if ( defined('IN_ADMIN') ) { ! if( !file_exists(@phpBB2::phpbb_realpath($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) ) { $board_config['default_lang'] = 'english'; --- 651,655 ---- if ( defined('IN_ADMIN') ) { ! if( !file_exists($mx_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) { $board_config['default_lang'] = 'english'; Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** page_tail.php 20 Dec 2007 13:10:12 -0000 1.34 --- page_tail.php 12 Jan 2008 10:43:45 -0000 1.35 *************** *** 112,115 **** --- 112,116 ---- 'MXBB_EXTRA' => $mxbb_footer_text, 'MXBB_EXTRA_URL' => $mxbb_footer_text_url, + 'SITENAME' => $board_config['sitename'], 'POWERED_BY' => $lang['Powered_by'], 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? PORTAL_VERSION : '', Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.72 retrieving revision 1.73 diff -C2 -d -r1.72 -r1.73 *** mx_functions.php 23 Jul 2007 22:52:43 -0000 1.72 --- mx_functions.php 12 Jan 2008 10:43:45 -0000 1.73 *************** *** 608,612 **** // Initialize PHP session // ! session_start(); } --- 608,612 ---- // Initialize PHP session // ! @session_start(); } |
|
From: OryNider <ory...@us...> - 2008-01-12 10:42:52
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21868 Modified Files: Tag: core28x page_tail.php Log Message: Sitename Index: page_tail.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/page_tail.php,v retrieving revision 1.32 retrieving revision 1.32.2.1 diff -C2 -d -r1.32 -r1.32.2.1 *** page_tail.php 21 Jul 2007 23:07:15 -0000 1.32 --- page_tail.php 12 Jan 2008 10:42:44 -0000 1.32.2.1 *************** *** 96,99 **** --- 96,100 ---- 'MXBB_EXTRA' => $mxbb_footer_text, 'MXBB_EXTRA_URL' => $mxbb_footer_text_url, + 'SITENAME' => $board_config['sitename'], 'POWERED_BY' => $lang['Powered_by'], 'MX_VERSION' => ($userdata['user_level'] == ADMIN && $userdata['user_id'] != ANONYMOUS) ? PORTAL_VERSION : '', |
|
From: OryNider <ory...@us...> - 2008-01-11 06:29:13
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv12898 Modified Files: Tag: core28x common.php Log Message: misssing constant that we may need added :) Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.67.2.1 retrieving revision 1.67.2.2 diff -C2 -d -r1.67.2.1 -r1.67.2.2 *** common.php 12 Sep 2007 17:56:44 -0000 1.67.2.1 --- common.php 11 Jan 2008 06:29:05 -0000 1.67.2.2 *************** *** 15,19 **** } - define('IN_PHPBB', 1); --- 15,18 ---- *************** *** 48,52 **** $HTTP_POST_FILES = $_FILES; ! // _SESSION is the only superglobal which is conditionally set if (isset($_SESSION)) { --- 47,51 ---- $HTTP_POST_FILES = $_FILES; ! //_SESSION is the only superglobal which is conditionally set if (isset($_SESSION)) { *************** *** 238,241 **** --- 237,241 ---- define('PORTAL_URL', $portal_config['portal_url']); define('PORTAL_VERSION', $portal_config['portal_version']); + define('PORTAL_BACKEND', $portal_config['portal_backend']); // |
|
From: OryNider <ory...@us...> - 2008-01-10 14:30:52
|
Update of /cvsroot/mxbb/core/templates/prosilver/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22446 Modified Files: logo.gif Log Message: :) Index: logo.gif =================================================================== RCS file: /cvsroot/mxbb/core/templates/prosilver/images/logo.gif,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 Binary files /tmp/cvs2bPC9L and /tmp/cvsx8ziDE differ |
|
From: OryNider <ory...@us...> - 2008-01-10 00:41:28
|
Update of /cvsroot/mxbb/mx_music/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25473 Modified Files: music_cat.php music_delete.php music_download.php music_media_cat.php music_modcp.php music_page.php music_pic_cat.php music_rate.php music_rss.php music_song.php music_upload.php Log Message: Index: music_delete.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_delete.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_delete.php 1 Aug 2007 23:33:27 -0000 1.2 --- music_delete.php 10 Jan 2008 00:41:16 -0000 1.3 *************** *** 15,50 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } // ------------------------------------ --- 15,20 ---- Index: music_pic_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_pic_cat.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** music_pic_cat.php 2 Oct 2007 05:13:45 -0000 1.6 --- music_pic_cat.php 10 Jan 2008 00:41:17 -0000 1.7 *************** *** 662,667 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 662,666 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_cat.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** music_cat.php 2 Oct 2007 05:13:45 -0000 1.13 --- music_cat.php 10 Jan 2008 00:41:16 -0000 1.14 *************** *** 668,673 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 668,672 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_modcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_modcp.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_modcp.php 1 Aug 2007 23:33:28 -0000 1.2 --- music_modcp.php 10 Jan 2008 00:41:16 -0000 1.3 *************** *** 15,50 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } // ------------------------------------ --- 15,21 ---- Index: music_rss.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_rss.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** music_rss.php 21 Sep 2007 22:21:56 -0000 1.5 --- music_rss.php 10 Jan 2008 00:41:17 -0000 1.6 *************** *** 404,422 **** { $videoid['song_url'] = explode("=", $thissong['song_url']); if (empty($videoid['song_url'][1]) ) ! { $row_type = 'flashvideo'; } else { ! $url_video = 'http://' . $domain . '/v/' . $videoid['song_url'][1]; ! //$url_download = append_sid($thissong['song_url']); $row_type = 'youtube'; } $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); } else if ( ($sitename == 'www.clipfish') || ($sitename == 'clipfish') ) --- 404,434 ---- { $videoid['song_url'] = explode("=", $thissong['song_url']); + + if (empty($videoid['song_url'][1]) ) + { + $videoid['song_url'] = explode("/v/", $thissong['song_url']); + } if (empty($videoid['song_url'][1]) ) ! { ! $template->assign_block_vars('songrow.flashvideo', array()); $row_type = 'flashvideo'; } else { ! $template->assign_block_vars('songrow.youtube', array()); $row_type = 'youtube'; } + + if ($sitename == 'www.youtube') + { + $domain = 'youtube.' . $sitesufix; + } $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); + $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); + //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; } else if ( ($sitename == 'www.clipfish') || ($sitename == 'clipfish') ) *************** *** 504,510 **** } ! $title = make_xml_compatible($thissong['song_title']); $url_cat = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_cat&" . "cat_id=" . $thissong['song_cat_id'])); ! $url_page = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_page&" . "song_id=" . $thissong['song_id'])); $url_song = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_song&" . "song_id=" . $thissong['song_id'], true)); $url_flv = !empty($thissong['song_url']) ? $thissong['song_url'] : PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; --- 516,522 ---- } ! $title = make_xml_compatible($thissong['song_title']); $url_cat = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_cat&" . "cat_id=" . $thissong['song_cat_id'])); ! $url_page = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_page&" . "song_id=" . $thissong['song_id'])); $url_song = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_song&" . "song_id=" . $thissong['song_id'], true)); $url_flv = !empty($thissong['song_url']) ? $thissong['song_url'] : PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; *************** *** 533,537 **** case 'youtube': ! $html_code = '<embed src="' . $url_video . '" id="VideoPlayback" wmode="transparent" width="425" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; --- 545,549 ---- case 'youtube': ! $html_code = '<embed src="' . $url_video . '" id="VideoPlayback" wmode="transparent" width="425" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' . '<a href="' . $url_page . '">' . '<br />' . '<img src="' . $img_id . '" border="1" vspace="2" hspace="2" align="left" width="425" height="350" />' . '</a>'; $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_media_cat.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** music_media_cat.php 2 Oct 2007 05:13:45 -0000 1.7 --- music_media_cat.php 10 Jan 2008 00:41:16 -0000 1.8 *************** *** 955,960 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 955,959 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_page.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** music_page.php 2 Oct 2007 05:13:45 -0000 1.11 --- music_page.php 10 Jan 2008 00:41:16 -0000 1.12 *************** *** 137,141 **** else { ! $img_id = PORTAL_URL . $song_image_path . $thissong['song_imagename']; } --- 137,141 ---- else { ! $img_id = $song_image_path . $thissong['song_imagename']; } *************** *** 429,434 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download; //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 429,433 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download; //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_rate.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** music_rate.php 1 Aug 2007 23:33:28 -0000 1.2 --- music_rate.php 10 Jan 2008 00:41:17 -0000 1.3 *************** *** 15,50 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } // ------------------------------------ --- 15,21 ---- |
|
From: OryNider <ory...@us...> - 2008-01-10 00:39:55
|
Update of /cvsroot/mxbb/mx_music/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24629 Modified Files: Tag: core28x music_cat.php music_delete.php music_download.php music_media_cat.php music_modcp.php music_page.php music_pic_cat.php music_rate.php music_rss.php music_song.php music_upload.php Log Message: Index: music_delete.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_delete.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** music_delete.php 1 Aug 2007 23:33:27 -0000 1.2 --- music_delete.php 10 Jan 2008 00:39:42 -0000 1.2.2.1 *************** *** 15,50 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } // ------------------------------------ --- 15,20 ---- Index: music_pic_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_pic_cat.php,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -C2 -d -r1.2.2.4 -r1.2.2.5 *** music_pic_cat.php 2 Oct 2007 05:11:20 -0000 1.2.2.4 --- music_pic_cat.php 10 Jan 2008 00:39:42 -0000 1.2.2.5 *************** *** 662,667 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 662,666 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_cat.php,v retrieving revision 1.8.2.4 retrieving revision 1.8.2.5 diff -C2 -d -r1.8.2.4 -r1.8.2.5 *** music_cat.php 2 Oct 2007 05:11:19 -0000 1.8.2.4 --- music_cat.php 10 Jan 2008 00:39:42 -0000 1.8.2.5 *************** *** 668,673 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 668,672 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_modcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_modcp.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** music_modcp.php 1 Aug 2007 23:33:28 -0000 1.2 --- music_modcp.php 10 Jan 2008 00:39:42 -0000 1.2.2.1 *************** *** 15,50 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } // ------------------------------------ --- 15,21 ---- Index: music_rss.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_rss.php,v retrieving revision 1.3.2.2 retrieving revision 1.3.2.3 diff -C2 -d -r1.3.2.2 -r1.3.2.3 *** music_rss.php 21 Sep 2007 22:25:26 -0000 1.3.2.2 --- music_rss.php 10 Jan 2008 00:39:43 -0000 1.3.2.3 *************** *** 404,422 **** { $videoid['song_url'] = explode("=", $thissong['song_url']); if (empty($videoid['song_url'][1]) ) ! { $row_type = 'flashvideo'; } else { ! $url_video = 'http://' . $domain . '/v/' . $videoid['song_url'][1]; ! //$url_download = append_sid($thissong['song_url']); $row_type = 'youtube'; } $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); } else if ( ($sitename == 'www.clipfish') || ($sitename == 'clipfish') ) --- 404,434 ---- { $videoid['song_url'] = explode("=", $thissong['song_url']); + + if (empty($videoid['song_url'][1]) ) + { + $videoid['song_url'] = explode("/v/", $thissong['song_url']); + } if (empty($videoid['song_url'][1]) ) ! { ! $template->assign_block_vars('songrow.flashvideo', array()); $row_type = 'flashvideo'; } else { ! $template->assign_block_vars('songrow.youtube', array()); $row_type = 'youtube'; } + + if ($sitename == 'www.youtube') + { + $domain = 'youtube.' . $sitesufix; + } $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); + $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); + //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; } else if ( ($sitename == 'www.clipfish') || ($sitename == 'clipfish') ) *************** *** 504,510 **** } ! $title = make_xml_compatible($thissong['song_title']); $url_cat = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_cat&" . "cat_id=" . $thissong['song_cat_id'])); ! $url_page = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_page&" . "song_id=" . $thissong['song_id'])); $url_song = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_song&" . "song_id=" . $thissong['song_id'], true)); $url_flv = !empty($thissong['song_url']) ? $thissong['song_url'] : PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; --- 516,522 ---- } ! $title = make_xml_compatible($thissong['song_title']); $url_cat = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_cat&" . "cat_id=" . $thissong['song_cat_id'])); ! $url_page = append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_page&" . "song_id=" . $thissong['song_id'])); $url_song = !empty($thissong['song_url']) ? $thissong['song_url'] : append_sid(PORTAL_URL . this_mo_rssurl("music_mode=music_song&" . "song_id=" . $thissong['song_id'], true)); $url_flv = !empty($thissong['song_url']) ? $thissong['song_url'] : PORTAL_URL . MUSIC_UPLOAD_PATH . $thissong['song_filename']; *************** *** 533,537 **** case 'youtube': ! $html_code = '<embed src="' . $url_video . '" id="VideoPlayback" wmode="transparent" width="425" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'; $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; --- 545,549 ---- case 'youtube': ! $html_code = '<embed src="' . $url_video . '" id="VideoPlayback" wmode="transparent" width="425" height="350" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />' . '<a href="' . $url_page . '">' . '<br />' . '<img src="' . $img_id . '" border="1" vspace="2" hspace="2" align="left" width="425" height="350" />' . '</a>'; $enclosure = 'url="' . $url_song . '" ' . 'type="application/x-shockwave-flash" length="1024000"'; break; Index: music_media_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_media_cat.php,v retrieving revision 1.2.2.4 retrieving revision 1.2.2.5 diff -C2 -d -r1.2.2.4 -r1.2.2.5 *** music_media_cat.php 2 Oct 2007 05:11:19 -0000 1.2.2.4 --- music_media_cat.php 10 Jan 2008 00:39:42 -0000 1.2.2.5 *************** *** 955,960 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 955,959 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = ( !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download ); //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_page.php,v retrieving revision 1.7.2.4 retrieving revision 1.7.2.5 diff -C2 -d -r1.7.2.4 -r1.7.2.5 *** music_page.php 2 Oct 2007 05:11:20 -0000 1.7.2.4 --- music_page.php 10 Jan 2008 00:39:42 -0000 1.7.2.5 *************** *** 137,141 **** else { ! $img_id = PORTAL_URL . $song_image_path . $thissong['song_imagename']; } --- 137,141 ---- else { ! $img_id = $song_image_path . $thissong['song_imagename']; } *************** *** 429,434 **** $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! //$img_id = !empty($thissong['song_imagename']) ? $img_id : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; ! $img_id = 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download; //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; --- 429,433 ---- $url_download = append_sid($thissong['song_url']); $lang['Download'] = ( !empty($lang['Share']) ? $lang['Share'] : 'Share URL' ); ! $img_id = !empty($thissong['song_imagename']) ? $thissong['song_imagename'] : 'http://img.' . $domain . '/vi/' . $videoid['song_url'][1] . '/default.jpg'; $url_video = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/v/' . $videoid['song_url'][1] : $url_download; //$url_player = !empty($videoid['song_url'][1]) ? 'http://' . $domain . '/player2.swf?video_id=' . $videoid['song_url'][1] : $url_download; Index: music_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/includes/music_rate.php,v retrieving revision 1.2 retrieving revision 1.2.2.1 diff -C2 -d -r1.2 -r1.2.2.1 *** music_rate.php 1 Aug 2007 23:33:28 -0000 1.2 --- music_rate.php 10 Jan 2008 00:39:43 -0000 1.2.2.1 *************** *** 15,50 **** } - // - // Let's include some stuff... - // - $phpEx = substr(strrchr(__FILE__, '.'), 1); - - if ( !defined('TEMPLATE_ROOT_PATH') ) - { - include_once($mx_root_path . 'common.' . $phpEx); - - // - // Start session management - // - $mx_user->init($user_ip, PAGE_INDEX); - // - // End session management - // - } - $music_root_path = $module_root_path . 'music_box/'; - // - // Get general music information - // - if ( !$is_block ) - { - include($music_root_path . 'music_common.'.$phpEx); - } - else - { - include_once($music_root_path . 'music_common.'.$phpEx); - } // ------------------------------------ --- 15,21 ---- |