PDA

View Full Version : How to create a image with a link in header?


TenRingGuns.com
05-09-2012, 05:48 AM
Hi all

I'm trying to add multiple images that when clicked will take the user to a particular website.

Can some one point me in the right direction?

Thanks

Zachery
05-09-2012, 08:37 AM
www.w3schools.com (http://www.w3schools.com)
You'll need to learn some html

Here are some basics to get you started


<a href="domain.com"><img src="imagename.extension" border="0" /></a>


You'll need to change the bits in red, at the very least.

TenRingGuns.com
05-11-2012, 05:40 AM
Thank you.

Where do I enter that code?

cellarius
05-11-2012, 06:35 AM
No way to say as long as you don't say where you want it to show up. Generally: In the templates.

TenRingGuns.com
05-11-2012, 11:12 PM
I'm looking to install it in the header bar at the top.

cellarius
05-12-2012, 05:33 AM
I don't know exactly what you mean by header bar, but you would have to look at the header or navbar template.

borbole
05-12-2012, 02:28 PM
I'm looking to install it in the header bar at the top.

Posting a picture/screenshot of the area that you mean would be helpful.

TenRingGuns.com
05-13-2012, 05:32 AM
https://vborg.vbsupport.ru/external/2012/05/28.png

In the top bar to the right of my existing logo.

borbole
05-13-2012, 12:11 PM
https://vborg.vbsupport.ru/external/2012/05/28.png

In the top bar to the right of my existing logo.

In that case the template you need for that is the header template. Add it after the part where the logo is defined and float it right.

TenRingGuns.com
05-31-2012, 10:33 PM
Can some please give me a clear description of how to create a custom image with a link? I have yet to get a clear answer. Thanks

blind-eddie
05-31-2012, 11:47 PM
In your header template

Find:
<div id="toplinks" class="toplinks">

Add Above:


<span style="padding-left:20px">
<a href="http://www.northwestguns.com" target="_blank">
<img src="http://www.northwestguns.com/images/misc/nwguns3.png" />
</a>
</span>

Change the red URL & image location to the URL you want members to go to & link to image.

TenRingGuns.com
06-01-2012, 12:45 AM
Thanks Eddie! So I add the code above this?:

<div id="toplinks" class="toplinks">

blind-eddie
06-01-2012, 12:54 AM
Yes, add it above. You can also change the space between your logo & the new image by changing the number from 20 to 10 to shorten the space...etc...

TenRingGuns.com
06-01-2012, 01:03 AM
Bummer, didn't work.

blind-eddie
06-01-2012, 01:10 AM
It worked, you added the wrong image URL
Use this instead.
http://www.tenringguns.com/wp-content/uploads/2012/05/wplogo18.png

TenRingGuns.com
06-01-2012, 01:17 AM
I uploaded an image via filezilla into the images folder, that won't work?

blind-eddie
06-01-2012, 01:26 AM
I see you got it worked out now.

http://blind-eddie.com/forum/imagehosting/14fc835ee9f614.jpg

TenRingGuns.com
06-01-2012, 01:26 AM
Got it. I typed in "trg.png" instead of "TRG.png" lol, thanks eddie. The file name threw it off.

--------------- Added 1338521254 at 1338521254 ---------------

Can I safely edit code in my admin panel or is that a bad idea?

blind-eddie
06-01-2012, 01:30 AM
Its safe to edit code but, I should have told you to always create a copy of any template before you edit it, just in case you may run into a problem & may need to re-add it.

Note: When you upgrade your vbulletin you may loose the added code in the header template. Keep a copy of the code needed to add the linked image in case you need to add it again if you loose it during upgrade.

TenRingGuns.com
06-01-2012, 01:36 AM
Thanks! I haven't a clue how I'm supposed to upgrade, is it necessary?

blind-eddie
06-01-2012, 01:38 AM
We will cross that bridge later. But, you are fine with the version you have for now.