Panels IAB

Component ID

1244050

Component name

Panels IAB

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

1847

Component created

Component changed

Component body

This module provides a Pane for use in your panels when developing your website.

Both Google and IAB provide "placeholder" creatives in the standard sizes defined by the IAB (Internet Advertising Bureau). This module simply exposes a pane which hotlinks to an image provided by Google or IAB.

API

There is an API to this module if you would like to include your own ads for the pane. The module looks for hook_panels_iab_sizes. This gets implemented either as seen in the module itself (see panels_iab_panels_iab_sizes) or like this:

function example_panels_iab_sizes($data) {
  return array(
    'provider_a' => array(
      'title' => t('Provider A Name'),
      'groups' => array(
        'group_a' => array(
          'title' => t('Group Name'),
          'base url' => 'https://www.example.com/images/',
          'items' => array(
            'leaderboard.gif' => array(
              'width' => 728,
              'height' =>  90,
              'title' => t('Leaderboard'),
            ),
            'banner.gif' => array(
              'width' => 468,
              'height' =>  60,
              'title' => t('Banner'),
            ),
          ),
        ),
      ),
    ),
 );
}

The API is simply a nested array. You can provide as many "providers" and groups as you wish. Each Provider and Group must has a title. Each item must have a title, width and height. The "base url" must appear in a tree at some point, either on the item, group or provider. The system will use the most specific one it can find.

Resources

See: