Uutiset:

Join the Facebook Fan Page.

Main Menu
Advertisement:

help with adding a link

Aloittaja higherauthority, helmikuu 01, 2006, 09:42:48 IP

« edellinen - seuraava »

higherauthority

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

forsakenlad

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 ;)
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

higherauthority

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

forsakenlad

The link should be like this:

<a href="http://www.airsoftchicago.com/">
Eren "forsakenlad" Yaşarkurt
SMF Friend & Former Team Member

higherauthority

#4
Thanks!!!!!!!!! I got it now!   8)

fiver

I used this and it worked:

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

Thanks  :)

Advertisement: