TinyPortal
Development => Support => Topic started by: Skhilled on October 30, 2005, 01:16:30 AM
Hi, I mistakenly edited and uploaded a previous version of index.template.php and now have lost my tp button link. What is the code to get it back? Or must I reinstall it again?
Re-installing would probably cause many errors, and fail. It's better to get a new, clean index.template.php file from the default theme folder, or from a new install zip file for SMF.
Just edit the index.template according to the instructions in the tinyportal.mod file that matches your set-up. TP and SMF version.
Open the .mod file with notepad, and then follow the directions. like this for SMF v1.0.x and TP v.74
<edit file>
$themedir/index.template.php
</edit file>
<search for>
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
</search for>
<add after>
// TinyPortal
if(isset($context['TPortal']['fixed_width'])){
require_once('SSI.php');
loadtemplate('TPortalBlocks');
$context['tportal_on']=true;
}
</add after>
This tells you to <edit file>
$themedir/index.template.php
</edit file>
find the index.template.php in the theme directory and then within that file, find:
<search for>
function template_main_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;
</search for> and add after that this code:
// TinyPortal
if(isset($context['TPortal']['fixed_width'])){
require_once('SSI.php');
loadtemplate('TPortalBlocks');
$context['tportal_on']=true;
}
Many other changes are made, but you should then be good to go.
Thanks, borgBOB. That worked. The only prob is I cannot get my themes to work anymore. I'm using smf rc1.1 and the Apollo and Neptune themes.
Nevermind. I was trying to change it thru the smf admin. I added the theme block and changed it thru there. :)