changing slideshow source gallery
primedigital
Registered Users Posts: 93 Big grins
I have a slideshow running on my home page and I would like to change the images. I have created a new gallery and filled it with images, but I can't remember where I need to plug in the url so it can find it. Not sure if I am to use the gallery url, or the url of the first image in the gallery. I can't remember. It's been so long since I have made any changes to the slideshow. Any help would be greatly appreciated.
Tracy :photo
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
0
Comments
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Here is the code in my Jave box:
//filmStrip values you can override:
rightMoves = -5;
leftMoves = 5;
/*=========================*/
/*== SLIDE SHOW ==*/
/*== version 0.56 ==*/
/*== Updated 03 May 2006 ==*/
/*=========================*/
var SLIDE_SHOW = 0;
var RANDOM_PHOTO = 1;
var slideshowContainer;
var sSlide;
var sCaption;
var ssSlides;
var ssSlideTotal;
var ssSlideTimer;
var ssOldSlide;
var ssFadeTimer;
var ssFade;
var ssTimerId;
var blank;
function PrepSlideEnvironment()
{
tmpCookie = getCookie("Template");
blank = new Image();
blank.src = "/img/spacer.gif";
if (typeof(slideshowType) == "undefined" || (slideshowType != SLIDE_SHOW && slideshowType != RANDOM_PHOTO))
slideshowType = SLIDE_SHOW;
if (slideshowType == RANDOM_PHOTO)
randomSlides = true;
if (typeof(slideshowContainerId) == "undefined")
return false
else if (typeof(slideshowContainerId) == "string")
slideshowContainer = document.getElementById(slideshowContainerId);
if (!slideshowContainer)
return false;
if (typeof(slideshowUrl) == "undefined" || typeof(slideshowUrl) != "string")
return false;
else
slideshowUrl = /(?:http:\/\/[^\/]+)?(\/\S+)/.exec(slideshowUrl)[1];
if (/\/gallery\/[0-9]+/.test(slideshowUrl))
slideSourceIsGallery = true;
else
slideSourceIsGallery = false;
if (typeof(slideHeight) == "undefined" || isNaN(slideHeight))
slideHeight = "800";
if (typeof(slideWidth) == "undefined" || isNaN(slideWidth))
slideWidth = "800";
if (typeof(photoHeight) == "undefined" || isNaN(photoHeight))
photoHeight = slideHeight;
if (typeof(photoWidth) == "undefined" || isNaN(photoWidth))
photoWidth = slideWidth;
if (typeof(slideDuration) == "undefined" || isNaN(slideDuration))
slideDuration = 3;
if (typeof(firstSlideUrl) == "undefined" || typeof(firstSlideUrl) != "string")
firstSlideUrl = "http://primedigitalphotography.smugmug.com/photos/174536275-L.jpg";
if (typeof(showSlideTransition) == "undefined" || typeof(showSlideTransition) != "boolean")
showSlideTransition = true;
if (typeof(resizeToPhoto) == "undefined" || typeof(resizeToPhoto) != "boolean")
resizeToPhoto = true;
if (typeof(quickStart) == "undefined" || typeof(quickStart) != "boolean")
quickStart = true;
if (typeof(randomSlides) == "undefined" || typeof(randomSlides) != "boolean")
randomSlides = false;
if (typeof(slideControls) == "undefined" || typeof(slideControls) != "boolean")
slideControls = false;
if (typeof(slideCaptions) == "undefined" || typeof(slideCaptions) != "boolean")
slideCaptions = false;
if (typeof(slidesClickable) == "undefined" || typeof(slidesClickable) != "boolean")
slidesClickable = false;
return true;
}
function loadSlideshow()
{
if (!PrepSlideEnvironment())
return false;
slideshowContainer.innerHTML = '<img src="http://www.smugmug.com/img/spacer.gif" alt="" id="ssSlide" height="' + slideHeight + '" width="' + slideWidth + '" style="opacity: .99; background-image: url(' + firstSlideUrl + '); background-repeat: no-repeat; background-position: center;" />';
if (slideCaptions)
slideshowContainer.innerHTML += '<div id="ssCaption"></div>';
if (slideControls)
slideshowContainer.innerHTML += '<div id="ssControl"><a title="Previous Slide" id="ssPrev" class="ssBtn" href="javascript: void(0);" onclick="prevSlide();"><img src="/img/spacer.gif" border="0" /></a><a title="Next Slide" id="ssNext" class="ssBtn" href="javascript: void(0);" onclick="nextSlide();"><img src="/img/spacer.gif" border="0" /></a><a title="Pause Slideshow" id="ssPause" class="ssBtn" href="javascript: void(0);" onclick="pauseSlideshow();"><img src="/img/spacer.gif" border="0" /></a><a title="Resume Slideshow" id="ssPlay" class="ssBtn" href="javascript: void(0);" onclick="resumeSlideshow();"><img src="/img/spacer.gif" border="0" /></a></div>';
sSlide = document.getElementById('ssSlide');
sCaption = document.getElementById('ssCaption');
if (slidesClickable) {
sSlide.style.cursor = 'pointer';
if (firstSlideUrl != blank.src)
ssAddSlideClick(slideshowUrl);
}
ssSlides = new Array(null);
ssSlideTotal = 0;
ssSlideTimer = 0;
ssOldSlide = 0;
ssFadeTimer = 100;
ssFade = "out";
if (slideSourceIsGallery)
ajax_query(slideshowHandler, '/photos/sspopup.mg?AlbumID=' + /\/gallery\/([0-9]+)/.exec(slideshowUrl)[1], null, true);
else {
var postArray = new Array();
postArray = '8';
postArray = slideshowUrl;
ajax_query(slideshowHandler, '/homepage/templatechange.mg', postArray, true);
}
}
function slideshowHandler(response)
{
if (!slideSourceIsGallery) {
if (tmpCookie && tmpCookie != "") {
var postArray = new Array();
postArray = tmpCookie;
postArray = slideshowUrl;
ajax_query(function(){}, '/homepage/templatechange.mg', postArray, true);
}
else
deleteCookie("Template", "/", "smugmug.com");
}
var re = /imageID\[\d+\] = "\d+";/g;
var re2 = /width\[\d+\] = "\d+";/g;
var re3 = /height\[\d+\] = "\d+";/g;
var re4 = /caption\[\d+\] = ".*";/g;
s = response.match(re);
w = response.match(re2);
h = response.match(re3);
c = response.match(re4);
var oSlide;
for (i = 0; i < s.length; i++)
{
oSlide = new Object;
temp = s.split(/"/);
oSlide.ImageId = temp[1];
oSlide.File = 'http://upload.smugmug.com/photos/toolthumbs.mg?ImageID=' + temp[1] + '&tool=slideshowXL&winHeight=' + photoHeight + '&winWidth=' + photoWidth;
oSlide.Gallery = slideshowUrl + '/1/' + oSlide.ImageId;
temp = h.split(/"/);
oSlide.Height = temp[1];
temp = w.split(/"/);
oSlide.Width = temp[1];
temp = c.split(/"/);
oSlide.Caption = temp[1];
oSlide.Loaded = false;
if ((oSlide.Width > photoWidth) || (oSlide.Height > photoHeight))
{
if (oSlide.Width >= oSlide.Height)
{
oSlide.Height = Math.round((oSlide.Height / oSlide.Width) * photoWidth);
oSlide.Width = photoWidth;
}
else
{
oSlide.Width = Math.round((oSlide.Width / oSlide.Height) * photoHeight);
oSlide.Height = photoHeight;
}
}
ssSlideTotal = ssSlides.push(oSlide);
}
ssSlideTotal -= 1;
if (randomSlides)
{
ssSlides.shift();
ssSlides.shuffle();
ssSlides.unshift(0);
}
if (quickStart)
ssSlideTimer = (slideDuration * 1);
ssPrepSlide(1);
window.setTimeout("ssPrepSlide(2);", 0);
window.setTimeout("ssPrepSlide(ssSlideTotal);", 0);
if (slideshowType == SLIDE_SHOW)
ssPlaySlideshow();
else
ssSlideSwap(1);
}
function ssPauseSlideshow()
{
window.clearTimeout(ssTimerId);
ssTimerId = null;
}
function ssResumeSlideshow()
{
if (!ssTimerId)
ssTimerId = window.setTimeout("ssPlaySlideshow()", 10);
}
function ssPrepSlide(prep)
{
if (ssSlides[prep].Loaded == false)
{
ssSlides[prep].Image = new Image();
ssSlides[prep].Image.src = ssSlides[prep].File;
ssSlides[prep].Loaded = true;
}
}
function ssMoveSlide(i) {
ssSlideTimer = 0;
ssFadeTimer = 100;
ssTransition(ssFadeTimer);
ssFade = "out";
ssSlideSwap(i);
}
function ssPlaySlideshow()
{
if (ssSlideTimer >= (slideDuration * 1000))
{
if (ssFade == 'out')
ssTransition(ssFadeTimer -= 10);
if (ssFadeTimer == 0)
{
ssSlideSwap(1);
ssFade = 'in';
}
if (ssFade == 'in')
ssTransition(ssFadeTimer += 10);
if (ssFadeTimer == 100)
{
ssSlideTimer = 0;
ssFade = 'out';
}
}
else
ssSlideTimer += 10;
ssTimerId = window.setTimeout("ssPlaySlideshow()", 10);
}
function ssTransition(opacity)
{
if (showSlideTransition)
{
if (opacity != 100)
sSlide.style.opacity = (opacity / 100);
// one case where mozilla sucks: the image will flash if you turn opacity up to 1 suddenly
else
sSlide.style.opacity = (.99);
// only affects Win IE
sSlide.style.filter = 'alpha(opacity=' + opacity + ')';
if (sCaption) {
sCaption.style.opacity = sSlide.style.opacity;
sCaption.style.filter = sSlide.style.filter;
}
}
}
function ssSlideSwap(i)
{
var newSlide = ssOldSlide + i;
if (newSlide > ssSlideTotal)
newSlide = 1;
if (newSlide < 1)
newSlide = ssSlideTotal;
if (ssSlides[newSlide].Loaded != false)
{
document.images.src = blank.src;
sSlide.style.backgroundImage = 'url(' + ssSlides[newSlide].File + ')';
if (resizeToPhoto)
{
document.images.height = ssSlides[newSlide].Height;
document.images.width = ssSlides[newSlide].Width;
}
if (slidesClickable)
ssAddSlideClick(ssSlides[newSlide].Gallery);
if (slideCaptions)
document.getElementById('ssCaption').innerHTML = ssSlides[newSlide].Caption;
ssPrepSlide(newSlide < ssSlideTotal ? newSlide + i : 1);
ssOldSlide = newSlide;
}
else
{
ssPrepSlide(newSlide);
ssSlideSwap(i);
}
}
function ssAddSlideClick(sUrl) {
addEvent(sSlide, 'click', function(){location.href=sUrl;});
}
Array.prototype.shuffle = function()
{
var len = this.length;
var rand, temp, i;
for (i = 0; i < len; i++)
{
rand = Math.floor(Math.random()*len);
temp = this;
this = this[rand];
this[rand] = temp;
}
}
function pauseSlideshow()
{
document.getElementById('ssPause').style.display = "none";
document.getElementById('ssPlay').style.display = "inline";
ssPauseSlideshow();
}
function resumeSlideshow()
{
document.getElementById('ssPause').style.display = "inline";
document.getElementById('ssPlay').style.display = "none";
ssResumeSlideshow();
}
function prevSlide()
{
pauseSlideshow();
ssMoveSlide(-1);
}
function nextSlide()
{
pauseSlideshow();
ssMoveSlide(1);
}
function getCookie(name) {
var start = document.cookie.indexOf(name + "=");
var len = start + name.length + 1;
if ((!start) && (name != document.cookie.substring(0, name.length)))
return null;
if (start == -1)
return null;
var end = document.cookie.indexOf(";", len);
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(len, end));
}
function deleteCookie(name, path, domain) {
if (getCookie(name))
document.cookie = name + "=" + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
function delHover() {
imgTags = document.getElementsByTagName("img");
for (i=0; i<imgTags.length; i++) {
imgTags.title = "";
imgTags.alt = "";
}
}
function AddReferralCode() {
var links = this.getElementsByTagName("A");
if (links && (links.length != 0)) {
var smugLink = links.item(0);
smugLink.href = "http://www.smugmug.com/?referrer=WRCvAV6YBBmds";
}
}
YE.onAvailable('footer'
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
work, no new photo will appear in the old show since the security keys were
added. I strongly recommend switching to the new show here.
http://wiki.smugmug.net/display/SmugMug/Flash+Slideshow
Remove old slideshow code
http://www.dgrin.com/showpost.php?p=777834&postcount=14
My Website index | My Blog
I deleted the lod slideshow stuff from my top java box and pasted in the new code to my bio filling in the proper fields. It is splashing to the correct image, but then goes on to the old slideshow. I noticed some code in my footer box that referrs to slideshow stuff and there is a url there. What am I doing wrong?
Here is the code in my footer:
********>
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
</********
******** type="text/javascript">
/* required slideshow variables */
slideshowContainerId = "mySlideshow";
slideshowUrl = "http://primedigitalphotography.smugmug.com/gallery/2043575_JzsbL";
/* optional slideshow variables */
/* see properties section */
slideDuration = 3;
showSlideTransition = 1000;
if (YD.hasClass(document.body, 'homepage') && !YD.hasClass(document.body, 'galleries'))
loadSlideshow();
</********
<table border="0" cellpadding="3" width="100%" height="355">
<tr>
<td width="13%" height="3"></td>
<td valign="bottom " width="73%" height="3">
<p align="center"></td>
<td width="14%" height="3"></td>
</tr>
<tr>
<td width="13%" height="3"></td>
<td width="73%" height="3"><font size="3"></font></td>
<td width="14%" height="3"></td>
</tr>
<tr>
<td width="13%" height="3"></td>
<td valign="bottom" width="73%" height="3">
<p align="center"><font size="3" face="AvantGarde Bk BT" color="#666666">All
Images Copyrighted 2008 Prime Digital Photography</font><a href="<A href="http://primedigitalphotography.smugmug.com/gallery/2349519"><font">http://primedigitalphotography.smugmug.com/gallery/2349519"><font size="3" face="AvantGarde Bk BT" color="#666666">.</font></a></p>
<p align="center"> </td>
<td width="14%" height="3"></td>
</tr>
</table>
<head>
****** http-equiv="Content-Type" content="text/html; charset=windows-1252">
****** name="GENERATOR" content="Microsoft FrontPage 4.0">
****** name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<head>
****** http-equiv="Content-Language" content="en-us">
****** http-equiv="Content-Type" content="text/html; charset=windows-1252">
****** name="GENERATOR" content="Microsoft FrontPage 4.0">
****** name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<p align="center"><font color="#666666"><a href="<A href="http://primedigitalphotography.smugmug.com/gallery/2769975">............................................................................</a></font></p">http://primedigitalphotography.smugmug.com/gallery/2769975">............................................................................</a></font></p>
<p align="center"><a href="<A href="http://fusion.google.com/add?feedurl=http://feeds.feedburner.com/feedburner/UHKo"><img">http://fusion.google.com/add?feedurl=http://feeds.feedburner.com/feedburner/UHKo"><img src="http://buttons.googlesyndication.com/fusion/add.gif" width="104" height="17" style="border:0" alt="Add to Google Reader or Homepage"/></a></p>
<p align="center"><a href="http://add.my.yahoo.com/rss?url=http://feeds.feedburner.com/feedburner/UHKo" title="Tracy Mewmaw's galleries"><img src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif" alt="" style="border:0"/></a></p>
<p align="center"><a href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http://feeds.feedburner.com/feedburner/UHKo" title="Tracy Mewmaw's galleries"><img src="http://www.newsgator.com/images/ngsub1.gif" alt="Subscribe in NewsGator Online" style="border:0"/></a></p>
******** src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</********
******** type="text/javascript">
_uacct = "UA-1198256-1";
urchinTracker();
</********
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
--- Denise
Musings & ramblings at https://denisegoldberg.blogspot.com
As far as I can tell I have removed everything that Allen told me to from javascript box. Nothing that remains, resembles anything he told me to remove. What do I do now?
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
<div id="mySlideshow"></div>
Things in CSS that can be removed.
Put a space between 2125973 and .nophotos in CSS
/* html only page for gallery 2125973 */
.gallery_2125973.nophotos { display: none; }
Put this in your biobox and change var's to what you want shown.
My Website index | My Blog
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389
"homepage layout" button and see if it's checked.
My Website index | My Blog
1) Go to the homepage layout button and show your bio.
2) Remove this from your custom footer:
3) Remove this from your custom footer:
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Prime Digital Photography
Capturing life one fraction of a second at a time
http://www.primedigitalphotography.com/
http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=195119389