Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: DaleJr8 - elokuu 27, 2006, 09:26:49 IP

Otsikko: adding a picture above the info center
Kirjoitti: DaleJr8 - elokuu 27, 2006, 09:26:49 IP
how would i go about adding a picture above the info center that links to a different url, and centering it, and having words like please visit my other site?



ty whoever takes the time to read this
Otsikko: Re: adding a picture above the info center
Kirjoitti: matera - elokuu 27, 2006, 10:26:02 IP
It depends somewhat on what version you are using. I was just checking the v1.1rc3 index.template.php to see how it differed from my modified rc2. In the new one it would probably be easiest to add another table cell after
<td class="catbg" height="32">';

if (empty($settings['header_logo_url']))
echo '
<span style="font-family: Verdana, sans-serif; font-size: 140%; ">', $context['forum_name'], '</span>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</td>

That's more or less what I did for my default Lightning (large text version lol) theme (v1.1rc2), except that I have my big logo image on the left, the forum tagline in the center, and a plain text link to my main site on the right.
http://www.firefromthesky.org/forum/index.php

In my Black Opal theme (v1.1rc2 http://www.firefromthesky.org/forum/index.php?board=17.0 ), I chopped out that whole upper table and put in
echo '

<div class="header">';

if (empty($settings['header_logo_url']))
echo '
<a href="../">', $context['forum_name'], '</a>';
else
echo '
<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />';

echo '
</div>';

for a centered title, which could just as well be an image.

These are just offered as examples of simple alterations that haven't killed anything (lol).
Otsikko: Re: adding a picture above the info center
Kirjoitti: DaleJr8 - elokuu 27, 2006, 10:39:45 IP
im using smf 1.0.7 with black day theme
Otsikko: Re: adding a picture above the info center
Kirjoitti: matera - elokuu 27, 2006, 11:17:55 IP
Ah. I have done some head-chopping in 1.07 too, but I don't have that theme at hand. Maybe someone else who has will turn up soon :)