Democratic Underground Latest Greatest Lobby Journals Search Options Help Login
Google

If the group smugalugafug looks odd or is missing

Printer-friendly format Printer-friendly format
Printer-friendly format Email this thread to a friend
Printer-friendly format Bookmark this thread
This topic is archived.
Home » Discuss » DU Groups » Arts & Entertainment » Photography Group Donate to DU
 
F.Gordon Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Sep-20-06 12:48 AM
Original message
If the group smugalugafug looks odd or is missing
DON'T PANIC !!!!!

http://www.forumphotogroup.com/

I'm going to be using the group mugazug to play with some new site designs so I can help out a few DUer-Smugmuggers with their smugkug, and I'm going to be changing the group smugalugazug. Going to change it to better meet the needs of the group. I've picked up on a few things that I think would be useful to people that hang here. Full co-branding, group "photo bucket" type galleries, FREE digital files for DUers.. stuff like that.

Oh, and..... DON'T PANIC !!!!!! I promise that NO PHOTOS WILL BE DELETED. With one exception.... the member links. Lakemonster appears to be MIA and Reg' is getting nailed again by spammers. I'm going to change this to a different format to keep frukkers from doing this. I know when I had the email addy on the home page I was getting blasted by spam.

:hi:
Printer Friendly | Permalink |  | Top
CC Donating Member (1000+ posts) Send PM | Profile | Ignore Wed Sep-20-06 12:54 AM
Response to Original message
1. Keep detailed instructions.
I haven't tried playing around with personalizing mine yet. Might when things slow down. Oh and I always do email as an image so the spammers can't just pick it up with their software. Yes people have to type it in but cuts way down on spam.



Printer Friendly | Permalink |  | Top
 
F.Gordon Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Sep-21-06 03:41 PM
Response to Original message
2. Part I complete
I need to "enlarge" the photos just a tad and then this part will be complete. Also, I'll be moving the slideshow to the footer so the bio and header can be use for other things.

http://www.forumphotogroup.com /

This is VERY easy. I'll post the code later.
:hi:
Printer Friendly | Permalink |  | Top
 
F.Gordon Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Sep-21-06 03:46 PM
Response to Reply #2
3. First part of code
Copy the code below. Go to your Control Panel. Go to customize. Then paste this in your java script secion: (copy and paste stuff below this line....
-----------------------------------------------------------------

/*=========================*/
/*== 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 = "200";

if (typeof(slideWidth) == "undefined" || isNaN(slideWidth))
slideWidth = "300";

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 = blank.src;

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="" 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="illegal code void(0);" illegal code"prevSlide();"><img src="/img/spacer.gif" border="0" /></a><a title="Next Slide" id="ssNext" class="ssBtn" href="illegal code void(0);" illegal code"nextSlide();"><img src="/img/spacer.gif" border="0" /></a><a title="Pause Slideshow" id="ssPause" class="ssBtn" href="illegal code void(0);" illegal code"pauseSlideshow();"><img src="/img/spacer.gif" border="0" /></a><a title="Resume Slideshow" id="ssPlay" class="ssBtn" href="illegal code void(0);" illegal code"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<'TemplateID'> = '8';
postArray<'origin'> = slideshowUrl;
ajax_query(slideshowHandler, '/homepage/templatechange.mg', postArray, true);
}
}


function slideshowHandler(response)
{
if (!slideSourceIsGallery) {
if (tmpCookie && tmpCookie != "") {
var postArray = new Array();
postArray<'TemplateID'> = tmpCookie;
postArray<'origin'> = 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 * 1000);

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.Loaded == false)
{
ssSlides.Image = new Image();
ssSlides.Image.src = ssSlides.File;
ssSlides.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.Loaded != false)
{
document.images<'ssSlide'>.src = blank.src;
sSlide.style.backgroundImage = 'url(' + ssSlides.File + ')';
if (resizeToPhoto)
{
document.images<'ssSlide'>.height = ssSlides.Height;
document.images<'ssSlide'>.width = ssSlides.Width;
}

if (slidesClickable)
ssAddSlideClick(ssSlides.Gallery);

if (slideCaptions)
document.getElementById('ssCaption').innerHTML = ssSlides.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;
this = 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";
}
Printer Friendly | Permalink |  | Top
 
F.Gordon Donating Member (1000+ posts) Send PM | Profile | Ignore Thu Sep-21-06 03:50 PM
Response to Reply #2
4. Now you have to use a gallery for the slideshow
Edited on Thu Sep-21-06 04:16 PM by F.Gordon
The slideshowContainerID tells the script WHERE you want the slideshow to display. In this case I'm just using the bioBox (but will be changing). The slideshowUrl is the gallery you want to use for your slide show. For this I'm using the "best of 2005" gallery.

----------------------------------------------------------------
<script type="text/javascript"> /* required slideshow variables */ slideshowContainerId = "bioBox"; slideshowUrl = "http://photogroup.smugmug.com/gallery/1043897"; /* optional slideshow variables */ /* see properties section */ loadSlideshow(); </script>
-------------------------------------------------------------------

On EDIT: You need to copy and paste AND MAKE THE CHANGES relevant to YOUR smugmugafug ... put THIS in the Footer section of your customize page.
:dunce:

I'll post the "optional slideshow variables" later.
:hi:

Any questions so far???? Ye' DU smugalugabugs???
:shrug:
Printer Friendly | Permalink |  | Top
 
DU AdBot (1000+ posts) Click to send private message to this author Click to view 
this author's profile Click to add 
this author to your buddy list Click to add 
this author to your Ignore list Tue Apr 16th 2024, 04:51 PM
Response to Original message
Advertisements [?]
 Top

Home » Discuss » DU Groups » Arts & Entertainment » Photography Group Donate to DU

Powered by DCForum+ Version 1.1 Copyright 1997-2002 DCScripts.com
Software has been extensively modified by the DU administrators


Important Notices: By participating on this discussion board, visitors agree to abide by the rules outlined on our Rules page. Messages posted on the Democratic Underground Discussion Forums are the opinions of the individuals who post them, and do not necessarily represent the opinions of Democratic Underground, LLC.

Home  |  Discussion Forums  |  Journals |  Store  |  Donate

About DU  |  Contact Us  |  Privacy Policy

Got a message for Democratic Underground? Click here to send us a message.

© 2001 - 2011 Democratic Underground, LLC