Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // $Id: customsite.module
- /**
- * @file
- * Custom functions for this site.
- */
- /**
- * Display help and module information
- * @param path which path of the site we're displaying help
- * @param arg array that holds the current path as would be returned from arg() function
- * @return help text for the path
- */
- function customsite_help($path, $arg) {
- $output = ''; //declare your output variable
- switch ($path) {
- case "admin/help#customsite":
- $output = '<p>'. t("My custom test module") .'</p>';
- break;
- }
- return $output;
- } // function customsite_help
- function customsite_perm()
- {
- return array('create customsite', 'edit customsite', 'access customsite');
- }
- function customsite_access($op, $node, $account) {
- return NULL;
- }
- function customsite_admin() {
- $form = array();
- $form['customsite_maxdisp'] = array(
- '#type' => 'textfield',
- '#title' => t('Maximum number of links'),
- '#default_value' => variable_get('customsite_maxdisp', 3),
- '#size' => 2,
- '#maxlength' => 2,
- '#description' => t("The maximum number of links to display in the this customsite module."),
- '#required' => TRUE,
- );
- return system_settings_form($form);
- }
- function customsite_menu() {
- $items = array();
- $items['admin/settings/customsite'] = array(
- 'title' => t('customsite settings'),
- 'description' => 'Description for this module',
- 'page_callback' => 'drupal_get_form',
- 'page_arguments' => array('customsite_admin'),
- 'access_arguments' => array('access administration pages'),
- 'type' => MENU_NORMAL_ITEM,
- );
- $items['customsite'] = array(
- 'title' => 'Customsite',
- 'page_callback' => 'customsite_all',
- 'access_arguments' => array('access customsite content'),
- 'type' => MENU_CALLBACK
- );
- return $items;
- }
- function customsite_all()
- {
- $page_content = '<p>blablablablabla test test test page content<br /></p>';
- }
Add Comment
Please, Sign In to add comment