Why can't I get thumbnail sizes to increase in my slideshow?

16 views
Skip to first unread message

Noah

unread,
Dec 27, 2008, 5:38:58 PM12/27/08
to Google AJAX APIs
I read <a href="http://groups.google.com/group/Google-AJAX-Search-API/
browse_thread/thread/a7910a6b0827a2fd/fcd8a97623f02e01?
#fcd8a97623f02e01">this</a> thread and decided to add the
thumbnailTag : 'content' option to my custom slideshow for a Blogger
blog (the slideshow widget on blogger only has very low resolution
thumbnails, and those are just too ugly). When I do this, my
slideshow stops working completely. Is there a reason why this might
be happening? Might it have something to do with the way Blogger
handles RSS feeds?

Noah

unread,
Dec 27, 2008, 5:58:58 PM12/27/08
to Google AJAX APIs
Sorry, I've never posted on Google Groups before so I didn't know how
the formatting would look, and didn't realize I wouldn't be able to
edit messages. Let me clarify.

I host my blogs using Blogger. Blogger's official Slideshow widget
isn't very good for taking pics from my Blogger RSS feeds -- the
pictures are too small (as you probably know, it uses the 72px
thumbnails from the media:thumbnail element in the RSS feed.

I thought I found a good workout to this: By using the Google AJAX
Feed API and Slideshow Code, I was able to re-create a custom version
of Blogger's Slideshow widget. But, when I tried to increase the
thumbnail size (by adding the thumbnailTag : 'content' option), my
slideshow disappeared completely.

I'm wondering if anyone else has this problem, and has solved it.

Ben Lisbakken

unread,
Dec 27, 2008, 6:14:17 PM12/27/08
to Google-AJAX...@googlegroups.com
Noah --

Have you tried adding the slideshow to an isolated page to see if that works?  I'm assuming that Blogger is not getting in the way of your code.  If you could try your slideshow on a test page by itself, and post a link to that, it would help greatly.  I'm thinking that maybe the problem could be with your feed.  When you post a link to your test page, I will also take a look at the feed you are using.

Thanks,
Ben

Noah

unread,
Dec 27, 2008, 6:26:29 PM12/27/08
to Google AJAX APIs
Ben, thanks for the swift reply! :)

Try this: http://www.ahfr.org/media/slideshow.html

Jeremy Geerdes

unread,
Dec 27, 2008, 7:28:03 PM12/27/08
to Google-AJAX...@googlegroups.com
I'm thinking that your problem is a result of the slideshow script not
knowing what to do with the content of the content tag. You will
probably want to switch from using the thumbnailTag : 'content'
approach to thumbnailResolver : function. You'll have to use a regexp
to pull the correct img url out.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
http://jgeerdes.home.mchsi.com
http://jgeerdes.blogspot.com
http://jgeerdes.wordpress.com
jgee...@mchsi.com

Unless otherwise noted, any price quotes contained within this
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!

And check out my blog, Adventures in Web Development, at http://jgeerdes.blogspot.com
!

Noah

unread,
Dec 27, 2008, 8:18:57 PM12/27/08
to Google AJAX APIs
I actually just started learning about regular expressions.
Unfortunately, I don't know enough to do anything useful with them
yet.

Can I have a hint, perhaps?

On Dec 27, 7:28 pm, Jeremy Geerdes <jrgeer...@gmail.com> wrote:
> I'm thinking that your problem is a result of the slideshow script not  
> knowing what to do with the content of the content tag.  You will  
> probably want to switch from using the thumbnailTag : 'content'  
> approach to thumbnailResolver : function.  You'll have to use a regexp  
> to pull the correct img url out.
>
> Jeremy R. Geerdes
> Effective website design & development
> Des Moines, IA
>
> For more information or a project quote:http://jgeerdes.home.mchsi.comhttp://jgeerdes.blogspot.comhttp://jgeerdes.wordpress.com
> jgeer...@mchsi.com
>
> Unless otherwise noted, any price quotes contained within this  
> communication are given in US dollars.
>
> If you're in the Des Moines, IA, area, check out Debra Heights  
> Wesleyan Church!
>
> And check out my blog, Adventures in Web Development, athttp://jgeerdes.blogspot.com

Jeremy Geerdes

unread,
Dec 27, 2008, 9:29:59 PM12/27/08
to Google-AJAX...@googlegroups.com
With your feed, you might try something like this:

thumbnailUrlResolver: function(result){
var el=result.xmlNode.getElementsByTagName('content')[0].textContent;
var matches=el.match(/img src=\'(.*?)\'/i);
return matches&&matches.length>1?matches[1]:'';
},

However, each feed type - even each individual feed - can be
different. For instance, in the feed you're loading, the content
element you're looking at has two image tags in it. If you want the
second image, you'll have to adjust the return statement accordingly.

Jeremy R. Geerdes
Effective website design & development
Des Moines, IA

For more information or a project quote:
Unless otherwise noted, any price quotes contained within this
communication are given in US dollars.

If you're in the Des Moines, IA, area, check out Debra Heights
Wesleyan Church!

And check out my blog, Adventures in Web Development, at http://jgeerdes.blogspot.com
!

Noah Chase

unread,
Jan 7, 2009, 12:41:17 AM1/7/09
to Google-AJAX...@googlegroups.com
That worked like a charm. Thank you very much.
Reply all
Reply to author
Forward
0 new messages