Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.27 KB | None | 0 0
  1. <?php
  2.  
  3. define ('KREALINKS_MULTIPOLL_NO_JUMP', -1);
  4. define ('KREALINKS_MULTIPOLL_OPEN,', 0);
  5. define ('KREALINKS_MULTIPOLL_SINGLE', 1);
  6. define ('KREALINKS_MULTIPOLL_MULTI', 2);
  7. define ('KREALINKS_MULTIPOLL_MAX_ANSWERS', 9);
  8. define ('KREALINKS_MULTIPOLL_VISIBLE', 1);
  9. define ('KREALINKS_MULTIPOLL_NOT_VISIBLE', 0);
  10.  
  11. /**
  12. * hook_menu implementation
  13. */
  14. function krealinks_multipoll_settings_menu() {
  15.   $items['multipoll_settings'] = array(
  16.     'title' => t('Multipoll settings'),
  17.     'page callback' => 'krealinks_present_multipolls',
  18.     'access arguments' => array('access content'),
  19.     'access callback' => TRUE,
  20.   );
  21.   $items['multipoll_settings/%poll'] = array(
  22.     'title' => t('Multipoll settings'),
  23.     'page callback' => 'return_empty',
  24.     'access arguments' => array('access content'),
  25.     'access callback' => TRUE,
  26.   );
  27.   $items['multipoll_settings/%poll/question/%question'] = array(
  28.     'title' => t('Multipoll settings'),
  29.     'page callback' => 'return_empty',
  30.     'access arguments' => array('access content'),
  31.     'access callback' => TRUE,
  32.   );  
  33.   return $items;
  34. }
  35.  
  36.  
  37. function krealinks_multipoll_settings_menu_block() {
  38.    switch ($op) {
  39.     case 'list':
  40.       // REGION: A CLASSER
  41.       // *****************
  42.  
  43.       // BLOCK: PRIZE CREATION
  44.       $blocks['multipoll_question_edit'] = array(
  45.         'info'       => 'Edit multipoll question',
  46.         'visibility' => 2,
  47.         'pages'      => '<?php if (arg(0) == "multipoll_settings") return TRUE; ?>',
  48.         'region'     => 'content',
  49.         'status'     => 1,
  50.       );
  51.       // BLOCK: PRIZE CREATION
  52.       $blocks['multipoll_question_list'] = array(
  53.         'info'       => 'List of multiple questions',
  54.         'visibility' => 2,
  55.         'pages'      => '<?php if (arg(0) == "multipoll_settings") return TRUE; ?>',
  56.         'region'     => 'content',
  57.         'status'     => 1,
  58.       );      
  59.       return $blocks;
  60.       break;
  61.     case 'view':
  62.       switch ($delta) {
  63.         case 'multipoll_question_edit':
  64.           $block['content'] = drupal_get_form('krealinks_form_add_question');
  65.           break;  
  66.         case 'multipoll_question_list':
  67.           $block['content'] = drupal_get_form('krealinks_form_sort_question');
  68.           break;        
  69.       }
  70.       return $block;
  71.    }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement