News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Changing the header

Started by bledsian, January 04, 2005, 06:11:06 PM

Previous topic - Next topic

bledsian

Ok, I'm not too keen on php so thats my biggest problem...

Ok, my question is what would i have to do to the index.template file to remove the text and small logo on the very top of the main page and just replace it with one wide logo?

http://www.petraint.com/forum/ <--i want to remove the Mansion of Metal text and Mansion of Metal logo and just replace it with one wide banner.

I'm just using the default index.template file too

Thanks :)
www.MansionofMetal.com  <---the place where true metal lives

Jerry

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


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Crawler

I already found these lines in index.template.php and did some experiments, but when I change something in the code, I always get a error-message stating:
Template Parse Error!
There was a problem loading the /Themes/default/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.


I want to add the following code for a add-system from pixelnet, can anybody tell me what the hell I'm doing wrong? I already tried putting a / at the end of the IMG-Line and also at the and of the A-Line, but that didn't work either ...

<a href="http://james.adbutler.de/click.php?pid=3335&tid=115515&bid=14235" target="_blank">
<img src="http://james.adbutler.de/view.php?pid=3335&bid=14235&tid=115515&b=468&h=60&inv=img" style="float: right;" width="468" height="60" border="0"></a>&nbsp;&nbsp;
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">PixelNet Partnerprogramm</span>

Jerry

well you could try replacing the code I pasted with this...
echo '<a href="http://james.adbutler.de/click.php?pid=3335&tid=115515&bid=14235" target="_blank">
<img src="http://james.adbutler.de/view.php?pid=3335&bid=14235&tid=115515&b=468&h=60&inv=img" style="float: right;" width="468" height="60" border="0"></a>&nbsp;&nbsp;
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">PixelNet Partnerprogramm</span>';
That shouldn't make a parse error :)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Crawler

No, doens't work ... I get the following error. By the way, what did you change, I couldn' find any difference except the additional echo ' ...
Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Jerry

well when you put html into a php file you need to make sure it is inside an echo :)
// This part is the logo and forum name. You should be able to change this to whatever you want...
echo '
<img src="', $settings['images_url'], '/smflogo.gif" width="250" style="float: right;" alt="" />
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">', $context['forum_name'], '</span>';


I don't see any 's in the code you pasted so it shouldn't make a parse error.
// This part is the logo and forum name. You should be able to change this to whatever you want...
echo '<a href="http://james.adbutler.de/click.php?pid=3335&tid=115515&bid=14235" target="_blank">
<img src="http://james.adbutler.de/view.php?pid=3335&bid=14235&tid=115515&b=468&h=60&inv=img" style="float: right;" width="468" height="60" border="0"></a>&nbsp;&nbsp;
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">PixelNet Partnerprogramm</span>';

should work by replacing the code I pasted originally.


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Crawler

It IS inside echo ' ... the code looks exactly like the one you posted, still I get the same error
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '
<a href="http://james.adbutler.de/click.php?pid=3335&tid=115515&bid=14235" target="_blank">
<img src="http://james.adbutler.de/view.php?pid=3335&bid=14235&tid=115515&b=468&h=60&inv=img" style="float: right;" width="468" height="60" border="0"></a>&nbsp;&nbsp;
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">PixelNet Partnerprogramm</span>';
echo '

Jerry

try going to this page when you make the edits:
http://yourforums/Themes/yourtheme/index.template.php

What error message does it show?


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

"If all you look for is the negative in things, you will never see the positive."

Crawler

If I browse the index.template.php directly, I get a blank page with no errors or anything, same thing happens when I use the original file instead ... BTW, the path to my forum is http://forum.digination.de [nofollow] or direct to index.template.php http://www.digination.de/forum/Themes/default/index.template.php [nofollow]

Crawler

Anything else? Anyone? Please ...

A.M.A

could you please post the line that comes after the last echo ' in your last code.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Crawler

Here is the complete code from the logo-section:
// This part is the logo and forum name.  You should be able to change this to whatever you want...
echo '<a href="http://james.adbutler.de/click.php?pid=3335&tid=115515&bid=14235" target="_blank">
<img src="http://james.adbutler.de/view.php?pid=3335&bid=14235&tid=115515&b=468&h=60&inv=img" style="float: right;" width="468" height="60" border="0"></a>&nbsp;&nbsp;
<span style="font-family: Georgia, sans-serif; font-size: xx-large;">PixelNet Partnerprogramm</span>';
echo '
   </td>
</tr>
<tr id="upshrinkHeader"', empty($options['collapse_header']) ? '' : ' style="display: none;"', '>
   <td valign="top">
      <div class="headertitles" style="margin-right: 5px; position: relative;"><img src="', $settings['images_url'], '/blank.gif" height="12" alt="" /></div>
      <div class="headerbodies" style="position: relative; margin-right: 5px; background-image: url(', $settings['images_url'], '/box_bg.gif);">
      <img src="', $settings['images_url'], '/', $context['user']['language'], '/userinfo.gif" style="position: absolute; left: ', $context['browser']['is_ie5'] || $context['browser']['is_ie4'] ? '0' : '-1px', '; top: -16px; clear: both;" alt="" />
         <table width="99%" cellpadding="0" cellspacing="5" border="0"><tr>';
if (!empty($context['user']['avatar']))
            echo '<td valign="middle">', $context['user']['avatar']['image'], '</td>';
            echo '<td width="100%" valign="top" class="smalltext" style="font-family: verdana, arial, sans-serif;">';

A.M.A

I've tested your code on my forum and it is working with no problem. It might be something else in your index.template.php that is causing the error.

You can send me the whole index.template.php to look at it, if you want.
Really sorry .. real life is demanding my full attention .. will be back soon hopefully :)

Advertisement: