| 25 |
$items['admin/config/fast_gallery'] = array( |
$items['admin/config/fast_gallery'] = array( |
| 26 |
'title' => 'Fast Gallery', |
'title' => 'Fast Gallery', |
| 27 |
'description' => 'Configure the fast gallery module', |
'description' => 'Configure the fast gallery module', |
| 28 |
|
'page callback' => 'system_admin_menu_block_page', |
| 29 |
|
'file' => 'system.admin.inc', |
| 30 |
|
'access arguments' => array('administer fast gallery'), |
| 31 |
|
'file path' => drupal_get_path('module', 'system'), |
| 32 |
|
); |
| 33 |
|
|
| 34 |
|
$items['admin/config/fast_gallery/general'] = array( |
| 35 |
|
'title' => 'General configuration', |
| 36 |
|
'description' => 'Configure the fast gallery module', |
| 37 |
'page callback' => 'drupal_get_form', |
'page callback' => 'drupal_get_form', |
| 38 |
'page arguments' => array('fast_gallery_general_settings_form'), |
'page arguments' => array('fast_gallery_general_settings_form'), |
| 39 |
'access arguments' => array('administer fast gallery'), |
'access arguments' => array('administer fast gallery'), |
| 59 |
'title' => $gallery['fg_title'], |
'title' => $gallery['fg_title'], |
| 60 |
); |
); |
| 61 |
} |
} |
| 62 |
|
$engine = variable_get('fg_storage_engine', array()); |
| 63 |
|
|
| 64 |
|
$items[$engine['config']] = array( |
| 65 |
|
'title' => $engine['name'] . ' - Storage engine', |
| 66 |
|
'page callback' => $engine['config_callback'], |
| 67 |
|
'access arguments' => array('administer fast gallery'), |
| 68 |
|
'file path' => $engine['path'], |
| 69 |
|
'file' => $engine['config_file'], |
| 70 |
|
'description' => 'Specific configuration options for this storage engine' |
| 71 |
|
); |
| 72 |
//exit(); |
//exit(); |
| 73 |
return $items; |
return $items; |
| 74 |
} |
} |
| 85 |
'name' => 'Default', //a human readable name |
'name' => 'Default', //a human readable name |
| 86 |
'file' => 'default.storage.inc', //the file where the class is located |
'file' => 'default.storage.inc', //the file where the class is located |
| 87 |
'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', //the path where the file is located |
'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', //the path where the file is located |
| 88 |
|
'config' => 'admin/config/fast_gallery/default', //the path where the config is going to be |
| 89 |
|
'config_callback' => 'fast_gallery_default_config', //callback for this path |
| 90 |
|
'config_file' => 'default.config.inc', //the file where this callback needs to be -> folder is same as path |
| 91 |
), |
), |
| 92 |
), |
), |
| 93 |
); |
); |
| 102 |
'name' => 'Default', |
'name' => 'Default', |
| 103 |
'file' => 'default.storage.inc', |
'file' => 'default.storage.inc', |
| 104 |
'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', |
'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', |
| 105 |
|
'config' => 'admin/config/fast_gallery/default', |
| 106 |
|
'config_callback' => 'fast_gallery_default_config', |
| 107 |
|
'config_file' => 'default.config.inc', |
| 108 |
), |
), |
| 109 |
'node' => array( |
'node' => array( |
| 110 |
'key' => 'node', |
'key' => 'node', |
| 111 |
'name' => 'Node <not implemented!!!>', |
'name' => 'Node <not implemented!!!>', |
| 112 |
'file' => 'node.storage.inc', |
'file' => 'node.storage.inc', |
| 113 |
'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', |
'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', |
| 114 |
|
'config' => 'admin/config/fast_gallery/node', |
| 115 |
), |
), |
| 116 |
), |
), |
| 117 |
); |
); |
| 172 |
$fg->rescanGallery(); |
$fg->rescanGallery(); |
| 173 |
} |
} |
| 174 |
|
|
|
function fast_gallery_file_delete($file) { |
|
|
$fg = fast_gallery_get_FastGallery(); |
|
|
$fg->deleteFile($file); |
|
|
} |
|
| 175 |
|
|
| 176 |
/** |
/** |
| 177 |
* Implementation of hook_theme |
* Implementation of hook_theme |