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,219
  • Total Topics: 21,352
  • Online today: 556
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

Mod: Infobar

Started by MotMann, January 07, 2006, 01:18:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MotMann

i wanna add the Mod Infobar in my forum.

Question: i must copy/change the code from the classic ore default index-template.php to the index.template.php from tiny?


borgBOB

#1
Just copying the index,template.php from the default theme to your other theme will probably cause problems.

If the theme you wish to use the mod on has it's own copy of index.template.php, then you will have to find what code was added, and modify that file.
But, if the theme you want to use is missing that file, then the default theme file is used.

The exact things to change can be found in the infobar.v1.00.mod file, inside the infobar[1][1].v1.00.zip file.
Right click, and select open with.. then selcet your text editor or php code editor or html editor, or notepad.
Read the file, and follow the instructions. You may wish to also open the modified index.template.php from your server to compare / see the changes made.
Then upload your new index.template.php back to your server in the correct theme folder, and it should work.

MotMann

Quote from: borgBOB on January 07, 2006, 04:30:22 PM
Just copying the index,template.php from the default theme to your other theme will probably cause problems.
if i installed the mod with the packagemanager, than i can just copied the index.templ.php from the default folder to the theme from Bloc?
I think, that bloc has modified that php file?

borgBOB

Many, if not all of Bloc's themes have a index.template.php that is different from the default.
So, NO, do not copy the file from the default theme.
First, this will remove Bloc's copywrite info, and remove the link back to this site.
Make the edits to the index.template.php from your copy of Bloc's theme. Or, if it is in english, send it to me, and I can try to change it.

MotMann

#4
Okey.. i use TP o.75 and Helios.

i have problems with these code:

<search for>
      }
   // ]]></script>
</head>
<body>';
</search for>

<add after>
   if (!$context['user']['is_logged'])
      echo '<div id="info"><div id="infobar">', parse_bbc( $txt['infobarText'] ), '</div></div>';
</add after>

Where i must copied that code in the themes_dir/TP Helios 1.1RC1/index.template.php? Please tell me the line or copied the new code in this topic... :)

And i do not copied anything from the classic template?

Thank's...

borgBOB

For me, line 232 starts like this:
        // ]]></script>
</head>
<body><div><table cellpadding="0" align="center" cellspacing="0" style="width: ' , (isset($settings['forum_width']) && !empty($settings['forum_width'])) ? $settings['forum_width'] : '100%' ,  ';"><tr><td>';
       


So, look down 4 or 5 lines, for this:
// TinyPortal start
     if($context['TPortal']['fixed_width']!=0 && $context['tportal_on'])
             echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';
// TinyPortal end


Add your code before that:

if (!$context['user']['is_logged'])
      echo '<div id="info"><div id="infobar">', parse_bbc( $txt['infobarText'] ), '</div></div>';


So it looks like this:
if (!$context['user']['is_logged'])
      echo '<div id="info"><div id="infobar">', parse_bbc( $txt['infobarText'] ), '</div></div>';

// TinyPortal start
     if($context['TPortal']['fixed_width']!=0 && $context['tportal_on'])
             echo '<table align="center" width="'.$context['TPortal']['fixed_width'].'" cellpadding="0" cellspacing="0" border="0"><tr><td>';
// TinyPortal end


Hope this helps


MotMann

#6
Okay.. the message will be displayed, but i must copy the code in the language to.
And witch code i must used, that the letters are displayed in red?

But, the Infobar comes with a noise.. that not be played.. what shell i do? I must copied anything else in some other folders?

And the Icon is not in the right space, it's to high.

borgBOB

MotMann, do you have any other mods installed? other than TP?
I will make an install and copy files for you, for Helios SMF 1.1RC1 theme.

MotMann

#8
Okey.. thank's, i have mods installed, just the germanpack  and the xbox360gamertag mod;-) because im waiting for TP 0.8 for SMF 1.1RC2

borgBOB

Use this file:

It's for Helios, SMF 1.1RC1 with TP v.75

The other mods do not touch this file.

[attachment deleted by admin]

This website is proudly hosted on Crocweb Cloud Website Hosting.