Slideshow/Cooliris on keyword albums?

wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Thu, 2008-11-06 19:43

I'm using the Carbon theme, not a theme with a built-in slideshow. Is there anyway to make a slideshow work with keyword albums? I would ideally want CoolIris to work as well.

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Fri, 2008-11-14 21:23

No one has any suggestions? Is this just not possible? It seems like it should be, I have the flashyourweb mini slideshow showing keyword albums.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2008-11-14 22:43
 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-11-17 20:20

Place this code directly above the </head> tag in your theme's theme.tpl

	{php}
	if(isset($_REQUEST['g2_keyword'])){
	    $this->assign('keyword',$_REQUEST['g2_keyword']);
	}else{
	    $this->assign('keyword','');
	}
	{/php}
	{if $theme.pageType == 'album' && $keyword}
	    <link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=dynamic&amp;g2_view=keyalbum.KeywordAlbum&amp;g2_keyword={$keyword}" id="picLensGallery"/>
	{/if}

clear your gallery's template cache and let me know how it works :)

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Mon, 2008-11-17 20:35

This didn't work, but I had remove the previous edits to theme.tpl and album.tpl, was I supposed to leave those in?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-11-17 20:50

That should be the only edit you need, see it worked for me. http://www.flashyourweb.com/media/index.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=batman

I don't have many items tagged with keywords.

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Mon, 2008-11-17 21:23

Not sure what I'm doing wrong...

These are the two steps I performed:
Copied piclensrss.php to \gallery2
Added the code above to theme.tpl in \gallery2\themes\carbon\templates\local\theme.tpl (I tried \gallery2\themes\carbon\templates as well).

Am I missing something? I was able to get your mini slideshow working so I'm not totally new to this...

Edit: I'm using the URL rewrite module and it appears that you aren't. Does this make a difference? The URL to my keyword albums appears as mysite\gallery2\key\keyword, whereas yours appears as yoursite/media/index.php?g2_view=keyalbum.KeywordAlbum&g2_keyword=batman

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-11-17 21:53

Well, even though your REQUEST variables look different, they should still be available.
I guess at this point, I'd need a sample url.
Gallery version?

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Mon, 2008-11-17 22:01

Unfortunately I can't give you a URL as my Gallery is hosted only internally, and I can't put it online.
I'm using version 2.3.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-11-17 22:48

I have another idea, give me a sec to figure it out.

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

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2008-11-18 00:44

Ok, took a sec to work this out(plus dinner)
new code for theme.tpl

	{assign var="separator" value=''}
	{assign var="itemString" value=''}
	{foreach from=$theme.children item=child}
	{if $itemString != ''}
	{assign var="separator" value=|}
	{/if}
	{assign var="itemString" value=$itemString$separator`$child.id`}
	{/foreach}
	{if $theme.pageType == 'album' && $itemString}
	<link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=simple&amp;g2_itemIds={$itemString}" id="picLensGallery"/>
	{/if}

You'll have to add some lines to picLensRss.php
around line 805 add

	    case 'simple':
	        $itemIds = explode('|', GalleryUtilities::getRequestVariables('itemIds'));
	        list ($ret, $items) = GalleryCoreApi::loadEntitiesById( $itemIds, 'GalleryItem' );
	        if ($ret) {
	            print "Error loading childItems:" . $ret->getAsHtml();
	        }
	        foreach($items as $item){
	            if(!$item->canContainChildren){
	                $xml .= getDisplay($item);
	            }
	        }
	    break;

just below

	    case 'search':
	        $xml .= getSearchItems($g2_itemId, $mime);
	    break;

This will add all items sans albums to the feed(even unsupported items) that appear on the page only.
So a multipage album will not look ahead.

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Tue, 2008-11-18 16:07

Where does the new theme.tpl code go? Am I supposed to leave in your previous code as well?

Sorry for the trouble, you've been extremely helpful so far.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2008-11-18 17:08

Place this code directly above the </head> tag in your /gallery2/themes/carbon/templates/local/theme.tpl

	{if $theme.pageType == 'album'}
	{g->theme include="keywordRss.tpl"}
	{/if}

rename the attached keyword.tpl.txt to keyword.tpl and upload to /gallery2/themes/carbon/templates/local/keyword.tpl

clear your gallery's template cache.

should work for tag albums & search albums too.

-s

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

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Tue, 2008-11-18 21:21

