openX addbanner HELP!! |
[eluser]Unknown[/eluser]
anyone of this forum can help me on how to add banner using the openx api for codeigniter.. i can add advertiser and campaign using this code: /*advertiser*/ $advertiser = array( "advertiserName"=>'tiser12', "contactName"=>'contact1', "emailAddress"=>'[email protected]' ); $advertiserId = $this->openx->addAdvertiser($advertiser); /*Campaign*/ $campaign = array( "advertiserId"=>$advertiserId, "campaignName"=>'campaign1' ); $campaignId = $this->openx->addCampaign($campaign); how about for the banner..help please...thanks...
[eluser]jmadsen[/eluser]
looking at the docs here: http://www.ecliptik.net/en/openx.html it seems you make a zone, then link the banner to it: Code: Add a new zone give that a try and see if it works
[eluser]Unknown[/eluser]
actually that is my reference in creating an advertiser and campaign but in that article it doesn't show on how to add a banner it only show on how to link a zone into a banner...all I want to know is on how to upload a banner using the openx api through codeigniter.. by the way...thanks for the reply...hoping for more replies...thanks
[eluser]Phoz[/eluser]
Code: $banner = array( See http://www.openx.com/community/developers for reference and examples. You might run into the error XML error: Invalid character at line 38. This has to do with the Openx library (Openx.php, around line 155) which recognizes $banner['aImage']['content'] as string which should be base64. Look on the internet on how to determine if the $value is binary, so should be 'base64'. Working on this myself now.
[eluser]Phoz[/eluser]
How I solved the XML error: Create a custom class File.php and include this Code: <?php Set the image content variable like this: Code: 'content' => new File($_FILES['banner']['tmp_name']) Change the Openx.php code from line 151: Code: default : |
Welcome Guest, Not a member yet? Register Sign In |