TinyPortal 0.9 TinyPortal v0.9 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'; } // 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 // Output any remaining HTML headers. (from mods, maybe?) echo $context['html_headers'], ' '; // TinyPortal start if($context['TPortal']['fixed_width']!=0) echo '
'; // TinyPortal end // display user name // TinyPortal if($context['TPortal']['showtop']==1) { // TinyPortal end echo '
'; // TinyPortal } // end echo ' // The main content should go here. echo '
'; // The main content should go here. A table is used because IE 6 just can't handle a div. echo ' '; // TinyPortal integrated bars if($context['TPortal']['leftbar']) { echo ''; } echo ''; // TinyPortal integrated bars if($context['TPortal']['rightbar']){ echo ''; } echo '
'; if($context['TPortal']['centerbar']) echo '
' , TPortal_sidebar('center') , '
'; function template_main_below() { global $context, $settings, $options, $scripturl, $txt; echo ' '; function template_main_below() { global $context, $settings, $options, $scripturl, $txt; echo '
';
', theme_copyright(), ' ', theme_copyright(), '
', tportal_version() , '
'; '; // TinyPortal if($context['TPortal']['fixed_width']!=0) echo ''; // end echo ' 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'])) $current_action = 'forum'; // 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 '*'; if($context['TPortal']['rightbar']) echo '*'; // TinyPortal end echo ' $boarddir/Themes/babylon/index.template.php // Output any remaining HTML headers. (from mods, maybe?) echo $context['html_headers'], ' '; // TinyPortal start if($context['TPortal']['fixed_width']!=0) echo ' // The following will be used to let the user know that some AJAX process is running echo ' '; // TinyPortal if($context['TPortal']['fixed_width']!=0) echo '
'; // TinyPortal end ', $context['forum_name'], ''; // TinyPortal if($context['TPortal']['showtop']==1) { // TinyPortal end ', $context['common_stats']['total_posts'], ' ', $txt[95], ' ', $txt['smf88'], ' ', $context['common_stats']['total_topics'], ' ', $txt[64], ' ', $txt[525], ' ', $context['common_stats']['total_members'], ' ', $txt[19], '
', $txt[656], ': ', $context['common_stats']['latest_member']['link'], ' ';
// TinyPortal } // end *'; '; // TinyPortal if($context['TPortal']['showtop']) echo '* '; if($context['TPortal']['leftbar']) echo '*'; if($context['TPortal']['rightbar']) echo '*'; // TinyPortal end // The main content should go here. A table is used because IE 6 just can't handle a div. echo ' '; // TinyPortal integrated bars if($context['TPortal']['rightbar']){ echo ''; } echo '
'; // The main content should go here. A table is used because IE 6 just can't handle a div. echo '
'; // TinyPortal integrated bars if($context['TPortal']['leftbar']) { echo ''; } echo '
'; if($context['TPortal']['centerbar']) echo '
' , TPortal_sidebar('center') , '
'; echo '
'; echo '
';
', theme_copyright(), ' ', theme_copyright(), '
', tportal_version() , '
'; // end
// Show the [home] and [help] buttons. echo ' ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator'], ' ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $txt[119]), '', $context['menu_separator']; // Show the [home] and [help] buttons. echo ' ', ($settings['use_image_buttons'] ? '' . $txt[103] . '' : $txt[103]), '', $context['menu_separator']; if($settings['TPortal_front_type']!='boardindex') echo ' ', ($settings['use_image_buttons'] ? 'Forum Index' : 'Forum Index'), '', $context['menu_separator']; echo ' ', ($settings['use_image_buttons'] ? '' . $txt[119] . '' : $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')); $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','tp_settings','tp_articles','tp_blocks','tp_dlmanager')); // Admin area 'Members'. // TinyPortal if (allowedTo(array('tp_settings', 'tp_blocks', 'tp_articles', 'tp_dlmanager', 'tp_gallery', 'tp_linkmanager', 'tp_teampage'))) { $context['admin_areas']['tportal'] = array( 'title' => 'TinyPortal', 'areas' => array() ); if (allowedTo('tp_settings')){ $context['admin_areas']['tportal']['areas']['tp_settings'] = '' . $txt['tp-admin2'] . ''; } if (allowedTo('tp_blocks')){ $context['admin_areas']['tportal']['areas']['tp_blocks'] = '' . $txt['tp-admin5'] . ''; } if (allowedTo('tp_articles')){ $context['admin_areas']['tportal']['areas']['tp_articles'] = '' . $txt['tp-admin8'] . ''; } if (allowedTo('tp_dlmanager') && $context['TPortal']['show_download']){ $context['admin_areas']['tportal']['areas']['tp_dlmanager'] = '' . $txt['tp-admin9'] . ''; } if (allowedTo('tp_linkmanager') && $context['TPortal']['show_linkmanager']){ $context['admin_areas']['tportal']['areas']['tp_linkmanager'] = '' . $txt['tp-admin13'] . ''; } if (allowedTo('tp_gallery') && $context['TPortal']['show_gallery']){ $context['admin_areas']['tportal']['areas']['tp_gallery'] = '' . $txt['tp-admin15'] . ''; } if (allowedTo('tp_teampage') && $context['TPortal']['show_teampage']){ $context['admin_areas']['tportal']['areas']['tp_teampage'] = '' . $txt['tp-admin17'] . ''; } } // TinyPortal end $sourcedir/ManagePermissions.php ) ), 'board' => array( ), // TinyPortal 'tinyportal' => array( 'tp_settings' => false, 'tp_blocks' => false, 'tp_articles' => false, ), 'tinyportal_dl' => array( 'tp_dlmanager' => false, 'tp_dlupload' => false, ), 'tinyportal_link' => array( 'tp_linkmanager' => false, ), 'tinyportal_gallery' => array( 'tp_gallery' => false, ), 'tinyportal_team' => array( 'tp_teampage' => false, $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/style.css /* Normal, standard links. */ /* TP specific classes */ .sitemap{ margin: 0; padding: 0; list-style: none; } .sitemap_topheader{ background: #ECEDF3; border-bottom: solid 1px #ffffff; padding: 4px; } .sitemap_header{ background: #ECEDF3; border-bottom: solid 1px #ffffff; padding: 4px; display: block; font-weight: bold; } .sitemap_header_active{ background: #C8D6E1; border-bottom: solid 1px #ffffff; padding: 4px; display: block; font-weight: bold; } .sitemap_header:hover , .sitemap_header_active:hover{ background: #DBE4ED; border-bottom: solid 1px #ffffff; padding: 4px; display: block; text-decoration: none; } /* TP other styles */ ul#articlelist { margin: 0; padding: 0.5ex 0; list-style: none; } ul#catlist { margin: 0; padding: 0; list-style: none; border-top: solid 1px #d0d0d0; } ul#articlelist li { margin: 0; display: block; padding: 0 0 0 3ex; background: url(images/divider.gif) no-repeat 5px 3px; } ul#catlist li { display: block; padding: 0 0 0 3ex; margin: 0; } /* TP rss feed styles */ .rss_title{ font-weight: bold; } .rss_body{ margin-bottom: 1ex; } .rss_image{ margin: 4px 0 4px 0; } $themedir/Help.template.php global $context, $settings, $options, $txt, $scripturl; echo '
'; global $context, $settings, $options, $txt, $scripturl; // Tinyportal echo '
    ' , $txt['tp-smfhelp'] , '   ' , $txt['tp-tphelp'] , '  
