Pages: [1]

TinyPortal Introduction
  • Articles:

    The article system gives you a CMS system tightly integrated with your forum. No need for bridges, double registering or other kludgey interface schemes with complex CMS software. Write articles in php, html or bbcode, and choose what member-groups can access them, who can contribute, and how they are approved. Choose the inbuilt menu options for these pages, or write your own, the flexibility to accommodate your choices is built in.
  • Blocks and Panels:

    The options are endless. Choose to layout your page with a left, right, upper, or lower columns. You can fill these panels with an array of different types of blocks. Ranging from the available built in blocks like a shoutbox, recent topics, or even a theme changer. Or customize your own using either the bbc, html, or a php code block.
  • Downloads Manager:

    A built-in module for TP that lets you offer files for your members to browse and download. Its works by having the downloadable files placed in categories. These categories have permissions on them, letting you restrict member groups access level per each category. Allow members to upload files, controlling which member groups are allowed.
  • Menu Manager:

    A built in menu manager allows you to create multiple menu's. These menu's are displayed in a block. You get all the features of blocks to display these menu's in different places along with choosing who gets to see the blocks based on permissions. You can created different types of links: links to articles, categories, or even just a custom link. You can choose to have the link open in the current window or a new window.
  • Shoutbox:

    A special kind of block is worth mentioning, namely the shout-box. Its a box in which you can leave messages for others to see and thus maintain a simple "chat" on the site. Combined with permissions you will have much freedom in who can participate as well. And as your visitors will discover, its actually quite fun to leave a smiley or two in it.
Share on Facebook! Share on Twitter! g+ Reddit Digg this story! Del.icio.us StumbleUpon

TinyPortal - Installation Instructions for 2.0 RC2-3

Installing TinyPortal v1.0 RC1 for SMF2.0 RC2



File Edits

./index.php

Code: (Find) [Select]
require_once($sourcedir . '/Security.php');

Code: (Add After:) [Select]
// TinyPortal include
require_once($sourcedir . '/TPortal.php');



Code: (Find:) [Select]
// Is the forum in maintenance mode? (doesn't apply to administrators.)

Code: (Add Before:) [Select]
// TinyPortal
TPortal_init();



Code: (Find:) [Select]
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

 
Code: (Replace With:) [Select]
// 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';
}




Code: (Find:) [Select]
'.xml' => array('News.php', 'ShowXmlFeed'),

Code: (Add After:) [Select]
'tpadmin' => array('TPortalAdmin.php', 'TPortalAdmin'),
'forum' => array('BoardIndex.php', 'BoardIndex'),
'tpmod' => array('TPmodules.php', 'TPmodules'),




./Sources/Load.php

Code: (Find:) [Select]
$settings = $themeData[0];

Code: (Add After:) [Select]
if (!empty($context['TPortal']['front_type'])){
$settings['TPortal_front_type'] = $context['TPortal']['front_type'];
}



Code: (Find:) [Select]
// Start the linktree off empty..
$context['linktree'] = array();


Code: (Replace With:) [Select]
// Start the linktree off empty..not quite, have to insert forum
$context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum'));


 
Code: (Find:) [Select]
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#c' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),


Code: (Replace With:) [Select]
// 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']
)),



Code: (Find:) [Select]
// The theme is the forum's default.
else
$id_theme = $modSettings['theme_guests'];


Code: (Add After:) [Select]

// TinyPortal
$newtheme=TP_loadTheme();
if($newtheme!=$id_theme && $newtheme>0)
$id_theme=$newtheme;
// end TinyPortal




./Sources/Subs.php

