Board index PBase Feature Requests Slideshow HOWTO v 1.1

Feature Requests

Slideshow HOWTO v 1.1

Request changes or modifications.
srijith
Moderator
 
Posts: 2321
Location: Amsterdam

Slideshow HOWTO v 1.1

Post Wed Nov 02, 2005 11:11 am


This slideshow feature has been discontinued in favor of Pbase’s slideshow feature. Any further use will return an error.

This post is to summarise the various replies in the original post on slideshow test. Please refer here for the latest update on the Unofficial slideshow feature. A big "Thanks You" to Karthik (yardbird) for kickstarting the whole activity and Arjun (arjunrc) for some great codes and suggestions.

Usage
There are two ways to add a slideshow to your gallery. The first provides an inline slideshow that is visible to the user as soon as they enter the gallery and the other method requires them to click (a link or an image) to launch the slidshow.

Inline method
For this method, use the code below as the starting point. Copy-paste it into your gellery's description field and enable 'html flag'.
Code: Select all
<center>
<iframe frameborder="0px" style="border:0px" width="460" height="450" src="http://www.srijith.net/pbase/slideshow.cgi?user=USER&gallery=GALLERY_NAME()&delay=DELAY&color=COLORCODE&title=TITLE&size=SIZE&maxwidth=MAXWIDTH&maxheight=MAXHEIGHT">
<!-- Alternate content for non-supporting browsers -->
<h2>Your browser does not support the technology needed for this slideshow.</h2>
</iframe>
</center>

Then make the following changes to suit your needs:
- Change USER to your username
- Change DELAY to the number of seconds delay you would like between slides (minimum is 3 seconds)
- Change COLORCODE to the Hexadecimal color code that is used for your gallery backrgound (example ffffff for white, 000000 for black)
- Change TITLE to 1 if all your gallery images have titles or 0 if they do not. 0 is assumed if not set explicitly
- Change SIZE to 'medium', 'large' or 'auto'. If you choose 'large' make sure that all images in the gallery does indeed have a large sized image. Choose 'auto' if you have panoramic image in your gallery. If nothing is specified, 'medium' is assumed.
- Change MAXWIDTH and MAXHEIGHT to the the maximum value of the width and height of the images in your gallery at the SIZE you selected. If not specified they are assumed to be 400 and 300 (if SIZE is medium) or 800 and 600 (if SIZE is large or auto).
- If you see scrollbars when you view the gallery, change the values 460 and 450 to larger values.

An example code that renders this slideshow is:
Code: Select all
<center>
<iframe frameborder="0px" style="border:0px" width="460" height="450" src="http://www.srijith.net/pbase/slideshow.cgi?user=srijith&gallery=GALLERY_NAME()&delay=3&color=4d4d4d&title=1&size=medium&maxwidth=400&maxheight=300">
<!-- Alternate content for non-supporting browsers -->
<h2>Your browser does not support the texhnology needed for this slideshow.</h2>
</iframe>
</center>



Extra-click method
For this method, use the code below as the starting point. Copy-paste it into your gellery's description field and enable 'html flag'
Code: Select all
<center><a href='javascript:doslide()'><img src="http://www.srijith.net/pbase/ss-img/ss.jpg" /></a></center>
<script language="JavaScript1.2">
function doslide()
{
   document.write('<html><head></head><body bgcolor=#COLOR>')
   document.write('<center>')
   document.write('<iframe frameborder="0px" style="border:0px" width="500" height="500" src="http://www.srijith.net/pbase/slideshow.cgi?user=USER&gallery=GALLERY_NAME()&delay=DELAY&color=COLOR&title=TITLE&size=SIZE&maxwidth=MAXWIDTH&maxheight=MAXHEIGHT">');
   document.write('<h2>Your browser does not support the technology needed for this slideshow.</h2>')
   document.write('</iframe> </center></body></html>')
}
</script>

