rendered paste body<?php
// ---------------------------------------------------------------------------
// Drupal hooks
/**
* Implementation of hook_help
*/
function views_bookmark_help($section) {
switch($section) {
case "admin/modules#description":
return t("This module allows you to create customized 'bookmarks' that individual users can set on nodes.");
}
}
/**
* Implementation of hook_menu
*/
function views_bookmark_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'admin/views_bookmark',
'title' => t('views bookmarks'),
'callback' => 'views_bookmark_admin_page',
'access' => user_access('administer views bookmark'),
'type' => MENU_NORMAL_ITEM);
$items[] = array('path' => 'admin/views_bookmark/edit',
'title' => t('edit view'),
'callback' => 'views_bookmark_edit_page',
'access' => user_access('administer views bookmark'),
'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/views_bookmark/delete',
'title' => t('delete view'),
'callback' => 'views_bookmark_delete_page',
'access' => user_access('administer views bookmark'),
'type' => MENU_CALLBACK);
$items[] = array('path' => 'admin/views_bookmark/list',
'title' => t('list'),
'callback' => 'views_bookmark_admin_page',
'access' => user_access('administer views bookmark'),
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1);
$items[] = array('path' => 'admin/views_bookmark/add',
'title' => t('add'),
'callback' => 'views_bookmark_edit_page',
'access' => user_access('administer views bookmark'),
'type' => MENU_LOCAL_TASK);
$items[] = array('path' => 'views_bookmark',
'title' => t('bookmark'),
'callback' => 'views_bookmark_page',
'access' => user_access('access content'),
'type' => MENU_CALLBACK);
}
return $items;
}
/**
* Implementation of hook_perm
*/
function views_bookmark_perm() {
return array('administer views bookmark');
}