Code: (Find:) [Select]
'help' => array(

Code: (Add Before:) [Select]
'forum' => array(
'title' => isset($txt['tp-forum']) ? $txt['tp-forum'] : 'Forum',
'href' => $scripturl . '?action=forum',
'show' => true,
),



Code: (Find:) [Select]
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(


Code: (Add After:) [Select]
'tphelp' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpmod;sa=help',
'show' => true,
),



Code: (Find:) [Select]
'calendar' => array(

Code: (Add Before:) [Select]
'tpadmin' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpadmin',
'show' =>  TPcheckAdminAreas(),
'sub_buttons' => array(
),
),



Code: (Find:) [Select]
// Now we put the buttons in the context so the theme can use them.

Code: (Add Before:) [Select]

// tinyportal //
$buttons['tpadmin']['sub_buttons'] = tp_getbuttons();



Code: (Find:) [Select]
function redirectexit($setLocation = '', $refresh = false)

Code: (Replace With:) [Select]
function redirectexit($setLocation = '', $refresh = false, $tp_not = false)


Code: (Find:) [Select]
// Put the session ID in.
if (defined('SID') && SID != '')



Code: (Add Before:) [Select]
// TinyPortal
if ($setLocation == $scripturl && !$tp_not && !empty($context['TPortal']['redirectforum']))
$setLocation .= '?action=forum';
// end




./Sources/Security.php

Code: (Find:) [Select]
// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context, $scripturl;


Code: (Add After:) [Select]

// TinyPortal
TPortal_init();




./Sources/Errors.php

Code: (Find:) [Select]
// We don't have $txt yet, but that's okay...
if (empty($txt))
die($error);


Code: (Add After:) [Select]

// TinyPortal
if(!isset($context['tp_prefix']))
TPortal_init();
// end




./SSI.php

Code: (Find:) [Select]
require_once($sourcedir . '/Security.php');

Code: (Add After:) [Select]
require_once($sourcedir . '/TPortal.php');



./Sources/QueryString.php

Code: (Find:) [Select]
// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.

Code: (Add Before:) [Select]
// A better place
if (function_exists('tp_addcopy'))
$buffer = tp_addcopy($buffer);




Code: (Find:) [Select]
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);


Code: (Replace With:) [Select]
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);




./Sources/Subs-Editor.php

Code: (Find:) [Select]
function theme_postbox($msg)
{
global $context;

return template_control_richedit($context['post_box_name']);
}


Code: (Replace With:) [Select]
function theme_postbox($msg, $from_tp = false)
{
global $context;

return template_control_richedit($context['post_box_name'], $from_tp);
}




./Sources/Profile.php

Code: (Find:) [Select]
// Do some cleaning ready for the menu function.
$context['password_areas'] = array();


Code: (Add Before:) [Select]

// TinyPortal
require_once($sourcedir. '/TPmodules.php');
tp_getprofileareas($profile_areas);




Code:
SMF2RC2/tp_upgrade.php
This file should be able to execute standalone.



File Operations:
Move the included directory "SMF2RC2/Themes" to "the root directory".
Move the included directory "common/Themes" to "the root directory".
Move the included directory "SMF2RC2/Sources" to "the root directory".
Move the included directory "common/tp-downloads" to "the root directory".
Move the included directory "common/tp-images" to "the root directory".
Move the included directory "SMF2RC2/tp-files" to "the root directory".

TinyPortal - Installation Instructions for 2.0 RC4

Installing TinyPortal v1.0 RC1 for SMF2.0 RC4



File Edits

./index.php
Find:
Code: [Select]
require_once($sourcedir . '/Security.php');
Add After:
Code: [Select]
// TinyPortal include
require_once($sourcedir . '/TPortal.php');


Find:
Code: [Select]
// Is the forum in maintenance mode? (doesn't apply to administrators.)
Add Before:
Code: [Select]
// TinyPortal
TPortal_init();


Find:
Code: [Select]
// Action and board are both empty... BoardIndex!
if (empty($board) && empty($topic))
{
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
}

Replace With:
Code: [Select]
// 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';
}



Find:
Code: [Select]
'.xml' => array('News.php', 'ShowXmlFeed'),
Add After:
Code: [Select]
'tpadmin' => array('TPortalAdmin.php', 'TPortalAdmin'),
'forum' => array('BoardIndex.php', 'BoardIndex'),
'tpmod' => array('TPmodules.php', 'TPmodules'),




./Sources/Load.php
Find:
Code: [Select]
$settings = $themeData[0];
Add After:
Code: [Select]
if (!empty($context['TPortal']['front_type'])){
$settings['TPortal_front_type'] = $context['TPortal']['front_type'];
}


Find:
Code: [Select]
// Start the linktree off empty..
$context['linktree'] = array();

Replace With:
Code: [Select]
// Start the linktree off empty..not quite, have to insert forum
$context['linktree'] = array(array('url' => $scripturl . '?action=forum', 'name' => 'Forum'));