Then make the following changes to suit your needs:
- Change USER to your username
- Change DELAY to the number of seconds delay you would like between slides (minimum is 3 seconds)
- Change COLORCODE to the Hexadecimal color code that is used for your gallery backrgound (example ffffff for white, 000000 for black)
- Change TITLE to 1 if all your gallery images have titles or 0 if they do not. 0 is assumed if not set explicitly
- Change SIZE to 'medium', 'large' or 'auto'. If you choose 'large' make sure that all images in the gallery does indeed have a large sized image. Choose 'auto' if you have panoramic image in your gallery. If nothing is specified, 'medium' is assumed.
- Change MAXWIDTH and MAXHEIGHT to the the maximum value of the width and height of the images in your gallery at the SIZE you selected. If not specified they are assumed to be 400 and 300 (if SIZE is medium) or 800 and 600 (if SIZE is large or auto).
- If you see scrollbars when you view the gallery, change the values 500 to larger values.

An example code that renders this slideshow is:
Code: Select all
<center><a href='javascript:doslide()'><img src="http://www.srijith.net/pbase/ss-img/ss.jpg" /></a></center>
<script language="JavaScript1.2">
function doslide()
{
   document.write('<html><head></head><body bgcolor=#4d4d4d>')
   document.write('<center>')
   document.write('<iframe frameborder="0px" style="border:0px" width="500" height="500" src="http://www.srijith.net/pbase/slideshow.cgi?user=srijith&gallery=GALLERY_NAME()&delay=3&color=4d4d4d&title=1&size=auto&maxwidth=400&maxheight=300">');
   document.write('<h2>Your browser does not support the technology needed for this slideshow.</h2>')
   document.write('</iframe> </center></body></html>')
}
</script>



Which to use?
The inline method involves one less click. However it will use up some space for the slideshow even if the viewer is not interested in the slideshow. The other method does involve one more click but it does not impose the slideshow area onto viewers.


Caveat
1. The slideshow feature will not work in passphrase protected galleries.
2. Setting title=1 when all images in the gallery does not have a title will render the slideshow unuseable.
3. I have no idea if non-english characters (Chinese, Japanese etc.) will create problems with the script.
4. The slideshow will not work on a multipage gallery.
5. The script performs server side caching to reduce load. Due to the way this caching works, I (owner of srijith.net on which the script runs) am in the position to see which galleries are using the slideshow feature. This list would also include 'non public' galleries. However, I assure you that I do not have any intention to poke my nose around galleries that have been made non-public. Not enough hours in the day :)
6. Because of the use of caching (to reduce server loads), any new image you may add to a gallery will not show in the slideshow until after about 2 hours (max as of now). After that 2 hours, the cache will expire and the new image will be added into the slideshow.

New features
There being only 24 hours in a day, it would be very difficult for me to make more changes to the script to accomodate new features. So unless you are good at hacking Perl (source code provided below), those request will not most probably be fulfilled. If you can hack Perl and have modified it to do more stuff, send it to me and I'll be happy to use the modification as long as it does not break any previous functionalities.

Disclaimer
This is not an official PBase feature. If it does not work, do not email Slug or Emily or anyone else related to PBase as they can't do anything about it! Post a reply in this thread and some of us will try our best to help you out. No assurances though. If it breaks, all I can guarantee you is that you get to keep the pieces :)


Source Code
Removed because of some licensing issues.

Change history

v 1.1 (2-Nov-2005)
----------
Added size, maxwidth and maxheight parameters.
Source code released.

v 1.0 (2-Nov-2005)
---------
Initial document
Last edited by srijith on Mon Mar 26, 2007 12:28 pm, edited 9 times in total.

yardbird
 
Posts: 613
Location: Palatine, IL

Great stuff

Post Wed Nov 02, 2005 2:20 pm


This works great! I hope Slug and Emily make it a part of pbase.

zevs
 
Posts: 67

Sidehow

Post Sat Nov 05, 2005 8:22 am


Thanks Srijith and Arjun for doing this! A really cool feature and it seems to work very well. For the inline slideshow, is there any way though to not have the first image come up by default when you go to the page? I'm always afraid of loosing valuable screen space so having this large reserved picture space sitting on top is not so attractive to me. A good solution would be that this part would just open up when you started a slideshow, then people who don't want to use this feature will have a more normal gallery view.

srijith
Moderator
 
Posts: 2321
Location: Amsterdam

Re: Sidehow

Post Sat Nov 05, 2005 9:06 am


zevs wrote:For the inline slideshow, is there any way though to not have the first image come up by default when you go to the page?


You should try the 'Extra-click method' then. I can't think of a way to impement what you want in the inline method, so unless someone can suggest a way, you are out of luck :)

zevs
 
Posts: 67


Post Sat Nov 05, 2005 9:36 am


