How can I replace the forum name with a banner?

Started by MiG, August 26, 2005, 05:36:38 PM

Previous topic - Next topic

MiG

Hi there, I'm new to these forums and to "Simple Machines" as well and I like it so far. I'm currently tweaking the default theme and I went through the FAQ- section here and found something that I meant to fix and it's this:

Quote from: FAQHow can I replace the forum name with a banner?

This action can be simply done by finding the code that displays the forum name:

Code:

', $context['forum_name'], '


and replacing that part with a image script:

Code:

<img src="', $settings['images_url'], '/IMAGE.GIF" border="0">


Ok, so where do I find this ( ', $context['forum_name'], ' ), wich of all the php files should I look in? Any info on this topic would be a great help since I've searched and searched for this but haven't been able to find anything about it.

Also on a sidenote, is it possible to resize the Smilies? I meant to make my own set but I want them to be displayed slightly larger than they are by default.

Thank you for any input about these Q's

/MiG

forsakenlad

Index.template.php is the place. And for the smilies you can resize them using any image editing software ;)
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

MiG

#2
Ok thank you I'll go through it again. :) Possibly I missed it. As for the smilies, there's no max size set for them?


Edit: Found it, but when I followed the FAQ it messed up my forum. Exactly how is the code supposed to look?
This is what it looks like by default:

Quote// 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>';

   echo '

How do I put my logo up instead of this without messing up the forums?

J. Williams

Go in your theme settings,click the default theme & theres a box which says Logo Image Url
Joshua Jon Williams
Back in Action.

forsakenlad

That is only if he is running the 1.1 Beta, and from the code I say that he isn't. The thing you have to do is to delete the second line starting with <span... and adjust width of the first line to fit your needs ;)
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

Anakin_holland

Quote from: forsakenlad on August 27, 2005, 07:53:54 AM
That is only if he is running the 1.1 Beta, and from the code I say that he isn't. The thing you have to do is to delete the second line starting with <span... and adjust width of the first line to fit your needs ;)

And make sure you put the '; of the second line at the end of the first, or else you'll get parse errors... ;) Kept me busy anyway...

Greetz!

MiG

#6
:) My heroes. I did delete the second line and the '; as well and indeed I got the infamous parse error. I'll try it once more.

Thank you for your help

Edit:

Allright, I'm now rid off the parse error but the logo just won't show up. Here's the code, please tell me what's wrong with it now:

<a href="hxxp:www.michaelgullbrandson.com/migsforum/ [nonactive]><img title="Home" src="', $settings['hxxp:www.michaelgullbrandson.com/migsforum/Themes/default/images' [nonactive]], '/migsforum_logo.gif" width="432" border="0" style="float: right;" alt="" /><a/>';

Anakin_holland

Quote from: MiG on August 27, 2005, 12:40:22 PM
:) My heroes. I did delete the second line and the '; as well and indeed I got the infamous parse error. I'll try it once more.

Thank you for your help

Edit:

Allright, I'm now rid off the parse error but the logo just won't show up. Here's the code, please tell me what's wrong with it now:

<a href="http://www.michaelgullbrandson.com/migsforum/><img title="Home" src="', $settings['http://www.michaelgullbrandson.com/migsforum/Themes/default/images'], '/migsforum_logo.gif" width="432" border="0" style="float: right;" alt="" /><a/>';

Well, the first thing I see is that you replaced the variable $settings['images_url'] which holds the directory of all the board images with the actual URL.

So now the script is looking for a variable called http://www.michaelgullbrandson.com/migsforum/Themes/default/images Which probably doesn't excist. ;)

Replacing the variable will get you further? Maybe you can check the forum log (Admin -> View Forum Error Log ) ?

Good Luck!

Anakin

MiG

Allright I give up. I have no idea what to replace it with and according to the error check there's none so I'll leave it at that.

Thank you anyway

/MiG

kegobeer

// 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'], '/migsforum_logo.gif" width="432" style="float: right;" alt="" />';


If you want the logo as a link...

// This part is the logo and forum name.  You should be able to change this to whatever you want...
   echo '
               <a href="index.php"><img src="', $settings['images_url'], '/migsforum_logo.gif" width="432" style="float: right;" alt="" /></a>';
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

MiG

 :) I've already started to modify the classic theme instead but I'll try this code out.

Thank you yet again :D

Advertisement: