You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2008-07-13 19:31:30
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2098/mx_navmenu Modified Files: mx_menu_nav.php Log Message: bbcodes as a class, backend extended Index: mx_menu_nav.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/mx_menu_nav.php,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** mx_menu_nav.php 5 Jul 2008 12:45:28 -0000 1.34 --- mx_menu_nav.php 13 Jul 2008 19:31:26 -0000 1.35 *************** *** 169,177 **** $cat = ( !empty($lang[$cat_title]) ? $lang[$cat_title] : $cat_title ); $bbcode_uid = $catData[0]['bbcode_uid']; ! $cat = mx_decode($cat, $bbcode_uid, false); $cat_desc = ''; $cat_desc = $catData[0]['cat_desc']; ! $cat_desc = mx_decode($cat_desc, $bbcode_uid, false); // --- 169,177 ---- $cat = ( !empty($lang[$cat_title]) ? $lang[$cat_title] : $cat_title ); $bbcode_uid = $catData[0]['bbcode_uid']; ! $cat = $mx_bbcode->decode($cat, $bbcode_uid, false); $cat_desc = ''; $cat_desc = $catData[0]['cat_desc']; ! $cat_desc = $mx_bbcode->decode($cat_desc, $bbcode_uid, false); // *************** *** 262,266 **** $bbcode_uid = $menuData['bbcode_uid']; ! $action = mx_decode($action, $bbcode_uid, false); --- 262,266 ---- $bbcode_uid = $menuData['bbcode_uid']; ! $action = $mx_bbcode->decode($action, $bbcode_uid, false); |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:31:29
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2098/mx_coreblocks Modified Files: mx_blockcp.php Log Message: bbcodes as a class, backend extended Index: mx_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_coreblocks/mx_blockcp.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** mx_blockcp.php 9 Mar 2008 23:39:13 -0000 1.24 --- mx_blockcp.php 13 Jul 2008 19:31:26 -0000 1.25 *************** *** 43,46 **** --- 43,51 ---- // + // Initialize page layout template + // + $layouttemplate = new mx_Template( $mx_root_path . 'templates/'. $theme['template_name'] ); + + // // ********************************************************************** // Read language definition |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:31:11
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1887/phpbb3 Modified Files: core.php Log Message: bbcodes as a class, backend extended Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** core.php 12 Jul 2008 20:24:17 -0000 1.6 --- core.php 13 Jul 2008 19:31:07 -0000 1.7 *************** *** 22,25 **** --- 22,27 ---- include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); + include_once($mx_root_path . 'includes/mx_functions_bbcode.' . $phpEx); // BBCode associated functions + // // Switch *************** *** 806,809 **** --- 808,1029 ---- /** + * MXP BBcodes + * @package MX-Publisher + */ + class mx_bbcode extends bbcode_base + { + var $smiley_path_url = ''; + var $smiley_root_path = ''; + + var $smiley_url = 'smiley_url'; + var $smiley_id = 'smiley_id'; + var $emotion = 'emotion'; + + function mx_bbcode() + { + global $board_config, $phpbb_root_path; + + $this->smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed + $this->smiley_root_path = $phpbb_root_path; //same here + $board_config['smilies_path'] = str_replace("smiles", "smilies", $board_config['smilies_path']); + } + + /** + * Generate smilies. + * + * Hacking generate_smilies from phpbb/includes/functions_post(ing).php + * + * @param string $mode + * @param integer $page_id + * + * Fill smiley templates (or just the variables) with smilies, either in a window or inline + */ + function generate_smilies($mode, $forum_id) + { + global $mx_page, $board_config, $template, $mx_root_path, $phpbb_root_path, $phpEx; + global $db, $lang, $images, $theme; + global $user_ip, $session_length, $starttime; + global $userdata, $phpbb_auth, $mx_user; + + $inline_columns = 4; + $inline_rows = 5; + $window_columns = 8; + + if ($mode == 'window') + { + $mx_user->init($user_ip, PAGE_INDEX); + + $gen_simple_header = TRUE; + $page_title = $lang['Emoticons']; + + if ($forum_id) + { + $sql = 'SELECT forum_style + FROM ' . FORUMS_TABLE . " + WHERE forum_id = $forum_id"; + $result = $db->sql_query_limit($sql, 1); + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $mx_user->setup('posting', (int) $row['forum_style']); + } + else + { + $mx_user->setup('posting'); + } + + include($mx_root_path . 'includes/page_header.'.$phpEx); + + $template->set_filenames(array( + 'smiliesbody' => 'posting_smilies.html') + ); + } + + $display_link = false; + if ($mode == 'inline') + { + $sql = 'SELECT smiley_id + FROM ' . SMILIES_TABLE . ' + WHERE display_on_posting = 0'; + $result = $db->sql_query_limit($sql, 1, 0, 3600); + + if ($row = $db->sql_fetchrow($result)) + { + $display_link = true; + } + $db->sql_freeresult($result); + } + + $last_url = ''; + + $sql = 'SELECT * + FROM ' . SMILIES_TABLE . + (($mode == 'inline') ? ' WHERE display_on_posting = 1 ' : '') . ' + ORDER BY smiley_order'; + + //phpBB2 code start + if ($result = $db->sql_query($sql)) + { + $num_smilies = 0; + $rowset = array(); + while ($row = $db->sql_fetchrow($result)) + { + if (empty($rowset[$row['smiley_url']])) + { + $rowset[$row['smiley_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); + $rowset[$row['smiley_url']]['emoticon'] = $row['emoticon']; + $num_smilies++; + } + } + + if ($num_smilies) + { + $smilies_count = ($mode == 'inline') ? min(19, $num_smilies) : $num_smilies; + $smilies_split_row = ($mode == 'inline') ? $inline_columns - 1 : $window_columns - 1; + + $s_colspan = 0; + $row = 0; + $col = 0; + + while (list($smile_url, $data) = @each($rowset)) + { + if (!$col) + { + $template->assign_block_vars('smilies_row', array()); + } + + $template->assign_block_vars('smilies_row.smilies_col', array( + 'SMILEY_CODE' => $data['code'], + 'SMILEY_IMG' => $this->smiley_path_url . $board_config['smilies_path'] . '/' . $smile_url, + 'SMILEY_DESC' => $data['emoticon']) + ); + + $s_colspan = max($s_colspan, $col + 1); + + if ($col == $smilies_split_row) + { + if ($mode == 'inline' && $row == $inline_rows - 1) + { + break; + } + $col = 0; + $row++; + } + else + { + $col++; + } + } + + if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) + { + $template->assign_block_vars('switch_smilies_extra', array()); + + $template->assign_vars(array( + 'L_MORE_SMILIES' => $lang['More_emoticons'], + 'U_MORE_SMILIES' => mx3_append_sid(PHPBB_URL . "posting.$phpEx", "mode=smilies")) + ); + } + + $template->assign_vars(array( + 'L_EMOTICONS' => $lang['Emoticons'], + 'L_CLOSE_WINDOW' => $lang['Close_window'], + 'S_SMILIES_COLSPAN' => $s_colspan) + ); + } + } + + /* + $result = $db->sql_query($sql, 3600); + + $smilies = array(); + while ($row = $db->sql_fetchrow($result)) + { + if (empty($smilies[$row['smiley_url']])) + { + $smilies[$row['smiley_url']] = $row; + } + } + $db->sql_freeresult($result); + + if (sizeof($smilies)) + { + foreach ($smilies as $row) + { + $template->assign_block_vars('smiley', array( + 'SMILEY_CODE' => $row['code'], + 'A_SMILEY_CODE' => addslashes($row['code']), + 'SMILEY_IMG' => $this->smiley_root_path . $board_config['smilies_path'] . '/' . $row['smiley_url'], + 'SMILEY_WIDTH' => $row['smiley_width'], + 'SMILEY_HEIGHT' => $row['smiley_height'], + 'SMILEY_DESC' => $row['emotion']) + ); + } + } + + //What we do here with forum_id versus page_id ? + if ($mode == 'inline' && $display_link) + { + $template->assign_vars(array( + 'S_SHOW_SMILEY_LINK' => true, + 'U_MORE_SMILIES' => mx3_append_sid(PHPBB_URL . "posting.$phpEx", 'mode=smilies&f=' . $forum_id)) + ); + } + */ + + if ($mode == 'window') + { + $template->pparse('smiliesbody'); + include($mx_root_path . 'includes/page_tail.'.$phpEx); + } + } + } + + // + // Instantiate the mx_cache class + // + $mx_bbcode = new mx_bbcode(); + + /** * Olympus Parse cfg file */ *************** *** 1063,1067 **** function mx_generate_text_for_display($text, $uid, $bitfield, $flags) { ! static $bbcode; if (!$text) --- 1283,1287 ---- function mx_generate_text_for_display($text, $uid, $bitfield, $flags) { ! static $bbcode, $mx_bbcode; if (!$text) *************** *** 1095,1099 **** $text = str_replace("\n", '<br />', $text); ! $text = mx_smilies_pass($text, !($flags & OPTION_FLAG_SMILIES)); return $text; --- 1315,1319 ---- $text = str_replace("\n", '<br />', $text); ! $text = $mx_bbcode->smilies_pass($text, !($flags & OPTION_FLAG_SMILIES)); return $text; |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:31:10
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1887/phpbb2 Modified Files: core.php Log Message: bbcodes as a class, backend extended Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** core.php 12 Jul 2008 20:24:15 -0000 1.6 --- core.php 13 Jul 2008 19:31:07 -0000 1.7 *************** *** 24,27 **** --- 24,29 ---- include_once($mx_root_path . 'includes/sessions/phpbb2/auth.' . $phpEx); + include_once($mx_root_path . 'includes/mx_functions_bbcode.' . $phpEx); // BBCode associated functions + /** * Permission/Auth class *************** *** 760,763 **** --- 762,908 ---- /** + * MXP BBcodes + * @package MX-Publisher + */ + class mx_bbcode extends bbcode_base + { + var $smiley_path_url = ''; + var $smiley_root_path = ''; + + var $smiley_url = 'smile_url'; + var $smiley_id = 'smilies_id'; + var $emotion = 'emoticon'; + + function mx_bbcode() + { + global $phpbb_root_path; + + $this->smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed + $this->smiley_root_path = $phpbb_root_path; //same here + } + + /** + * Generate smilies. + * + * Hacking generate_smilies from phpbb/includes/functions_post(ing).php + * + * @param string $mode + * @param integer $page_id + * + * Fill smiley templates (or just the variables) with smilies, either in a window or inline + */ + function generate_smilies($mode, $forum_id) + { + global $mx_page, $board_config, $template, $mx_root_path, $phpbb_root_path, $phpEx; + global $db, $lang, $images, $theme; + global $user_ip, $session_length, $starttime; + global $userdata, $phpbb_auth, $mx_user; + + $inline_columns = 4; + $inline_rows = 5; + $window_columns = 8; + + if ($mode == 'window') + { + $mx_user->init($user_ip, PAGE_INDEX); + + $gen_simple_header = TRUE; + $page_title = $lang['Emoticons']; + + include($mx_root_path . 'includes/page_header.'.$phpEx); + + $template->set_filenames(array( + 'smiliesbody' => 'posting_smilies.tpl') + ); + } + + $sql = "SELECT emoticon, code, smile_url + FROM " . SMILIES_TABLE . " + ORDER BY smilies_id"; + if ($result = $db->sql_query($sql)) + { + $num_smilies = 0; + $rowset = array(); + while ($row = $db->sql_fetchrow($result)) + { + if (empty($rowset[$row['smile_url']])) + { + $rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); + $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; + $num_smilies++; + } + } + + if ($num_smilies) + { + $smilies_count = ($mode == 'inline') ? min(19, $num_smilies) : $num_smilies; + $smilies_split_row = ($mode == 'inline') ? $inline_columns - 1 : $window_columns - 1; + + $s_colspan = 0; + $row = 0; + $col = 0; + + while (list($smile_url, $data) = @each($rowset)) + { + if (!$col) + { + $template->assign_block_vars('smilies_row', array()); + } + + $template->assign_block_vars('smilies_row.smilies_col', array( + 'SMILEY_CODE' => $data['code'], + 'SMILEY_IMG' => $this->smiley_path_url . $board_config['smilies_path'] . '/' . $smile_url, + 'SMILEY_DESC' => $data['emoticon']) + ); + + $s_colspan = max($s_colspan, $col + 1); + + if ($col == $smilies_split_row) + { + if ($mode == 'inline' && $row == $inline_rows - 1) + { + break; + } + $col = 0; + $row++; + } + else + { + $col++; + } + } + + if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) + { + $template->assign_block_vars('switch_smilies_extra', array()); + + $template->assign_vars(array( + 'L_MORE_SMILIES' => $lang['More_emoticons'], + 'U_MORE_SMILIES' => mx3_append_sid(PHPBB_URL . "posting.$phpEx", "mode=smilies")) + ); + } + + $template->assign_vars(array( + 'L_EMOTICONS' => $lang['Emoticons'], + 'L_CLOSE_WINDOW' => $lang['Close_window'], + 'S_SMILIES_COLSPAN' => $s_colspan) + ); + } + } + + if ($mode == 'window') + { + $template->pparse('smiliesbody'); + include($mx_root_path . 'includes/page_tail.'.$phpEx); + } + } + } + + // + // Instantiate the mx_cache class + // + $mx_bbcode = new mx_bbcode(); + + /** * Get 'Poll Select' html select list. * |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:31:10
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1887/internal Modified Files: core.php Log Message: bbcodes as a class, backend extended Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** core.php 12 Jul 2008 20:24:15 -0000 1.6 --- core.php 13 Jul 2008 19:31:07 -0000 1.7 *************** *** 22,25 **** --- 22,27 ---- include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); + include_once($mx_root_path . 'includes/mx_functions_bbcode.' . $phpEx); // BBCode associated functions + /** * Backend specific tasks *************** *** 491,493 **** --- 493,638 ---- } } + + /** + * MXP BBcodes + * @package MX-Publisher + */ + class mx_bbcode extends bbcode_base + { + var $smiley_path_url = ''; + var $smiley_root_path = ''; + + var $smiley_url = 'smile_url'; + var $smiley_id = 'smilies_id'; + var $emotion = 'emoticon'; + + function mx_bbcode() + { + global $phpbb_root_path; + + $this->smiley_path_url = PHPBB_URL; //change this to PORTAL_URL when shared folder will be removed + $this->smiley_root_path = $phpbb_root_path; //same here + } + + /** + * Generate smilies. + * + * Hacking generate_smilies from phpbb/includes/functions_post(ing).php + * + * @param string $mode + * @param integer $page_id + * + * Fill smiley templates (or just the variables) with smilies, either in a window or inline + */ + function generate_smilies($mode, $forum_id) + { + global $mx_page, $board_config, $template, $mx_root_path, $phpbb_root_path, $phpEx; + global $db, $lang, $images, $theme; + global $user_ip, $session_length, $starttime; + global $userdata, $phpbb_auth, $mx_user; + + $inline_columns = 4; + $inline_rows = 5; + $window_columns = 8; + + if ($mode == 'window') + { + $mx_user->init($user_ip, PAGE_INDEX); + + $gen_simple_header = TRUE; + $page_title = $lang['Emoticons']; + + include($mx_root_path . 'includes/page_header.'.$phpEx); + + $template->set_filenames(array( + 'smiliesbody' => 'posting_smilies.tpl') + ); + } + + $sql = "SELECT emoticon, code, smile_url + FROM " . SMILIES_TABLE . " + ORDER BY smilies_id"; + if ($result = $db->sql_query($sql)) + { + $num_smilies = 0; + $rowset = array(); + while ($row = $db->sql_fetchrow($result)) + { + if (empty($rowset[$row['smile_url']])) + { + $rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); + $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; + $num_smilies++; + } + } + + if ($num_smilies) + { + $smilies_count = ($mode == 'inline') ? min(19, $num_smilies) : $num_smilies; + $smilies_split_row = ($mode == 'inline') ? $inline_columns - 1 : $window_columns - 1; + + $s_colspan = 0; + $row = 0; + $col = 0; + + while (list($smile_url, $data) = @each($rowset)) + { + if (!$col) + { + $template->assign_block_vars('smilies_row', array()); + } + + $template->assign_block_vars('smilies_row.smilies_col', array( + 'SMILEY_CODE' => $data['code'], + 'SMILEY_IMG' => $this->smiley_path_url . $board_config['smilies_path'] . '/' . $smile_url, + 'SMILEY_DESC' => $data['emoticon']) + ); + + $s_colspan = max($s_colspan, $col + 1); + + if ($col == $smilies_split_row) + { + if ($mode == 'inline' && $row == $inline_rows - 1) + { + break; + } + $col = 0; + $row++; + } + else + { + $col++; + } + } + + if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) + { + $template->assign_block_vars('switch_smilies_extra', array()); + + $template->assign_vars(array( + 'L_MORE_SMILIES' => $lang['More_emoticons'], + 'U_MORE_SMILIES' => mx3_append_sid(PHPBB_URL . "posting.$phpEx", "mode=smilies")) + ); + } + + $template->assign_vars(array( + 'L_EMOTICONS' => $lang['Emoticons'], + 'L_CLOSE_WINDOW' => $lang['Close_window'], + 'S_SMILIES_COLSPAN' => $s_colspan) + ); + } + } + + if ($mode == 'window') + { + $template->pparse('smiliesbody'); + include($mx_root_path . 'includes/page_tail.'.$phpEx); + } + } + } + + // + // Instantiate the mx_cache class + // + $mx_bbcode = new mx_bbcode(); ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:30:37
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1162/includes Modified Files: mx_functions_bbcode.php mx_functions_blockcp.php mx_functions_core.php mx_functions_tools.php template.php Log Message: bbcodes as a class, backend extended Index: mx_functions_blockcp.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_blockcp.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** mx_functions_blockcp.php 11 Jul 2008 22:00:04 -0000 1.27 --- mx_functions_blockcp.php 13 Jul 2008 19:30:28 -0000 1.28 *************** *** 472,476 **** // Get the list of phpBB usergroups // ! $mx_backend->generate_group_select_sql(); if( !($result = $db->sql_query($sql)) ) --- 472,476 ---- // Get the list of phpBB usergroups // ! $sql = $mx_backend->generate_group_select_sql(); if( !($result = $db->sql_query($sql)) ) Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** mx_functions_core.php 12 Jul 2008 20:24:13 -0000 1.96 --- mx_functions_core.php 13 Jul 2008 19:30:28 -0000 1.97 *************** *** 65,69 **** global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; ! global $mx_backend, $phpbb_auth; // --- 65,69 ---- global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; ! global $mx_backend, $phpbb_auth, $mx_bbcode; // Index: mx_functions_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_bbcode.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_functions_bbcode.php 12 Jul 2008 20:24:11 -0000 1.10 --- mx_functions_bbcode.php 13 Jul 2008 19:30:28 -0000 1.11 *************** *** 27,1181 **** $bbcode_tpl = null; ! /** ! * Loads bbcode templates from the bbcode.tpl file of the current template set. ! * Creates an array, keys are bbcode names like "b_open" or "url", values ! * are the associated template. ! * Probably pukes all over the place if there's something really screwed ! * with the bbcode.tpl file. ! * ! * Nathan Codding, Sept 26 2001. [...1926 lines suppressed...] { ! global $mx_page, $board_config, $phpbb_root_path, $phpEx; ! ! if( !function_exists('generate_smilies') ) ! { ! mx_cache::load_file('functions_post', 'phpbb2'); ! } ! ! if( !function_exists('smilies_pass') ) ! { ! mx_cache::load_file('bbcode', 'phpbb2'); ! } ! ! $smilies_path = $board_config['smilies_path']; ! $board_config['smilies_path'] = PHPBB_URL . $board_config['smilies_path']; ! $message = smilies_pass($message); ! $board_config['smilies_path'] = $smilies_path; ! return $message; } } Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** mx_functions_tools.php 10 Jul 2008 23:02:06 -0000 1.37 --- mx_functions_tools.php 13 Jul 2008 19:30:28 -0000 1.38 *************** *** 122,125 **** --- 122,127 ---- function display($text, $bbcode_uid = '') { + global $mx_bbcode; + // // strip html if reqd *************** *** 138,147 **** if ($text != '' && $bbcode_uid != '') { ! $text = ($this->bbcode_on) ? mx_bbencode_second_pass($text, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $text); } if ( $text != '' ) { ! $text = mx_make_clickable($text); } --- 140,149 ---- if ($text != '' && $bbcode_uid != '') { ! $text = ($this->bbcode_on) ? $mx_bbcode->bbencode_second_pass($text, $bbcode_uid) : preg_replace("/\:$bbcode_uid/si", '', $text); } if ( $text != '' ) { ! $text = $mx_bbcode->make_clickable($text); } *************** *** 153,157 **** if ( $text != '' ) { ! $text = mx_smilies_pass($text); } } --- 155,159 ---- if ( $text != '' ) { ! $text = $mx_bbcode->smilies_pass($text); } } *************** *** 278,282 **** function encode($text) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; $this->bbcode_uid = ''; --- 280,284 ---- function encode($text) { ! global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path, $mx_bbcode; $this->bbcode_uid = ''; *************** *** 287,291 **** if (!empty($text)) { ! $this->bbcode_uid = ($this->bbcode_on) ? mx_make_bbcode_uid() : ''; $text = $this->prepare_message(trim($text), $this->html_on, $this->bbcode_on, $this->smilies_on, $this->bbcode_uid); } --- 289,293 ---- if (!empty($text)) { ! $this->bbcode_uid = ($this->bbcode_on) ? $mx_bbcode->make_bbcode_uid() : ''; $text = $this->prepare_message(trim($text), $this->html_on, $this->bbcode_on, $this->smilies_on, $this->bbcode_uid); } *************** *** 362,366 **** function encode_preview($text) { ! global $html_entities_match, $html_entities_replace, $board_config; if ($this->allow_all_html_tags) --- 364,368 ---- function encode_preview($text) { ! global $html_entities_match, $html_entities_replace, $board_config, $mx_bbcode; if ($this->allow_all_html_tags) *************** *** 373,382 **** $text = ( !empty($text) ) ? htmlspecialchars(trim(stripslashes($text))) : ''; ! $bbcode_uid = ( $this->bbcode_on ) ? mx_make_bbcode_uid() : ''; $text = stripslashes($this->prepare_message(addslashes($this->unprepare_message($text)), $this->html_on, $this->bbcode_on, $this->smilies_on, $bbcode_uid)); if( $this->bbcode_on ) { ! $text = mx_bbencode_second_pass($text, $bbcode_uid); } --- 375,384 ---- $text = ( !empty($text) ) ? htmlspecialchars(trim(stripslashes($text))) : ''; ! $bbcode_uid = ( $this->bbcode_on ) ? $mx_bbcode->make_bbcode_uid() : ''; $text = stripslashes($this->prepare_message(addslashes($this->unprepare_message($text)), $this->html_on, $this->bbcode_on, $this->smilies_on, $bbcode_uid)); if( $this->bbcode_on ) { ! $text = $mx_bbcode->bbencode_second_pass($text, $bbcode_uid); } *************** *** 386,394 **** } ! $text = mx_make_clickable($text); if( $this->smilies_on ) { ! $text = mx_smilies_pass($text); } --- 388,396 ---- } ! $text = $mx_bbcode->make_clickable($text); if( $this->smilies_on ) { ! $text = $mx_bbcode->smilies_pass($text); } *************** *** 437,441 **** function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { ! global $board_config, $html_entities_match, $html_entities_replace; // --- 439,443 ---- function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { ! global $board_config, $html_entities_match, $html_entities_replace, $mx_bbcode; // *************** *** 477,481 **** if($bbcode_on && $bbcode_uid != '') { ! $message = mx_bbencode_first_pass($message, $bbcode_uid); } --- 479,483 ---- if($bbcode_on && $bbcode_uid != '') { ! $message = $mx_bbcode->bbencode_first_pass($message, $bbcode_uid); } *************** *** 1790,1794 **** function _insert_pm() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; // --- 1792,1796 ---- function _insert_pm() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx, $mx_bbcode; // *************** *** 1827,1831 **** if ( $this->bbcode_on ) { ! $bbcode_uid = mx_make_bbcode_uid(); } --- 1829,1833 ---- if ( $this->bbcode_on ) { ! $bbcode_uid = $mx_bbcode->make_bbcode_uid(); } *************** *** 1972,1976 **** function _mailer() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx; // --- 1974,1978 ---- function _mailer() { ! global $db, $lang, $user_ip, $board_config, $userdata, $phpbb_root_path, $phpEx, $mx_bbcode; // *************** *** 2010,2014 **** if ( $this->bbcode_on ) { ! $bbcode_uid = mx_make_bbcode_uid(); } --- 2012,2016 ---- if ( $this->bbcode_on ) { ! $bbcode_uid = $mx_bbcode->make_bbcode_uid(); } Index: template.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/template.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** template.php 11 Jul 2008 21:52:38 -0000 1.29 --- template.php 13 Jul 2008 19:30:28 -0000 1.30 *************** *** 921,928 **** { global $lang, $theme, $board_config; ! if ( !defined( 'IN_ADMIN' ) && (PORTAL_BACKEND == 'phpbb3') ) { - global $admin_script; $admin_script = ($admin_script) ? $admin_script : $filename; } --- 921,931 ---- { global $lang, $theme, $board_config; + global $admin_script; ! // ! // Note: This little snippet is needed to make the templating work with Olympus ! // ! if ( !defined( 'IN_ADMIN' ) ) { $admin_script = ($admin_script) ? $admin_script : $filename; } *************** *** 943,947 **** elseif ($admin_script) { ! ($include_once) ? include_once($admin_script) : include($admin_script); } else --- 946,950 ---- elseif ($admin_script) { ! ($include_once) ? include_once($admin_script) : include($admin_script); // See note above } else |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:30:36
|
Update of /cvsroot/mxbb/core/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1162/admin Modified Files: admin_mx_page_cp.php Log Message: bbcodes as a class, backend extended Index: admin_mx_page_cp.php =================================================================== RCS file: /cvsroot/mxbb/core/admin/admin_mx_page_cp.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** admin_mx_page_cp.php 9 Mar 2008 23:37:59 -0000 1.31 --- admin_mx_page_cp.php 13 Jul 2008 19:30:27 -0000 1.32 *************** *** 478,497 **** // Get the list of phpBB usergroups // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_single_user <> " . TRUE . " ! ORDER BY group_name ASC"; ! break; ! case 'phpbb3': ! $sql = "SELECT group_id, group_name ! FROM " . GROUPS_TABLE . " ! WHERE group_name NOT IN ('BOTS', 'GUESTS') ! ORDER BY group_name ASC"; ! break; ! } if( !($result = $db->sql_query($sql)) ) --- 478,482 ---- // Get the list of phpBB usergroups // ! $sql = $mx_backend->generate_group_select_sql(); if( !($result = $db->sql_query($sql)) ) |
|
From: Jon O. <jon...@us...> - 2008-07-13 19:30:36
|
Update of /cvsroot/mxbb/core In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv1162 Modified Files: common.php Log Message: bbcodes as a class, backend extended Index: common.php =================================================================== RCS file: /cvsroot/mxbb/core/common.php,v retrieving revision 1.96 retrieving revision 1.97 diff -C2 -d -r1.96 -r1.97 *** common.php 11 Jul 2008 21:23:08 -0000 1.96 --- common.php 13 Jul 2008 19:30:27 -0000 1.97 *************** *** 222,227 **** // include_once($mx_root_path . 'includes/mx_functions.' . $phpEx); // CORE Functions - include_once($mx_root_path . 'includes/mx_functions_phpbb.' . $phpEx); // phpBB associated functions - include_once($mx_root_path . 'includes/mx_functions_bbcode.' . $phpEx); // BBCode associated functions include_once($mx_root_path . 'includes/mx_functions_style.' . $phpEx); // Styling and sessions --- 222,225 ---- |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:24:37
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb3blocks In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21788 Modified Files: mx_viewforum.php Log Message: Removed mx_functions_phpbb.php -> backend loaded. Index: mx_viewforum.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb3blocks/mx_viewforum.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mx_viewforum.php 9 Feb 2008 21:14:27 -0000 1.3 --- mx_viewforum.php 12 Jul 2008 20:24:33 -0000 1.4 *************** *** 142,146 **** ); ! make_jumpbox(mx3_append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id); $template->assign_vars(array( --- 142,146 ---- ); ! $mx_backend->make_jumpbox(mx3_append_sid("{$phpbb_root_path}viewforum.$phpEx"), $forum_id); $template->assign_vars(array( |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:24:23
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21282/sessions/phpbb2 Modified Files: core.php session.php Log Message: Removed mx_functions_phpbb.php -> backend loaded. Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** core.php 11 Jul 2008 23:03:30 -0000 1.5 --- core.php 12 Jul 2008 20:24:15 -0000 1.6 *************** *** 79,82 **** --- 79,149 ---- return $auth_data_sql; } + + /** + * function mx_acl_getfignore() + * $auth_level_read can be a value or array; + * $ignore_forum_ids can have this sintax: forum_id(1), forum_id(2), ..., forum_is(n); + * 1st test 25.06.2008 by FlorinCB + */ + function mx_acl_getfignore($auth_level_read, $ignore_forum_ids) + { + global $phpbb_root_path, $mx_user; + + $ignore_forum_ids = ($ignore_forum_ids) ? $ignore_forum_ids : ''; + + $auth_user = array(); + + if (is_array($auth_level_read)) + { + foreach ($auth_level_read as $auth_level) + { + $auth_user = $this->auth($auth_level, AUTH_LIST_ALL, $mx_user->data); + + if ($num_forums = count($auth_user)) + { + while ( list($forum_id, $auth_mod) = each($auth_user) ) + { + $unauthed = false; + + if (!$auth_mod[$auth_level] && ( strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) + { + $unauthed = true; + } + + if ($unauthed) + { + $ignore_forum_ids .= ($ignore_forum_ids) ? ',' . $forum_id : $forum_id; + } + } + } + unset($auth_level_read); + } + } + elseif ($auth_level_read) + { + $auth_user = $this->auth($auth_level_read, AUTH_LIST_ALL, $mx_user->data); + + if ($num_forums = count($auth_user)) + { + while ( list($forum_id, $auth_mod) = each($auth_user) ) + { + $unauthed = false; + + if (!$auth_mod[$auth_level] && ( strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) + { + $unauthed = true; + } + + if ($unauthed) + { + $ignore_forum_ids .= ($ignore_forum_ids) ? ',' . $forum_id : $forum_id; + } + } + } + + } + $ignore_forum_ids = ($ignore_forum_ids) ? $ignore_forum_ids : 0; + return $ignore_forum_ids; + } } *************** *** 158,173 **** define('PORTAL_VERSION', $portal_config['portal_version']); ! if( @file_exists($phpbb_root_path . 'includes/class_config.' . $phpEx) && @file_exists($phpbb_root_path . 'includes/class_groups.' . $phpEx) ) ! { ! include($mx_root_path . 'includes/mx_functions_ch.'.$phpEx); ! } ! else ! { ! // ! // Grab phpBB global variables, re-cache if necessary ! // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings ! // - true: enable cache, false: disable cache ! $board_config = $this->obtain_phpbb_config(false); ! } $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; --- 225,233 ---- define('PORTAL_VERSION', $portal_config['portal_version']); ! // ! // Grab phpBB global variables, re-cache if necessary ! // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings ! // - true: enable cache, false: disable cache ! $board_config = $this->obtain_phpbb_config(false); $script_name_phpbb = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path'])) . '/'; *************** *** 302,311 **** /** ! * _load_file * * @param unknown_type $force_shared * @access private */ ! function _load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; --- 362,371 ---- /** ! * load_file * * @param unknown_type $force_shared * @access private */ ! function load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; *************** *** 333,336 **** --- 393,533 ---- /** + * dss_rand + * + * @param unknown_type $force_shared + * @access private + */ + function dss_rand($force_shared) + { + global $db, $portal_config, $board_config, $dss_seeded; + + $val = $board_config['rand_seed'] . microtime(); + $val = md5($val); + $board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a'); + + if($dss_seeded !== true) + { + $sql = "UPDATE " . CONFIG_TABLE . " SET + config_value = '" . $board_config['rand_seed'] . "' + WHERE config_name = 'rand_seed'"; + + if( !$db->sql_query($sql) ) + { + mx_message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql); + } + + $dss_seeded = true; + } + + return substr($val, 4, 16); + } + + function make_jumpbox($action, $match_forum_id = 0) + { + global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; + + // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); + + $sql = "SELECT c.cat_id, c.cat_title, c.cat_order + FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f + WHERE f.cat_id = c.cat_id + GROUP BY c.cat_id, c.cat_title, c.cat_order + ORDER BY c.cat_order"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql); + } + + $category_rows = array(); + while ( $row = $db->sql_fetchrow($result) ) + { + $category_rows[] = $row; + } + + if ( $total_categories = count($category_rows) ) + { + $sql = "SELECT * + FROM " . FORUMS_TABLE . " + ORDER BY cat_id, forum_order"; + if ( !($result = $db->sql_query($sql)) ) + { + message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); + } + + $boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>'; + + $forum_rows = array(); + while ( $row = $db->sql_fetchrow($result) ) + { + $forum_rows[] = $row; + } + + if ( $total_forums = count($forum_rows) ) + { + for($i = 0; $i < $total_categories; $i++) + { + $boxstring_forums = ''; + for($j = 0; $j < $total_forums; $j++) + { + if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG ) + { + + // if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] ) + // { + $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : ''; + $boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>'; + + // + // Add an array to $nav_links for the Mozilla navigation bar. + // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array. + // + $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array ( + 'url' => mx_append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']), + 'title' => $forum_rows[$j]['forum_name'] + ); + + } + } + + if ( $boxstring_forums != '' ) + { + $boxstring .= '<option value="-1"> </option>'; + $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>'; + $boxstring .= '<option value="-1">----------------</option>'; + $boxstring .= $boxstring_forums; + } + } + } + + $boxstring .= '</select>'; + } + else + { + $boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>'; + } + + // Let the jumpbox work again in sites having additional session id checks. + // if ( !empty($SID) ) + // { + $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; + // } + + $template->set_filenames(array( + 'jumpbox' => 'jumpbox.tpl') + ); + $template->assign_vars(array( + 'L_GO' => $lang['Go'], + 'L_JUMP_TO' => $lang['Jump_to'], + 'L_SELECT_FORUM' => $lang['Select_forum'], + + 'S_JUMPBOX_SELECT' => $boxstring, + 'S_JUMPBOX_ACTION' => mx_append_sid($action)) + ); + $template->assign_var_from_handle('JUMPBOX', 'jumpbox'); + + return; + } + + /** * Backend specific Page Header data * *************** *** 561,563 **** --- 758,798 ---- } } + + /** + * Get 'Poll Select' html select list. + * + * Quick and handy function to generate a dropdown select list for current phpbb polls + * + * @param string $default_poll select idfield = id + * @param string $select_name select name + * @return string (html) + */ + function poll_select($default_poll, $select_name = 'Poll_Topic_id') + { + global $db; + + $style_select = '<select name="' . $select_name . '">'; + $selected = ( $default_poll == 0 ) ? ' selected="selected"' : ''; + $style_select .= '<option value="0"' . $selected . '>' . 'The most recent' . "</option>\n"; + + $sql = "SELECT topic_id, vote_text + FROM " . VOTE_DESC_TABLE . " + ORDER BY vote_text, topic_id"; + + if( !($result = $db->sql_query($sql)) ) + { + mx_message_die(GENERAL_ERROR, "Couldn't query polls table", '', __LINE__, __FILE__, $sql); + } + + while( $row = $db->sql_fetchrow($result) ) + { + $selected = ( $row['topic_id'] == $default_poll ) ? ' selected="selected"' : ''; + $style_select .= '<option value="' . $row['topic_id'] . '"' . $selected . '>' . $row['vote_text'] . "</option>\n"; + } + $style_select .= '</select>'; + + unset($row); + $db->sql_freeresult($result); + return $style_select; + } ?> \ No newline at end of file Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/session.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** session.php 10 Jul 2008 23:23:16 -0000 1.11 --- session.php 12 Jul 2008 20:24:16 -0000 1.12 *************** *** 23,29 **** class session { - // - // phpBB3 duplicates - // var $cookie_data = array(); var $page = array(); --- 23,26 ---- *************** *** 71,75 **** function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0) { ! global $db, $board_config; global $mx_request_vars, $SID; --- 68,72 ---- function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0) { ! global $db, $board_config, $mx_backend; global $mx_request_vars, $SID; *************** *** 222,226 **** if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) { ! $session_id = md5(mx_dss_rand()); $sql = "INSERT INTO " . SESSIONS_TABLE . " --- 219,223 ---- if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) { ! $session_id = md5($mx_backend->dss_rand()); $sql = "INSERT INTO " . SESSIONS_TABLE . " *************** *** 554,558 **** function session_reset_keys($user_id, $user_ip) { ! global $db, $userdata, $board_config; $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : ''; --- 551,555 ---- function session_reset_keys($user_id, $user_ip) { ! global $db, $userdata, $board_config, $mx_backend; $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : ''; *************** *** 578,582 **** if ( !empty($key_sql) ) { ! $auto_login_key = mx_dss_rand() . mx_dss_rand(); $current_time = time(); --- 575,579 ---- if ( !empty($key_sql) ) { ! $auto_login_key = $mx_backend->dss_rand() . $mx_backend->dss_rand(); $current_time = time(); |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:24:23
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21282/sessions/internal Modified Files: core.php session.php Log Message: Removed mx_functions_phpbb.php -> backend loaded. Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** core.php 11 Jul 2008 23:03:30 -0000 1.5 --- core.php 12 Jul 2008 20:24:15 -0000 1.6 *************** *** 207,216 **** /** ! * _load_file * * @param unknown_type $force_shared * @access private */ ! function _load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; --- 207,216 ---- /** ! * load_file * * @param unknown_type $force_shared * @access private */ ! function load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; *************** *** 231,234 **** --- 231,265 ---- /** + * dss_rand + * + * @param unknown_type $force_shared + * @access private + */ + function dss_rand($force_shared) + { + global $db, $portal_config, $board_config, $dss_seeded; + + $val = $portal_config['rand_seed'] . microtime(); + $val = md5($val); + $portal_config['rand_seed'] = md5($portal_config['rand_seed'] . $val . 'a'); + + if($dss_seeded !== true) + { + $sql = "UPDATE " . PORTAL_TABLE . " SET + rand_seed = '" . $portal_config['rand_seed'] . "' + WHERE portal_id = '1'"; + + if( !$db->sql_query($sql) ) + { + mx_message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql); + } + + $dss_seeded = true; + } + + return substr($val, 4, 16); + } + + /** * Backend specific Page Header data * Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/session.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** session.php 10 Jul 2008 23:40:53 -0000 1.13 --- session.php 12 Jul 2008 20:24:15 -0000 1.14 *************** *** 35,41 **** var $update_session_page = true; - // - // phpBB3 duplicates - // var $lang = array(); var $help = array(); --- 35,38 ---- *************** *** 80,84 **** function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0) { ! global $db, $board_config; global $mx_request_vars, $SID; --- 77,81 ---- function session_begin($user_id, $user_ip, $page_id, $auto_create = 0, $enable_autologin = 0, $admin = 0) { ! global $db, $board_config, $mx_backend; global $mx_request_vars, $SID; *************** *** 233,237 **** if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) { ! $session_id = md5(mx_dss_rand()); $sql = "INSERT INTO " . SESSIONS_TABLE . " --- 230,234 ---- if ( !$db->sql_query($sql) || !$db->sql_affectedrows() ) { ! $session_id = md5($mx_backend->dss_rand()); $sql = "INSERT INTO " . SESSIONS_TABLE . " *************** *** 266,270 **** if ($enable_autologin) { ! $auto_login_key = mx_dss_rand() . mx_dss_rand(); if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '') --- 263,267 ---- if ($enable_autologin) { ! $auto_login_key = $mx_backend->dss_rand() . $mx_backend->dss_rand(); if (isset($sessiondata['autologinid']) && (string) $sessiondata['autologinid'] != '') *************** *** 560,564 **** function session_reset_keys($user_id, $user_ip) { ! global $db, $userdata, $board_config; $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : ''; --- 557,561 ---- function session_reset_keys($user_id, $user_ip) { ! global $db, $userdata, $board_config, $mx_backend; $key_sql = ($user_id == $userdata['user_id'] && !empty($userdata['session_key'])) ? "AND key_id != '" . md5($userdata['session_key']) . "'" : ''; *************** *** 584,588 **** if ( !empty($key_sql) ) { ! $auto_login_key = mx_dss_rand() . mx_dss_rand(); $current_time = time(); --- 581,585 ---- if ( !empty($key_sql) ) { ! $auto_login_key = $mx_backend->dss_rand() . $mx_backend->dss_rand(); $current_time = time(); |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:24:23
|
Update of /cvsroot/mxbb/core/includes/shared/phpbb2/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21282/shared/phpbb2/includes Modified Files: bbcode.php Log Message: Removed mx_functions_phpbb.php -> backend loaded. Index: bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/shared/phpbb2/includes/bbcode.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** bbcode.php 3 Jun 2008 20:04:14 -0000 1.3 --- bbcode.php 12 Jul 2008 20:24:17 -0000 1.4 *************** *** 240,246 **** function make_bbcode_uid() { // Unique ID for this message.. ! $uid = mx_dss_rand(); $uid = substr($uid, 0, BBCODE_UID_LEN); --- 240,247 ---- function make_bbcode_uid() { + global $mx_backend; // Unique ID for this message.. ! $uid = $mx_backend->dss_rand(); $uid = substr($uid, 0, BBCODE_UID_LEN); |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:24:22
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21282 Modified Files: mx_functions.php mx_functions_bbcode.php mx_functions_core.php Removed Files: mx_functions_ch.php mx_functions_phpbb.php Log Message: Removed mx_functions_phpbb.php -> backend loaded. --- mx_functions_ch.php DELETED --- Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** mx_functions_core.php 11 Jul 2008 23:03:29 -0000 1.95 --- mx_functions_core.php 12 Jul 2008 20:24:13 -0000 1.96 *************** *** 176,180 **** global $mx_root_path, $phpbb_root_path, $phpEx, $mx_backend; ! $path = $mx_backend->_load_file($force_shared); if (file_exists($path . $file.'.'.$phpEx)) --- 176,180 ---- global $mx_root_path, $phpbb_root_path, $phpEx, $mx_backend; ! $path = $mx_backend->load_file($force_shared); if (file_exists($path . $file.'.'.$phpEx)) --- mx_functions_phpbb.php DELETED --- Index: mx_functions_bbcode.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_bbcode.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_functions_bbcode.php 10 Jul 2008 23:02:05 -0000 1.9 --- mx_functions_bbcode.php 12 Jul 2008 20:24:11 -0000 1.10 *************** *** 270,276 **** function mx_make_bbcode_uid() { // Unique ID for this message.. ! $uid = mx_dss_rand(); $uid = substr($uid, 0, BBCODE_UID_LEN); --- 270,277 ---- function mx_make_bbcode_uid() { + global $mx_backend; // Unique ID for this message.. ! $uid = $mx_backend->dss_rand(); $uid = substr($uid, 0, BBCODE_UID_LEN); Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.84 retrieving revision 1.85 diff -C2 -d -r1.84 -r1.85 *** mx_functions.php 21 May 2008 22:08:33 -0000 1.84 --- mx_functions.php 12 Jul 2008 20:24:11 -0000 1.85 *************** *** 16,19 **** --- 16,1048 ---- /** + * General replacement for die(). + * + * This is general replacement for die(), allows templated + * output in users (or default) language, etc. + * $msg_code can be one of these constants: + * - GENERAL_MESSAGE : Use for any simple text message, eg. results of an operation, authorisation failures, etc. + * - GENERAL ERROR : Use for any error which occurs _AFTER_ the common.php include and session code, ie. most errors in pages/functions [...1004 lines suppressed...] + // + if( $page_id > 0 && $mx_pages_count > 0 ) + { + for( $i = 0; $i < $mx_pages_count; $i++ ) + { + if( $mx_pages_data[$i]['page_id'] == $page_id ) + { + return array( + $mx_pages_data[$i]['page_name'], + PORTAL_URL . "index.$phpEx?page=" . $mx_pages_data[$i]['page_id'] + ); + } + } + } + return false; + } + + /** * Return data from table. * |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:24:22
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv21282/sessions/phpbb3 Modified Files: core.php Log Message: Removed mx_functions_phpbb.php -> backend loaded. Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** core.php 11 Jul 2008 23:03:30 -0000 1.5 --- core.php 12 Jul 2008 20:24:17 -0000 1.6 *************** *** 82,85 **** --- 82,152 ---- return $auth_data_sql; } + + /** + * function mx_acl_getfignore() + * $auth_level_read can be a value or array; + * $ignore_forum_ids can have this sintax: forum_id(1), forum_id(2), ..., forum_is(n); + * 1st test 25.06.2008 by FlorinCB + */ + function mx_acl_getfignore($auth_level_read, $ignore_forum_ids) + { + global $phpbb_root_path, $mx_user; + + $ignore_forum_ids = ($ignore_forum_ids) ? $ignore_forum_ids : ''; + + $auth_user = array(); + + if (is_array($auth_level_read)) + { + foreach ($auth_level_read as $auth_level) + { + $auth_user = $this->acl_getf('!' . $auth_level, true); + + if ($num_forums = count($auth_user)) + { + while ( list($forum_id, $auth_mod) = each($auth_user) ) + { + $unauthed = false; + + if (!$auth_mod[$auth_level] && ( strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) + { + $unauthed = true; + } + + if ($unauthed) + { + $ignore_forum_ids .= ($ignore_forum_ids) ? ',' . $forum_id : $forum_id; + } + } + } + unset($auth_level_read); + } + } + elseif ($auth_level_read) + { + $auth_user = $this->acl_getf('!' . $auth_level_read, true); + + if ($num_forums = count($auth_user)) + { + while ( list($forum_id, $auth_mod) = each($auth_user) ) + { + $unauthed = false; + + if (!$auth_mod[$auth_level] && ( strstr($ignore_forum_ids,$auth_mod['forum_id']) === FALSE)) + { + $unauthed = true; + } + + if ($unauthed) + { + $ignore_forum_ids .= ($ignore_forum_ids) ? ',' . $forum_id : $forum_id; + } + } + } + + } + $ignore_forum_ids = ($ignore_forum_ids) ? $ignore_forum_ids : 0; + return $ignore_forum_ids; + } } *************** *** 294,303 **** /** ! * _load_file * * @param unknown_type $force_shared * @access private */ ! function _load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; --- 361,370 ---- /** ! * load_file * * @param unknown_type $force_shared * @access private */ ! function load_file($force_shared) { global $mx_root_path, $phpbb_root_path, $phpEx; *************** *** 325,328 **** --- 392,528 ---- /** + * dss_rand + * + * @param unknown_type $force_shared + * @access private + */ + function dss_rand($force_shared) + { + global $db, $portal_config, $board_config, $dss_seeded; + + $val = $board_config['rand_seed'] . microtime(); + $val = md5($val); + $board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a'); + + if($dss_seeded !== true) + { + $sql = "UPDATE " . CONFIG_TABLE . " SET + config_value = '" . $board_config['rand_seed'] . "' + WHERE config_name = 'rand_seed'"; + + if( !$db->sql_query($sql) ) + { + mx_message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql); + } + + $dss_seeded = true; + } + + return substr($val, 4, 16); + } + + function make_jumpbox($action, $match_forum_id = 0) + { + global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; + + $sql = 'SELECT forum_id, forum_name, parent_id, forum_type, left_id, right_id + FROM ' . FORUMS_TABLE . ' + ORDER BY left_id ASC'; + $result = $db->sql_query($sql, 600); + + $right = $padding = 0; + $padding_store = array('0' => 0); + $display_jumpbox = false; + $iteration = 0; + + // Sometimes it could happen that forums will be displayed here not be displayed within the index page + // This is the result of forums not displayed at index, having list permissions and a parent of a forum with no permissions. + // If this happens, the padding could be "broken" + + $forum_rows = array(); + while ($row = $db->sql_fetchrow($result)) + { + $forum_rows[] = $row; + + if ($forum_rows['left_id'] < $right) + { + $padding++; + $padding_store[$row['parent_id']] = $padding; + } + else if ($row['left_id'] > $right + 1) + { + // Ok, if the $padding_store for this parent is empty there is something wrong. For now we will skip over it. + // @todo digging deep to find out "how" this can happen. + $padding = (isset($padding_store[$row['parent_id']])) ? $padding_store[$row['parent_id']] : $padding; + } + + $right = $forum_rows['right_id']; + + if ($forum_rows['forum_type'] == FORUM_CAT && ($forum_rows['left_id'] + 1 == $forum_rows['right_id'])) + { + // Non-postable forum with no subforums, don't display + continue; + } + + if ( $total_forums = count($forum_rows) ) + { + for($i = 0; $i < $total_categories; $i++) + { + $boxstring_forums = ''; + for($j = 0; $j < $total_forums; $j++) + { + $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : ''; + $boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>'; + + // + // Add an array to $nav_links for the Mozilla navigation bar. + // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array. + // + $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array ( + 'url' => mx_append_sid(PHPBB_URL . "viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']), + 'title' => $forum_rows[$j]['forum_name'] + ); + + } + + if ( $boxstring_forums != '' ) + { + $boxstring .= '<option value="-1"> </option>'; + $boxstring .= '<option value="-1">' . $forum_rows[$i]['forum_type'] == FORUM_CAT . '</option>'; + $boxstring .= '<option value="-1">----------------</option>'; + $boxstring .= $boxstring_forums; + } + } + } + + $boxstring .= '</select>'; + } + + // Let the jumpbox work again in sites having additional session id checks. + // if ( !empty($SID) ) + // { + $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; + // } + + $template->set_filenames(array( + 'jumpbox' => 'jumpbox.tpl') + ); + + $template->assign_vars(array( + 'L_GO' => $lang['Go'], + 'L_JUMP_TO' => $lang['Jump_to'], + 'L_SELECT_FORUM' => $lang['Select_forum'], + + 'S_JUMPBOX_SELECT' => $boxstring, + 'S_JUMPBOX_ACTION' => mx_append_sid($action), + 'S_FORUM_COUNT' => $j) + ); + + $template->assign_var_from_handle('JUMPBOX', 'jumpbox'); + + return; + } + + /** * Backend specific Page Header data * *************** *** 604,606 **** --- 804,1101 ---- } } + + /** + * Olympus Parse cfg file + */ + function mx_parse_cfg_file($filename, $lines = false) + { + $parsed_items = array(); + + if ($lines === false) + { + $lines = file($filename); + } + + foreach ($lines as $line) + { + $line = trim($line); + + if (!$line || $line[0] == '#' || ($delim_pos = strpos($line, '=')) === false) + { + continue; + } + + // Determine first occurrence, since in values the equal sign is allowed + $key = strtolower(trim(substr($line, 0, $delim_pos))); + $value = trim(substr($line, $delim_pos + 1)); + + if (in_array($value, array('off', 'false', '0'))) + { + $value = false; + } + else if (in_array($value, array('on', 'true', '1'))) + { + $value = true; + } + else if (!trim($value)) + { + $value = ''; + } + else if (($value[0] == "'" && $value[sizeof($value) - 1] == "'") || ($value[0] == '"' && $value[sizeof($value) - 1] == '"')) + { + $value = substr($value, 1, sizeof($value)-2); + } + + $parsed_items[$key] = $value; + } + + return $parsed_items; + } + + /** + * Add log event + */ + function mx_add_log() + { + global $db, $mx_user; + + $args = func_get_args(); + + $mode = array_shift($args); + $reportee_id = ($mode == 'user') ? intval(array_shift($args)) : ''; + $forum_id = ($mode == 'mod') ? intval(array_shift($args)) : ''; + $topic_id = ($mode == 'mod') ? intval(array_shift($args)) : ''; + $action = array_shift($args); + $data = (!sizeof($args)) ? '' : serialize($args); + + $sql_ary = array( + 'user_id' => (empty($mx_user->data)) ? ANONYMOUS : $mx_user->data['user_id'], + 'log_ip' => $mx_user->ip, + 'log_time' => time(), + 'log_operation' => $action, + 'log_data' => $data, + ); + + switch ($mode) + { + case 'admin': + $sql_ary['log_type'] = LOG_ADMIN; + break; + + case 'mod': + $sql_ary += array( + 'log_type' => LOG_MOD, + 'forum_id' => $forum_id, + 'topic_id' => $topic_id + ); + break; + + case 'user': + $sql_ary += array( + 'log_type' => LOG_USERS, + 'reportee_id' => $reportee_id + ); + break; + + case 'critical': + $sql_ary['log_type'] = LOG_CRITICAL; + break; + + default: + return false; + } + + $db->sql_query('INSERT INTO ' . LOG_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); + + return $db->sql_nextid(); + } + + /** + * Generate sort selection fields + */ + function mx_gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param) + { + global $mx_user; + + $sort_dir_text = array('a' => $mx_user->lang['ASCENDING'], 'd' => $mx_user->lang['DESCENDING']); + + // Check if the key is selectable. If not, we reset to the first key found. + // This ensures the values are always valid. + if (!isset($limit_days[$sort_days])) + { + @reset($limit_days); + $sort_days = key($limit_days); + } + + if (!isset($sort_by_text[$sort_key])) + { + @reset($sort_by_text); + $sort_key = key($sort_by_text); + } + + if (!isset($sort_dir_text[$sort_dir])) + { + @reset($sort_dir_text); + $sort_dir = key($sort_dir_text); + } + + $s_limit_days = '<select name="st">'; + foreach ($limit_days as $day => $text) + { + $selected = ($sort_days == $day) ? ' selected="selected"' : ''; + $s_limit_days .= '<option value="' . $day . '"' . $selected . '>' . $text . '</option>'; + } + $s_limit_days .= '</select>'; + + $s_sort_key = '<select name="sk">'; + foreach ($sort_by_text as $key => $text) + { + $selected = ($sort_key == $key) ? ' selected="selected"' : ''; + $s_sort_key .= '<option value="' . $key . '"' . $selected . '>' . $text . '</option>'; + } + $s_sort_key .= '</select>'; + + $s_sort_dir = '<select name="sd">'; + foreach ($sort_dir_text as $key => $value) + { + $selected = ($sort_dir == $key) ? ' selected="selected"' : ''; + $s_sort_dir .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; + } + $s_sort_dir .= '</select>'; + + $u_sort_param = "st=$sort_days&sk=$sort_key&sd=$sort_dir"; + + return; + } + + /** + * Get username details for placing into templates. + * + * @param string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour) or full (for obtaining a html string representing a coloured link to the users profile). + * @param int $user_id The users id + * @param string $username The users name + * @param string $username_colour The users colour + * @param string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then. + * @param string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id} + * + * @return string A string consisting of what is wanted based on $mode. + */ + function mx_get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false) + { + global $phpbb_root_path, $phpEx, $mx_user, $phpbb_auth; + + $profile_url = ''; + $username_colour = ($username_colour) ? '#' . $username_colour : ''; + + if ($guest_username === false) + { + $username = ($username) ? $username : $mx_user->lang['GUEST']; + } + else + { + $username = ($user_id && $user_id != ANONYMOUS) ? $username : ((!empty($guest_username)) ? $guest_username : $mx_user->lang['GUEST']); + } + + // Only show the link if not anonymous + if ($user_id && $user_id != ANONYMOUS) + { + // Do not show the link if the user is already logged in but do not have u_viewprofile permissions (relevant for bots mostly). + // For all others the link leads to a login page or the profile. + if ($mx_user->data['user_id'] != ANONYMOUS && !$phpbb_auth->acl_get('u_viewprofile')) + { + $profile_url = ''; + } + else + { + $profile_url = ($custom_profile_url !== false) ? $custom_profile_url : mx3_append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=viewprofile'); + $profile_url .= '&u=' . (int) $user_id; + } + } + else + { + $profile_url = ''; + } + + switch ($mode) + { + case 'profile': + return $profile_url; + break; + + case 'username': + return $username; + break; + + case 'colour': + return $username_colour; + break; + + case 'full': + default: + + $tpl = ''; + if (!$profile_url && !$username_colour) + { + $tpl = '{USERNAME}'; + } + else if (!$profile_url && $username_colour) + { + $tpl = '<span style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</span>'; + } + else if ($profile_url && !$username_colour) + { + $tpl = '<a href="{PROFILE_URL}">{USERNAME}</a>'; + } + else if ($profile_url && $username_colour) + { + $tpl = '<a href="{PROFILE_URL}" style="color: {USERNAME_COLOUR};" class="username-coloured">{USERNAME}</a>'; + } + + return str_replace(array('{PROFILE_URL}', '{USERNAME_COLOUR}', '{USERNAME}'), array($profile_url, $username_colour, $username), $tpl); + break; + } + } + + /** + * For display of custom parsed text on user-facing pages + * Expects $text to be the value directly from the database (stored value) + */ + function mx_generate_text_for_display($text, $uid, $bitfield, $flags) + { + static $bbcode; + + if (!$text) + { + return ''; + } + + $text = phpbb3::censor_text($text); + + // Parse bbcode if bbcode uid stored and bbcode enabled + if ($uid && ($flags & OPTION_FLAG_BBCODE)) + { + if (!class_exists('bbcode')) + { + global $phpbb_root_path, $phpEx; + mx_cache::load_file('bbcode', 'phpbb3'); + } + + if (empty($bbcode)) + { + $bbcode = new bbcode($bitfield); + } + else + { + $bbcode->bbcode($bitfield); + } + + $bbcode->bbcode_second_pass($text, $uid); + } + + $text = str_replace("\n", '<br />', $text); + + $text = mx_smilies_pass($text, !($flags & OPTION_FLAG_SMILIES)); + + return $text; + } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:22:33
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20737 Modified Files: mx_functions_phpbb.php Log Message: will remove Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** mx_functions_phpbb.php 11 Jul 2008 23:15:05 -0000 1.75 --- mx_functions_phpbb.php 12 Jul 2008 20:22:29 -0000 1.76 *************** *** 15,1679 **** } - /** - * function mx_acl_getfignore() - * $auth_level_read can be a value or array; - * $ignore_forum_ids can have this sintax: forum_id(1), forum_id(2), ..., forum_is(n); - * 1st test 25.06.2008 by FlorinCB - */ - function mx_acl_getfignore($auth_level_read, $ignore_forum_ids) - { [...1637 lines suppressed...] - 'jumpbox' => 'jumpbox.tpl') - ); - - $template->assign_vars(array( - 'L_GO' => $lang['Go'], - 'L_JUMP_TO' => $lang['Jump_to'], - 'L_SELECT_FORUM' => $lang['Select_forum'], - - 'S_JUMPBOX_SELECT' => $boxstring, - 'S_JUMPBOX_ACTION' => mx_append_sid($action), - 'S_FORUM_COUNT' => $j) - ); - $template->assign_var_from_handle('JUMPBOX', 'jumpbox'); - - return; - } ?> \ No newline at end of file --- 15,19 ---- |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:21:22
|
Update of /cvsroot/mxbb/core/contrib/CategoriesHierarchyMod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20202 Added Files: mx_functions_ch.php readme.txt Log Message: moved to contrib folder --- NEW FILE: mx_functions_ch.php --- <?php /** * * @package CH * @version $Id: mx_functions_ch.php,v 1.1 2008/07/12 20:21:14 jonohlsson Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * @internal * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // // This code is part of common.php in Categories Hierarchy 2.1.0 // $starttime = microtime(); $trc_loc_start = $trc_loc_end = 0; // include basic classes def include($phpbb_root_path . 'includes/class_config.' . $phpEx); include($phpbb_root_path . 'includes/class_groups.' . $phpEx); // get config $config = new config_class(); if ( !$config->read() ) { define('RUN_CH_INSTALL', true); } $board_config = $config->data; // let's run the upgrade script if ( !defined('IN_LOGIN') && !defined('IN_INSTALL') && (($config->data['mod_cat_hierarchy'] != CH_CURRENT_VERSION) || defined('RUN_CH_INSTALL')) ) { header('Location: ' . $phpbb_root_path . 'install_cat/install.' . $phpEx . (empty($SID) ? '' : '?' . $SID)); exit; } // user objects include($config->url('includes/class_user')); include($config->url('includes/class_auth')); // instantiate some objects $user = new user(); $censored_words = new words(); $icons = new icons(); $navigation = new navigation(); $themes = ''; $smilies = new smilies(); // People never read achievement messages after after having seen "Succesfull !", tss tss :) 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'); } // messages queue $message_queue = ''; @include($config->url('includes/class_message')); $message_queue = !defined('CH_message_queue') ? '' : new message_queue(); // include extra language key $language = $userdata['user_lang']; if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = $board_config['default_lang']; } if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = 'english'; } include($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.' . $phpEx); // include extra language key $language = $userdata['user_lang']; if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = $board_config['default_lang']; } if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = 'english'; } include($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.' . $phpEx); ?> --- NEW FILE: readme.txt --- In includes/sessions/phpbb2/core.php FIND // // Grab phpBB global variables, re-cache if necessary // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings // - true: enable cache, false: disable cache $board_config = $this->obtain_phpbb_config(false); REPLACE WITH if( @file_exists($phpbb_root_path . 'includes/class_config.' . $phpEx) && @file_exists($phpbb_root_path . 'includes/class_groups.' . $phpEx) ) { include($mx_root_path . 'includes/mx_functions_ch.'.$phpEx); } else { // // Grab phpBB global variables, re-cache if necessary // - optional parameter to enable/disable cache for config data. If enabled, remember to refresh the MX-Publisher cache whenever updating phpBB config settings // - true: enable cache, false: disable cache $board_config = $this->obtain_phpbb_config(false); } |
|
From: Jon O. <jon...@us...> - 2008-07-12 20:20:29
|
Update of /cvsroot/mxbb/core/contrib/CategoriesHierarchyMod In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19639/CategoriesHierarchyMod Log Message: Directory /cvsroot/mxbb/core/contrib/CategoriesHierarchyMod added to the repository |
|
From: Jon O. <jon...@us...> - 2008-07-11 23:15:09
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20959 Modified Files: mx_functions_phpbb.php Log Message: further fixes Index: mx_functions_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_phpbb.php,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** mx_functions_phpbb.php 11 Jul 2008 22:46:04 -0000 1.74 --- mx_functions_phpbb.php 11 Jul 2008 23:15:05 -0000 1.75 *************** *** 120,124 **** { global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images, $mx_root_path, $module_root_path; ! global $userdata, $user_ip, $session_length; global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache, $tplEx; --- 120,124 ---- { global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images, $mx_root_path, $module_root_path; ! global $userdata, $user_ip, $session_length, $mx_backend; global $mx_starttime, $mx_page, $mx_block, $mx_user, $mx_request_vars, $mx_cache, $tplEx; |
|
From: Jon O. <jon...@us...> - 2008-07-11 23:03:34
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15230/sessions/phpbb3 Modified Files: core.php Log Message: more Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** core.php 11 Jul 2008 22:46:06 -0000 1.4 --- core.php 11 Jul 2008 23:03:30 -0000 1.5 *************** *** 19,24 **** // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); // --- 19,24 ---- // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); // |
|
From: Jon O. <jon...@us...> - 2008-07-11 23:03:33
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15230/sessions/phpbb2 Modified Files: core.php Log Message: more Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** core.php 11 Jul 2008 22:46:06 -0000 1.4 --- core.php 11 Jul 2008 23:03:30 -0000 1.5 *************** *** 19,26 **** // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); - include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... include_once($mx_root_path . 'includes/sessions/phpbb2/auth.' . $phpEx); --- 19,25 ---- // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); include_once($mx_root_path . 'includes/sessions/phpbb2/auth.' . $phpEx); *************** *** 182,185 **** --- 181,186 ---- // $this->sync_configs(); + + include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... } |
|
From: Jon O. <jon...@us...> - 2008-07-11 23:03:33
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15230/sessions/internal Modified Files: core.php Log Message: more Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** core.php 11 Jul 2008 22:46:06 -0000 1.4 --- core.php 11 Jul 2008 23:03:30 -0000 1.5 *************** *** 19,26 **** // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); ! ! include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... /** --- 19,24 ---- // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() // ! include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); ! include_once($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); /** *************** *** 94,97 **** --- 92,97 ---- // $this->sync_configs(); + + include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... } |
|
From: Jon O. <jon...@us...> - 2008-07-11 23:03:33
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv15230 Modified Files: mx_functions_core.php Log Message: more Index: mx_functions_core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_core.php,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** mx_functions_core.php 11 Jul 2008 21:23:16 -0000 1.94 --- mx_functions_core.php 11 Jul 2008 23:03:29 -0000 1.95 *************** *** 65,69 **** global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; ! global $mx_backend; // --- 65,69 ---- global $db, $portal_config, $phpbb_root_path, $mx_root_path; global $mx_table_prefix, $table_prefix, $phpEx, $tplEx; ! global $mx_backend, $phpbb_auth; // |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:46:10
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7216/sessions/internal Modified Files: core.php Log Message: Moving phpbb_auth to backends... Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/core.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.php 11 Jul 2008 22:00:18 -0000 1.3 --- core.php 11 Jul 2008 22:46:06 -0000 1.4 *************** *** 15,18 **** --- 15,26 ---- } + // + // First off, include common vanilla phpBB functions, from our shared dir + // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() + // + include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); + include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); + + include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... /** |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:46:10
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7216/sessions/phpbb3 Modified Files: core.php Log Message: Moving phpbb_auth to backends... Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb3/core.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.php 11 Jul 2008 22:00:23 -0000 1.3 --- core.php 11 Jul 2008 22:46:06 -0000 1.4 *************** *** 15,18 **** --- 15,91 ---- } + // + // First off, include common vanilla phpBB functions, from our shared dir + // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() + // + include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); + include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); + + // + // Switch + // + include_once($mx_root_path . 'includes/sessions/phpbb3/auth.' . $phpEx); + + /** + * Permission/Auth class + * + * @package MX-Publisher + * + */ + class phpbb_auth extends phpbb_auth_base + { + /** + * get_auth_forum + * + * @param unknown_type $mode + * @return unknown + */ + function get_auth_forum($mode = 'phpbb') + { + global $userdata, $mx_root_path, $phpEx; + + // + // Try to reuse auth_view query result. + // + $userdata_key = 'mx_get_auth_' . $mode . $userdata['user_id']; + if( !empty($userdata[$userdata_key]) ) + { + $auth_data_sql = $userdata[$userdata_key]; + return $auth_data_sql; + } + + // + // Now, this tries to optimize DB access involved in auth(), + // passing AUTH_LIST_ALL will load info for all forums at once. + // + $is_auth_ary = $this->acl_getf('f_read', false); + + // + // Loop through the list of forums to retrieve the ids for + // those with AUTH_VIEW allowed. + // + $auth_data_sql = ''; + foreach( $is_auth_ary as $fid => $is_auth_row ) + { + if( ($is_auth_row['f_read']) ) + { + $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; + } + } + + if( empty($auth_data_sql) ) + { + $auth_data_sql = -1; + } + + $userdata[$userdata_key] = $auth_data_sql; + return $auth_data_sql; + } + } + + // + // Init the phpbb_auth class + // + $phpbb_auth = new phpbb_auth(); /** |
|
From: Jon O. <jon...@us...> - 2008-07-11 22:46:09
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7216/sessions/phpbb2 Modified Files: core.php Log Message: Moving phpbb_auth to backends... Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** core.php 11 Jul 2008 22:00:23 -0000 1.3 --- core.php 11 Jul 2008 22:46:06 -0000 1.4 *************** *** 15,18 **** --- 15,89 ---- } + // + // First off, include common vanilla phpBB functions, from our shared dir + // Note: These functions will later be accessible wrapped as phpBBX::orig_functionname() + // + include($mx_root_path . 'includes/shared/phpbb2/includes/functions.' . $phpEx); + include($mx_root_path . 'includes/shared/phpbb3/includes/functions.' . $phpEx); + + include_once($phpbb_root_path . 'includes/functions.' . $phpEx); // In case we need old functions... + include_once($mx_root_path . 'includes/sessions/phpbb2/auth.' . $phpEx); + + /** + * Permission/Auth class + * + * @package MX-Publisher + * + */ + class phpbb_auth extends phpbb_auth_base + { + /** + * get_auth_forum + * + * @param unknown_type $mode + * @return unknown + */ + function get_auth_forum($mode = 'phpbb') + { + global $userdata, $mx_root_path, $phpEx; + + // + // Try to reuse auth_view query result. + // + $userdata_key = 'mx_get_auth_' . $mode . $userdata['user_id']; + if( !empty($userdata[$userdata_key]) ) + { + $auth_data_sql = $userdata[$userdata_key]; + return $auth_data_sql; + } + + // + // Now, this tries to optimize DB access involved in auth(), + // passing AUTH_LIST_ALL will load info for all forums at once. + // + $is_auth_ary = $this->auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); + + // + // Loop through the list of forums to retrieve the ids for + // those with AUTH_VIEW allowed. + // + $auth_data_sql = ''; + foreach( $is_auth_ary as $fid => $is_auth_row ) + { + if( ($is_auth_row['auth_view']) ) + { + $auth_data_sql .= ( $auth_data_sql != '' ) ? ', ' . $fid : $fid; + } + } + + if( empty($auth_data_sql) ) + { + $auth_data_sql = -1; + } + + $userdata[$userdata_key] = $auth_data_sql; + return $auth_data_sql; + } + } + + // + // Init the phpbb_auth class + // + $phpbb_auth = new phpbb_auth(); /** |