Thanks Srijith for the rapid reply! I tried the Extra-click method on a multipage gallery and that worked fine for the first page of 16 images. I then made the gallery just one page instead, but still the Extra-click method only shows the first 16 images and then cycles back again. Any idea of why I can't see all my pics.... The address where I tried it is

http://www.pbase.com/zevs/desertedcity

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Sat Nov 05, 2005 9:48 am


zevs wrote:I tried the Extra-click method on a multipage gallery and that worked fine for the first page of 16 images. I then made the gallery just one page instead, but still the Extra-click method only shows the first 16 images and then cycles back again. Any idea of why I can't see all my pics.... The address where I tried it is

http://www.pbase.com/zevs/desertedcity


Haa.. that is the caching thingie working (or not working as you expected). The first time you set the slideshow the first page had only 15 snaps. This is what the script fetched and stored in the cache. For the next 2 hours (as of now) this cache is used rather than fetching the details again, to reduce the load on my as well as PBase server loads. Hence even after you changed to single page, the script was using the cache. I have cleared your cache for now and hence things should be working as required.

Since I can't do it all the time, next time around you may have to wait for the cache to grow stale and be fecthed again :)

zevs
 
Posts: 67


Post Sat Nov 05, 2005 10:00 am


Thanks again Srijith for rapid reply and help! I will remember to change the page setting before setting up a slide show next time. Just one more thing, the little navigation image does nor work very well in Firefox, the middle button stays green all the time and doesnt change as it does in Explorer. Making it a bit less intuitive to know how to stop the slide show.

arjunrc
 
Posts: 1003


Post Sat Nov 05, 2005 2:49 pm


Zevs, I tested the image switch to work in Firefox too. In my case, the play and stop button toggles in firefox as well - for example, http://www.pbase.com/arjunrc/paris slideshow (EDIT: corrected gallery URL)

regds
arjun


zevs wrote:Thanks again Srijith for rapid reply and help! I will remember to change the page setting before setting up a slide show next time. Just one more thing, the little navigation image does nor work very well in Firefox, the middle button stays green all the time and doesnt change as it does in Explorer. Making it a bit less intuitive to know how to stop the slide show.
Last edited by arjunrc on Sat Nov 05, 2005 10:42 pm, edited 2 times in total.

zevs
 
Posts: 67


Post Sat Nov 05, 2005 8:27 pm


Hmmm Arjun.. strange.. that link leads me to just an empty PBase page, no pics no button...

dang
 
Posts: 3780


Post Sat Nov 05, 2005 8:42 pm


Same here, Arjun. Black page with nothing but "This gallery is empty".
I'm using Windows ME with IE if that helps.

arjunrc
 
Posts: 1003


Post Sat Nov 05, 2005 10:30 pm


Oops - sorry - that should be http://www.pbase.com/arjunrc/paris

regds
arjun
Last edited by arjunrc on Sat Nov 05, 2005 10:36 pm, edited 1 time in total.

dang
 
Posts: 3780


Post Sat Nov 05, 2005 10:33 pm


I checked again, and now I have a White page instead of black but still nothing.

arjunrc
 
Posts: 1003


Post Sat Nov 05, 2005 10:38 pm


So when you go to http://www.pbase.com/arjunrc/paris you see nothing ? That is my paris gallery. I wrote http://www.pbase.com/arjunr/paris first and just corrected it to arjunrc.

regds
arjun


dang wrote:I checked again, and now I have a White page instead of black but still nothing.

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Sat Nov 05, 2005 10:49 pm


dang wrote:Same here, Arjun. Black page with nothing but "This gallery is empty".
I'm using Windows ME with IE if that helps.

Which version of IE is that? I checked with IE 6.02 in Win XP and Win2003 server and it was working fine.

srijith
Moderator
 
Posts: 2321
Location: Amsterdam


Post Sat Nov 05, 2005 10:50 pm


zevs wrote:Just one more thing, the little navigation image does nor work very well in Firefox, the middle button stays green all the time and doesnt change as it does in Explorer. Making it a bit less intuitive to know how to stop the slide show.


Strange, the button changes properly for me in Firefox 1.5RC1 on Ubuntu Linux and WindXP. Which version of FF are you using?

Next

Board index PBase Feature Requests Slideshow HOWTO v 1.1

Who is online

Users browsing this forum: No registered users and 2 guests