Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: global77 - tammikuu 06, 2006, 11:14:58 AP

Otsikko: Add a button?
Kirjoitti: global77 - tammikuu 06, 2006, 11:14:58 AP
Using 1.0.5

I'd like to add a button at the end of the "row of buttons" beginning with "Home", to say "Main Site" and have alink back to my main website homepage.

I've already created the button to look like the others.

How can I add this button, and its link, to my forum?

I did find the buttons code in /Themes/default/index.template.php

Any assistance would be GREAT!

Thanks, J.D.

Otsikko: Re: Add a button?
Kirjoitti: Owdy - tammikuu 06, 2006, 12:27:50 IP
Search is your friend.

http://www.simplemachines.org/community/index.php?topic=7854.msg75035#msg75035
Otsikko: Re: Add a button?
Kirjoitti: global77 - tammikuu 06, 2006, 01:10:30 IP
Thanks! But I have a slight problem. I am getting a text link, not the button. Here is my code for index.template.php:

    // How about the [site] button?
   echo '
            <a href="https://my-domain.com">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/site.gif" alt="' . $txt[801] . '" border="0" />' : $txt[801]), '</a>', $context['menu_separator'];


Anything look amiss?
Otsikko: Re: Add a button?
Kirjoitti: global77 - tammikuu 06, 2006, 01:11:32 IP
By the way, I have uploaded my button named site.gif to the images directory.
Otsikko: Re: Add a button?
Kirjoitti: Owdy - tammikuu 06, 2006, 01:12:46 IP
It should be under images/english if you use that language.
Otsikko: Re: Add a button?
Kirjoitti: global77 - tammikuu 06, 2006, 01:14:43 IP
...and that was the problem...it needed to go into the english directory of the images directory. That's fixed.

Now, my button is slightly lower than the others. I made the button by opening one of the others and just putting my info over it, so I didn't change the canvas size or anything at all.

Please see it at:

http://spreadtheblessings.com/forum/

Ideas?
Otsikko: Re: Add a button?
Kirjoitti: EG - tammikuu 06, 2006, 01:35:18 IP
you need to add

style="margin: 2px 0;"

like this

<img src="http://spreadtheblessings.com/forum/Themes/default/images/english/site.gif" alt="site" style="margin: 2px 0;" width="76" height="16" border="0"/>
Otsikko: Re: Add a button?
Kirjoitti: global77 - tammikuu 06, 2006, 02:08:04 IP
Thaks E.G....worked like a charm...