does the picLensRss.php file support the standard dynamic albums (updates, random, popular) and/or tag albums?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2008-11-18 21:44
 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Tue, 2008-11-18 21:48

Ah; never mind; I missed the part of your last post where you wrote "should work for tag albums & search albums too."

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2008-11-18 22:16

I just updated my picLens download with the above required code to make use of the keywordRss.tpl

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Tue, 2008-11-18 22:21

Great! The update to piclensrss.php got this working for me. Thanks for all your help!

The only thing missing is making this work for multi-page albums, but in the meantime I'll just increase the amount of results per page. Thanks again!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2008-11-18 22:30
Quote:
Great! The update to piclensrss.php got this working for me

Fantastic! I had given up ;)

It should work for multipage keyword albums, and could easily be updated for tag albums, but the search will remain on a perpage basis, as I know nearly nothing about gallery's search functions.

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Tue, 2008-11-18 22:34

I was testing it out and it didn't seem to work for multipage keyowrd albums.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Tue, 2008-11-18 23:05

Well, I did not have enough keyword items to test multipage, so I added the tagName variable and it does work for multipage (at least with rewrite off)
http://www.flashyourweb.com/media/index.php?g2_view=tags.VirtualAlbum&g2_tagName=cars
The cooliris view shows all items from the tagName search. There is nowhere that I limit the return.

So here's the updated code for keywordRss.tpl:

	{php}
	if(isset($_REQUEST['g2_keyword'])){
	    $this->assign('keyword',$_REQUEST['g2_keyword']);
	}else{
	    $this->assign('keyword','');
	}
	if(isset($_REQUEST['g2_tagName'])){
	    $this->assign('tagName',$_REQUEST['g2_tagName']);
	}else{
	    $this->assign('tagName','');
	}
	{/php}
	
	{if $keyword}
	    <link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=dynamic&amp;g2_view=keyalbum.KeywordAlbum&amp;g2_keyword={$keyword}" id="picLensGallery"/>
	{elseif $tagName}
	    <link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=dynamic&amp;g2_view=tags.VirtualAlbum&amp;g2_tagName={$tagName}" id="picLensGallery"/>
	{else}
	    {assign var="separator" value=''}
	    {assign var="itemString" value=''}
	    {foreach from=$theme.children item=child}
	    {if $itemString != ''}
	    {assign var="separator" value=|}
	    {/if}
	    {assign var="itemString" value=$itemString$separator`$child.id`}
	    {/foreach}
	    {if $itemString}
	    <link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=simple&amp;g2_itemIds={$itemString}" id="picLensGallery"/>
	    {/if}
	{/if}

I'd be interested to know if rewrite changes the $_REQUEST variables.

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

 
wreckanize

Joined: 2007-10-30
Posts: 24
Posted: Tue, 2008-11-18 23:13

This does seem to be related to the rewrite module. I tested it out using the default URL for keyword albums and every image from a 5 page keyword album showed up in cooliris.

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Wed, 2008-11-19 04:31

I'm trying to use picLensRss 2.0.9 to display dynamic albums, and I'm having a problem.

The albums from g2_view=dynamicalbum.* all work fine, but tag albums all give me the same error in my logs:

2008/11/19 06:12:37 [error] 23695#0: *122534 FastCGI sent in stderr: "PHP Fatal error:  Class 'TagsHelper' not found in /path/to/gallery/picLensRss.php on line 56
PHP Stack trace:
PHP   1. {main}() /path/to/gallery/picLensRss.php:0
PHP   2. xml() /path/to/gallery/picLensRss.php:830
PHP   3. getTagChildIds() /path/to/gallery/picLensRss.php:796" while reading upstream, client: X.X.X.X, server: mikeage.net, request: "GET /content/gallery/picLensRss.php?mode=dynamic&g2_view=tags.VirtualAlbum&g2_tagName=Whatever HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "mikeage.net"

