Library Tool (doc)

Tipitaka Khmer

 Please feel welcome to join the transcription project of the Tipitaka translation in khmer, and share one of your favorite Sutta or more. Simply click here or visit the Forum: 

Search ATI on ZzE

Zugang zur Einsicht - Schriften aus der Theravada Tradition



Access to Insight / Zugang zur Einsicht: Dhamma-Suche auf mehr als 4000 Webseiten (deutsch / english) - ohne zu googeln, andere Ressourcen zu nehmen, weltliche Verpflichtungen einzugehen. Sie sind für den Zugang zur Einsicht herzlich eingeladen diese Möglichkeit zu nutzen. (Info)

Random Sutta
Random Article
Random Jataka

Zufälliges Sutta
Zufälliger Artikel
Zufälliges Jataka


Arbeits/Work Forum ZzE

"Dhammatalks.org":
[logo dhammatalks.org]
Random Talk
[pic 30]

Chaṭṭha Saṅgāyana Tipitaka

A message and email solution for Venerable's Sangha, your Parisa or Upasaka's community in Dhamma: May one make use of the given "Sangha-messager": Download app here . More infos see here . មិនទាន់មានកម្មវិធីផ្ញើសារទេ? ទាញយកសារហារីសង្ឃ

12 Mar 2014 - INSTALLATION

INSTALLATION




Setup





How Do I Add A Forum Button Or Tab To My Themes?

Adding the Button/Tab varies depending on theme, but hopefully this guide will help point you in the right direction. You only need to edit your index.template.php file to add a button/tab.

First open your "index.template.php" file.

