Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 13th Aug 2008, 01:38 PM   #1
Advance Warrior
War Room Member
 
Tirmizi's Avatar
 
Join Date: 2008
Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
Default
A quick php question ?????
Share on: 
fb share twitter share gplus share more share

Dear Warriors,



Just wanted to ask a quick php question, I have a page on which we have static pictures but i want those pictures to be clickable as currently they don't link to anything the code is

<img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />

now how can i make this code to link to some other website ... i mean the graphic that should link to some other website ...

I hope you get the idea..



Best Regards,



Tirmizi

Tirmizi is offline  
Unread 13th Aug 2008, 01:42 PM   #2
Spartan Warrior
War Room Member
 
Join Date: 2008
Posts: 869
Thanks: 130
Thanked 149 Times in 75 Posts
Default
Share on: 
fb share twitter share gplus share more share

It's just HTML you need. Just use the following HTML code:

<a href="http://google.com">
<img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />
</a>

Just replace google.com of course


Mark Brian is offline  
Unread 13th Aug 2008, 01:42 PM   #3
* Telekinetic Marketing *
War Room Member
 
Jared Alberghini's Avatar
 
Join Date: 2004
Location: The Matrix
Posts: 1,854
Thanks: 808
Thanked 1,144 Times in 447 Posts
Blog Entries: 25
Default
Share on: 
fb share twitter share gplus share more share

<a href="YOUR-URL-HERE">
<img src="<?php bloginfo('template_url'); ?>/images/ad1.gif" class="left" alt="" />
</a>

Does that answer your question? Or am I misunderstanding your question?

- Jared

P.S.

Join The Future: Telekinetic Marketing
Jared Alberghini is offline  
Unread 13th Aug 2008, 10:52 PM   #4
Advance Warrior
War Room Member
 
Tirmizi's Avatar
 
Join Date: 2008
Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Share on: 
fb share twitter share gplus share more share

Thanks guys , will definatly give it a go ..


am sure it will work ..




Tirmizi

Tirmizi is offline  
Unread 14th Aug 2008, 05:00 AM   #5
Advance Warrior
War Room Member
 
Tirmizi's Avatar
 
Join Date: 2008
Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Share on: 
fb share twitter share gplus share more share

This is exactly what I was looking for. However, something starnge happened. When I looked at the link after changing , it looked fine. the picture showed an external link to the website that i wanted.

But I checked it back again after an hour or so ... and it had some sort of malware thing going on it... like you see on virust websites .... when clicked on it , gave an option for " checking your computer for virus etc' i am pretty much sure that would be some sort of malware or virus .. but how did it get their ....

What i wanted to do basically was to put " click bank hop" link on the picture .... so that people would go to the product sales page through that link ....

is their an easier way of doing it .. or am i doing something wrong ...

for reference do check out the website

How to Lose Weight Fast - How to lose weight fast. This website will contain all the relevent information which will help you lose weight fast , I want to put the links on the 125X125 pixel pics on the right side bar ....

the code for this is the one that I mentioned in my earlier post ...


appreciate your help ...




Tirmizi

Tirmizi is offline  
Unread 14th Aug 2008, 06:00 AM   #6
White Hat Marketer
War Room Member
 
Dan Grossman's Avatar
 
Join Date: 2007
Location: Montgomeryville, PA
Posts: 1,546
Thanks: 77
Thanked 775 Times in 267 Posts
Default
Share on: 
fb share twitter share gplus share more share

Perhaps it's time to do an AdAware/Spybot scan on your own PC to look for malware that would inject ads into your browsing experience...

Improvely: Built to track, test and optimize your marketing.

[SIGPIC][/SIGPIC]
Dan Grossman is offline  
Unread 14th Aug 2008, 06:11 AM   #7
Advance Warrior
War Room Member
 
Tirmizi's Avatar
 
Join Date: 2008
Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Share on: 
fb share twitter share gplus share more share

i'll definatly do that ... so there is basically nothing wrong with the code????

Tirmizi is offline  
Unread 14th Aug 2008, 06:11 AM   #8
Advance Warrior
War Room Member
 
Tirmizi's Avatar
 
Join Date: 2008
Location: Islamabad, Pakistan
Posts: 398
Thanks: 0
Thanked 2 Times in 2 Posts
Default
Share on: 
fb share twitter share gplus share more share

i'll definatly do that ... so there is basically nothing wrong with the code???? I mean everything else is fine .....

Tirmizi is offline  
Unread 14th Aug 2008, 06:16 AM   #9
White Hat Marketer
War Room Member
 
Dan Grossman's Avatar
 
Join Date: 2007
Location: Montgomeryville, PA
Posts: 1,546
Thanks: 77
Thanked 775 Times in 267 Posts
Default
Share on: 
fb share twitter share gplus share more share

Right... adding a link doesn't cause virus checking graphics to appear... that wasn't what caused it. Either your website was hijacked (but it doesn't look to be), or your computer... so more likely your computer.

Improvely: Built to track, test and optimize your marketing.

[SIGPIC][/SIGPIC]
Dan Grossman is offline  
Unread 14th Aug 2008, 07:06 AM   #10
Banned
War Room Member
 
Join Date: 2006
Location: The Hague,Netherlands.
Posts: 1,077
Thanks: 384
Thanked 220 Times in 136 Posts
Blog Entries: 1
Default
Share on: 
fb share twitter share gplus share more share

Nothing wrong with the code. If you want to use an affiliate link make a simple cloak on it.

create a file called fi likes.php and in it have something like this

<?php
$url="http://www.youraffiliatelink";
header("Location: $url");
?>
edynas is offline  
Unread 14th Aug 2008, 11:11 AM   #11
VIP Warrior
War Room Member
 
Ross Dalangin's Avatar
 
Join Date: 2005
Posts: 1,604
Thanks: 350
Thanked 214 Times in 161 Posts
Blog Entries: 33
Default
Share on: 
fb share twitter share gplus share more share

In your code:
<div id="sponsors">

<img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad1.gif" class="left" alt="">
<img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad2.gif" class="right" alt="">
<img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad3.gif" class="left" alt="">

<img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad4.gif" class="right" alt="">
<div style="clear: both;"></div>
</div>
Change it as:
<div id="sponsors">

<a href="TheLinkHere"><img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad1.gif" class="left" alt="" border="0"></a>
<a href="TheLinkHere"><img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad2.gif" class="right" alt="" border="0"></a>
<a href="TheLinkHere"><img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad3.gif" class="left" alt="" border="0"></a>

<a href="TheLinkHere"><img src="http://weightlossprogramtips.info/wp-content/themes/Wordpress_Magazine/images/ad4.gif" class="right" alt="" border="0"></a>
<div style="clear: both;"></div>
</div>
Ross Dalangin is offline  
Unread 7th Jun 2010, 03:29 PM   #12
Warrior Member
War Room Member
 
Join Date: 2010
Posts: 24
Thanks: 4
Thanked 37 Times in 6 Posts
Default
Re: A quick php question ?????
Share on: 
fb share twitter share gplus share more share

Instead of border="0" you can also add this to your CSS file:

Code:
a img {
  border:none;
}
JonathanKrantz is offline  
Closed Thread


Bookmarks

Tags
php, php scripts


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 05:58 AM.