/[drupal]/contributions/modules/fast_gallery/fast_gallery.module
ViewVC logotype

Diff of /contributions/modules/fast_gallery/fast_gallery.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.61, Thu Nov 5 04:53:17 2009 UTC revision 1.62, Mon Nov 9 07:29:05 2009 UTC
# Line 56  function fast_gallery_menu() { Line 56  function fast_gallery_menu() {
56    
57  /**  /**
58   * implementation of hook_fast_gallery_info()   * implementation of hook_fast_gallery_info()
59   * @return unknown_type   * Let's Fast Gallery know that we are implementing a storage engine
60     * The following structure is needed
61     * array(
62        'fg_version' => 2, the version of fast_gallery
63        'storageengine' => array(
64          'default' => array( //needs to be identical with the param key
65            'key' => 'default', //just an identifier for this engine
66            'name' => 'Default', //a human readable name
67            'file' => 'default.storage.inc', //the file where the class is located
68            'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine', //the path where the file is located
69           ),
70        ),
71      );
72     * @return array
73   */   */
74  function fast_gallery_fast_gallery_info() {  function fast_gallery_fast_gallery_info() {
75    return array(    return array(
76      'fg_version' => 2,      'fg_version' => 2,
77      'storageengine' => array(      'storageengine' => array(
78        'default' => array(        'default' => array(
79          'name' => 'default',          'key' => 'default',
80            'name' => 'Default',
81          'file' => 'default.storage.inc',          'file' => 'default.storage.inc',
82          'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine',          'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine',
83         ),         ),
84        'node' => array(        'node' => array(
85          'name' => 'name <not implemented!!!>',          'key' => 'node',
86            'name' => 'Node <not implemented!!!>',
87          'file' => 'node.storage.inc',          'file' => 'node.storage.inc',
88          'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine',          'path' => drupal_get_path('module', 'fast_gallery') . '/storageengine',
89        ),        ),
90      ),      ),
   
91    );    );
92  }  }
93    
# Line 85  function _fast_gallery_get_alias_count($ Line 99  function _fast_gallery_get_alias_count($
99    return count($ar);    return count($ar);
100  }  }
101    
102    /**
103     * Callbackfunction when hitting a gallery page
104     * @param $path
105     * @return unknown_type
106     */
107  function fast_gallery_page_alias($path) {  function fast_gallery_page_alias($path) {
108    $settings = variable_get('fg_galleries');    $settings = variable_get('fg_galleries');
109    
# Line 109  function fast_gallery_page_alias($path) Line 128  function fast_gallery_page_alias($path)
128        $image_html = l($image->renderHtml(), $current_path . '/' . $image->getName(), array('html' => TRUE));        $image_html = l($image->renderHtml(), $current_path . '/' . $image->getName(), array('html' => TRUE));
129      }      }
130      else {      else {
131        $image_html = l($image->renderHtml(), $image->getPath(), array('html' => TRUE));        $image_html = l($image->renderHtml() . '<br/>' . $image->getName(), $image->getPath(), array('html' => TRUE));
132    
133      }      }
134    
# Line 127  function fast_gallery_cron() { Line 146  function fast_gallery_cron() {
146    $fg->rescanGallery();    $fg->rescanGallery();
147  }  }
148    
149    function fast_gallery_file_delete($file) {
150      $fg = fast_gallery_get_FastGallery();
151      $fg->deleteFile($file);
152    }
153    
154  /**  /**
155   * Implementation of hook_theme   * Implementation of hook_theme
156   * @return array   * @return array
# Line 136  function fast_gallery_theme() { Line 160  function fast_gallery_theme() {
160      'fast_gallery_image' => array(      'fast_gallery_image' => array(
161        'variables' => array(        'variables' => array(
162          'image' => NULL,          'image' => NULL,
163            'name' => NULL,
164    ),    ),
165        'template' => 'fast_gallery-image',        'template' => 'fast_gallery-image',
166    ),    ),

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.62

  ViewVC Help
Powered by ViewVC 1.1.2