'; echo '
'; // end Tinyportal $sourcedir/Profile.php 'deleteAccount' => array(array('profile_remove_any', 'profile_remove_own'), array('profile_remove_any')), // Tinyportal 'tpsummary' => array(array('profile_view_any', 'profile_view_own'), array('profile_view_any')), 'tparticles' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_articles')), 'tpdownload' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_dlmanager')), 'tpshoutbox' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_blocks')), 'tpgallery' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_gallery')), 'tplinks' => array(array('profile_extra_any', 'profile_extra_own'), array('tp_links')), // end Tinyportal // If you have permission to do something with this profile, you'll see one or more actions. if (($context['user']['is_owner'] && allowedTo('profile_remove_own')) || allowedTo('profile_remove_any') || (!$context['user']['is_owner'] && allowedTo('pm_send'))) // TinyPortal if (!$user_info['is_guest'] && (($context['user']['is_owner'] && allowedTo('profile_view_own')) || allowedTo(array('profile_view_any', 'moderate_forum', 'manage_permissions','tp_dlmanager','tp_blocks','tp_articles','tp_gallery','tp_linkmanager')))) { $context['profile_areas']['tinyportal'] = array( 'title' => $txt['tp-profilesection'], 'areas' => array() ); $context['profile_areas']['tinyportal']['areas']['tpsummary'] = '' . $txt['tpsummary'] . ''; if ($context['user']['is_owner'] || allowedTo('tp_articles')) $context['profile_areas']['tinyportal']['areas']['tparticles'] = '' . $txt['articlesprofile'] . ''; if(($context['user']['is_owner'] || allowedTo('tp_dlmanager')) && $context['TPortal']['show_download']) $context['profile_areas']['tinyportal']['areas']['tpdownload'] = '' . $txt['downloadprofile'] . ''; if($context['user']['is_owner'] || allowedTo('tp_blocks')) $context['profile_areas']['tinyportal']['areas']['tpshoutbox'] = '' . $txt['shoutboxprofile'] . ''; if(($context['user']['is_owner'] || allowedTo('tp_gallery')) && $context['TPortal']['show_gallery']) $context['profile_areas']['tinyportal']['areas']['tpgallery'] = '' . $txt['galleryprofile'] . ''; if(($context['user']['is_owner'] || allowedTo('tp_linkmanager')) && $context['TPortal']['show_linkmanager']) $context['profile_areas']['tinyportal']['areas']['tplinks'] = '' . $txt['linksprofile'] . ''; } // end TinyPortal ?> // Tinyportal function tpsummary($memID) { global $txt, $user_profile, $db_prefix, $context, $db_prefix; loadtemplate('TPprofile'); $context['page_title'] = $txt['tpsummary']; TP_profile_summary($memID); } function tparticles($memID) { global $txt, $user_profile, $db_prefix, $context, $db_prefix; loadtemplate('TPprofile'); $context['page_title'] = $txt['articlesprofile']; TP_profile_articles($memID); } function tpdownload($memID) { global $txt, $user_profile, $db_prefix, $context, $db_prefix; loadtemplate('TPprofile'); $context['page_title'] = $txt['downloadprofile']; TP_profile_download($memID); } function tpshoutbox($memID) { global $txt, $user_profile, $db_prefix, $context, $db_prefix; loadtemplate('TPprofile'); $context['page_title'] = $txt['shoutboxprofile']; TP_profile_shoutbox($memID); } function tpgallery($memID) { global $txt, $user_profile, $db_prefix, $context, $db_prefix; loadtemplate('TPprofile'); $context['page_title'] = $txt['galleryprofile']; TP_profile_gallery($memID); } function tplinks($memID) { global $txt, $user_profile, $db_prefix, $context, $db_prefix; loadtemplate('TPprofile'); $context['page_title'] = $txt['linksprofile']; TP_profile_links($memID); } $boarddir/SSI.php require_once($sourcedir . '/Security.php'); require_once($sourcedir . '/TPortal.php');