If it matters, I have a multi-site installation (both embedUri and g2Uri point to the specific G2 that I'm trying, not my code base.

Tag albums do work in general.

I haven't yet touched my templates; I'm entering this path manually.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2008-11-19 04:46
Quote:
PHP Fatal error: Class 'TagsHelper' not found

what version of the tags module are you using?

-s

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

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2008-11-19 04:55
 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Wed, 2008-11-19 08:23

That's the version I have (slightly customized, but just to support AND/OR tag albums)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2008-11-19 12:19

Try adding the following line to picLensRss.php line 54:

GalleryCoreApi::requireOnce('modules/tags/classes/TagsHelper.class');

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

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2008-12-14 18:56

New code update utilizes gallery's own slideshow module without need for my script(picLensRss.php):
Place this in gallery2/themes/your theme/templates/local/theme.tpl <- you may have to copy yours here.
Just above the </head>

{if $theme.pageType == 'album' && $theme.item.entityType == 'GalleryDynamicAlbum'}
    {assign var="separator" value=''}
    {assign var="itemString" value=''}
    {foreach from=$theme.children item=child}
    {if $itemString != ''}
    {assign var="separator" value=|}
    {/if}
    {assign var="itemString" value=$itemString$separator`$child.id`}
    {/foreach}
    {if $itemString}
    <link rel="alternate" type="application/rss+xml" title="Photo RSS" href="{g->url arg1="view=slideshow.SlideshowMediaRss" arg2="itemList=`$itemString`"}"/>
    {/if}
{/if}

Works for all dynamic albums including keyword and tag albums :)

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

 
mikeage
mikeage's picture

Joined: 2005-01-23
Posts: 138
Posted: Mon, 2008-12-15 08:55

nice; works great!

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-12-22 23:23

The above code will only work with the current page. Personally I only show 24 items in my dynamic albums, 3 columns x 8 rows all on one page.
I'd consider 40 items/page tops.

To load all items from a keyword or tag album, basically we'd have to re-query for the results:

{php}
	if(isset($_REQUEST['g2_keyword'])){
	    $this->assign('keyword',$_REQUEST['g2_keyword']);
	}else{
	    $this->assign('keyword','');
	}
	if(isset($_REQUEST['g2_tagName'])){
	    $this->assign('tagName',$_REQUEST['g2_tagName']);
	}else{
	    $this->assign('tagName','');
	}
	{/php}
	
	{if $keyword}
	    <link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=dynamic&amp;g2_view=keyalbum.KeywordAlbum&amp;g2_keyword={$keyword}" id="picLensGallery"/>
	{elseif $tagName}
	    <link rel="alternate" type="application/rss+xml" title="PicLens RSS" href="/gallery2/picLensRss.php?mode=dynamic&amp;g2_view=tags.VirtualAlbum&amp;g2_tagName={$tagName}" id="picLensGallery"/>
	{/if}

but this requires my picLensRss.php.

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

 
joelrnorton

Joined: 2008-06-02
Posts: 5
Posted: Tue, 2008-12-23 14:39

Suprsidr,

Does the code to retrieve all items in the keyword/tag album fully replace the code you originally posted which only retrieves the items on the current page? If so, am I correct in assuming that this code basically replaces the other in the theme.tpl file, just above the </head> tag?

Thanks!

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Tue, 2009-01-27 22:05

Wayne,

If you have a spare moment, wonder if you could look at this. As I mentioned in a different thread, I'm using the mini slideshow to replace the lytebox/cooliris slideshow in G2.3. I have it mostly working great. I created a module which adds this block(link...) to the sidebar, formatting, etc. removed for readability here, but the editor is nixing the code indentation :-( :

*********
{* Here is the code to determine item type to pass to slideshow, if it is an album, cool, if not, we need to grab the parent*}
{if $theme.pageType == 'album'}
{assign var='ss_target' value=$theme.item.id}
{assign var='item_title' value=$theme.item.title}
{else}
{assign var='ss_target' value=$theme.parent.id}
{assign var='item_title' value=$theme.parent.title}
{/if}

<div>
<a href="http://www.wildsuburbia.com/slideshows/ss.php?item_id={$ss_target}&title={$item_title}" title="View Album as Slideshow"> View Album as Slideshow </a>
</div>
*************

The above calls my external slideshow page, passing the itemId & title as parameters in the url:

*************
/* The slideshow page, non-pertinent crap removed */

<?php
$item_id = $_GET['item_id'];

$title = $_GET['title'];{* only used for page title at this stage...*}
?>

<script type="text/javascript">

// <![CDATA[

var so = new SWFObject("http://www.wildsuburbia.com/b2e/gallery2/minislideshow.swf", "objectId", "800", "700", "9.0.115.0", "ffffff");

{* The following is my crude way of shoehorning the itemID into the flashvars stream...I tried a thousand variations, this works...*}

