comparison scald_dailymotion.module @ 7:f3040f91b65d

Add a manual search / import form
author Franck Deroche <franck@defr.org>
date Tue, 20 Jul 2010 11:57:23 +0200
parents f0e59759c605
children da69ba21d0c3
comparison
equal deleted inserted replaced
6:f0e59759c605 7:f3040f91b65d
49 'template' => 'scald_dailymotion_player' 49 'template' => 'scald_dailymotion_player'
50 ), 50 ),
51 'scald_dailymotion_imports_table' => array( 51 'scald_dailymotion_imports_table' => array(
52 'arguments' => array('form' => NULL), 52 'arguments' => array('form' => NULL),
53 'file' => 'scald_dailymotion.admin.inc' 53 'file' => 'scald_dailymotion.admin.inc'
54 ),
55 'scald_dailymotion_search_results_table' => array(
56 'arguments' => array('form' => NULL),
57 'file' => 'scald_dailymotion.pages.inc'
54 ) 58 )
55 ); 59 );
56 } 60 }
57 61
58 /** 62 /**
59 * Implements hook_perm. 63 * Implements hook_perm.
60 */ 64 */
61 function scald_dailymotion_perm() { 65 function scald_dailymotion_perm() {
62 return array('administer dailymotion imports'); 66 return array('administer dailymotion imports', 'import dailymotion videos');
63 } 67 }
64 68
65 /** 69 /**
66 * Implements hook_cron. 70 * Implements hook_cron.
67 */ 71 */
85 'page callback' => 'drupal_get_form', 89 'page callback' => 'drupal_get_form',
86 'page arguments' => array('scald_dailymotion_imports_form'), 90 'page arguments' => array('scald_dailymotion_imports_form'),
87 'access arguments' => array('administer dailymotion imports'), 91 'access arguments' => array('administer dailymotion imports'),
88 'description' => 'Configure the videos that should be automatically imported from DailyMotion', 92 'description' => 'Configure the videos that should be automatically imported from DailyMotion',
89 'file' => 'scald_dailymotion.admin.inc' 93 'file' => 'scald_dailymotion.admin.inc'
94 );
95 $items['dailymotion/search'] = array(
96 'title' => 'DailyMotion Video search',
97 'page callback' => 'drupal_get_form',
98 'page arguments' => array('scald_dailymotion_search_form', 2),
99 'access arguments' => array('import dailymotion videos'),
100 'description' => 'Search for new videos to import into this site',
101 'file' => 'scald_dailymotion.pages.inc'
90 ); 102 );
91 return $items; 103 return $items;
92 } 104 }
93 105
94 /** 106 /**