You are here

function ad_node_info in Advertisement 6

Same name and namespace in other branches
  1. 5.2 ad.module \ad_node_info()
  2. 5 ad.module \ad_node_info()
  3. 6.3 ad.module \ad_node_info()
  4. 6.2 ad.module \ad_node_info()
  5. 7 ad.module \ad_node_info()

Implementation of hook_node_info().

File

./ad.module, line 468
An advertising system for Drupal powered websites.

Code

function ad_node_info() {
  $items['ad'] = array(
    'name' => t('Advertisement'),
    'module' => 'ad',
    'description' => t('Advertisements can be randomly displayed to visitors of your website.'),
  );
  $adtypes = ad_get_types('data');

  // New 'type' notation returns everything we need to define content type
  foreach ($adtypes as $type => $data) {
    $items['ad/' . $type] = $data;
  }
  return $items;
}