var $s1 = "xmlUrl=";

var $s2 = "http://www.wildsuburbia.com/b2e/gallery2/mediaRss.php?g2_itemId=<?php echo $item_id; ?>%26recursive=true";

var $s3 = "&useFull=true&showDropShadow=true&delay=4&transInType=Fade&transOutType=Fade";

so.addParam("flashVars", $s1+$s2+$s3);
so.addParam("wmode","transparent");
so.addParam("allowFullscreen","true");
so.addParam("allowScriptAccess","always");
so.write("flashcontent");

// ]]>
</script>

<div id="flashcontent>
</div>

blah, blah, blah,

***************************

Ok, I know there are more scientific ways to do this:-) :-), but I'm 1.)a noob, 2.)suck at this, and am 3.)very much trial & error/brute-forcing stuff at this stage. As you'd guess, this works fine for standard gallery albums/subalbums/photos.
However it falls on its face with search, dynamic, & tag albums. Have you got any boilerplate code laying around that I could plug into my hack to to make it work with these dynamic album types?

I couldn't tell whether the code further up the thread & particularly one-page limitation applies to the lytebox/cooliris only, or also mediaRss & the mini? I couldn't find a similar discussion/snippets for mediaRss/mini slideshow, so I'm posting this, hoping there is a way around the one page limit, particularly for search results...

If I don't get any better suggestions, I'm getting ready to try and parse the page url, but my gut tells me that's like swatting flies with a backhoe...

Thanks again, really appreciate the help.

____
Neil

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-01-28 00:54

Well, you didn't really need to create a module.

I just updated the minislideshow with my current mediaRss.php to include a new mode.
xmlUrl=mediaRss.php?mode=simple%26g2_itemIds=30561|24884|37651|30557|24118|24123|37646|30553|24133&showDropShadow=true&shuffle=true....
your itemIds would be a pipe separated list of ids.

I created an extra template and included it in my theme.tpl {g->theme include="alternateRss.tpl"}

alternateRss.tpl:

{if $theme.pageType == 'album' && $theme.item.entityType == 'GalleryDynamicAlbum'}
    {assign var="separator" value=''}
    {assign var="itemString" value=''}
    {foreach from=$theme.allChildIds item=id}
    {if $itemString != ''}
    {assign var="separator" value=|}
    {/if}
    {assign var="itemString" value=$itemString$separator`$id`}
    {/foreach}
    {if $itemString}
    <div>
        <a href="http://www.wildsuburbia.com/slideshows/ss.php?g2_itemIds={$itemString}&title={$item_title}" title="View Album as Slideshow"> View Album as Slideshow </a>
    </div>
    {/if}
{/if}

Does this help?

I do something similar in the sidebar on mysite http://www.flashyourweb.com/media/index.php?g2_view=dynamicalbum.PopularAlbum&g2_albumId=32
check the html behind the slideshow in the sidebar.
again I just include minislideshow.tpl in my sidebar.tpl {g->theme include="minislideshow.tpl"}

minislideshow.tpl:

{if $theme.pageType == 'album' && $theme.item.entityType == 'GalleryDynamicAlbum'}
    {assign var="separator" value=''}
    {assign var="itemString" value=''}
    {foreach from=$theme.children item=child}
    {if $itemString != ''}
    {assign var="separator" value=|}
    {/if}
    {assign var="itemString" value=$itemString$separator`$child.id`}
    {/foreach}
{/if}
{if $theme.pageType == 'album'}
<div id="gsSidebar" class="gcBorder1">
    <div id="sidebarMini">
        Generated By <a href="http://www.flashyourweb.com/staticpages/index.php?page=embed-o-rator" target="_blank">The Acme MiniSlideShow EMBED-O-RATOR</a>
    </div>
    <script type="text/javascript" src="{g->url href='modules/flashvideo/lib/swfobject.js'}">
    </script>
    <script type="text/javascript">
        // <![CDATA[
        var so = new SWFObject("{g->url href='minislideshow.swf'}", "minislideshow", "180", "180", "9.0.115.0", "ffffff");
{if !empty($theme.rssIds)}
        so.addParam("flashVars", "xmlUrl={g->url href='mediaRss.php'}?mode=simple%26g2_itemIds={$theme.rssIds}&showDropShadow=true&shuffle=true");
{elseif $itemString}
        so.addParam("flashVars", "xmlUrl={g->url href='mediaRss.php'}?mode=simple%26g2_itemIds={$itemString}&showDropShadow=true&shuffle=true");
{else}
        so.addParam("flashVars", "xmlUrl={g->url href='mediaRss.php'}?mode=dynamic%26g2_view=dynamicalbum.RandomAlbum%26g2_albumId={$theme.item.id}&showDropShadow=true");
{/if}
        so.addParam("wmode", "transparent");
        so.addParam("allowFullscreen", "true");
        so.addParam("allowScriptAccess", "always");
        so.write("sidebarMini");
        // ]]>
    </script>
