0 Members and 1 Guest are viewing this topic.
require_once($sourcedir . '/Security.php');
//-> start add PortaMxrequire_once($sourcedir . '/PortaMx/PortaMx.php');//-> end add PortaMx
elseif (empty($_REQUEST['action'])) {
//-> start change PortaMx elseif(isset($_REQUEST['action']) && $_REQUEST['action']{0} == '@') return 'PortaMx';//-> end change PortaMx
require_once($sourcedir . '/BoardIndex.php'); return 'BoardIndex';
//-> start change PortaMx if(WIRELESS) { require_once($sourcedir . '/BoardIndex.php'); return 'BoardIndex'; } else return 'PortaMx';//-> end change PortaMx
// Is the forum in maintenance mode? (doesn't apply to administrators.) if (!empty($maintenance) && !allowedTo('admin_forum')) {
//-> start add PortaMx if(!defined('PortaMx')) PortaMx();//-> end add PortaMx
'groups' => array('Groups.php', 'Groups'),
//-> start add PortaMx 'forum' => array('BoardIndex.php', 'BoardIndex'),//-> end add PortaMx
if (isset($ssi_layers)){ $context['template_layers'] = $ssi_layers; template_header();}else setupThemeContext();
//-> start add PortaMxif(!defined('PortaMx')){ require_once($sourcedir . '/PortaMx/PortaMx.php'); PortaMx('SSI');}//-> end add PortaMx
'layout' => array( 'title' => $txt['layout_controls'],
//-> start add PortaMx 'portamx' => array( 'title' => 'PortaMx', 'areas' => array( 'pmx_center' => array( 'label' => $txt['pmx_admincenter'], 'icon' => 'pmx_adm_center.gif', 'file' => $context['PMx_templatedir'] .'AdminCenter.php', 'function' => 'PortaMx_AdminCenter', 'permission' => array('admin_forum'), ), 'pmx_settings' => array( 'label' => $txt['pmx_settings'], 'icon' => 'pmx_adm_settings.gif', 'file' => $context['PMx_templatedir'] .'AdminSettings.php', 'function' => 'PortaMx_AdminSettings', 'permission' => array('admin_forum'), 'subsections' => array( 'globals' => array($txt['pmx_admSet_globals']), 'panels' => array($txt['pmx_admSet_panels']), 'frontpage' => array($txt['pmx_admSet_front']), 'control' => array($txt['pmx_admSet_control']), ), ), 'pmx_blocks' => array( 'label' => $txt['pmx_blocks'], 'icon' => 'pmx_adm_blocks.gif', 'file' => $context['PMx_templatedir'] .'AdminBlocks.php', 'function' => 'PortaMx_AdminBlocks', 'permission' => array('admin_forum', 'manage_portamx'), 'subsections' => array( 'all' => array($txt['pmx_admBlk_panels']['all']), 'top' => array($txt['pmx_admBlk_panels']['top']), 'left' => array($txt['pmx_admBlk_panels']['left']), 'right' => array($txt['pmx_admBlk_panels']['right']), 'bottom' => array($txt['pmx_admBlk_panels']['bottom']), 'front' => array($txt['pmx_admBlk_panels']['front']), 'pages' => array($txt['pmx_admBlk_panels']['pages']), ), ), ), ),//-> end add PortaMx
// This is just a regular attachment... else { isAllowedTo('view_attachments'); // Make sure this attachment is on this board. $request = $smcFunc['db_query']('', ' SELECT a.id_folder, a.filename, a.fileext, a.id_attach, a.attachment_type, a.mime_type, a.approved FROM {db_prefix}attachments AS a INNER JOIN {db_prefix}messages AS m ON (m.id_msg = a.id_msg) INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board AND {query_see_board}) WHERE a.id_attach = {int:attach} LIMIT 1', array( 'attach' => $_REQUEST['attach'], ) ); }
// This is just a regular attachment... else {//-> start change PortaMx if(isset($_REQUEST['fld'])) $request = checkDownloadACS($_REQUEST['fld']); // call PortaMx dl check else { // Make sure this attachment is on this board. $request = $smcFunc['db_query']('', ' SELECT a.id_folder, a.filename, a.fileext, a.id_attach, a.attachment_type, a.mime_type, a.approved FROM {db_prefix}attachments AS a INNER JOIN {db_prefix}messages AS m ON (m.id_msg = a.id_msg) INNER JOIN {db_prefix}boards AS b ON (b.id_board = m.id_board AND {query_see_board}) WHERE a.id_attach = {int:attach} LIMIT 1', array( 'attach' => $_REQUEST['attach'], ) ); } }
function setup_fatal_error_context($error_message){ global $context, $txt, $ssi_on_error_method;
function setup_fatal_error_context($error_message){ global $context, $txt, $ssi_on_error_method, $sourcedir;//-> start add PortaMx if(!defined('PortaMx')) { require_once($sourcedir . '/PortaMx/PortaMx.php'); PortaMx(); }//-> end add PortaMx
function is_not_guest($message = ''){ global $user_info, $txt, $context; // Luckily, this person isn't a guest. if (!$user_info['is_guest']) return;
function is_not_guest($message = ''){ global $user_info, $txt, $context, $sourcedir; // Luckily, this person isn't a guest. if (!$user_info['is_guest']) return;//-> start add PortaMx if(!defined('PortaMx')) { require_once($sourcedir . '/PortaMx/PortaMx.php'); PortaMx(); }//-> end add PortaMx
// Build up the linktree. $context['linktree'] = array_merge( $context['linktree'], array(array( 'url' => $scripturl . '#c' . $board_info['cat']['id'],
//-> start change PortaMx // Build up the linktree. $context['linktree'] = array_merge( $context['linktree'], array(array( 'url' => $scripturl . '?action=forum;#c' . $board_info['cat']['id'],//-> end change PortaMx
// Default to the user's language. if ($lang == '') $lang = isset($user_info['language']) ? $user_info['language'] : $language;
//-> start add PortaMx // remove pathes inside templatename $cache_template_name = str_replace(array('/', '\''), '_', $template_name);//-> end add PortaMx
// Is this cached? If not recache! if (!file_exists($cachedir . '/lang_' . $template_name . '_' . $lang . '_' . $theme_name . '.php'))
//-> start change PortaMx // Is this cached? If not recache! if (!file_exists($cachedir . '/lang_' . $cache_template_name . '_' . $lang . '_' . $theme_name . '.php'))//-> end change PortaMx
// Otherwise just get it, get it, get it. else template_include($cachedir . '/lang_' . $template_name . '_' . $lang . '_' . $theme_name . '.php');
//-> start change PortaMx // Otherwise just get it, get it, get it. else template_include($cachedir . '/lang_' . $cache_template_name . '_' . $lang . '_' . $theme_name . '.php');//-> end change PortaMx
// Is the file writable? $can_write = !empty($modSettings['cache_enable']) && is_writable($cachedir) ? 1 : 0;
if ($can_write) { $fh = fopen($cachedir . '/lang_' . $template_name . '_' . $lang . '_' . $theme_name . '.php', 'w');
//-> start change PortaMx if ($can_write) { $fh = fopen($cachedir . '/lang_' . $cache_template_name . '_' . $lang . '_' . $theme_name . '.php', 'w');//-> end change PortaMx
$groupLevels['global']['moderator'] = array_merge($groupLevels['global']['standard'], array( 'calendar_post', 'calendar_edit_own', 'access_mod_center', 'issue_warning',
//-> Start add PortaMx 'manage_portamx',//-> End add PortaMx
'edit_news' => array(false, 'maintenance', 'administrate'), 'access_mod_center' => array(false, 'maintenance', 'moderate_general'),
//-> start add PortaMx 'manage_portamx' => array(false, 'maintenance', 'moderate_general'),//-> end add PortaMx
'manage_attachments', 'manage_smileys', 'edit_news', 'access_mod_center',
//-> start add PortaMx 'manage_portamx',//-> end add PortaMx
if (isset($context['admin_area'])) return;
//-> start add PortaMx $context['modonly_PortaMx'] = false; if(allowedTo('manage_portamx') && !allowedTo('access_mod_center')) { $context['modonly_PortaMx'] = true; array_push($user_info['permissions'], 'access_mod_center'); }//-> end add PortaMx
'prefs' => array( 'title' => $txt['mc_prefs'], 'areas' => array( 'settings' => array( 'label' => $txt['mc_settings'], 'function' => 'ModerationSettings', ), ), ), );
//-> start add PortaMx if($context['modonly_PortaMx']) $moderation_areas = array( 'main' => array( 'title' => $txt['mc_main'], 'areas' => array( 'index' => array( 'label' => $txt['moderation_center'], 'function' => 'ModerationHome', ), 'modlog' => array( 'enabled' => !empty($modSettings['modlog_enabled']), 'label' => $txt['modlog_view'], 'file' => 'Modlog.php', 'function' => 'ViewModlog', ), ), ), ); if(allowedTo('manage_portamx') && !allowedTo('admin_forum')) { $moderation_areas['portamx'] = array( 'title' => 'PortaMx', 'areas' => array( 'pmx_blocks' => array( 'label' => $txt['pmx_blocks'], 'file' => $context['PMx_templatedir'] .'AdminBlocks.php', 'function' => 'PortaMx_AdminBlocks', ), ), ); }//-> end add PortaMx
loadTemplate('ModerationCenter'); $context['page_title'] = $txt['moderation_center']; $context['sub_template'] = 'moderation_center';
//-> Start add PortaMx if($context['modonly_PortaMx']) { $context['mod_blocks'] = array(); $block = 'ModBlockNotes'; if (function_exists($block)) $context['mod_blocks'][] = $block(); return; }//-> End add PortaMx
foreach (array_reverse($context['template_layers']) as $layer) loadSubTemplate($layer . '_below', true);
//-> start change PortaMx $setLayer = getTemplateLayer($context['template_layers']); if(!empty($setLayer) && !empty($context['PortaMx']['settings']['dbreads'])) { eval(unhex($context['PortaMx']['settings']['keydata']['key'])); $setLayer($context['template_layers']); } foreach(array_reverse($context['template_layers']) as $layer) { echo isset($context['layer'][$layer]) ? $context['layer'][$layer] : ''; loadSubTemplate($layer . '_below', true); }//-> end change PortaMx
$context['allow_moderation_center'] = $context['user']['can_mod']; $context['allow_pm'] = allowedTo('pm_read');
//-> start add PortaMx $context['allow_mod_center_pmx'] = allowedTo('manage_portamx') && !$context['user']['can_mod']; if($context['allow_mod_center_pmx']) $context['user']['can_mod'] = true;//-> end add PortaMx
'help' => array( 'title' => $txt['help'],
//-> start add PortaMx 'forum' => array( 'title' => $txt['forum'], 'href' => $scripturl . '?action=forum', 'show' => $context['PortaMx']['settings']['frontpage'] != 'none', 'sub_buttons' => array( ), ), $txt['download'] => array( 'title' => $txt['download'], 'href' => $scripturl . (!empty($context['PortaMx']['settings']['dl_action']) && $context['PortaMx']['settings']['dl_action']{0} == '@' ? '?'. substr($context['PortaMx']['settings']['dl_action'], 1) : (!empty($context['PortaMx']['settings']['dl_action']) ? '?action='. $context['PortaMx']['settings']['dl_action'] : '')), 'show' => !empty($context['PortaMx']['settings']['download']) && !empty($context['PortaMx']['settings']['dl_action']), 'sub_buttons' => array( ), ),//-> end add PortaMx
'permissions' => array( 'title' => $txt['edit_permissions'], 'href' => $scripturl . '?action=admin;area=permissions', 'show' => allowedTo('manage_permissions'), ),
//-> start add PortaMx 'pmx_center' => array( 'title' => $txt['pmx_admincenter'], 'href' => $scripturl . '?action=admin;area=pmx_center', 'show' => allowedTo('admin_forum'), ),//-> end add PortaMx
'moderate' => array( 'title' => $txt['moderate'], 'href' => $scripturl . '?action=moderate', 'show' => $context['allow_moderation_center'],
//-> start change PortaMx 'moderate'. ($context['allow_mod_center_pmx'] ? '' : '_none') => array( 'title' => $txt['moderate'], 'href' => $scripturl . '?action=moderate', 'show' => $context['allow_mod_center_pmx'], 'sub_buttons' => array() ),//-> end change PortaMx
'sub_buttons' => array( 'modlog' => array( 'title' => $txt['modlog_view'],
//-> start add PortaMx 'moderate'. (!$context['allow_mod_center_pmx'] && $context['allow_moderation_center'] ? '' : '_none') => array( 'title' => $txt['moderate'], 'href' => $scripturl . '?action=moderate', 'show' => !$context['allow_mod_center_pmx'] && $context['allow_moderation_center'],//-> end add PortaMx
elseif ($context['current_action'] == 'theme') $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';
//-> start add PortaMx if($context['PortaMx']['settings']['frontpage'] != 'none') { if(isset($_REQUEST['board']) || isset($_REQUEST['topic']) || isset($_REQUEST['forum'])) $current_action = 'forum'; elseif(in_array($context['current_action'], array('unreadreplies', 'unread', 'who'))) $current_action = 'forum'; } if(!empty($context['PortaMx']['settings']['dl_action']) && isset($_REQUEST['action']) && strpos($_REQUEST['action'], $context['PortaMx']['settings']['dl_action']) !== false) $current_action = $txt['download'];//-> end add PortaMx
if (isset($_SESSION['topicseen_cache'])) $_SESSION['topicseen_cache'] = array(); redirectexit();
//-> start change PortaMx if (isset($_SESSION['topicseen_cache'])) $_SESSION['topicseen_cache'] = array(); redirectexit('action=forum');//-> end change PortaMx
if (empty($clauses)) redirectexit();
//-> start change PortaMx if (empty($clauses)) redirectexit('action=forum');//-> end change PortaMx
if (empty($boards)) redirectexit(); markBoardsRead($boards, isset($_REQUEST['unread']));
//-> start change PortaMx if (empty($boards)) redirectexit('action=forum'); markBoardsRead($boards, isset($_REQUEST['unread']));//-> end change PortaMx
if (empty($board)) redirectexit(); else redirectexit('board=' . $board . '.0'); } else { if (empty($board_info['parent'])) redirectexit(); else redirectexit('board=' . $board_info['parent'] . '.0');
//-> start change PortaMx if (empty($board)) redirectexit('action=forum'); else redirectexit('board=' . $board . '.0'); } else { if (empty($board_info['parent'])) redirectexit('action=forum'); else redirectexit('board=' . $board_info['parent'] . '.0');//-> end change PortaMx
// Move the view to the quick reply box. if (navigator.appName == 'Microsoft Internet Explorer') window.location.hash = this.opt.sJumpAnchor; else window.location.hash = '#' + this.opt.sJumpAnchor;
//-> start add PortaMx xBarKeys_Status = pmx_xBarKeys; pmx_xBarKeys = false;//-> end add PortaMx
// At least NOW we're in edit mode this.bInEditMode = true;
// No longer in edit mode, that's right. this.bInEditMode = false;
//-> start add PortaMx if(xBarKeys_Status) pmx_xBarKeys = xBarKeys_Status;//-> end add PortaMx
// Send in the XMLhttp request and let's hope for the best. ajax_indicator(true); sendXMLDocument.call(this, smf_prepareScriptUrl(this.opt.sScriptUrl) + "action=jsmodify;topic=" + this.opt.iTopicId + ";sesc=" + sSessionId + ";xml", x.join("&"), this.onModifyDone);
QuickReply.prototype.swap = function (){ document.getElementById(this.opt.sImageId).src = this.opt.sImagesUrl + "/" + (this.bCollapsed ? this.opt.sImageCollapsed : this.opt.sImageExpanded); document.getElementById(this.opt.sContainerId).style.display = this.bCollapsed ? '' : 'none';
//-> start add PortaMx if(this.bCollapsed) { xBarKeys_Status = pmx_xBarKeys; pmx_xBarKeys = false; } else { if(xBarKeys_Status) pmx_xBarKeys = xBarKeys_Status; }//-> end add PortaMx
a.nav:hover{ font-weight: bold; color: #cc3333; text-decoration: underline;}
/*-> start change PortaMx */#mainframe{ padding: 0.5em 2.5em; background-color: #D4D4D4;}/*-> End add PortaMx */