Closed (fixed)
Project:
Advertisement
Version:
6.x-2.1
Component:
ad module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Nov 2009 at 21:49 UTC
Updated:
24 Nov 2009 at 18:50 UTC
We get our affiliate ads via an API from a service that provides ads from its clients. I'm hoping that somebody has an module/function where I can pass the needed content in to create an ad node, so that I don't have to figure out the drupal_execute() call myself.
Comments
Comment #1
jeremy commentedAds are nodes, so you can create the node object and call node_save:
http://api.drupal.org/api/function/node_save
Be sure to set $node->title, $node->body, $node->adtype, and any fields required by the ad type (ie $node->url, $node->adheader and $node->adbody if a text ad). Take a look at ad_nodeapi() in ad.module, where $op == 'insert', as well as _adapi() in the appropriate ad_type module.
Comment #2
drm commentedHey - I just wanted to get back to you to let you know that I got this working.