Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: higherauthority - helmikuu 01, 2006, 09:42:48 IP

Otsikko: help with adding a link
Kirjoitti: higherauthority - helmikuu 01, 2006, 09:42:48 IP
OK I am new to PHP   

thanks to this board I figured out how to change the logo at the top now my question is how to I make the logo contain a link to my main homepage

sorry this is a total noob question

Thanks in advance
Otsikko: Re: help with adding a link
Kirjoitti: forsakenlad - helmikuu 02, 2006, 06:27:36 AP
In your index.template.php file, search for this:

<img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" />

And replace it with this:

<a href="', $scripturl, '"><img src="', $settings['header_logo_url'], '" style="margin: 4px;" alt="', $context['forum_name'], '" /></a>

This piece of code will make your header linked to your forum home page, if you want to link it to another page, replace the ', $scripturl, ' with the URL of the page ;)

Let me know if you cannot find this piece of code and please give the name of your theme, also your SMF version ;)
Otsikko: Re: help with adding a link
Kirjoitti: higherauthority - helmikuu 03, 2006, 06:45:21 IP
hmm i must be doing something wrong I get this error

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.


This is what I have


<center><a href="', www.airsoftchicago.com, "'><img src="', $settings['images_url'], '/AClogo.gif" width="500" style="float: center;" alt="" /></center>';

I want it to goto my home page at www.airsoftchicago.com and I want to keep my logo centered
and everything
Otsikko: Re: help with adding a link
Kirjoitti: forsakenlad - helmikuu 04, 2006, 12:12:45 IP
The link should be like this:

<a href="http://www.airsoftchicago.com/">
Otsikko: Re: help with adding a link
Kirjoitti: higherauthority - helmikuu 20, 2006, 05:46:24 IP
Thanks!!!!!!!!! I got it now!   8)
Otsikko: Re: help with adding a link
Kirjoitti: fiver - heinäkuu 16, 2006, 10:32:11 AP
I used this and it worked:

<a href="', $scripturl, '"><img src="', $settings['header_logo_url'], '" style="margin: 0px;" alt="', $context['forum_name'], '" /></a>';

Thanks  :)