I am using the banner maodule and was wondering if anyone had successfully used banners from an external site (ie full urls instead of hosting the banners myself)?

The reason is that some affiliate banners i use will change according to their latest offers, and get tracked on the affiliate site...and as such they need to remotely hosted, not uploaded to my drupal site.

Any ideas?

Comments

murph’s picture

I have just discovered that i have to use remotely hosted banners, but yet i need to use the banner module! :-/

Can anyone tell me a way of using direct urls to the images instead of having to upload banners, or is this impossible? I did wonder whether this would stop the tracking ability? Anyone?

Please help me on this!

murph’s picture

I notice that the variable stored in the db is called $path. I have manually replaced some of my banner image paths to display the direct url to the hosted image.

I then hacked the banner.module file at function theme_banner_show.

I replaced the img src='$filename' with img src='$banner->path'

 $filename = file_create_url("$banner->path");

  switch(_banner_type($banner->format)) {
    case 'image':
      return l("<img src='$banner->path' border=0 width='$banner->width' height='$banner->height'>", "banner/$banner->id", array(), NULL, NULL, FALSE, TRUE);

Hopefully this little hack might some other users wanting remotely hosted banners in the banner module :)

murph’s picture

I have discovered just one problem with using remotely located images via the banner module...

It causes page rendering delays as the browser is waiting for the JavaScript ad to arrive to fully render the page.

Can't see a solution for this, as there is no way of telling the browser how big it is going to be and so letting the rest of the page render whilst waiting for the remote banner to load. :(

murph’s picture

or is this banner module set up in a weird way?

Surely it would be a good idea to have each banner be shown on pages that are specified, in a similar way to nodes? As it stands i have to:

1. Create the banner, assign a unique group id.
2. Create a flexiblock and paste the banner call with that same unique group id.
3. Then assign the flexiblock to the same position for all banners (ie 9)

Then repeat 1-3 for each banner (creating as many flexiblocks as banners/groups)

In this way, each banner has to have it's own group, and 10 is the limit. (I have to do this, as i need to have a certain different banner per page.)

If each banner could be assigned pages or not pages, then i could assign all banners to the same group and have just 1 flexiblock!

0207100’s picture

Ideally the quickest method to load banners is by using an iFrame, all the major banner delivery firms use iFrams, DoubleClick, Dart, VCM, Atlas.... well the list goes on.

With an iFram it will not matter how long the banner takes to load as you page load is seperate to the iFrame

murph’s picture

how cross-browser are iframes thesedays? I wouldn't want to deny a % of my users from seeing these banners...

trueMarketing’s picture

Hello,
I posted a thread about a similar issue a few days ago but it was concerning pulling in text ads (not Google Adsense) in the form of XML feeds.

Discussion:
http://drupal.org/node/50079

A couple of quick notes is, as I understand it, you can install phpadsnew on your server (or a remote server) and create as many ad campaigns you want there and pull them in via XML and simply associate the xml feed/ads to a single keyword. They can be banner, text, etc.

This is what MSN and Yahoo uses whenever you type in a search on either site (for example, it's the light green box with three ads at the top of the page under the search field on MSN), and the payout is astoundingly better than Adsense.

All you would need is one keyword associated with each node/page so that you can pull in the most appropriate xml ad per page and drop in the xml code in the node.tpl.php file above the content/product/review/article or whatever the page has on it.

Maybe using the nodewords module would work here and just reference the "keywords" meta tag. But lke I said, you can only have one keyword, not many to pull in the most relevant ads.

We get a lot more revenue than you can hope to make with Google Adsense by integrating with Infospace, who feeds us ads from Google and Overture PPC partners - from $0.80 to $6.00 per click on average.

I may just have to get some custom programming done, but by doing this you can skip using the banners module and have only one place in the node.tpl.php file where the code is inserted to pull the ad feeds.

SEOPosition.com
SEO Company
Offering Pure CSS Design, Web Optimization & SEO Consulting

murph’s picture

a copy of the phpadsnew module?? I would be v interested in using this software, but haven't got the ability to code something like that myself....