Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: Hragged - syyskuu 11, 2006, 10:41:25 IP

Otsikko: Quick question on modifying the Core theme (SMF 1.1 RC3)
Kirjoitti: Hragged - syyskuu 11, 2006, 10:41:25 IP
Hi, I'm pretty new to SMF, loving it so far! :)

My question is, how do I get rid of the bit on the Core theme shown on the image below (i've highlighted the bit I would like to remove with a red box):
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg.photobucket.com%2Falbums%2Fv292%2Fhragged%2Funtitled.jpg&hash=bb2dd7f51854e2a127c1fee64b117a0ff239d6ba)

and add a new header exactly the same as the header shown here to the top of the Core theme:
http://www.ogrestronghold.com/header.htm

Thanks for your time :)
Otsikko: Re: Quick question on modifying the Core theme (SMF 1.1 RC3)
Kirjoitti: Ravyn - syyskuu 12, 2006, 12:35:48 AP
An admin can correct me if I'm wrong, but I believe you'll want to do the following:

Open up index.template.php
Find:

echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<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>
<td align="right" class="catbg">
<img src="', $settings['images_url'], '/tarsmlogo.png" style="margin: 2px;" alt="" />
</td>
</tr>
</table>';


and replace with:

echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
                                     <img src="nameofyourheaderimg.jpg">
</td>
</tr>
</table>';


Let me know if it works out for you.
Otsikko: Re: Quick question on modifying the Core theme (SMF 1.1 RC3)
Kirjoitti: SKETCHi - syyskuu 12, 2006, 02:12:15 AP
If you want to use the exact header you have linked to, with the tiling image on the left, you will need to do something different than what Ravyn said :).

From what I see, his code looks correct, but he just used an image instead of the header.htm file you linked to. So, if you want to use that header.htm file, you will need to use an include.


echo '
<div class="tborder" ', $context['browser']['needs_size_fix'] && !$context['browser']['is_ie6'] ? ' style="width: 100%;"' : '', '>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td>';
                                     include ("../your_directory/header.htm");
echo '
</td>
</tr>
</table>';


Replace "../your_directory/" with the location of the file. The include will grab your file and display it.