Then, you will need to add the button to the array. Towards the end of the index.template.php file, search for:
Code: [Select]
if (in_array($context['current_action'], array('links', 'search', 'admin', 'arcade','calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'tpadmin')))
$current_action = $context['current_action'];

You will need to add 'forum', to your button array, so that it will look something like this:
Code: [Select]
if (in_array($context['current_action'], array('forum', 'links', 'search', 'admin', 'arcade','calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'tpadmin')))
$current_action = $context['current_action'];

For Tab:
Next you will need to add the tab itself. Further to the end of the index.template.php file, search for code that looks similar to this:
Code: [Select]
	// Show the [help] button.
echo ($current_action == 'help' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'help' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=help">' , $txt[119] , '</a>
</td>' , $current_action == 'help' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';

You will need to add this forum tab snippet somewhere between each snippet of tab code:
Code: [Select]
if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last">&nbsp;</td>' : '';

For Button:
If you are adding a button, not a tab, you will need to search for code that looks similar to this:
Code: [Select]
	// How about the [search] button?
if ($context['allow_search'])
echo '
<a href="', $scripturl, '?action=search">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/search.gif" alt="' . $txt[182] . '" style="margin: 2px 0;" border="0" />' : $txt[182]), '</a>', $context['menu_separator'];

Then add this somewhere between each button snippet:
Code: [Select]
	// How about the [forum] button?
if($settings['TPortal_front_type']!='boardindex')
echo '        <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum Index" style="margin: 2px 0;" border="0" />' : 'Forum Index'), '</a>', $context['menu_separator'];

Finally, just save and your done!

If you are confused about the differences between a "button" and a "tab", view the image attached below...

Doc Written By: Xarcell


How Do I Install Tiny Portal?

This is very, very, very simple assuming everything installs successfully.

First and most importantly, make a backup of your forum. If you are not sure how to do that, you can this the guide: How Do I Create a Backup Of My Site?

Second, download the version of Tiny Portal you wish to use (latest release recommended) from: http://www.tinyportal.net/index.php?action=tpmod;dl=tinyportal

Third, in your SMF forum go to "Admin > Package > Download Packages > Browse > Select The TP package zip" and click "upload".

Forth, once the TinyPortal package has been successfully uploaded click on the 'Apply Mod' link.

Finally, assuming everything tested successfully, click on the 'Install Now' link and your all done!

*However, if it shows test failed, you may need to manually install Tiny Portal. You can read instructions on how to do that here: How Do I Manually Install Tiny Portal?

If you are experienced and confident with what you are doing, you can proceed to install even though it says "test failed", and manually modify those files using the guidelines from the manual install guide mentioned previously.

Useful Links:
FTP Information Required ...A Doc on the SMF Package Manager and file permissions.

Doc Written By: Xarcell


How Do I Manually Install Tiny Portal?

Doing a manual install of Tiny Portal is easy, but sensitive. This may be the only way to install Tiny Portal for forums that have been heavily modded manually, or by other mods themselves.

NOTE: if you have been told to do a manual install because of a "test failed" on installation, you may be better off following this guide: "Test Failed On Installation?".


START


1.| First and most importantly, make a backup of your forum. If you are not sure how to do that, you can this the guide: How Do I Create a Backup Of My Site?

2.| On your computer, create a folder called "TPmanual-install". Inside your TPmanual-install folder, create another folder called SMF. The SMF folder will contain your unedited files. Inside the SMF folder create a folder called TP. Your TP folder will contain the files that you will edit. The folder structure should look like this: "TPmanual-install/SMF/TP/".

3.| Download the version of Tiny Portal you wish to manually install from: http://www.tinyportal.net/index.php?action=tpmod;dl . Open the package and extract the files to a folder named: TPmanual-install.

4.| Inside your TPmanual-install folder, upload the following files and folders to your forum root directory:
  • /Sources
  • /Themes
  • /tp-downloads
  • /tp-files
  • /tp-images
  • tp-upgrade.php

5.| Download a copy of the following files from your forum and place them in SMF - and - TP folders. These are the files that Tiny Portal modifies:
  • Sources Directory: Errors.php
  • Sources Directory: Load.php
  • Sources Directory: QueryString.php
  • Sources Directory: Subs.php
  • Sources Directory: Subs-Editor.php
  • Forum Directory: SSI.php
  • Forum Directory: index.php

6.| After you have a copy of your SMF files downloaded to both the SMF and TP folders, follow these instructions to manually make the code changes necessary to the files in the TP folder.


7.| Upload your edited files in your "TPmanual-install/SMF/TP" folder to there proper directories and your almost done! If you run into trouble, you can always upload the unedited files from your "TPmanual-install/SMF" folder to the proper directories for a quick fix.

8.| Finally, run the "tp_upgrade.php" in your forum root by visiting the URL of that file in your browser. This will update your database. Your manual install should be complete!


END



Doc Written By: Xarcell


Mod Instructions for SMF 1.1.* and TP V1.0.*


OPEN FILE:
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'),



OPEN FILE:
$sourcedir/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 . '#' . $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



OPEN FILE:
$themedir/index.template.php

Find:
   
Code: [Select]
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))

Replace With:
   
Code: [Select]
if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm', 'forum', 'tpadmin')))


Find:
      
Code: [Select]
$current_action = 'search';

Add After:
   
Code: [Select]
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';


Find:
   
Code: [Select]
// Show the [help] button.

Add Before:
Code: [Select]
if($settings['TPortal_front_type']!='boardindex')
// Show the [forum] button.
echo ($current_action=='forum' || $context['browser']['is_ie4']) ? '<td class="maintab_active_first">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action=='forum' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=forum">'.$txt['tp-forum'].'</a>
</td>' , $current_action=='forum' ? '<td class="maintab_active_last">&nbsp;</td>' : '';


Find:
   
Code: [Select]
// The end of tab section.
echo '
<td class="maintab_' , $last , '">&nbsp;</td>

Add After:
Code: [Select]
';
// TinyPortal
if($context['TPortal']['leftbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
         if($context['TPortal']['rightbar'])
             echo '<td style="padding-left: 1ex;"><a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" /></td>';
// TinyPortal end
echo '



OPEN FILE:
$boarddir/Themes/babylon/index.template.php

Find:
      
Code: [Select]
<a href="javascript:void(0);" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 2ex 2px 0;" border="0" /></a>';

Replace With:
Code: [Select]
';
// TinyPortal

         if($context['TPortal']['showtop'])
             echo '<a href="javascript:void(0);" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="', $settings['images_url'], '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 1ex;" /> ';
         if($context['TPortal']['leftbar'])
             echo '<a href="javascript:void(0);" onclick="shrinkHeaderLeftbar(!current_leftbar); return false;"><img id="upshrinkLeftbar" src="', $settings['images_url'], '/', empty($options['collapse_leftbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempLeftbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
         if($context['TPortal']['rightbar'])
             echo '<a href="javascript:void(0);" onclick="shrinkHeaderRightbar(!current_rightbar); return false;"><img id="upshrinkRightbar" src="', $settings['images_url'], '/', empty($options['collapse_rightbar']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTempRightbar" src="', $settings['images_url'], '/blank.gif" alt="" style="margin-right: 0ex;" />';
// TinyPortal end


Find:
   
Code: [Select]
// Show the [home] and [help] buttons.
echo '
<a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=help">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];

Replace With:
   
Code: [Select]
// Show the [home] and [help] buttons.
echo '
                     <a href="', $scripturl, '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/home.gif" alt="' . $txt[103] . '" style="margin: 2px 0;" border="0" />' : $txt[103]), '</a>', $context['menu_separator'];
if($settings['TPortal_front_type']!='boardindex')
echo '        <a href="', $scripturl, '?action=forum">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/forum.gif" alt="Forum Index" style="margin: 2px 0;" border="0" />' : 'Forum Index'), '</a>', $context['menu_separator'];

echo '        <a href="', $scripturl, '?action=help" target="_blank">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/help.gif" alt="' . $txt[119] . '" style="margin: 2px 0;" border="0" />' : $txt[119]), '</a>', $context['menu_separator'];



OPEN FILE:
$sourcedir/Subs.php

Find:
   
Code: [Select]
$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'));

Add After:
   
Code: [Select]
// tinyportal //
global $sourcedir;
require_once($sourcedir.'/TPSubs.php');
TPcheckAdminAreas();
// end //


Find:
   
Code: [Select]
// Admin area 'Members'.

Add Before:
   
Code: [Select]
// TinyPortal
global $sourcedir;
require_once($sourcedir.'/TPSubs.php');
TPsetupAdminAreas();
// TinyPortal end


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)
$setLocation .= '?action=forum';
// end
   


OPEN FILE:
$sourcedir/ManagePermissions.php

Find:
   
Code: [Select]
// This is just a helpful array of permissions guests... cannot have.

Add Before:
   
Code: [Select]
// TPortal 	
foreach($context['TPortal']['permissonlist'] as $perm )
$permissionList['membergroup'][$perm['title']] = $perm['perms'];

// end TinyPortal


Find:
   
Code: [Select]
// All permission groups that will be shown in the left column.
$leftPermissionGroups = array(
'general',
'calendar',
'maintenance',
'member_admin',
'general_board',
'topic',
'post',
);

Replace With:
   
Code: [Select]
// All permission groups that will be shown in the left column.
$leftPermissionGroups = array(
'general',
'maintenance',
'member_admin',
'profile',
'general_board',
'topic',
'post',
);



OPEN FILE:
$sourcedir/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;

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



OPEN FILE:
$sourcedir/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



OPEN FILE:
$themedir/style.css

Find:
Code: [Select]
/* Normal, standard links. */

Add Before:
Code: [Select]
/* 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;
}



OPEN FILE:
$themedir/Help.template.php

Find:
   
Code: [Select]
global $context, $settings, $options, $txt, $scripturl;

echo '
<div class="tborder" style="margin-top: 1ex;">
<div id="helpmenu" class="titlebg" style="padding: 4px;">';

Replace With:
   
Code: [Select]
global $context, $settings, $options, $txt, $scripturl;

// Tinyportal
echo '
<table cellpadding="0" cellspacing="0" border="0" style="margin-left: 10px;">
<tr>
<td class="mirrortab_first">&nbsp;</td>
<td class="mirrortab_active_first">&nbsp;</td>
<td valign="top" class="mirrortab_active_back">
<a href="', $scripturl, '?action=help">' , $txt['tp-smfhelp'] , '</a>
</td>
<td class="mirrortab_active_last">&nbsp;</td>
<td valign="top" class="mirrortab_back">
<a href="', $scripturl, '?action=tpmod;sa=help">' , $txt['tp-tphelp'] , '</a>
</td>
<td class="mirrortab_last">&nbsp;</td>
     </tr>
</table>';

echo '
<div class="tborder">
<div id="helpmenu" class="titlebg" style="padding: 4px;">';
// end Tinyportal



OPEN FILE:
$sourcedir/Profile.php

Find:
      
Code: [Select]
// Set the profile layer to be displayed.

Add Before:
      
Code: [Select]
	// TinyPortal
$tp_areas = TP_fetchprofile_areas();
foreach($tp_areas as $tp)
$sa_allowed[$tp['name']] = array(array('profile_view_any', 'profile_view_own'), array($tp['permission']));
// end TinyPortal


Find:
   
Code: [Select]
// If you have permission to do something with this profile, you'll see one or more actions.

Add Before:

   
Code: [Select]
 
// TinyPortal
TP_fetchprofile_areas2($memID);

Find:
   
Code: [Select]
$_REQUEST['sa']($memID);

Replace:

   
Code: [Select]
 
if(isset($_GET['tpmodule']))
{
global $boarddir, $db_prefix;

// prefix of the TP tables
$tp_prefix = $db_prefix.'tp_';

$request = db_query("SELECT modulename,autoload_run FROM {$tp_prefix}modules WHERE active=1 and profile = '" . $_GET['sa'] . "'", __FILE__, __LINE__);
if(mysql_num_rows($request)>0)
{
$what=mysql_fetch_assoc($request);
mysql_free_result($request);
// load the appropiate source file
if(file_exists($boarddir .'/tp-files/tp-modules/' . $what['modulename']. '/Sources/'. $what['autoload_run']))
{
require_once($boarddir .'/tp-files/tp-modules/' . $what['modulename']. '/Sources/'. $what['autoload_run']);
}
}
$_GET['sa']($memID);
}
else
$_REQUEST['sa']($memID);



OPEN FILE:
$boarddir/SSI.php

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

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



OPEN FILE:
$sourcedir/BoardIndex.php

Find:
            
Code: [Select]
'href' => $scripturl . '#' . $row_board['ID_CAT'],

Replace With:
            
Code: [Select]
'href' => $scripturl . '?action=forum#' . $row_board['ID_CAT'],



OPEN FILE:
$sourcedir/QueryString.php

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|action)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html?' . SID . '\$2\"'", $buffer);
else
$buffer = preg_replace('/"' . preg_quote($scripturl, '/') . '\?((?:board|topic|page|cat|action)=[^#"]+?)(#[^"]*?)?"/e', "'\"' . \$scripturl . '/' . strtr('\$1', '&;=', '//,') . '.html\$2\"'", $buffer);



OPEN FILE:
$sourcedir/Subs-Post.php

Find:
Code: [Select]
function theme_postbox($msg)

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


Find:
   
Code: [Select]
// Load the Post template and language file.
loadLanguage('Post');
loadTemplate('Post');

Replace With:
   
Code: [Select]
// Load the Post template and language file.
loadLanguage('Post');
if(!$from_tp)
loadTemplate('Post');


Find:
   
Code: [Select]
// Go!  Supa-sub-template-smash!
template_postbox($msg);

Replace With:
   
Code: [Select]
// Go!  Supa-sub-template-smash!
if(!$from_tp)
template_postbox($msg);
else
tp_renderbbc($msg);



OPEN FILE:
$sourcedir/Admin.php

Find:
   
Code: [Select]
// You have to be able to do at least one of the below to see this page.
isAllowedTo(array('admin_forum', 'manage_permissions', 'moderate_forum', 'manage_membergroups', 'manage_bans', 'send_mail', 'edit_news', 'manage_boards', 'manage_smileys', 'manage_attachments'));

Replace With:
   
Code: [Select]
// You have to be able to do at least one of the below to see this page.
$admPerms = TP_addPerms();
isAllowedTo($admPerms);


Doc Written By: G6


Troubleshooting





Error 550: No Such File Or Directory?

Sometimes SMF cannot detect the proper path for the FTP information. Keep trying the FTP setup with a different path. To do this in SMF, go to: "Admin > Configuration > Server Settings > SMF Directory".

Your paths will be something like:
  • ./
  • ./directory-of-smf
  • /home/your-username/www/directory-of-smf(this is the full path and usually uses your username)


Doc Written By: Xarcell


Error: Could not upload package, please check directory permissions!

If you try to install something through the package manager, and receive the following error:

Quote
Could not upload package, please check directory permissions!

First try this: "Admin > Packages > Options > Only the standard files are writable". Then try again.

If it still doesn't work, then it will be one of two things.
1.| "Upgrade" packages cannot be installed through the package manager. The files inside the package must be uploaded to your forum site, then run the upgrade file by visiting it's URL address on your site.

2.| If it is a "Update" or "new package", then it may be one of the following problems below...



If you are on a window server, there is no chmod. Makes ure that the "Packages" folder exists, and inside of it make sure there is a "temp" folder. Check the properties of both folders and make sure the "read only" attribute is turned off.

Otherwise...

1.| Just use your FTP program, chmod the "Packages" directory to 777.
2.| Inside your Packages directory, create a folder called "temp". Then chmod the "temp" folder to 777.
3.| Re-upload your package and it should be fixed!

If it still is not fixed, re-check your directory permissions. Make sure they are set to 777. If they will not save to 777, contact your host.

If your directory permissions are indeed set to 777, but you continue to get the error, you very well may indeed have a corrupted settings.php file. To work around this, try:

1.| Backup a copy of your "setting.php" file and your "setting_bak.php" file somewhere safe.
2.| Delete your "settings.php" file on the site.
3.| Rename your "settings_bak.php" file to "settings.php".
4.| Try installing your package again.

If this still doesn't work, then you can only manually install your packages. However, I recommend a re-install of your SMF site.

Doc Written By: Xarcell


Error: Directory Or Files Are Not Writiable?

This mean you will need to manually chmod your files. It is easier to do so with a FTP program, but can also be done through a browser such as "Internet Explorer".

1.| Open your FTP program and go to the files that are not writable. Figuring out how to chmod your files is different for each FTP program, so you don't know how, just refer to your FTP help section and search for "CHMOD".

*If you are using Internet Explorer, visit the address: ftp://username:passsword@yourdomain . Fill in your FTP information to access files and folders.

2.| Chmod your files and folders to: 775, or 777. I recommend 775 first, then try 777. Some hosts do not allow 777, and some don't allow chmodding at all. Contact your host to find out more on if your allowed to chmod.

Then your done! Try again...

You can also refer to this guide for additional info: What Is A Chmod?

Doc Written By: Xarcell


Error: Modification Parse Error or Failed Opening Required

There could be a number of small problems that could be causing this error, but the most common is your server/host has it's php.ini settings for "safe_mode" on. This is kind of extra security that will not allow the modification of your SMF files, which will not allow you to install TP.

The work around would be to follow the instructions in this Doc: How Do I Manually Install Tiny Portal?

Doc Written By: Xarcell


Error: UTF-8 Setting, Unable To Update Database.

 :)


Missing Images After Installation!

In some rare cases, the SMF package manager doesn't upload/extract the full package due to latency, connection dropping, etc. This can be fixed easily by manually FTP your image files and folders. The folders and files in TinyPortal to manually FTP are:

  • /tp-images
  • /Themes/default/images/tinyportal

This should correct the problem.

Doc Written By: Xarcell


Missing Text After Installation!

In some rare cases when installing SMF or mod's, it defaults to UTF-8 characters. This causes some language strings or "text" not to appear. YOu have 2 options to correct this:

1.| You will need to check the language characters your forum uses. To do this, go to: "Admin > Configuration > Server Settings > Default Forum Language". If it is set to "English_utf8", try changing it to "English".

2.| You can install the UTF-8 language packs, by downloading them from: http://www.tinyportal.net/index.php?action=tpmod;dl=cat693 . Then extract the files and FTP them to your forum "Themes/default/languages/" directory.

That's it, the problem should be corrected!

There is a UTF-8 Read Me at SMF:
http://docs.simplemachines.org/index.php?topic=865

NOTE: If you intend on using multiple languages on your site, they will need to be in UTF-8 characters, along with your language settings.

Doc Written By: Xarcell


Package Is Invalid Or Corrupt!

Sometimes when you try to install a package through the SMF packages installer, you may get the following error:
Quote
The package you tried to upload either is not a valid package or has become corrupted.

This usually means just that.

1.| The package may be corrupted, which you can try to open it manually with a package program such as winzip or winrar. If it doesn't open, then it's corrupted and cannot in anyway be used. If it does open, try re-packaging it and install.

If that doesn't work...

2.| The package may be invalid, meaning it's not the right package, or doesn't work with that version of SMF and/or TP. If it is a valid SMF or TP package, and it's not corrupted, you may try installing it manually. If it is a TP package, you can follow this guide on how to install it manually: "How Do I Manually Install Tiny Portal?".

Doc Written By: Xarcell


Test Failed On Installation?

Sometimes with TinyPortal you may get a "test failed" when you apply the mod during installation. This is because the install script cannot find the sections of code within a it needs to edit. Normally, this is because of other mod's that have already modified the code. But don't fret, you can still install TinyPortal manually.

If all of your files listed on installation report "test failed", it may be best to do a complete manually install. You can read this guide on how to do so: "How Do I Manually Install Tiny Portal?"


START


1.| First and most importantly, make a backup of your forum. If you are not sure how to do that, you can this the guide: How Do I Create a Backup Of My Site?

2.| On your computer, create a folder called "TPfailed-install". Inside your TPfailed-install folder, create another folder called SMF. The SMF folder will contain your unedited files. Inside the SMF folder create a folder called TP. Your TP folder will contain the files that you will edit. The folder structure should look like this: "TPfailed-install/SMF/TP/".

3.| Download a copy of the files that reported "test failed" from your forum and place them in SMF - and - TP folders.

4.| Continue with installing TinyPortal regardless of it saying "test failed". Be sure to remember which files stated "test failed". These will be the ones you will try to manually install later on.

5.| In the folder "TPfailed-install" open the "tp-version.mod" that corresponds with the TP version you are trying to install. Browse through it's content to familiarize yourself with the editing instructions before actually doing so. Now, open a copy of the files in your "TPfailed-install/SMF/TP" directory with your editor, and follow the editing instructions from your "tp-version.mod" file. Remember when reading edit file instructions:
  • $boarddir = files from the forum root listed above.
  • $sourcesdir = files from the sources directory above.
  • $themedir = files from theme directory above.

6.| Upload your edited files in your "TPfailed-install/SMF/TP" folder to there proper directories and your done! If you run into trouble, you can always upload the unedited files from your "TPfailed-install/SMF" folder to the proper directories for a quick fix.


END



Doc Written By: Xarcell


Articles in « Documentation Library tool (TinyPortal) »

Comments *