[slideshow]

Kuefler

Joined: 2009-11-20
Posts: 18
Posted: Fri, 2009-12-11 21:54

I need my slideshow(not the slideshow app) to be recursive.

It says in the support wiki:

Quote:
If you want to have g2 do a recursive slideshow (display items from the current album and all descendant albums) change gallery2/modules/slideshow/Slideshow.inc to the following:

<before>

function buildSlideshow($item, $startId = null, $recursive = false) {

<after>

function buildSlideshow($item, $startId = null, $recursive = true) {

The problem is there is that is nowhere to be found in the document. My file looks like this:

Quote:
<?php
/*
* Gallery - a web based photo album viewer and editor
* Copyright (C) 2000-2008 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/

GalleryCoreApi::requireOnce('modules/slideshow/classes/SlideshowHelper.class');

/**
* Display the slideshow
* @package Slideshow
* @subpackage UserInterface
* @author Alan Harder <alan.harder@sun.com>
* @version $Revision: 17625 $
*/
class SlideshowView extends GalleryView {

/**
* @see GalleryView::loadTemplate
*/
function loadTemplate(&$template, &$form) {
global $gallery;
$urlGenerator =& $gallery->getUrlGenerator();

$Slideshow = array();

list ($itemListString, $startId, $offset) =
GalleryUtilities::getRequestVariables('itemList', 'startId', 'offset');
if (isset($startId)) {
$startId = (int)$startId;
}
if (isset($offset)) {
$offset = (int)$offset;
}

/**
* @todo Remove the redundancy of calling buildAlbumSlideshow() twice (here and in
* SlideshowMediaRss), e.g. by building the lytebox slideshow via AJAX/DOM.
*/
if (!empty($itemListString)) {
foreach (explode('|', $itemListString) as $id) {
$itemIds[] = (int)$id;
}
list ($ret, $items, $start) = SlideshowHelper::buildItemsSlideshow($itemIds, $startId);
if ($ret) {
return array($ret, null);
}
} else {
/* Build slideshow for an album */
list ($ret, $item) = $this->getItem();
if ($ret) {
return array($ret, null);
}
list ($ret, $items, $start) =
SlideshowHelper::buildAlbumSlideshow($item, $startId, $offset);
if ($ret) {
return array($ret, null);
}
}

list ($ret, $module) = GalleryCoreApi::loadPlugin('module', 'slideshow');
if ($ret) {
return array($ret, null);
}
if (!empty($Slideshow['item']['title'])) {
$template->title($module->translate(array('text' => 'Slideshow for %s',
'arg1' => $Slideshow['item']['title'])));
} else {
$template->title($module->translate('Slideshow'));
}

list ($ret, $picLensVersion) = $module->getParameter('piclens.version');
if ($ret) {
return array($ret, null);
}

if ($picLensVersion) {
$Slideshow['piclensVersion'] = $picLensVersion;

$template->javascript($urlGenerator->generateUrl(
array('view' => 'slideshow.DownloadPicLens',
'file' => 'js',
'v' => $picLensVersion),
array('forceDirect' => true, 'forceFullUrl' => true)));

$jsUrlParams = array('forJavascript' => true, 'forceFullUrl' => true,
'htmlEntities' => false);
$jsUrlParamsDirect = array_merge($jsUrlParams, array('forceDirect' => true));
$Slideshow['piclensSwfUrl'] = $urlGenerator->generateUrl(
array('view' => 'slideshow.DownloadPicLens',
'file' => 'swf',
'v' => $picLensVersion),
$jsUrlParamsDirect);

if (empty($itemListString)) {
$Slideshow['mediaRssUrl'] = $urlGenerator->generateUrl(
array('view' => 'slideshow.SlideshowMediaRss',
'itemId' => $item->getId()),
$jsUrlParams);
} else {
$Slideshow['mediaRssUrl'] = $urlGenerator->generateUrl(
array('view' => 'slideshow.SlideshowMediaRss',
'itemList' => $itemListString),
$jsUrlParams);
}

/* Set the start item */
if (!empty($items)) {
$Slideshow['startItemId'] = $items[$start]['item']['id'];
} else {
$Slideshow['startItemId'] = $item->getId();
}

if (GalleryUtilities::hasRequestVariable('return')) {
/* Remove HTML entities */
$Slideshow['returnUrl'] =
html_entity_decode(GalleryUtilities::getRequestVariables('return'));
}

if (empty($Slideshow['returnUrl'])) {
$Slideshow['returnUrl'] = $urlGenerator->generateUrl(
array('view' => 'core.ShowItem', 'itemId' => $Slideshow['startItemId']),
$jsUrlParams);
}
$Slideshow['returnUrl'] = $urlGenerator->makeAbsoluteUrl($Slideshow['returnUrl']);
}

$Slideshow['items'] = $items;
$Slideshow['count'] = count($items);
$Slideshow['start'] = $start;
$template->setVariable('Slideshow', $Slideshow);

$template->javascript('lib/yui/yahoo-dom-event.js');
$template->javascript('modules/slideshow/data/lytebox.js');
$template->link(array('rel' => 'stylesheet',
'href' => 'modules/slideshow/data/lytebox.css',
'type' => 'text/css',
'media' => 'screen'));
return array(null, array('body' => 'modules/slideshow/templates/Slideshow.tpl',
'useFullScreen' => true));
}
}
?>

What do I need to make my slide-show to be recursive?

Quote:
Gallery URL = http://carvingsbyscott.com/g/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 4.3.11 cgi-fcgi
Webserver = Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.6b FrontPage/5.0.2.2510 mod_fastcgi/2.4.2
Database = mysqlt 4.1.14, lock.system=flock
Toolkits = Exif, Getid3, LinkItemToolkit, NetPBM, Thumbnail, Gd, SquareThumb
Acceleration = none, none
Operating system = FreeBSD hostingprod.com 4.11-YAHOO-20080312 FreeBSD 4.11-YAHOO-20080312 #0: i386
Default theme = matrix
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 GTB6 (.NET CLR 3.5.30729)
Rows in GalleryAccessMap table = 32
Rows in GalleryAccessSubscriberMap table = 150
Rows in GalleryUser table = 2
Rows in GalleryItem table = 148
Rows in GalleryAlbumItem table = 13
Rows in GalleryCacheMap table = 0

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2009-12-11 22:48

the advice from the wiki is outdated, pre 2.3 slideshow.

Are you referring to the lytebox slideshow or the cooliris version?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Kuefler

Joined: 2009-11-20
Posts: 18
Posted: Fri, 2009-12-11 23:59

It's the cooliris version, well there is a link to the cooliris website, so I assume it is.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2009-12-12 01:46

1st my opinion:
recursive is idiotic. forcing your visitors to download possibly 1000's of images is irresponsible as a webmaster/website owner.

That said. My picLensRss.php can supply a recursive feed for cooliris.

Instructions to use it within your templates are somewhere in these forums, you'll have to search.
http://gallery.menalto.com/node/79065#comment-279440
http://gallery.menalto.com/node/66745?page=1#comment-268732

I also have an update to the slideshow module which fixes many bugs and allows you to set delay and which resizes appear in the slideshow.
Discussion here if you're interested. Someone mentioned recursive slideshows and we shot 'em down.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Kuefler

Joined: 2009-11-20
Posts: 18
Posted: Sat, 2009-12-12 04:41

Well I think is a good idea for my users to not just see bear carvings, I want them to get a variety of carvings. I don't see the site getting that many pictures until years from now. A random slideshow would be nice, but I think that would entail a lot more work.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2009-12-12 05:11
 
Kuefler

Joined: 2009-11-20
Posts: 18
Posted: Sat, 2009-12-12 21:17

Does lytebox slideshow support recursiveness?

 
webmayin

Joined: 2005-10-16
Posts: 26
Posted: Wed, 2009-12-16 07:19

I'm hoping to link to a cooliris slideshow of a dynamic album, can you let me know how to call it?
I have picLensRss.php uploaded
Slideshow update from flashyourweb, working
http://jacksonsteen.ca/gallery2/main.php?g2_view=slideshow.Slideshow&g2_itemId=146&g2_return=%2Fgallery2%2Fmain.php%3Fg2_itemId%3D146
When I link
http://jacksonsteen.ca/gallery2/picLensRss.php?mode=dynamic&g2_view=dynamicalbum.RandomAlbum
I get a page of the feed, but if I use it like I would mediaRss.php, I would make this code:

Quote:
<embed type="application/x-shockwave-flash" width="700" height="700" src="http://www.jacksonsteen.ca/gallery2/minislideshow.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" name="minislide" wmode="transparent" allowfullscreen="true" allowscriptaccess="always" quality="high" flashvars="xmlUrl=http://www.jacksonsteen.ca/gallery2/picLensRss.php?mode=dynamic&g2_view=dynamicalbum.RandomAlbum" align="middle"></embed>

I recognise it's calling the minislideshow.swf, is that why I'm not getting the cooliris slide? Thanks for any help.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-12-16 12:23

something like:

// Include the following in your site's header
<script type="text/javascript" src="http://lite.piclens.com/current/piclens.js"></script>
<script type="text/javascript">
    PicLensLite.setLiteURLs({swf:'http://lite.piclens.com/releases/1.3.1.14221/lite/PicLensLite.swf'});
</script>
// Where you want you link to appear use this
<a title="View Slideshow" href="javascript:PicLensLite.start({feedUrl:'http://jacksonsteen.ca/gallery2/picLensRss.php?mode=dynamic%26g2_view=dynamicalbum.RandomAlbum'});">View SLideshow</a>

untested

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
webmayin

Joined: 2005-10-16
Posts: 26
Posted: Thu, 2009-12-17 04:03

Mr. Suprsidr, you are singularly the most helpful person I have ever met on the open source internet. Your devotion to sharing your knowledge of things that people care about is truly astounding. You may have no idea how many times your posts have helped me along the way without even having to post a new question to the community. May your tireless efforts be rewarded in all aspects of your life. I truly thank you. I thank you myself, and on the behalf of anyone too busy to thank you that has been reading any of these threads, though they may read like a mystery novel.
btw, I think that advice worked, I can't totally tell yet, because I'm on dialup. :)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-12-17 12:12

A little flattery will get you everywhere.(everyone else take note)
Only question... what is dialup?

Have a good holiday and may you find the $20/mnth for broadband.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
webmayin

Joined: 2005-10-16
Posts: 26
Posted: Fri, 2010-01-01 10:00

Very funny. I happen to like living out in the sticks. It's quiet, and there is time for musical devotions and careful contemplation.
Speaking of which, do you know a way to keep the filename from showing up in the black rectangle in the upper right corner of the cooliris slideshow?
same link, www.jacksonsteen.ca View Slideshow link on main page
Thanks for your consideration