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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,230
  • Total Topics: 21,353
  • Online today: 867
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 338
  • Total: 339
  • @rjen

index.template.php screwed up

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

Previous topic - Next topic

0 Members and 2 Guests 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.  :)

This website is proudly hosted on Crocweb Cloud Website Hosting.