Closed (works as designed)
Project:
SimpleAds
Version:
7.x-1.7
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2012 at 17:45 UTC
Updated:
18 Apr 2012 at 20:09 UTC
I tried to add other types of Image Ad types and not getting anywhere. Is it possible to add multiple "graphic" ad types to the content type field settings? Or, is there another way I have to make this work.
I'm hoping to add graphic|Homerun Ad, graphic|Triple Ad, etc. for our baseball league and have it correctly crop and scale the ad images to fit in specific block locations on the website. I've already defined the images styles, just need to add the Ad Types to the list.
Cheers
Comments
Comment #1
minnur commentedHi,
You cannot add new graphic types this way. I would recommend you to add new Text List field (drop-down list) and add those type to it.
And then take themable template from SimpleAds (simpleads_img_element.tpl.php) module and copy to your theme folder.
Then copy simpleads_preprocess_simpleads_img_element from simpleads.module file to your theme's template.php, rename it to YOUR_THEME_NAME_preprocess_simpleads_img_element and add your logic there.
$vars['ad']['nid'] has node id of the ad so you can use node_load or custom SQL query to get values from added Text list field.
Thanks.
Comment #2
jaskegreen commentedThanks for the feedback. I might give this a go if I can find some time around my kids' activities.
Cheers
Comment #3
minnur commented