|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Scripting dude-volunteer
|
How to customize gallery slideshow or full screen slideshow
[[This customization is no longer supported. Last I checked, it does work in some browsers, but not all. If you use it, you are on your own - please do not expect support or help in making it work. Unfortunately, Smugmug makes it nearly impossible to customize gallery slideshows when it would have been very trivial for them to make it easy to customize.]]
As many have realized, Smugmug did not build in a way to customize the parameters on either the gallery slideshow or the full screen slideshow. Homepage slideshows, on the other hand, can control all sorts of things (captions, thumbs, buttons, transparency, etc...). So, using this customization, you can turn off captions, buttons, speed indicators and thumbs in either the gallery slideshow or the full screen slideshow. Here's how you do it: Step 1: Paste Code into your Bottom Javascript. Paste this code into your bottom javascript in your site-wide-customization: Code:
// ---------------------------------------------
// Slideshow parameter modification
// ---------------------------------------------
function MyEmbedSWF(swfURL, containerID, swfID, version, backgroundColor, expressInstall)
{
// catch all exceptions here so, if there's an error, we just continue on as if we weren't here
try {
var overrides = null;
if (this._type == "gallery")
{
overrides = this.gallerySlideshowOverrides;
}
else if (this._type == "fullScreen")
{
overrides = this.fullScreenSlideshowOverrides;
}
if (overrides)
{
// copy all overrides over into the objects flashVars
for (var i in overrides)
{
this._flashVars[i] = overrides[i];
}
}
} catch (e) {}
oldEmbedSWF.apply(this, arguments); // call the regular handler for this method
}
function SetSlideshowOverrides()
{
var globalGallerySlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false",
showThumbs: "false",
captions: "false",
transparent: "true" // no comma after the last entry in this table or IE7 will barf
};
var globalFullScreenSlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false" // no comma after the last entry in this table or IE7 will barf
};
SM.flash.Slideshow.prototype.gallerySlideshowOverrides = globalGallerySlideshowConfigOverride;
SM.flash.Slideshow.prototype.fullScreenSlideshowOverrides = globalFullScreenSlideshowConfigOverride;
// now check to see if anything was defined just for this gallery and use it instead
if (typeof(localGallerySlideshowConfigOverride) == "object")
{
SM.flash.Slideshow.prototype.gallerySlideshowOverrides = localGallerySlideshowConfigOverride;
}
if (typeof(localFullScreenSlideshowConfigOverride) == "object")
{
SM.flash.Slideshow.prototype.fullScreenSlideshowOverrides = localFullScreenSlideshowConfigOverride;
}
}
// SM.flash.Slideshow is only defined in a galleries page
if (typeof(SM.flash.Slideshow) == "function")
{
var oldEmbedSWF = SM.flash.Slideshow.superclass._embedSWF;
SM.flash.Slideshow.superclass._embedSWF = MyEmbedSWF;
SetSlideshowOverrides();
}
// ---------------------------------------------
// end of slideshow customization
// ---------------------------------------------
In this code that you just put into your bottom javascript are two tables of values. One is called globalGallerySlideshowConfigOverride, the other is called globalFullScreenSlideshowConfigOverride. This is where you set the values that you want your gallery slideshows or your full screen slideshows to have. These tables affect all gallery slideshow or all full screen slideshows in your site. If you want to only change the slideshow in one specific gallery, then these tables can be left empty and you can read on to the following steps. The valid values for these tables are as follows: Code:
showButtons: "false", showSpeed: "false", showThumbs: "false", captions: "false", bgColor: "FF0000", Step 3 - Set Parameters for a Specific Gallery (optional) If you want to set different parameters for a specific gallery, here's how you would do that. In the albumDescription for that gallery, paste this code: Code:
<html>
<script type="text/javascript">
var localGallerySlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false",
showThumbs: "false",
captions: "false"
};
var localFullScreenSlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false"
};
</script>
</html>
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question Last edited by jfriend; Oct-15-2010 at 01:10 PM. |
|
|
|
|
#2
|
|
|
Beginner grinner
|
Hi there,
Thanks for this tutorial. I have used this for my homepage slideshow but cannot change the background color. http://brijeshpatel.smugmug.com/gallery/1869831 I want to change the black background color of the slideshow so it blends with the rest of the page. Would be greatfull for your help. Manieer |
|
|
|
|
#3
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#4
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#5
|
|
|
Big grins
|
Hi. I've tried the lengthy code and put it in my bottom javascript as mentioned above, but it still did not remove my captions in full screen slideshow which I wanted to do. The only thing it did was get rid of the speed buttons on the topmost left. I was wondering if I'm missing something. Please help. Thanks!
|
|
|
|
|
#6
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#7
|
||
|
Big grins
|
Quote:
Here's the direct link to the gallery: http://www.yenbaet.com/gallery/8348541_8SrPF or, my smugmug URL: http://rainprel.smugmug.com/gallery/8348541_8SrPF |
|
|
|
||
|
#8
|
||
|
Scripting dude-volunteer
|
Quote:
Code:
var globalGallerySlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false",
showThumbs: "false",
captions: "false" // no comma after the last entry in this table or IE7 will barf
};
var globalFullScreenSlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false" // no comma after the last entry in this table or IE7 will barf
};
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#9
|
||
|
Big grins
|
Quote:
Thanks so much once again. Worked lke a charm. I think a lot of people are looking for this code; this definitely helps. |
|
|
|
||
|
#10
|
|
|
Big grins
|
Thanks for the code.
__________________
Photos: http://www.kenyahudson.com Profiles: Lightstalkers | Sportsshooter Gear: Canon 40D | Canon 350D | Tokina 17/3.5 | Sigma 30mm/1.4 | EF 50mm/1.4 | EF 85mm/1.8 | EF 200mm/2.8L II | EF 300mm/4.0L | Canonet QL 17 GIII | Yashica 635 | Elinchrom Skyport Transmitter & Triggers | Canon 430EX | Nikon SB-24 (x2) | Bogen 3208 Tripod |
|
|
|
|
#11
|
|
|
Shooter
|
can we customize the size (width) of the slideshow with this code?
__________________
Nikon Shooter - D700 Rich Mar Photography - Sydney Family Photographer Rich Mar Photography Blog |
|
|
|
|
#12
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#13
|
|
|
underwater kungfu
|
Is there a way to set the default speed to 'Fast'?
|
|
|
|
|
#14
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#15
|
|
|
Scripting dude-volunteer
|
Fixed a problem with this code that was causing a script error in non-gallery pages that could cause some other code to stop working. If you have installed this code, you should update your code with the newest version that is now included in the first post in this thread.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
|
#16
|
||
|
Beginner grinner
|
Quote:
Thanks for getting back to me over here and sorry for my delayed response. I've copied and pasted in the new code but I'm still having the same issue. What am I doing wrong? As an addition, this is what I have in my Bio box: <html> ********> var ssConfig = { AlbumID: '9192288', newWindow: 'false', transparent: 'true', showLogo: 'false', clickToImage: 'true', showThumbs: 'false', randomize: 'true', borderThickness: '10', borderColor:'ffffff', showButtons: 'false', imgAlign: 'center', clickUrl: '/galleries', crossFadeSpeed: '350' }; SM.flash.insertSlideshow(1000, 700, ssConfig, 'transparent'); </******** </html> Last edited by AngusD; Aug-25-2009 at 11:16 PM. |
|
|
|
||
|
#17
|
|
|
Big grins
|
How do you add the bottoms back to the gallery?
Www.jwcarterphotograpy.comhttp://www.jwcarterphotography.com
QUOTE=jfriend]As many have realized, Smugmug did not build in a way to customize the parameters on either the gallery slideshow or the full screen slideshow. Homepage slideshows, on the other hand, can control all sorts of things (captions, thumbs, buttons, transparency, etc...). So, using this customization, you can turn off captions, buttons, speed indicators and thumbs in either the gallery slideshow or the full screen slideshow. Here's how you do it: Step 1: Paste Code into your Bottom Javascript. Paste this code into your bottom javascript in your site-wide-customization: Code:
// ---------------------------------------------
// Slideshow parameter modification
// ---------------------------------------------
function MyEmbedSWF(swfURL, containerID, swfID, version, backgroundColor, expressInstall)
{
// catch all exceptions here so, if there's an error, we just continue on as if we weren't here
try {
var overrides = null;
if (this._type == "gallery")
{
overrides = this.gallerySlideshowOverrides;
}
else if (this._type == "fullScreen")
{
overrides = this.fullScreenSlideshowOverrides;
}
if (overrides)
{
// copy all overrides over into the objects flashVars
for (var i in overrides)
{
this._flashVars[i] = overrides[i];
}
}
} catch (e) {}
oldEmbedSWF.apply(this, arguments); // call the regular handler for this method
}
function SetSlideshowOverrides()
{
var globalGallerySlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false",
showThumbs: "false",
captions: "false",
transparent: "true" // no comma after the last entry in this table or IE7 will barf
};
var globalFullScreenSlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false" // no comma after the last entry in this table or IE7 will barf
};
SM.flash.Slideshow.prototype.gallerySlideshowOverrides = globalGallerySlideshowConfigOverride;
SM.flash.Slideshow.prototype.fullScreenSlideshowOverrides = globalFullScreenSlideshowConfigOverride;
// now check to see if anything was defined just for this gallery and use it instead
if (typeof(localGallerySlideshowConfigOverride) == "object")
{
SM.flash.Slideshow.prototype.gallerySlideshowOverrides = localGallerySlideshowConfigOverride;
}
if (typeof(localFullScreenSlideshowConfigOverride) == "object")
{
SM.flash.Slideshow.prototype.fullScreenSlideshowOverrides = localFullScreenSlideshowConfigOverride;
}
}
// SM.flash.Slideshow is only defined in a galleries page
if (typeof(SM.flash.Slideshow) == "function")
{
var oldEmbedSWF = SM.flash.Slideshow.superclass._embedSWF;
SM.flash.Slideshow.superclass._embedSWF = MyEmbedSWF;
SetSlideshowOverrides();
}
// ---------------------------------------------
// end of slideshow customization
// ---------------------------------------------
In this code that you just put into your bottom javascript are two tables of values. One is called globalGallerySlideshowConfigOverride, the other is called globalFullScreenSlideshowConfigOverride. This is where you set the values that you want your gallery slideshows or your full screen slideshows to have. These tables affect all gallery slideshow or all full screen slideshows in your site. If you want to only change the slideshow in one specific gallery, then these tables can be left empty and you can read on to the following steps. The valid values for these tables are as follows: Code:
showButtons: "false", showSpeed: "false", showThumbs: "false", captions: "false", bgColor: "FF0000", Step 3 - Set Parameters for a Specific Gallery (optional) If you want to set different parameters for a specific gallery, here's how you would do that. In the albumDescription for that gallery, paste this code: Code:
<html>
<script type="text/javascript">
var localGallerySlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false",
showThumbs: "false",
captions: "false",
};
var localFullScreenSlideshowConfigOverride = {
showButtons: "false",
showSpeed: "false"
};
<script>
</html>
|
|
|
|
|
#18
|
||
|
Scripting dude-volunteer
|
Quote:
P.S. The link to your site is really messed up in dgrin. I am guessing that the proper link is http://www.jwcarter-photo.com, but I'm not sure.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
|
#19
|
||
|
Big grins
|
Slideshow buttons
Quote:
I am trying to put back the full screen slideshow buttons back on my Wedding and Event pages. I think the slideshow updates is great and I want to use it. Sorry about the last post and the web adress in your reply is correct. Thanks. John |
|
|
|
||
|
#20
|
||
|
Scripting dude-volunteer
|
Quote:
.gallery_5525052 #breadcrumb {display: none;} .gallery_5525911 #breadcrumb {display: none;} If you don't want the style button to show, then go to customize gallery for those galleries and lock the style to Smugmug. This will cause Smugmug to take away the style button.
__________________
--John Homepage • Popular JFriend's javascript customizations • Secrets for getting fast answers on Dgrin Always include a link to your site when posting a question |
|
|
|
||
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|