Closed (outdated)
Project:
Advertisement
Version:
6.x-2.2-rc1
Component:
ad module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Apr 2010 at 20:47 UTC
Updated:
19 Sep 2024 at 11:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
arcane commentedI know this is a global setting, but just wanted to check if I missed anything. My desired behavior is for internal links to open in the same browser window and for external links to open in a new browser window.
Comment #2
arcane commentedI located the code for Image Ad, so I'll see if I can make the changes and perhaps roll a patch.
Comment #3
arcane commentedI've created a patch that includes a dropdown field for Click-target for Image Ads. It includes the update hook to add the extra column in the database.
It uses the same options as the Global Settings for the target and generates the same html code using the existing onclick code.
To test the patch, download and run from ad/image directory. Afterwards, run update.php and then create a new image advertisement.
The patch was generated against version = "6.x-2.2".
Comment #4
marcinsdance commentedThanks a lot, I've used this on our site and it works great! Exactly what I needed.
Comment #5
arcane commentedThere is a flaw in this patch in that it only supports Safari browser. There is a quick fix I will post and update the patch.
Comment #6
ericpai commentedI have the patch installed, but when attaching an Ad image I get this output after clicking the "Attach" button:
{ "status": true, "data": "\x3cdiv class=\"messages error\"\x3e\n \x3cul\x3e\n \x3cli\x3ewarning: Parameter 2 to ad_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to ad_channel_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to ad_owners_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to ad_weight_probability_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to audio_attach_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to audio_feeds_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to audio_getid3_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to audio_images_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to video_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to ckeditor_swf_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to xmlsitemap_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3cli\x3ewarning: Parameter 2 to xmlsitemap_node_form_alter() expected to be a reference, value given in C:\\xampp\\htdocs\\drupal_shared\\html\\includes\\common.inc on line 2883.\x3c/li\x3e\n \x3c/ul\x3e\n\x3c/div\x3e\n\x3ctable id=\"upload-attachments\" class=\"sticky-enabled\"\x3e\n \x3cthead\x3e\x3ctr\x3e\x3cth\x3e\x3c/th\x3e\x3cth\x3eDelete\x3c/th\x3e\x3cth\x3eList\x3c/th\x3e\x3cth\x3eDescription\x3c/th\x3e\x3cth\x3eWeight\x3c/th\x3e\x3cth\x3eSize\x3c/th\x3e \x3c/tr\x3e\x3c/thead\x3e\n\x3ctbody\x3e\n \x3ctr class=\"draggable odd\"\x3e\x3ctd\x3e\x3c/td\x3e\x3ctd\x3e\x3cdiv class=\"form-item\" id=\"edit-files-307-remove-wrapper\"\x3e\n \x3cinput type=\"checkbox\" name=\"files[307][remove]\" id=\"edit-files-307-remove\" value=\"1\" class=\"form-checkbox\" /\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd\x3e\x3cdiv class=\"form-item\" id=\"edit-files-307-list-wrapper\"\x3e\n \x3cinput type=\"checkbox\" name=\"files[307][list]\" id=\"edit-files-307-list\" value=\"1\" checked=\"checked\" class=\"form-checkbox\" /\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd\x3e\x3cdiv class=\"form-item\" id=\"edit-files-307-description-wrapper\"\x3e\n \x3cinput type=\"text\" maxlength=\"256\" name=\"files[307][description]\" id=\"edit-files-307-description\" size=\"60\" value=\"ad_125x125_2_blue.jpg\" class=\"form-text\" /\x3e\n \x3cdiv class=\"description\"\x3e\x3csmall\x3ehttp://mysite.com/sites/mysite.com/files/ad_125x125_2_blue_2.jpg\x3c/small\x3e\x3c/div\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd\x3e\x3cdiv class=\"form-item\" id=\"edit-files-307-weight-wrapper\"\x3e\n \x3cselect name=\"files[307][weight]\" class=\"form-select upload-weight\" id=\"edit-files-307-weight\" \x3e\x3coption value=\"-1\"\x3e-1\x3c/option\x3e\x3coption value=\"0\" selected=\"selected\"\x3e0\x3c/option\x3e\x3coption value=\"1\"\x3e1\x3c/option\x3e\x3c/select\x3e\n\x3c/div\x3e\n\x3c/td\x3e\x3ctd\x3e2.8 KB\x3c/td\x3e \x3c/tr\x3e\n\x3c/tbody\x3e\n\x3c/table\x3e\n\x3cdiv class=\"form-item\" id=\"edit-upload-wrapper\"\x3e\n \x3clabel for=\"edit-upload\"\x3eAttach new file: \x3c/label\x3e\n \x3cinput type=\"file\" name=\"files[upload]\" class=\"form-file\" id=\"edit-upload\" size=\"40\" /\x3e\n\n \x3cdiv class=\"description\"\x3eThe maximum upload size is \x3cem\x3e100 MB\x3c/em\x3e. Only files with the following extensions may be uploaded: \x3cem\x3ejpg jpeg gif png txt html doc xls pdf ppt pps avi mpeg mpg mov rm m4v flv wmv 3gp mp4 dir dcr ogg\x3c/em\x3e. \x3c/div\x3e\n\x3c/div\x3e\n\x3cinput type=\"submit\" name=\"attach\" id=\"edit-attach\" value=\"Attach\" class=\"form-submit\" /\x3e\n" }
Any idea why this is happening?
thanks
Comment #7
ericpai commentedIt was a problem with the field name of "target". I changed it to "target_window" and it worked.
Thank you for the patch!!
Comment #8
lrwebks commentedDrupal 6 is EOL and no longer supported. Closing this as outdated for that reason. Thanks for your contribution!