diff options
-rw-r--r-- | jquery_gallery_view.module | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/jquery_gallery_view.module b/jquery_gallery_view.module index 6ac2c58..329248b 100644 --- a/jquery_gallery_view.module +++ b/jquery_gallery_view.module @@ -45,15 +45,15 @@ function jquery_gallery_view_field($fields) { * @param $view * View data. */ -function jquery_gallery_view_setup_photos($view) { +function jquery_gallery_view_setup_photos($view, $field) { // Setup files folder $files = variable_get('file_directory_path', conf_path() .'/files'); foreach ($view->result as $result) { - $fid = $result->node_data_field_photo_fid; + $fid = $result->{'node_data_field_'. $field .'_fid'}; if ($fid != NULL) { $file = field_file_load($fid); - $data = unserialize($result->node_data_field_photo_data); + $data = unserialize($result->{'node_data_field_'. $field .'_data'}); $photos[] = array( 'filename' => $file['filename'], 'title' => $data['title'], @@ -63,6 +63,7 @@ function jquery_gallery_view_setup_photos($view) { // Add needed javascript drupal_add_js(array('jqueryGalleryView' => array('photos' => $photos)), 'setting'); - drupal_add_js(drupal_get_path('module', 'jqueryGalleryView') .'/js/jquery-galleryview/jquery.galleryview-2.1.1-pack.js'); - drupal_add_js(drupal_get_path('module', 'jqueryGalleryView') .'/js/jquery-galleryview/jquery.timers-1.2.js'); + drupal_add_js(drupal_get_path('module', 'jquery_gallery_view') .'/js/jquery-gallery_view.js'); + drupal_add_js(drupal_get_path('module', 'jquery_gallery_view') .'/js/jquery-galleryview/jquery.galleryview-2.1.1-pack.js'); + drupal_add_js(drupal_get_path('module', 'jquery_gallery_view') .'/js/jquery-galleryview/jquery.timers-1.2.js'); } |