Module for MiniSlide Show integration
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
MiniSlide Show is a flash based slideshow with support for Gallery 3 (that I've seen mentioned on the forums a couple of times). This module will allow you to display the slideshow within Gallery 3. Example: Please be aware that: --- |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Cool! Dave |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
Is this different enough? I'm not really sure what else to make a slideshow button look like. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Looks good to me. I am sure some theme/UX person will change it if they want. Dave |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Very very cool - Good job -s |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Hmmm... installed, but no "Admin -> Settings -> MiniSlide Show settings menu option" -s |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
suprsidr wrote:
Hmmm... installed, but no "Admin -> Settings -> MiniSlide Show settings menu option" Are you using Gallery 3 Beta 2 or Experimental? If you're using Beta 2, you'll need to upgrade to the expermintal version: |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
floridave wrote:
Looks good to me. I am sure some theme/UX person will change it if they want. Okay, modifications attached here and up on my github. It seems that menu icons are all controlled within the actual theme, so some minor editing of the theme you're using will be required to get the menu icon to show up properly (see the "theme files" folder included with the module). |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Quote:
This module has been tested against git only and will most likely not work with Beta 2 Sorry, read this as will work with beta2 only - duh! I have not spent much time with G3, I really should take a look. -s |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
Updated version of MiniSlide Show module: The updated module is attached to this post, and up on my github. |
|
ptan
Joined: 2010-04-14
Posts: 3 |
![]() |
Thanks for this great module. I have some questions though... |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
Here is the latest version of the MiniSlide Show integration module. I've updated the code to load the CSS into Gallery's combined css file, added a few admin-level "this module requires the RSS module" messages that get displayed if RSS is turned off, and updated the module.info file so the new links in Gallery 3.0.2 point to the proper pages. This version of the module has been tested for use with Gallery 3.0.2. |
|
laohu99
Joined: 2011-08-24
Posts: 6 |
![]() |
Hi rWatcher: I have tried to place the embed codes in the album pages, expecting the album pages to show the slide automatically when openned. Thanks for your help. |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
If you look at the edit album link at the top of the page, it'll look something like http://www.example.com/gallery3/index.php/form/edit/albums/ALBUM_ID_NUMBER -- the end of the url is the id number for the current album. |
|
laohu99
Joined: 2011-08-24
Posts: 6 |
![]() |
Thank you rWatcher. |
|
laohu99
Joined: 2011-08-24
Posts: 6 |
![]() |
Just now I found the following codes in your minislideshow_dialog.html.php , and tried to insert them into album.html.php of my theme, but it doesnot work. <embed src="<?= module::get_var("minislideshow", "slideshow_url") ?>" width="485" height="300" What should I do to this $item_id? Many thanks for your help |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
There is also a handy form for embedding the mini. -s |
|
rWatcher
![]()
Joined: 2005-09-06
Posts: 722 |
![]() |
laohu99 wrote:
What should I do to this $item_id? Try $item->id or $theme->item->id instead. |
|
laohu99
Joined: 2011-08-24
Posts: 6 |
![]() |
rWatcher: Thank you very much! $theme->item->id works. I m a php beginner.Thank you again for your help. |
|
laohu99
Joined: 2011-08-24
Posts: 6 |
![]() |
Hi rWatcher: Thank you again . The embed codes work greatly. BTW, about the rss feeds, if I want minislideshow to show the latest 20 photos of an album, what should the feed's url be like? Appreciate your help. |
|
riflecn
Joined: 2011-09-03
Posts: 1 |
![]() |
Thanks for your great minislideshow and hard work. I have a question and need help: I have modified the rss module to make xml items be ordered by upadteDate, but items in minislideshow seem still shown in a random order. Thank you rWatcher. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Hi, |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
add &mp3Url=http://mysite.com/mysong.mp3 -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Thanks for the response. As laou99 asked "Is there any method to pass the variable ALBUM_ID_NUMBER into the embed code, so that every album can be openned with the slideshow automatically?" I did try the &mp3Url but no sound. The code in "minislideshow_dialog.html.php" contains no & and the whole code is repeated using " around everything. I presume I needed to change both. I have a minislideshow in my gallery root feeding 2 drupal sites and am putting this minislideshow.swf as the address for the minislideshow module in the modules file. Will this have an effect on the this module's performance, |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
An afterthought. The album with the sound file is;- http://talkingwalk.com/gallerywalk/TALK-AND-WALK/KEN-ENNION/Wetherlam Have tried for ages to insert mp3Url code into minislideshow file with no success. Is there another way to do this as it does not seem to be accepted, |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
I've never used the minislideshow module for G3, so I cannot advise on passing extra variables. <script type="text/javascript"> function onMiniSlideShowReady(){ // Do something... } </script> So we could have that function load up some audio via html5's great new audio tag: /** * @author suprsidr */ function onMiniSlideShowReady(){ var audio = document.createElement('audio'); audio.setAttribute('autoplay', true); audio.setAttribute('controls', true); var src1 = document.createElement('source'); src1.setAttribute('src', 'http://www.flashyourweb.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=44493&g2_serialNumber=2'); src1.setAttribute('type', 'audio/ogg'); var src2 = document.createElement('source'); src2.setAttribute('src', 'http://www.flashyourweb.com/gallery2/main.php?g2_view=core.DownloadItem&g2_itemId=44478&g2_serialNumber=2'); src2.setAttribute('type', 'audio/mpeg'); audio.appendChild(src1); audio.appendChild(src2); document.querySelector('body').appendChild(audio); }
Whalah! Of course there are other advisable steps like testing for html5 audio support and providing a fallback, so if yer interested in that check out my other html5 audio examples. -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Thanks for all of that. I'd love to give it a try but have little idea where to put the code or how to provide a fallback but I'll give it a go tomorrow. I presume any older browsers would not cope so a fallback would be needed, |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Hi, I did however,insert the code below in minislideshow which gave me an item on the settings form to insert an mp3Url. If I give the exact address of an mp3 file it will now play it. I inserted in;- modules/minislideshow/comtrollers/admin_minislideshow.php and into;- modules/minislideshow/comtrollers/minislideshow.php |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
There is no reason you cannot create a separate slideshow page foe any album. -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Hi, It seems that the slideshow respnds to "url::site("rss/feed/gallery/album/" . $item_id". Don't know if something similar to the "item_id" is possible for the audio. Am I asking the impossible? |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Quote:
"url::site("rss/feed/gallery/album/" . $item_id" That is the RSS feed that the mini parses to get the photo list. I actually used to have a version of the mini that would play any mp3 that showed up in the RSS feed, which would make it easy to add album specific audio. You could hand add a custom array to modules/minislideshow/comtrollers/minislideshow.php, something like: $audioArray = array( // format: 'album id' => 'url to audio' '1' => 'http://mysite.com/my_audio1.mp3', '6' => 'http://mysite.com/my_audio6.mp3', '8' => 'http://mysite.com/my_audio8.mp3', '14' => 'http://mysite.com/my_audio14.mp3', '16' => 'http://mysite.com/my_audio16.mp3', '22' => 'http://mysite.com/my_audio22.mp3' ); then your mp3Url would look like: -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
That was quick, thanks. All things were possible once upon a time then! if (module::get_var("minislideshow", "mp3Url") != ""){ $audioArray = array( ); } // Display the slideshow. Am I doing something wrong? |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
try like: $audioArray = array( // format: 'album id' => 'url to audio' '4838' => 'http://talkingwalk.com/gallerywalk/var/albums/TALK%20AND%20WALK/KEN%20ENNION/Wetherlam/Wetherlam.mp3', '6' => 'http://mysite.com/my_audio6.mp3', '8' => 'http://mysite.com/my_audio8.mp3', '14' => 'http://mysite.com/my_audio14.mp3', '16' => 'http://mysite.com/my_audio16.mp3', '22' => 'http://mysite.com/my_audio22.mp3' ); $slideshow_params .= isset($audioArray[$item_id])?"&mp3Url=" .$audioArray[$item_id]:''; // Display the slideshow. print $view; } } notice I put %20 in place of the spaces in your url. if (module::get_var("minislideshow", "mp3Url") != ""){ $slideshow_params = $slideshow_params . "&mp3Url=" . isset($audioArray[$item_id])?$audioArray[$item_id]:''; }
-s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Just getting very pixelated photos, no sound, |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
and the delay is now the default 3secs instead of my 10secs. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Here you go, this works for me. -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Magic. The $view-> was missed out. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
make sure useFull is set in minislideshow settings -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Set to "True" |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
I updated the above attachment was overwriting the other params -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
It is indeed just like magic. Works great and I look forward to playing. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
I changed the height and width in modules/minislideshow/views/minislideshow_dialog.html.php -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Once again, many thanks, |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
hi, |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Really pleased with the results on my computer but on using 2 other computers I find that the minislideshow hangs with "Loading 1/0". Have latest Flash, Mozilla and IE8. Been trying to solve this for some time with no success so, apologies for coming back yet again and hope you can help, |
|
mervyngroves
Joined: 2008-08-03
Posts: 92 |
![]() |
I experienced the same issue but only when minislideshow is associated with Gallery3. I usually use Chrome but it occurs in the other browsers too. |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
I just rewrote minislideshow_dialog.html.php to utilize gallery3's swfobject to embed the mini. -s |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Made the changes but no change. Ok on my computer. On other computers the "Loading 1/0" for the photos appears. A link below but it is the same on all albums that I checked, http://talkingwalk.com/gallerywalk/TALK-AND-WALK/KEN-ENNION/Wetherlam |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Sorry, works fine on all six of my PCs including my netbook and crappy mac. Can those browsers view the feed: http://talkingwalk.com/gallerywalk/rss/feed/gallery/album/4838 Have you tried uninstalling flash and re-installing? -s |
|