View source
<?php
module_load_include('inc', 'brilliant_gallery', 'brilliant_gallery_menu');
module_load_include('inc', 'brilliant_gallery', 'brilliant_gallery_config');
module_load_include('inc', 'brilliant_gallery', 'brilliant_gallery');
module_load_include('inc', 'brilliant_gallery', 'brilliant_gallery_formatters');
module_load_include('inc', 'brilliant_gallery', 'brilliant_gallery_cron');
function brilliant_gallery_views_api() {
return array(
'api' => 3,
'path' => drupal_get_path('module', 'brilliant_gallery') . '/views',
);
}
function brilliant_gallery_views_default_views() {
$path = __DIR__ . '/views/default/*.view.inc';
$views = array();
foreach (glob($path) as $views_filename) {
$view = FALSE;
require_once $views_filename;
$views[$view->name] = $view;
unset($view);
}
return $views;
}
function brilliant_gallery_permission() {
return array(
'access brilliant_gallery' => array(
'title' => t('Access Brilliant Gallery'),
'description' => t('Allow access to Brilliant Gallery.'),
),
'administer brilliant_gallery' => array(
'title' => t('Administer Brilliant Gallery'),
'description' => t('Set roles that may access the settings of Brilliant Gallery.'),
),
);
}
function brilliant_gallery_help($path, $arg) {
switch ($path) {
case "admin/help#brilliant_gallery":
return '<h3>' . t('About') . '</h3>' . '<p>' . t("Highly customizable Drupal module creating a table gallery of quality-scaled images from any number of folders.") . '</p>';
}
}
function brilliant_gallery_perms() {
drupal_goto('admin/people/permissions', array(
'fragment' => 'module-brilliant_gallery',
));
}
function brilliant_gallery_filter_info() {
$filters = array();
$filters['filter_brilliant_gallery'] = array(
'title' => t('Brilliant Gallery tag'),
'description' => t('Substitutes a special Brilliant Gallery tag [bg|...] with the actual gallery table.'),
'prepare callback' => 'brilliant_gallery_filter_brilliant_gallery_prepare',
'process callback' => 'brilliant_gallery_filter_brilliant_gallery_process',
);
return $filters;
}
function brilliant_gallery_filter_brilliant_gallery_prepare($text, $filter) {
return $text;
}
function brilliant_gallery_filter_brilliant_gallery_process($text, $filter) {
$text = brilliant_gallery_replace_tags($text);
return $text;
}