TinyPortal
1.0.8
TinyPortal v1.0.8 beta 4
Bloc
http://www.tinyportal.net
$boarddir/index.php
require_once($sourcedir . '/Security.php');
// TinyPortal include
require_once($sourcedir . '/TPortal.php');
// Is the forum in maintenance mode? (doesn't apply to administrators.)
// TinyPortal
TPortal_init();
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
// first..if the action is set, but empty, don't go any further
if (isset($_REQUEST['action']) && $_REQUEST['action']=='')
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
// Action and board are both empty... maybe the portal page?
if (empty($board) && empty($topic) && $settings['TPortal_front_type']!='boardindex')
{
require_once($sourcedir . '/TPortal.php');
return 'TPortal';
}
if (empty($board) && empty($topic) && $settings['TPortal_front_type']=='boardindex' && (isset($_GET['cat']) || isset($_GET['page'])))
{
require_once($sourcedir . '/TPortal.php');
return 'TPortal';
}
// Action and board are still both empty...and no portal startpage - BoardIndex!
elseif (empty($board) && empty($topic) && $settings['TPortal_front_type']=='boardindex')
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}
'.xml' => array('News.php', 'ShowXmlFeed'),
'tpadmin' => array('TPortalAdmin.php', 'TPortalAdmin'),
'forum' => array('BoardIndex.php', 'BoardIndex'),
'tpmod' => array('TPmodules.php', 'TPmodules'),
$sourcedir/Load.php
$settings = $themeData[0];
if (!empty($context['TPortal']['front_type'])){
$settings['TPortal_front_type'] = $context['TPortal']['front_type'];
}
// Start the linktree off empty..
$context['linktree'] = array();
// Start the linktree off empty..not quite, have to insert forum
$context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum'));
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),
// Build up the linktree (adding TPortal forum index)
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),
// The theme is the forum's default.
else
$ID_THEME = $modSettings['theme_guests'];
// TinyPortal
$newtheme=TP_loadTheme();
if($newtheme!=$ID_THEME && $newtheme>0)
$ID_THEME=$newtheme;
// end TinyPortal
$themedir/index.template.php
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))
$current_action = 'search';
if (isset($_GET['dl']))
$current_action = 'dlmanager';
if (isset($_GET['board']) || isset($_GET['topic']) || $context['current_action']=='forum')
$current_action = 'forum';
if ($context['current_action']=='tpadmin')
$current_action = 'admin';
// Show the [help] button.
if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '| | ' : '' , '
'.$txt['tp-forum'].'
| ' , $current_action=='forum' ? ' | ' : '';
// The end of tab section.
echo '
|
';
// TinyPortal
if($context['TPortal']['leftbar'])
echo '![', $txt['upshrink_description'], ' *](', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', ')  | ';
if($context['TPortal']['rightbar'])
echo '![', $txt['upshrink_description'], ' *](', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', ')  | ';
// TinyPortal end
echo '
$boarddir/Themes/babylon/index.template.php
';
';
// TinyPortal
if($context['TPortal']['showtop'])
echo '![', $txt['upshrink_description'], ' *](', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', ')
';
if($context['TPortal']['leftbar'])
echo '![', $txt['upshrink_description'], ' *](', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', ')
';
if($context['TPortal']['rightbar'])
echo '![', $txt['upshrink_description'], ' *](', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', ')
';
// TinyPortal end
// Show the [home] and [help] buttons.
echo '
', ($settings['use_image_buttons'] ? '
' : $txt[103]), '', $context['menu_separator'], '
', ($settings['use_image_buttons'] ? '
' : $txt[119]), '', $context['menu_separator'];
// Show the [home] and [help] buttons.
echo '
', ($settings['use_image_buttons'] ? '
' : $txt[103]), '', $context['menu_separator'];
if($settings['TPortal_front_type']!='boardindex')
echo ' ', ($settings['use_image_buttons'] ? '
' : 'Forum Index'), '', $context['menu_separator'];
echo ' ', ($settings['use_image_buttons'] ? '
' : $txt[119]), '', $context['menu_separator'];
$sourcedir/Subs.php
$context['allow_admin'] = allowedTo(array('admin_forum', 'manage_boards', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_attachments', 'manage_smileys'));
// tinyportal //
global $sourcedir;
require_once($sourcedir.'/TPSubs.php');
TPcheckAdminAreas();
// end //
// Admin area 'Members'.
// TinyPortal
global $sourcedir;
require_once($sourcedir.'/TPSubs.php');
TPsetupAdminAreas();
// TinyPortal end
function redirectexit($setLocation = '', $refresh = false)
function redirectexit($setLocation = '', $refresh = false, $tp_not = false)
// Put the session ID in.
if (defined('SID') && SID != '')
// TinyPortal
if ($setLocation == $scripturl && !$tp_not)
$setLocation .= '?action=forum';
// end
$sourcedir/ManagePermissions.php
// This is just a helpful array of permissions guests... cannot have.
// TPortal
foreach($context['TPortal']['permissonlist'] as $perm )
$permissionList['membergroup'][$perm['title']] = $perm['perms'];
// end TinyPortal
// All permission groups that will be shown in the left column.
$leftPermissionGroups = array(
'general',
'calendar',
'maintenance',
'member_admin',
'general_board',
'topic',
'post',
);
// All permission groups that will be shown in the left column.
$leftPermissionGroups = array(
'general',
'maintenance',
'member_admin',
'profile',
'general_board',
'topic',
'post',
);
$sourcedir/Security.php
// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context;
// TinyPortal
TPortal_init();
$sourcedir/Errors.php
// We don't have $txt yet, but that's okay...
if (empty($txt))
die($error);
// TinyPortal
if(!isset($context['tp_prefix']))
TPortal_init();
// end
$themedir/Help.template.php
global $context, $settings, $options, $txt, $scripturl;
echo '