Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define ('KREALINKS_MULTIPOLL_NO_JUMP', -1);
- define ('KREALINKS_MULTIPOLL_OPEN,', 0);
- define ('KREALINKS_MULTIPOLL_SINGLE', 1);
- define ('KREALINKS_MULTIPOLL_MULTI', 2);
- define ('KREALINKS_MULTIPOLL_MAX_ANSWERS', 9);
- define ('KREALINKS_MULTIPOLL_VISIBLE', 1);
- define ('KREALINKS_MULTIPOLL_NOT_VISIBLE', 0);
- /**
- * hook_menu implementation
- */
- function krealinks_multipoll_settings_menu() {
- $items['multipoll_settings'] = array(
- 'title' => t('Multipoll settings'),
- 'page callback' => 'krealinks_present_multipolls',
- 'access arguments' => array('access content'),
- 'access callback' => TRUE,
- );
- $items['multipoll_settings/%poll'] = array(
- 'title' => t('Multipoll settings'),
- 'page callback' => 'return_empty',
- 'access arguments' => array('access content'),
- 'access callback' => TRUE,
- );
- $items['multipoll_settings/%poll/question/%question'] = array(
- 'title' => t('Multipoll settings'),
- 'page callback' => 'return_empty',
- 'access arguments' => array('access content'),
- 'access callback' => TRUE,
- );
- return $items;
- }
- function krealinks_multipoll_settings_menu_block() {
- switch ($op) {
- case 'list':
- // REGION: A CLASSER
- // *****************
- // BLOCK: PRIZE CREATION
- $blocks['multipoll_question_edit'] = array(
- 'info' => 'Edit multipoll question',
- 'visibility' => 2,
- 'pages' => '<?php if (arg(0) == "multipoll_settings") return TRUE; ?>',
- 'region' => 'content',
- 'status' => 1,
- );
- // BLOCK: PRIZE CREATION
- $blocks['multipoll_question_list'] = array(
- 'info' => 'List of multiple questions',
- 'visibility' => 2,
- 'pages' => '<?php if (arg(0) == "multipoll_settings") return TRUE; ?>',
- 'region' => 'content',
- 'status' => 1,
- );
- return $blocks;
- break;
- case 'view':
- switch ($delta) {
- case 'multipoll_question_edit':
- $block['content'] = drupal_get_form('krealinks_form_add_question');
- break;
- case 'multipoll_question_list':
- $block['content'] = drupal_get_form('krealinks_form_sort_question');
- break;
- }
- return $block;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement