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

Recent

Welcome to TinyPortal. Please login or sign up.

April 19, 2024, 10:16:53 PM

Login with username, password and session length
Members
  • Total Members: 3,885
  • Latest: Growner
Stats
  • Total Posts: 195,165
  • Total Topics: 21,219
  • Online today: 266
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 138
  • Total: 138

index.template help

Started by gerrymo, October 10, 2005, 05:33:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gerrymo

I want to make a change to a copy of the default index.template. I want to remove the title (it shows "the bloc zone" and the SMF logo on this site), and replace it. What I am looking for is one cell 100% wide, with a background image (10px wide by 110px high and repeated accross to 100% wide), and a central logo of my own (450px wide by 100px high).

I have done something similar to an SMF forum before, by for the life of me, I cannot remember what I did (and *Idoit me* I didnt keep acurate notes). Can someone let me know what to remove, and what to add in?

Thanks.

(Versions I have are SMF 1.1B3 & TP 0.7.4)

IchBin

I think you can remove this code to remove the Forum Title.
        if (empty($settings['header_logo_url']))
                echo '
                                        <span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
        else
                echo '
                                        <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';


Best thing you can do is comment it out to see if it works. Like this:
//        if (empty($settings['header_logo_url']))
//                echo '
//                                        <span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
//        else
//                echo '
//                                        <img src="', $settings['header_logo_url'], '" alt="', $context['forum_name'], '" border="0" />';


And the line right above it is where the logo is at.
<img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" />';

You can change the name of the logo and the width etc.

gerrymo

Yes, I could do that, but I am looking at having a whole new cell (no Border) with a background image, and the logo (a banner) in the center.

gerrymo

If it helps, here is the html code that I used for the top of my coppermine gallery. But I cant get it to work in index.template as I'm not much good at coding php.


  <table border="0" cellpadding="1" width="100%">
    <tr>
      <td width="100%" background="http://www.******.co.uk/images/cellpic_bkg.jpg">
        <p align="center"><img border="0" src="http://www.******.co.uk/images/logo2.gif" width="450" height="100">
      </td>
    </tr>
  </table>


I neeed to know what to remove from the existing file, and how to add the above code to it (but in a way tha works in php).

IchBin

Ok, I'm a bit busy atm. But I will get this in a little bit.

Nokonium

1.1.3b ......

I have the code for 1.1RC1 which I hope is similar ....

        // This part is the logo and forum name.  You should be able to change this to whatever you want...
        echo '
                                        <div align="center"><img src="', $settings['images_url'], '/smflogo.gif" style="width: 250px; float: ', !$context['right_to_left'] ? 'right' : 'left', ';" alt="" /></div>';
        if (empty($settings['header_logo_url']))
                echo '
                                        <span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';
        else
                echo '
                                        <div align="center"><img src="', $settings['header_logo_url'], '" alt="',


If you add your banner/header to the text box in the theme settings and delete the smflogo.gif this will load your own logo centered. It allows you to have different colourways to your logo for different themes.

gerrymo

#6
Yes but that would still give the forum name. I want a custom top to the page. It is only going to work correctly with the full width cell (with a Bg image), containing the centered banner. I have done it before but cnt remember how.

The code I posted above came from the html template for my coppermine gallery.(Its a single cell table). I'm looking for an equivilant for index.template.

IchBin

If you comment out the stuff I told you in the first post that will get rid of the forum logo and forum title.
Then all you can use this code if Nokoniums doens't work for you. This is from my RC1 forum.

        // The logo and the three info boxes.
        echo '
                <table cellspacing="0" cellpadding="0" border="0" width="100%" style="position: relative;">
                        <tr>
                                <td colspan="2" valign="bottom" style="padding: 5px; white-space: nowrap;">';
echo '
  <table border="0" cellpadding="1" width="100%">
    <tr>
      <td width="100%" background="http://www.******.co.uk/images/cellpic_bkg.jpg">
        <p align="center"><img border="0" src="http://www.******.co.uk/images/logo2.gif" width="450" height="100">
      </td>
    </tr>
  </table>';


Following this code will be the code you want to comment out.

Nokonium

#8
Quote from: gerrymo on October 10, 2005, 07:08:52 PM
Yes but that would still give the forum name.
It doesn't, if you delete the smflogo all you get is your logo centered.

gerrymo

Thanks guys. I'll give it a go later, and see how it goes.

Thanks for your help.