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

minnur’s picture

Hi,

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.

jaskegreen’s picture

Thanks for the feedback. I might give this a go if I can find some time around my kids' activities.

Cheers

minnur’s picture

Status: Active » Closed (works as designed)