/[drupal]/contributions/modules/fast_gallery/fast_gallery.admin.inc
ViewVC logotype

Diff of /contributions/modules/fast_gallery/fast_gallery.admin.inc

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

revision 1.15, Thu Nov 5 04:53:17 2009 UTC revision 1.16, Mon Nov 9 07:29:05 2009 UTC
# Line 5  function _fast_gallery_gallery_form($key Line 5  function _fast_gallery_gallery_form($key
5    $form = array(    $form = array(
6      '#tree' => TRUE,      '#tree' => TRUE,
7    );    );
   
8    // We'll manually set the #parents property of these fields so that    // We'll manually set the #parents property of these fields so that
9    // their values appear in the $form_state['values']['choice'] array.    // their values appear in the $form_state['values']['choice'] array.
10    $form['chid'] = array(    $form['chid'] = array(
# Line 92  function fast_gallery_general_settings_f Line 91  function fast_gallery_general_settings_f
91    
92    // We name our button 'poll_more' to avoid conflicts with other modules using    // We name our button 'poll_more' to avoid conflicts with other modules using
93    // AJAX-enabled buttons with the id 'more'.    // AJAX-enabled buttons with the id 'more'.
94    $form['gallery_wrapper']['fg_more'] = array(    //TODO: this still needs some work....
95      /*$form['gallery_wrapper']['fg_more'] = array(
96      '#type' => 'submit',      '#type' => 'submit',
97      '#value' => t('Add gallery'),      '#value' => t('Add gallery'),
98      '#description' => t("If the amount of boxes above isn't enough, click here to add more choices."),      '#description' => t("If the amount of boxes above isn't enough, click here to add more choices."),
# Line 104  function fast_gallery_general_settings_f Line 104  function fast_gallery_general_settings_f
104        'method' => 'replace',        'method' => 'replace',
105        'effect' => 'fade',        'effect' => 'fade',
106    ),    ),
107    );    );*/
108    
109    $form['fg_setup'] = array(    $form['fg_setup'] = array(
110      '#type' => 'fieldset',      '#type' => 'fieldset',
# Line 116  function fast_gallery_general_settings_f Line 116  function fast_gallery_general_settings_f
116    $engines = module_invoke_all('fast_gallery_info');    $engines = module_invoke_all('fast_gallery_info');
117    
118    $ar_engines = array();    $ar_engines = array();
119    foreach ($engines['storageengine'] as $key => $engine) {    foreach ($engines['storageengine'] as $engine) {
120      $ar_engines[$key] = $engine['name'];      $ar_engines[$engine['key']] = $engine['name'];
121    }    }
122    
123    $form['fg_setup']['fg_storage_engine'] = array(    $form['fg_setup']['fg_storage_engine'] = array(
# Line 252  function fast_gallery_general_settings_f Line 252  function fast_gallery_general_settings_f
252        $ar_galleries[$gallery['fg_path']] = $gallery;        $ar_galleries[$gallery['fg_path']] = $gallery;
253      }      }
254    }    }
255    variable_set('fg_galleries', $ar_galleries);    variable_set('fg_galleries', $ar_galleries); //save the galleries
256    
257    menu_rebuild();    $engines = module_invoke_all('fast_gallery_info');
258      variable_set('fg_storage_engine', $engines['storageengine'][$form_state['values']['fg_storage_engine']]); //save the storageengine
259    
260      menu_rebuild();//prepare the paths for newly built galleries
261  }  }
262    
263    /**
264     * Ajax handler when hitting some of the buttons
265     * @param $form
266     * @param $form_state
267     */
268  function fast_gallery_ajax_handler($form, $form_state) {  function fast_gallery_ajax_handler($form, $form_state) {
269    $fg = fast_gallery_get_FastGallery();    $fg = fast_gallery_get_FastGallery();
270    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.2