Flash Slideshow Module for Gallery2?

DFox

Joined: 2007-07-08
Posts: 7
Posted: Sun, 2007-07-08 22:51
suprsidr wrote:
and keep working on its big brother.

That's looking awesome. It's going to be a great module. Keep up the great work and I can't wait to see the final product.

 
erik7

Joined: 2006-04-26
Posts: 1
Posted: Wed, 2007-08-29 14:54

I was seeing this module on another website and finally came here.
After some trying I'm getting the following error:

"Loading xml feed.....
"Loading 1/5"

I'm using Joomla CMS and my gallery directory is called g2.

Quote:
$ret = GalleryEmbed::init(array('fullInit' => true, 'embedUri' => '/home/xxx/domains/xxx.com/public_html/index.php?option=com_gallery2&Itemid=123', 'g2Uri' => '/home/xxx/domains/xxx.com/public_html/g2/'));

Quote:
<embed width="160" height="160" align="middle" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" name="minislide" wmode="transparent" quality="high" flashvars="xmlUrl=http://www.xxx.nl/g2/xml_all.php?g2_itemId=1997" src="http://www.xxx.nl/g2/minislideshow.swf"></embed>

May the problem be that my g2data-directory is not in the public_html directory, but at /home/xxx/ ??

Can someone try to help me?

Edit: The error I see in my error log is:

Quote:
/home/xxx/domains/xxx.nl/public_html/home/xxx/domains/xxx.nl/public_html/g2/main.php

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2007-08-29 21:08
 
ckawalek

Joined: 2005-01-25
Posts: 104
Posted: Fri, 2007-09-07 15:29

Hows the "Big Brother" version coming along???

--
http://ChristianJamesPhoto.com

 
Xaneth

Joined: 2006-12-26
Posts: 20
Posted: Wed, 2007-10-24 05:01

Got my xml_dynamic.php working. It was a version issue I'm pretty sure, I had it working on one website, but not the other. After copying the xml_dynamic.php from the working site, it worked! Can't wait for Big Brother!!!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2007-10-24 10:51

I have a release candidate of the mini with much better/smoother transitions and now my xml.php supports keyword albums and tags. It also looks for the imageblock disabled flag and checks user permissions.

And actually I also have a beta of our all-in-one media player who's xml.php supports mediaRss for piclens and other media players.

I've been busy lately - you really should update. :)

-s

FlashYourWeb and Your Gallery

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-10-24 12:10

@suprsidr:
can you put your new versions of the mp3/ flash video modules up for review at reviews.gallery2.org?

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
StoneUSA7

Joined: 2007-06-15
Posts: 12
Posted: Thu, 2008-02-21 21:10
Quote:
Setting the external embed dimensions control the size. The mini simply scales the images to Stage.width x Stage.height but will honor aspect ratio of the image.
I guess if you wanted to use the full image or a derivative you could edit xml.php to point the thumbUrl to the derivative of your choice.

Suprsidr, I understand this concept, but I can't figure out HOW or WHAT to actually edit in xml.php to point the thumbUrl (actually getView() in my case) to a derivative (resized) image. I have your xml.php working with Polaroid Gallery, but the full size images in my gallery take ages to load. That's why I want to call the resized images instead.

I've dug around and it seems that what I want to do is change the getView() function to point to a different image id, I'd assume by changing the way getId() is called and somehow using GalleryDerivativeImage. I suck at the Gallery2 core functions so I just know what I piece together from digging through code other people have written.

Do you have any suggestions?

EDIT - after posting this I switched to using the getThumbUrl() function just because it seems like I'd be able to work with it a bit more.

 
StoneUSA7

Joined: 2007-06-15
Posts: 12
Posted: Thu, 2008-02-21 21:31

I figured it out.

Problem was it was making a multi-dimensional array. Just had to add the ['0'] after the [$itemId] and it worked fine. Which means it pulls the first resized image it finds (640x480 for me). If you want a different resize, just change the ['0'] to a ['1'] or whatever number resize you'd like to use. I just renamed the getThumbUrl() function so if you want to use this just drop it into the xml.php and call it by replacing getThumbUrl($item) with getResize($item).

Quote:
function getResize($item)
{
global $gallery;
$urlGenerator =& $gallery->getUrlGenerator();
$itemId = $item->getId();
list ($ret, $thumbnail) = GalleryCoreApi::fetchResizesByItemIds(array($itemId));
if (!$ret && !empty($thumbnail)) {
$thumbUrl = $urlGenerator->generateUrl(
array('view' => 'core.DownloadItem', 'itemId' => $thumbnail[$itemId]['0']->getId(),
'serialNumber' => $thumbnail[$itemId]['0']->getSerialNumber()),
array('forceFullUrl' => true, 'forceSessionId' => true, 'htmlEntities' => true));
} else {
$thumbUrl = "";
}
return $thumbUrl;
}

 
StoneUSA7

Joined: 2007-06-15
Posts: 12
Posted: Thu, 2008-02-21 21:56

Whoops. There was a bug. If there were no resizes then it was returning a blank ($thumbUrl = "";).

I switched that else statement out so that if there were no resizes then you will see the original image:

Quote:
function getResize($item)
{
global $gallery;
$urlGenerator =& $gallery->getUrlGenerator();
$itemId = $item->getId();
list ($ret, $thumbnail) = GalleryCoreApi::fetchResizesByItemIds(array($itemId));
if (!$ret && !empty($thumbnail)) {
$thumbUrl = $urlGenerator->generateUrl(
array('view' => 'core.DownloadItem', 'itemId' => $thumbnail[$itemId]['0']->getId(),
'serialNumber' => $thumbnail[$itemId]['0']->getSerialNumber()),
array('forceFullUrl' => true, 'forceSessionId' => true, 'htmlEntities' => true));
} else {
$thumbUrl = $urlGenerator->generateUrl(
array('view' => 'core.DownloadItem', 'itemId' => $item->getId(),
'serialNumber' => $item->getSerialNumber()),
array('forceFullUrl' => true, 'forceSessionId' => true, 'htmlEntities' => true));
//$thumbUrl = "";
}
return $thumbUrl;
}

I also wanted to re-iterate that this is for the Polaroid Gallery by Christopher Einarsrud and would probably not have much meaning for anyone using the regular MiniSlideshow mod, though it may.

 
Xaneth

Joined: 2006-12-26
Posts: 20
Posted: Tue, 2008-09-30 21:34
DFox wrote:
suprsidr wrote:
and keep working on its big brother.

That's looking awesome. It's going to be a great module. Keep up the great work and I can't wait to see the final product.

Suprsidr, any word on Big Brother? Still anticipating...

 
Xaneth

Joined: 2006-12-26
Posts: 20
Posted: Tue, 2008-09-30 22:31

In fact, the new minislideshow.swf looks a lot like it's big brother now, but when increase the size of the flash window, it still displays in thumbnail sizes. Is there any way to increase it to 500 or 600 pixels? Or is that a limit of minislideshow.swf?

 
Xaneth

Joined: 2006-12-26
Posts: 20
Posted: Tue, 2008-09-30 22:43

Figured it out using the useFull feature, awesome!