TinyPortal 0.9 TinyPortal v0.9 Bloc http://www.tinyportal.net $sourcedir/Load.php $settings = $themeData[0]; if (!empty($context['TPortal']['front_type'])){ $settings['TPortal_front_type'] = $context['TPortal']['front_type']; } // 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 $boarddir/index.php // Action and board are both empty... BoardIndex! if (empty($board) && empty($topic)) { require_once($sourcedir . '/TPortal.php'); return 'TPortal'; } // 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'; } $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 /* Normal, standard links. */ /* TP sitemap styles */ .sitemap{ margin: 0; padding: 0; list-style: none; } .sitemap_topheader{ background: #f0f0ff; border-bottom: solid 1px #ffffff; padding: 4px; } .sitemap_header{ background: #cDdBe8; border-bottom: solid 1px #ffffff; padding: 4px; display: block; font-weight: bold; } .sitemap_header_active{ background: #bDcBd8; border-bottom: solid 1px #ffffff; padding: 4px; display: block; font-weight: bold; } .sitemap_header:hover , .sitemap_header_active:hover{ background: #dDeBf8; 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 function template_manual_above() { 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');