</div>
{/if}

I have more if you need it.

-s

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

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Wed, 2009-01-28 02:33

Outstanding. Thanks a lot. I had started playing around w/ some of the Smarty string functions & was able to get what I needed from a tagalbum uri, and pass it as a parameter in a test case. But that's as far as I got so far. I'll start playing w/ this new stuff straightaway.

Question: How will the most recent mini slideshow/mediaRss handle g2 search results? Didn't see any references in the above code. I don't think that's technically a dynamic album, is it? The url that the search generates for the results is pretty scary, if I can't get the mini to digest that, I'll probably have to hack the Lytebox ss back in just for the search results, since it seems to handle that well...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-01-28 03:23

Never been much for gallery's limited search functionality, always used tag or keyword searches.
For example, I created a multiple tag search utilizing the tag cloud (bottom of the album).

So, I don't have any experience with search albums. Bu they should also return $theme.allChildIds

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

 
davidarnoult

Joined: 2008-03-18
Posts: 39
Posted: Wed, 2009-01-28 14:50

Hi Suprsidr,

Can you tell me how you create your multiple tag search, it is really cool!
What did you modify to have it this way (click on each keyword adda the string in the list)?

Thanks

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-01-28 18:42

I'll package it up later when I get home, I had to adjust the query as well as the templates.

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

 
davidarnoult

Joined: 2008-03-18
Posts: 39
Posted: Wed, 2009-01-28 18:55

Thanks

David

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Wed, 2009-01-28 21:27

I agree that the gallery search needs a huge update. How much would it take to provide an option for 'AND' type boolean searches in that slick tag setup you have?! The ability to, for example, return all of the red luxury cars would hugely extend it's utility. Folks have been clamoring for years for a boolean search in gallery , some of the hacks are almost there, but still buggy & inconsistent...

___
Neil

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Wed, 2009-01-28 22:57

Ok, I put up what I have. I'll look into adding booleanesque functionality when I have time.

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

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Thu, 2009-01-29 02:50

Hi Wayne,

I've been experimenting w/ the new mediaRss, and the mode=simple is doing the famous "loading 1/0" dance for me. Other modes seem OK. Go to this test page w/ hardcoded xmlUrl & look at the sourcecode, the swfobject stuff is near the bottom of the page:

http://www.wildsuburbia.com/slideshows/url.php

This page works fine if I plug in an itemID or mode=dynamic xmlUrl. I had the same issue as others w/ MediaRss.php, where I needed to whack the language code from ~line800 from the MediaRss as per your advice, even in prior version.

Any idea what's happening here? I looked at the so values in firebug & they seem to look good.

RE: Tag & Keyword albums, if mode=dynamic works, is there an advantage to using the mode=simple instead? My hope was finding some way to get g2 search results into the mini, since the search results page doesn't seem to dump childId's that I can see, but I could be looking in the wrong place.

This is what the url looks like:

http://www.wildsuburbia.com/b2e/wpg2?g2_return=%2Fb2e%2Fwpg2%3Fg2_view%3Dtags.VirtualAlbum%26g2_tagName%3DUnion%2BBeach%26g2_page%3D1%26g2_wpg2_returnurl%3Dhttp%253A%252F%252Fwww.wildsuburbia.com%252Fb2e%26g2_wpg2_returnname%3DWildSuburbia%2521&g2_formUrl=%2Fb2e%2Fwpg2%3Fg2_view%3Dtags.VirtualAlbum%26g2_tagName%3DUnion%2BBeach%26g2_page%3D1%26g2_wpg2_returnurl%3Dhttp%253A%252F%252Fwww.wildsuburbia.com%252Fb2e%26g2_wpg2_returnname%3DWildSuburbia%2521&g2_authToken=fa07cb7b8827&g2_view=search.SearchScan&g2_form%5BformName%5D=search_SearchBlock&g2_form%5BsearchCriteria%5D=union&g2_form%5BuseDefaultSettings%5D=1