Find:
Code: [Select]
// Build up the linktree.
$context['linktree'] = array_merge(
$context['linktree'],
array(array(
'url' => $scripturl . '#c' . $board_info['cat']['id'],
'name' => $board_info['cat']['name']
)),

Replace With:
Code: [Select]
// 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']
)),


Find:
Code: [Select]
// The theme is the forum's default.
else
$id_theme = $modSettings['theme_guests'];

Add After:
Code: [Select]

// TinyPortal
$newtheme=TP_loadTheme();
if($newtheme!=$id_theme && $newtheme>0)
$id_theme=$newtheme;
// end TinyPortal




./Sources/Subs.php
Find:
Code: [Select]
'help' => array(
Add Before:
Code: [Select]
'forum' => array(
'title' => isset($txt['tp-forum']) ? $txt['tp-forum'] : 'Forum',
'href' => $scripturl . '?action=forum',
'show' => true,
),


Find:
Code: [Select]
'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(

Add After:
Code: [Select]
'tphelp' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpmod;sa=help',
'show' => true,
),


Find:
Code: [Select]
'calendar' => array(
Add Before:
Code: [Select]
'tpadmin' => array(
'title' => 'TinyPortal',
'href' => $scripturl . '?action=tpadmin',
'show' =>  TPcheckAdminAreas(),
'sub_buttons' => array(
),
),


Find:
Code: [Select]
// Now we put the buttons in the context so the theme can use them.
Add Before:
Code: [Select]

// tinyportal //
$buttons['tpadmin']['sub_buttons'] = tp_getbuttons();


Find:
Code: [Select]
function redirectexit($setLocation = '', $refresh = false)
Replace With:
Code: [Select]
function redirectexit($setLocation = '', $refresh = false, $tp_not = false)

Find:
Code: [Select]
// Put the session ID in.
if (defined('SID') && SID != '')


Add Before:
Code: [Select]
// TinyPortal
if ($setLocation == $scripturl && !$tp_not && !empty($context['TPortal']['redirectforum']))
$setLocation .= '?action=forum';
// end




./Sources/Security.php
Find:
Code: [Select]
// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context, $scripturl;

Add After:
Code: [Select]

// TinyPortal
TPortal_init();




./Sources/Errors.php
Find:
Code: [Select]
// We don't have $txt yet, but that's okay...
if (empty($txt))
die($error);

Add After:
Code: [Select]

// TinyPortal
if(!isset($context['tp_prefix']))
TPortal_init();
// end




./SSI.php
Find:
Code: [Select]
require_once($sourcedir . '/Security.php');
Add After:
Code: [Select]
require_once($sourcedir . '/TPortal.php');



./Sources/QueryString.php
Find:
Code: [Select]
// If $scripturl is set to nothing, or the SID is not defined (SSI?) just quit.
Add Before:
Code: [Select]
// A better place
if (function_exists('tp_addcopy'))
$buffer = tp_addcopy($buffer);



Find:
Code: [Select]
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);

Replace With:
Code: [Select]
// Let's do something special for session ids!
if (defined('SID') && SID != '')
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?(?:' . SID . '(?:;|&|&))((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page|cat)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);




./Sources/Subs-Editor.php
Find:
Code: [Select]
function theme_postbox($msg)
{
global $context;

return template_control_richedit($context['post_box_name']);
}

Replace With:
Code: [Select]
function theme_postbox($msg, $from_tp = false)
{
global $context;

return template_control_richedit($context['post_box_name'], $from_tp);
}




./Sources/Profile.php
Find:
Code: [Select]
// Do some cleaning ready for the menu function.
$context['password_areas'] = array();

Add Before:
Code: [Select]

// TinyPortal
require_once($sourcedir. '/TPmodules.php');
tp_getprofileareas($profile_areas);




Code
SMF2RC3/tp_upgrade.php
This file should be able to execute standalone.



File Operations:
Move the included directory "SMF2RC4/Themes" to "the root directory".
Move the included directory "common/Themes" to "the root directory".
Move the included directory "SMF2RC4/Sources" to "the root directory".
Move the included directory "common/tp-downloads" to "the root directory".
Move the included directory "common/tp-images" to "the root directory".
Move the included directory "SMF2RC2/tp-files" to "the root directory".
Pages: [1]