Link back to home page question

Started by Cheese-Burger, May 18, 2005, 02:13:04 PM

Previous topic - Next topic

Cheese-Burger

<a href="www.hamburger-deluxe.co.uk"><img src="', $settings[www.hamburger-deluxe.co.uk/SMF/Themes/default/images/smfloatinglogo4.gif], '/IMAGE.GIF"></a>


Would this be correct, to link back to my home page by clicking on the image?

I know its an obvious question, but hey, i`m pants at coding although i try.
Hate code. Love burgers

Thantos

#1
try:

echo '
<a href="www.hamburger-deluxe.co.uk"><img src="'
, $settings['images_url'], '/IMAGE.GIF" alt="" /></a>';

Cheese-Burger

So the [images_url] would be the url of my gif yes?
Hate code. Love burgers

Thantos

$settings['images_url'] is the url of the images folder for the current theme.

Cheese-Burger

Still lost really, but i am assuming that this is a copy and paste job. And just paste it into my theme index file.

And thanks for the help.
Hate code. Love burgers

Thantos

Ok each theme has an images directory, either its own or the default theme's directory
$settings['images_url'] is the URL of that directory.
so let say for yours:
$settings['images_url'] probably is "http://www.hamburger-deluxe.co.uk/SMF/Themes/default/images"
for the deafult theme.  So then you append "/IMAGE.GIF" to it and you get
http://www.hamburger-deluxe.co.uk/SMF/Themes/default/images/IMAGE.gif

I noticed a mistake in my orginal post and have fixed it.  You should be able to copy paste what I gave.

you might have to drop the"
echo '
and ';
parts however

Cheese-Burger

Ok
I`ve inserted the image, but it wants to link to http://www.hamburger-deluxe.co.uk/SMF/www.hamburger-deluxe.co.uk/ for some reason.

Also how do i get rid of the box thats around it?
Hate code. Love burgers

Jerry

for the link you must put the http:// in there ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

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

Cheese-Burger

Sweet, thanks Jerry  ;D That works.

Do you know how i lose the box that`s around it?
Hate code. Love burgers

Jerry

yes you need to add border="0" to the image tag like:
<img src="', $settings['images_url'], '/IMAGE.GIF" alt="" border="0" /> ;)


- Jerry
Find me on:
Facebook
Twitter
PlanetSMF

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

Cheese-Burger

Worked a treat. Thanks again Jerry.
Hate code. Love burgers

Advertisement: