Advertisement Image Module with target blank

gafir777 - October 28, 2009 - 20:47
Project:Advertisement
Version:6.x-2.1-rc1
Component:ad_image module
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello,

I need to use target="_blank" for my image ads. I understand, from the documentation, that image ads cannot be target blank with the ads image module and to use the html ads for this purpose. The html ads, however, do not count clicks. Is there a way I could have the image ads use target blank by default for all the clicks? I thought someone may have developed this, and if not, any recommendation on how to do this with Javascript or JQuery?

Thanks,

#1

gafir777 - October 28, 2009 - 21:07

I used the image_ad array from the image ads module in my phptemplate.

I tried the following:
$output .= l($image, $ad->redirect .'/@HOSTID___', array('attributes' => ad_link_attributes(array('target' => '_blank')), 'absolute' => TRUE, 'html' => TRUE));

But no target blank has been applies.

Any idea?

#2

gafir777 - October 28, 2009 - 21:16

I seem to have the target blank with the following:
$output .= l($image, $ad->redirect .'/@HOSTID___', array('attributes' => array('target' => '_blank'), 'absolute' => TRUE, 'html' => TRUE));

However, I have removed the ad_link_attributes(). Is there anyway I could still have the ad_link_attributes() along with the 'target' => '_blank'

#3

Jeremy - October 28, 2009 - 21:20

Why not just go to Administer >> Content management >> Ads >> Settings >> Global settings and enable this globally? Set click-through target to 'new browser window'. This will affect all advertisements, image ads included.

#4

Jeremy - November 22, 2009 - 18:55
Status:active» fixed

No further feedback, hopefully the configuration option worked for you. Closing.

#5

System Message - December 6, 2009 - 19:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.