How to attach music to the slideshow?
design.er - March 17, 2009 - 17:48
| Project: | album photos |
| Version: | 6.x-2.6-beta3 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | music, photos, preferences, slideshow |
Description
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

#1
Try this patch:
<?php
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: <a href="http://mysite/music.mp3'" title="http://mysite/music.mp3'" rel="nofollow">http://mysite/music.mp3'</a>),
+ );
$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
?>
<?php
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
?>
<?php
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: <a href="http://mysite/music.mp3'" title="http://mysite/music.mp3'" rel="nofollow">http://mysite/music.mp3'</a>),
+ );
$form['slideshow']['show_size']['photos_slide_show_thumb'] = array(
'#type' => 'select',
'#title' => t('Thumbnails'),
Success, CVS operation completed
?>
#2
#3
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.
#4
and I want to but no music? is a required field in beta 3
#5
PLease give some information for slideshow with NO music
and i don't know how to patch any source
THX
#6
Here you can see how to "Patch", http://drupal.org/patch/apply
#7
Thanks! this patch did the trick for me, options for autostart would be cool. Thanks again!