TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

June 26, 2024, 01:30:22 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,280
  • Total Topics: 21,227
  • Online today: 203
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 181
  • Total: 181

index.template.php screwed up

Started by Skhilled, October 30, 2005, 01:16:30 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skhilled

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?

borgBOB

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.

Skhilled

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.

Skhilled

Nevermind. I was trying to change it thru the smf admin. I added the theme block and changed it thru there.  :)