You are here

function simpleads_menu in SimpleAds 7

Same name and namespace in other branches
  1. 7.2 simpleads.module \simpleads_menu()

Implements hook_menu().

File

./simpleads.module, line 38

Code

function simpleads_menu() {
  $items = array();
  $items['simpleads/load/%/%'] = array(
    'title' => 'Display Ads',
    'page callback' => '_simpleads_show_ads',
    'page arguments' => array(
      2,
      3,
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['admin/content/simpleads/%simpleadsid/stat'] = array(
    'title' => 'Ad Statistics',
    'page callback' => '_simpleads_stat_tab',
    'page arguments' => array(
      3,
    ),
    'access arguments' => array(
      'access ad statistics',
    ),
    'weight' => 15,
    'type' => MENU_LOCAL_TASK,
    'file' => 'simpleads.stat.inc',
  );
  $items['node/%simpleadsid/stat'] = array(
    'title' => 'Ad Statistics',
    'page callback' => '_simpleads_stat_tab',
    'page arguments' => array(
      1,
    ),
    'access callback' => '_simpleads_node_stat_tab',
    'weight' => 15,
    'type' => MENU_LOCAL_TASK,
    'file' => 'simpleads.stat.inc',
  );
  $items['admin/content/simpleads'] = array(
    'title' => 'Ads List',
    'page callback' => '_simpleads_listing',
    'access arguments' => array(
      'access ad statistics',
    ),
    'weight' => 15,
    'type' => MENU_LOCAL_TASK,
    'file' => 'simpleads.stat.inc',
  );
  $items['admin/content/simpleads/create_ad'] = array(
    'title' => 'Create new Ad',
    'page callback' => '_simpleads_new_add',
    'access callback' => '_simpleads_access_callback',
    'weight' => 15,
    'type' => MENU_LOCAL_ACTION,
  );
  $items['admin/content/simpleads/create_ad_group'] = array(
    'title' => 'Create new Ad Group',
    'page callback' => '_simpleads_new_group_add',
    'access callback' => '_simpleads_access_callback',
    'weight' => 15,
    'type' => MENU_LOCAL_ACTION,
  );
  $items['simpleads/redirect/%'] = array(
    'title' => 'Redirect Ads',
    'page callback' => '_simpleads_redirect',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['simpleads/dashboard/%'] = array(
    'title' => 'SimpleAds Filter',
    'description' => 'Filter Dashboard',
    'page callback' => '_simpleads_filter_dashboard_page',
    'access arguments' => array(
      'administer nodes',
    ),
    'type' => MENU_CALLBACK,
    'page arguments' => array(
      2,
    ),
    'theme callback' => '_simpleads_filter_dashboard_theme',
  );
  return $items;
}