Thanks,

_____
Neil

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-01-29 03:08
 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Thu, 2009-01-29 03:40

Thanks. I shouldn't have missed that. I'm building the xmlUrl in another file & passing it as a parameter in the href that calls the slideshow page. The %26 is being
converted to an ? in the url string. I'll see if I can escape it somehow, otherwise, I'll just have to move the code over to the slideshow page.

I appreciate the sharp eyes.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Thu, 2009-01-29 03:46

I use a couple of functions that may help:

    function getRelevantKeys() {
	$relevantKeys = array ('mode', 'g2_view', 'g2_itemId', 'limit', 'g2_keyword', 'g2_tagName', 'mime',
		'recursive', 'limit', 'g2_maxImageHeight', 'g2_maxImageWidth', 'useThumb', 'useMicro', 'showTitle',
		'noLink', 'noShadow', 'shuffle', 'column', 'rss', 'pagenate', 'ajaxLink', 'showSummary', 'showOwner',
		'showDate', 'showViews', 'showRating', 'fullInfo');
	$keys = array ();
	foreach ($_REQUEST as $key=>$value) {
	    if (in_array($key, $relevantKeys)) {
	        $keys[$key] = $value;
	    }
	}
	return $keys;
    }

    function rebuildCurrentUrl() {
	$keys = getRelevantKeys();
	$pageUrl = 'http';
	$pageUrl .= '://';
	$pageUrl .= $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
	if (count($keys) > 0) {
	    $pageUrl .= '?';
	    foreach ($keys as $key=>$value) {
	        $pageUrl .= $key.'='.$value.'&amp;';
	    }
	}
	return rtrim($pageUrl, '&amp;');
    }

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

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Sat, 2009-01-31 14:43

Wayne,
Thanks again for the help & code snippets. I'm making good progress.

The one thing I wonder about before I get too much further, is there any practical limit to the mumber of items that can be passed as a
url argument when using mode=simple? That's actually a general apache/php/etc. question, since I don't think it has much to do w/ mediRss.php.
My test gallery is still very small, so I can't really test performance/robustness for, say, a thousand items in a tagAlbum.Reason I ask is
that if I use the mode=simple, it could cover tag, keyword, and dynamic albums, making my code simpler/cleaner. Are there
scenarios where mode=dynamic is a better choice than mode=simple? Did you intend for mode=simple to supersede the other modes?

Thanks,

____
Neil

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2009-01-31 17:05

I never load more then say 40 items or so in a slideshow and absolutely no more then 100.
Even at 3 seconds per image(x40) its a 2 minute show which will repeat. How many people actually sit and watch a 2 minute slideshow.

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

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Sat, 2009-01-31 18:56

OK, hypothetically, if for whatever reason ( web-connected Digital Picture Frames or bigscreen HD TV's comes to mind...) someone wanted to
loop a large slideshow of every red car in your album, (for a party in a red room in their home, whatever...), and you had hundreds of red
cars in the gallery, is there a downside to creating that feed w/ mode=simple vs mode=dynamic?

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2009-01-31 20:31

I don't believe there is any limit to post variables http://www.w3schools.com/php/php_post.asp
But the dynamic mode query is quite a bit more complex and you'd still have to load the entities afterwards.
Simple mode simply loads the list of entities.

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

 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Fri, 2009-03-13 02:07

Did you ever get a chance to look into the boolean functions?

suprsidr wrote:
Ok, I put up what I have. I'll look into adding booleanesque functionality when I have time.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Fri, 2009-03-13 12:37
 
ForestCat

Joined: 2007-04-27
Posts: 29
Posted: Thu, 2009-03-19 14:13

I understand. I had high hopes, since that functionality is something a lot of people have been begging for in Gallery for a long time, and it's what's needed, IMO to bring Gallery2 up to par with some of the other script & web based packages.

I have reservations about Gallery3, I've now got a lot of my time invested in Gallery2, and it seems they've changed _everything_, including the theme interface. What I've read leads me to believe that G3 will be much less customizable/configurable, which was what led me to G2 in the first place. Hope I'm wrong. The lack
of flexible search capabilities is the last hurdle for me in getting this website exactly where I want it, and it seems no one else is working on that area, and the SQL is pretty far over my head, or I'd dive in...