| 1 |
<?php
|
| 2 |
/**
|
| 3 |
* $Id: slideshow_creator.module,v 1.3 2008/02/15 22:30:04 brmassa Exp $
|
| 4 |
* @author Bruno Massa http://drupal.org/user/67164
|
| 5 |
* @file slideshow_creator.module
|
| 6 |
* Create true slideshows using any image over internet with many other features.
|
| 7 |
*
|
| 8 |
* @note only hooks are here. For other function see slideshow_creator.inc
|
| 9 |
* and slideshow_creator.cck.inc for spedific CCK functions
|
| 10 |
*/
|
| 11 |
|
| 12 |
// Add the CCK complement if the module is enabled
|
| 13 |
if (module_exists('content')) {
|
| 14 |
require_once(drupal_get_path('module', 'slideshow_creator') .'/slideshow_creator.cck.inc');
|
| 15 |
}
|
| 16 |
|
| 17 |
/**
|
| 18 |
* Implementation of hook_filter().
|
| 19 |
*/
|
| 20 |
function slideshow_creator_filter($op, $delta = 0, $format = -1, $text = '') {
|
| 21 |
switch ($op) {
|
| 22 |
case 'description':
|
| 23 |
return t('Create true slideshows using any image over internet with many other features.');
|
| 24 |
case 'list':
|
| 25 |
return array(0 => t('Slideshow Creator'));
|
| 26 |
case 'name':
|
| 27 |
return t('Slideshow Creator');
|
| 28 |
case 'no cache':
|
| 29 |
return TRUE;
|
| 30 |
case 'prepare':
|
| 31 |
return $text;
|
| 32 |
case 'process':
|
| 33 |
include drupal_get_path('module', 'slideshow_creator') .'/slideshow_creator.inc';
|
| 34 |
return _slideshow_creator_process_text($text);
|
| 35 |
}
|
| 36 |
}
|
| 37 |
|
| 38 |
/**
|
| 39 |
* Implementation of hook_filter_tips().
|
| 40 |
*/
|
| 41 |
function slideshow_creator_filter_tips($delta, $format, $long = FALSE) {
|
| 42 |
return t('Slideshows can be added to this post.');
|
| 43 |
}
|
| 44 |
|
| 45 |
/**
|
| 46 |
* Implementation of hook_help().
|
| 47 |
*/
|
| 48 |
function slideshow_creator_help($path, $arg) {
|
| 49 |
if ($path == 'admin/modules#description') {
|
| 50 |
return t('Create true slideshows using any image over internet with many other features.');
|
| 51 |
}
|
| 52 |
elseif ($path == 'node/add#slideshow_creator') {
|
| 53 |
return t('Slideshows are a series of images that are shown after each other. In modern browsers, the images are changed without reloading the entire page using JavaScript.');
|
| 54 |
}
|
| 55 |
}
|
| 56 |
|
| 57 |
/**
|
| 58 |
* Implementation of hook_theme().
|
| 59 |
*/
|
| 60 |
function slideshow_creator_theme() {
|
| 61 |
return array(
|
| 62 |
'slideshow_creator' => array(
|
| 63 |
'arguments' => array('ssid' => NULL, 'links' => NULL, 'ss' => NULL),
|
| 64 |
'file' => 'slideshow_creator.inc'
|
| 65 |
)
|
| 66 |
);
|
| 67 |
}
|