Thursday 29 April 2004 5:37:56 pm
There are two area's where I have created code: Firstly: Creating a new template operator that can call the PAN system. It works like so:
{let type='js',
what='zone:1'
context=array()}
{ads($type, $what, $context)}
{/let}
And it will fetch the appropriate ads. The second are is where I have modified the PAN code. I needed to allow non-technical users to create ads for certain types of content objects, for instance - pushing certain products and tracking the response of that by displaying an html advertisement for a Product contentobject conforming to a consistent format on the front page. So what I have done is created an advertisement view for the Product content object, that will generate the appropriate html for all products (featuring a box, a link to more information that is tracked by PAN, an image link to more information that is tracked by PAN and an html post form that instantly adds that product to a request more information form, that is also tracked by pan. Where I modified the PAN code is where an advertiser enters a new html banner. Instead of putting in the actual html, which would be impossible, due to the complexity of the html and also because they don't understand the need for consistency of look and brand on a website - even if I provided a cut and paste template people would modify it if they thought bright pink <h1> title look good etc ;-)..... they put in code like <url>http://www.mycompany.com/index.php/content/view/advertisement/8729</url> (which they can understand and enforces consistency) Then when PAN ads that ad to its db, it fetches that url, parses the html, modifies the href's and post forms for tracking purposes and places it in the db. Its an ok implementation and will do in the mean time. The next job is so that they can add adverts like that from inside ez. IE create a FrontPageProductAdvertisement contentobject that will allow them to select the content object by means of a select box. Then there would be a workflow event that would place the appropriate code in the db. Any suggestions or comments as to how it could be done better?
Regards, Willie
|