Hi,

Thank you very much for this great module! :)

There are 2 buttons in the slideshow. Now my questions are:
1. How to attach/embed music to the photo slideshow?
2. There is a (I guess) "preference" button in the slideshow. Which possibilities provides this button and how to activate them?

I really would like to attach music to the slideshow.
Thanks a lot in advance for your support.

Regards,
Stefan

CommentFileSizeAuthor
#1 slide-music-inc-patch.zip9.16 KBeastcn

Comments

eastcn’s picture

StatusFileSize
new9.16 KB

Try this patch:


Index: photos.form.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/photos/inc/Attic/photos.form.inc,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 photos.form.inc
--- photos.form.inc   6 Mar 2009 08:22:41 -0000   1.1.2.1
+++ photos.form.inc   18 Mar 2009 00:55:07 -0000
@@ -41,6 +41,7 @@
       '#collapsed' => FALSE,
       '#weight' => -3
    );
+  $opt = array(t('Do not display'), t('Display cover'), t('Display thumbnails'));
   if(variable_get('photos_display_user', 1)){
      $form['photos']['global']['album'] = array(
         '#type' => 'fieldset',
@@ -102,15 +103,17 @@
         '#required' => TRUE,
         '#description' => t('The width and height of flash, e.g: 640x480.'),
       );
+      $form['photos']['global']['album']['slide_music'] = array(
+        '#type' => 'textfield',
+        '#default_value' => !empty($node->album['slide_music']) ? $node->album['slide_music'] : '',
+        '#title' => t('Slide Music'),
+        '#required' => TRUE,
+        '#description' => t('e.g: http://mysite/music.mp3'),
+      );
       $opt[] = t('Slide show');
     }
   }
   
-  $opt = array(t('Do not display'), t('Display cover'), t('Display thumbnails'));
-  if(variable_get('photos_slide', 0)){
-    $opt[] = t('Slide show');
-  }
-  
   if(variable_get('photos_display_page_user', 1)){
      $form['photos']['page']['album'] = array(
         '#type' => 'fieldset',

Success, CVS operation completed


Index: photos.data.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/photos/inc/Attic/photos.data.inc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 photos.data.inc
--- photos.data.inc   10 Mar 2009 02:18:59 -0000   1.1.2.2
+++ photos.data.inc   18 Mar 2009 03:03:17 -0000
@@ -4,7 +4,7 @@
 function photos_page_slide($ac){
   if($ac->album['album']['count'] && $ac->album['image']['count']){
     list($width, $height) = explode('x', variable_get('photos_display_slide', '640x480'));
-    $v = dfgallery_html(array('url' => url("photos/data/user/$ac->uid", array('absolute' => true, 'query' => array('type' => 'json.json'))), 'width' => $width, 'height' => $height));
+    $v = dfgallery_html(array('url' => url("photos/data/user/$ac->uid/json.json", array('absolute' => true)), 'width' => $width, 'height' => $height));
   }else{
     $v = photos_page_title($ac, t('has not yet create an album'));
   }
@@ -40,7 +40,10 @@
         'images' => $t[$key]['image']
       );
     }
-    print dfgallery_json($album);
+    if(variable_get('photos_slide_music', false)){
+      $setting['config']['theme']['config_theme_music'] = variable_get('photos_slide_music', false);
+    }
+    print dfgallery_json($album, $setting);
   }
 }
 
@@ -110,7 +113,8 @@
         'images' => $array,
       )
     );
-    print dfgallery_json($albums);
+    $setting['config']['theme']['config_theme_music'] = $node->album['slide_music'] ? $node->album['slide_music'] : variable_get('photos_slide_music', false);
+    print dfgallery_json($albums, $setting);
   }
 }
 

Success, CVS operation completed


Index: photos.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/photos/inc/Attic/photos.admin.inc,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 photos.admin.inc
--- photos.admin.inc   10 Mar 2009 02:18:59 -0000   1.1.2.2
+++ photos.admin.inc   18 Mar 2009 03:10:04 -0000
@@ -367,6 +367,13 @@
       '#size' => '20',
     '#disabled' => (module_exists('dfgallery') ? false: true)
    );
+  $form['slideshow']['photos_slide_music'] = array(
+    '#type' => 'textfield',
+    '#default_value' => variable_get('photos_slide_music', false),
+    '#title' => t('Slide default Music'),
+    '#required' => TRUE,
+    '#description' => t('e.g: http://mysite/music.mp3'),
+  );
    $form['slideshow']['show_size']['photos_slide_show_thumb'] = array(
       '#type' => 'select',
       '#title' => t('Thumbnails'),

Success, CVS operation completed

eastcn’s picture

Status: Active » Needs review
design.er’s picture

Man, you rock! ...the music function works! :) Is it possible to autostart the music? I think that would be a great usability improvement.

It would be great if there's a possibility to activate the preference button... or if there are no functions (yet), to hide it. Otherwise it could be confusing to users.

k74’s picture

Version: 6.x-2.6-beta2 » 6.x-2.6-beta3

and I want to but no music? is a required field in beta 3

alwin4711’s picture

PLease give some information for slideshow with NO music

and i don't know how to patch any source

THX

Ole Martin’s picture

Here you can see how to "Patch", http://drupal.org/patch/apply

jday’s picture

Thanks! this patch did the trick for me, options for autostart would be cool. Thanks again!

nathaniel’s picture

Status: Needs review » Closed (fixed)