• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support SmugMug Customization Client proofing area

FAQtoid

Ever wanted to create an Avatar? Creating an Avatar!

Searching Dgrin with Google Searching with Google

Dgrin Challenges

Congratulations to the Winner of DSS #128 (Sunrise or Sunset), ShootingStar.

The next Dgrin Challenge DSS #129 (Silhouette Revisited ) is open for entries through May 27th, 2013 at 8:00pm PDT.

As always, we look forward to your participation but please do take a moment to read through the rules before posting your entry.

Past DSS Challenge Winners, DSS Challenge Rules, and other important DSS Challenge information is here.

Need some help with Accessories?

Tutorials

Ever find yourself wondering just how someone managed to create an image using different effects?

Here are three simple tutorials we hope will encourage you to try something new.

The Hot Seat

A lifelong interest in landscape photography has led Eyal Oren to make a study of his adopted hometown of Marblehead, MA. As you can see, his dedication is paying off!

Africa!

Dgrinners Harryb, Pathfinder, and others joined Andy Williams and Marc Muench on Safari in East Africa recently. Here are some awesome threads to check out!

 
Thread Tools Display Modes
Page 3  of  12
1 2 3 4 5 6 7 Last »
Old Apr-26-2012, 08:30 PM
#41
alex326 is offline alex326
Beginner grinner
Quote:
Originally Posted by alex326 View Post
Hi, I am trying to get the client login page to work - it seems many people in this thread had the same problem. I click on "clients" and nothing shows up. Please help :)

www.amgphotography.com
Also, the "clients" category still shows up when I click "galleries" on the nav bar. I'd like it to just be separate under the "clients" area on the nav bar. Does this code that I'm trying to use hide the clients category from showing up under "galleries"?
Old Apr-27-2012, 01:32 AM
#42
Patrik is offline Patrik
Big grins
Hi,

This doesn't work for me. My slideshows disappear when I add the code so I removed it again. Where should I start troubleshooting?

www.patrikwinge.com
Old Apr-27-2012, 01:37 AM
#43
J Allen is offline J Allen
Major grins
J Allen's Avatar
Quote:
Originally Posted by Patrik View Post
Hi,

This doesn't work for me. My slideshows disappear when I add the code so I removed it again. Where should I start troubleshooting?

www.patrikwinge.com

add the above code to your bottom js box and we'll have a look at it
__________________
-Joe Allen
My Smugmug Site
Old Apr-27-2012, 01:43 AM
#44
Patrik is offline Patrik
Big grins
Done!

I want the menu to say Login instead of Client so I change the script somewhere...

Patrik
Old Apr-27-2012, 02:08 AM
#45
J Allen is offline J Allen
Major grins
J Allen's Avatar
Quote:
Originally Posted by Patrik View Post
Done!

I want the menu to say Login instead of Client so I change the script somewhere...

Patrik

Remove what you have in there and replace it with code from this post:

http://www.dgrin.com/showpost.php?p=...6&postcount=43

You also need to have a category named "Clients" with a few public galleries in there.
__________________
-Joe Allen
My Smugmug Site
Old Apr-27-2012, 02:25 AM
#46
Patrik is offline Patrik
Big grins
Done!

Still no slideshows...
Old Apr-27-2012, 02:51 AM
#47
Patrik is offline Patrik
Big grins
Done. My slideshows have returned!

What's next?
Old Apr-27-2012, 02:53 AM
#48
J Allen is offline J Allen
Major grins
J Allen's Avatar
Quote:
Originally Posted by Patrik View Post
Done. My slideshows have returned!

What's next?

In your custom header box, change this line:

Code:
<li><a href="/photos/i-nhH5vjr/0/L/i-nhH5vjr-L.jpg" title="">Login</a></li>

to this:


Code:
<li><a href="/Clients" title="">Login</a></li>
__________________
-Joe Allen
My Smugmug Site
Old Apr-27-2012, 03:00 AM
#49
Patrik is offline Patrik
Big grins
Done. It works!

Thank you!

Just one question... Is it necessary to have public galleries? Can't they be hidden?
Old Apr-27-2012, 03:10 AM
#50
Patrik is offline Patrik
Big grins
Thank you!

I appreciate your help!
Old Apr-27-2012, 03:12 AM
#51
Patrik is offline Patrik
Big grins
The Contact Me page we added now doesn't work.

"We're awfully sorry, but there was a problem. Please try again."
Old Apr-27-2012, 03:19 AM
#52
J Allen is offline J Allen
Major grins
J Allen's Avatar
Quote:
Originally Posted by Patrik View Post
The Contact Me page we added now doesn't work.

"We're awfully sorry, but there was a problem. Please try again."

if you have a "pro" account, you need to enable it from your main control panel...if you do not have a pro account then we can just remove it from the code I supplied you
__________________
-Joe Allen
My Smugmug Site
Old Apr-27-2012, 03:22 AM
#53
Patrik is offline Patrik
Big grins
I have a Power account.
Old Apr-27-2012, 03:43 AM
#54
Patrik is offline Patrik
Big grins
Thank YOU!

You are a Hero!
Old Apr-27-2012, 04:08 AM
#55
Patrik is offline Patrik
Big grins
I've found one issue...

The Login dialogue disappears outside (?) the screen on a small device like iPhone. It is possible to login, but it's difficult. Any idea?
Old Apr-27-2012, 06:39 AM
#56
alex326 is offline alex326
Beginner grinner
Thank you! Works great!

Quote:
Originally Posted by J Allen View Post
Looks like you have some type of js error, remove all your previous code for the client log-in and replace it with this:
Code:

function addCategoryTitleToThumbs(descriptionObject, boxObjectName) 
{
    var re = /\>([^\<]+)<\/a>/i;    // pattern to find the category name between the <a> and </a> tags
    var divTag = YD.get(boxObjectName);
    if (divTag) 
    {
        var divTags = YD.getElementsByClassName("albumTitle", "p", divTag);
        for (var i = 0; i < divTags.length; i++) 
        {
            var matches = re.exec(divTags[i].innerHTML);    // get just the category name
            if (matches && (matches.length > 1))
            {
                var nameWithUnderscores = matches[1].replace(/ |&/g, "_");        // replace spaces with underscores
                // if we have this object in our array, then proceed
                if (descriptionObject[nameWithUnderscores] != undefined)
                {
                    var pTag = document.createElement("p");
                    pTag.className = "categoryDescription";
                    pTag.innerHTML = descriptionObject[nameWithUnderscores];
                    divTags[i].parentNode.insertBefore(pTag, divTags[i].nextSibling);
                }
            }
        }
    }
}




function addCategoryDescription(titleOnly) 
{
    var categoryDescription = {
                "Clients"  : "<font color=#21871D><font size=3>Error. Please check login and try again.</font>"
    };
    
    var re, matches, i;        // various local variables

    // now fix it so that it works automatically even if the category or sub-category name has spaces in it
    // we replace those spaces with underscores (which is what the classname does) and add those to our object so we can match those too
    for (i in categoryDescription) 
    {
        var newName = i.replace(/ |&/g, "_");
        categoryDescription[newName] = categoryDescription[i];    // add a property to the object that has only underscores in the name
    }
    // on the homepage, we want to check for category names and add a description if a match found
    // on a category page, we want to check to see if the category that the page is needs a description under the breadcrumb
    //      and, we need to see if any of the sub-category items on the page need us to add a description under the name
    // on a sub-category page, we want to check to see if the sub-category that the page is needs a description under the breadcrumb
    if (YD.hasClass(document.body, "category")) 
    {
        // fetch the category name
        re = /category_(\S+)/i;
        matches = re.exec(document.body.className);
        if (matches && (matches.length > 1)) 
        {
            var categoryName = matches[1];
            // now see if we have a subcategory too
            if (YD.hasClass(document.body, "subcategory")) 
            {
                re = /subcategory_(\S+)/i;
                matches = re.exec(document.body.className);
                if (matches && (matches.length > 1)) 
                {
                    var subcatName = matches[1];
                    // category and subcategory so we are on a subcategory page showing a list of galleries in this subcategory
                    // we need to just add a subcategory title to this page if the category-subcategory matches
                    var fullName = categoryName + "." + subcatName;
                    if (categoryDescription[fullName])
                    {
                        addCategoryTitleToBreadcrumb(categoryDescription[fullName]);
                    }
                }
            }
            // here we're on a category page
            // we need to add a category description for the category page
            // and potentially add subcategory descriptions to the subcategory names displayed on this page
            else 
            {
                if (categoryDescription[categoryName])
                {
                    addCategoryTitleToBreadcrumb(categoryDescription[categoryName]);
                }
                if (!titleOnly)
                {
                    // now we need to build a temporary subcategoryDescription object that has only the subcategory names in it that are in this category
                    var subcatDescriptions = {};
                    re = new RegExp("^" + categoryName + "\\.(.+)$", "i");
                    for (i in categoryDescription)
                    {
                        matches = re.exec(i);
                        if (matches && (matches.length > 1))
                        {
                            subcatDescriptions[matches[1]] = categoryDescription[i];
                        }
                    }
                    addCategoryTitleToThumbs(subcatDescriptions, "subcategoriesBox");
                }
            }
        }
    }

    // then see if we're on the homepage
    if (!titleOnly && YD.hasClass(document.body, "homepage")) 
    {
        addCategoryTitleToThumbs(categoryDescription, "categoriesBox");
    }
}

function addCategoryDescriptionBoth()
{
    addCategoryDescription(false);
}

YE.onDOMReady(addCategoryDescriptionBoth); 


function TagThumbs() 
{
    // get current category and subcategory
    var info = GetCategoryInfo();
    
    // get list of miniBox divs in the "this" object
    var miniBoxList = YD.getElementsByClassName('miniBox', 'div', this);

    // for each miniBox, get the category or sub-category name from the albumTitle div
    for (var i = 0; i < miniBoxList.length; i++) 
    {
        // get the albumTitle p tag
        var titleTags = YD.getElementsByClassName("albumTitle", "p", miniBoxList[i]);
        if (titleTags && (titleTags.length > 0))
        {
            // get the link in the albumTitle
            var linkTags = titleTags[0].getElementsByTagName('a');
            if (linkTags && (linkTags.length > 0))
            {
                // grab the name of the category/subcategory from the thumb
                var thumbName = linkTags[0].innerHTML;
                thumbName = thumbName.replace(/\s+|\&[a-z]+;|[^_a-zA-Z0-9-]/g, "_");    // replace illegal CSS chars with underscore
                var newClassName = "thumbnail_";
                if (info.cat)
                {
                    newClassName += info.cat + "_";
                }
                if (info.subcat)
                {
                    newClassName += info.subcat + "_";
                }
                newClassName += thumbName;
                YD.addClass(miniBoxList[i], newClassName);
            }
        }
        
        // get the photo div in each miniBox
        var photoTags = YD.getElementsByClassName("photo", "div", miniBoxList[i]);
        if (!photoTags || (photoTags.length == 0))
        {
            photoTags = YD.getElementsByClassName("photoLarge", "div", miniBoxList[i]);
        }
        if (photoTags && (photoTags.length > 0))
        {
            // get the link in the photo tag
            var photoLinkTags = photoTags[0].getElementsByTagName('a');
            if (photoLinkTags && (photoLinkTags.length > 0))
            {
                // grab the URL of the gallery
                var link = photoLinkTags[0].href;
                // href should be "/gallery/5608799_ZJ27n"
                var matches = link.match(/\/gallery\/(\d+)_/);
                if (matches && (matches.length > 1))
                {
                    YD.addClass(miniBoxList[i], "thumbnail_gallery_" + matches[1]);
                }
                
            }
            
        }
    }
}

YE.onContentReady('categoriesBox', TagThumbs);
YE.onContentReady('subcategoriesBox', TagThumbs);
YE.onContentReady('galleriesBox', TagThumbs);

//====End of TagThumbs====


//====GetCategoryInfo====
// Retrieves category and subcategory names from the body tag classes
// returns an object
function GetCategoryInfo()
{
    var info = new Object;
    info.cat = "";
    info.subcat = "";
    
    if (YD.hasClass(document.body, "category"))
    {
        var re = /category_(\S+)/i;
        var matches = re.exec(document.body.className);
        if (matches && (matches.length > 1))
        {
            info.cat = matches[1];
        }
        if (YD.hasClass(document.body, "subcategory"))
        {
            re = /subcategory_(\S+)/i;
            matches = re.exec(document.body.className);
            if (matches && (matches.length > 1))
            {
                info.subcat = matches[1];
            }
        }
    }
    return(info);
}



YE.onDOMReady(function(){clientLogin(Sizzle('a[href=/Clients]')[0],'Clients')});function clientLogin(trigger,category){var clDialog=new YAHOO.widget.Panel("clDialog",{width:"300px",fixedcenter:true,zIndex:100,constraintovikrport:true,underlay:"shadow",modal:true,close:true,visible:false,draggable:false,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:.7}});clDialog.setHeader("<p><font size=2>Please enter your unique client login</font>");clDialog.setBody('<center><label>Login:</label><input id="clUsername" type="text" />');clDialog.setFooter('<input id="clLoginButton" type="button" value="submit" /></center>');clDialog.render(document.body);YE.addListener(trigger,'click',function(e){YE.preventDefault(e);clDialog.show()});YE.addListener('clLoginButton','click',function(e){var value=YD.get('clUsername').value;if(value!=''){var url='/'+category+'/'+value;window.location.href=url}else{alert('Please enter your username to continue')}})};
Old Apr-27-2012, 11:58 PM
#57
Patrik is offline Patrik
Big grins
Any idea?
Old Apr-28-2012, 03:37 AM
#58
J Allen is offline J Allen
Major grins
J Allen's Avatar
Not really....you could make the log-in on a page....give this a try and see what you think...

1. make a new gallery with no pictures

2. add this to the gallery description area:

Code:
<html>

<script type="text/javascript">

function handleEnter (field, event) {

        var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;

        if (keyCode == 13) {

            var i;

            for (i = 0; i < field.form.elements.length; i++)

                if (field == field.form.elements[i])

                    break;

            i = (i + 1) % field.form.elements.length;

            opensmugLinkWindow(document.customerproofs.customerid.value);

            return false;

        } 

        else

        return true;

    }   




function opensmugLinkWindow(smugid)

  {



if (document.customerproofs.customerid.value == "")

    {

        alert("Client Login ID required");

        document.customerproofs.customerid.focus();

        



    }

else

{



var smugmugbase = "/Clients/";

var smugidname = smugid;

var URL = smugmugbase + smugidname;

window.location=URL;

}

}

  





YE.onDOMReady(function()

{

clientLogin('MY_LINK_ID', 'Clients'); 

});



function clientLogin(trigger, category) 

{

var clDialog = new YAHOO.widget.Panel("clDialog", {

width: "325px", 

fixedcenter: true, 

zIndex: 100,

constraintovichport: true, 

underlay: "shadow",

modal: true,

close: true, 

visible: false, 

draggable: false

});

clDialog.setHeader("<h1>Client Login</h1><p>Please enter your client login to continue.</p>");

clDialog.setBody('<label>client login : </label><input id="clUsername" type="text" />');

clDialog.setFooter('<input id="clLoginButton" type="button" value="submit" />');

clDialog.render(document.body);

YE.addListener(trigger, 'click', function(e)

{

YE.preventDefault(e);

clDialog.show();

});

YE.addListener('clLoginButton', 'click', function(e)

{

var value = YD.get('clUsername').value;

if(value != '') {

var url = '/' +  category + '/' + value;

window.location.href = url;

}

else {

alert('Please enter your username to continue.');

}

});

};

</script>

<div  style="width: 70%; text-align: center; border: 1px solid #999999;  background-color: #F5FFEA; margin:auto; padding: 8px">
<p style="font-size: 1.2em">To view your photographs in our  gallery, please enter the password you received by your  photographer.</p>
<p>
Note: Passwords are case-sensitive and should be entered exactly as provided.
</p>

<div id="login-form">
<form  name="customerproofs" id="customerproofs" action="#"  method="get"><input class="inputleft" name="customerid"  id="customerid" value="" size="30" maxlength="30" tabindex="1"  onkeypress="return handleEnter(this, event)"  type="text"></form>
<a href="javascript:opensmugLinkWindow(document.customerproofs.customerid.value);"><img src="http://www.joerallen.com/photos/i-fr.../i-fr9ZXNj.png" border="0"></a>

 </div>
<br>
<p>
If you need assistance, please contact us at (###) ###-#### or at <a href="mailto:youremail@yourdomain.com">ouremail@yourdomain.com</a>
</p>


</div>

</html>
We can hide things on this page later on if you decide to go this route
__________________
-Joe Allen
My Smugmug Site

Last edited by J Allen; Dec-28-2012 at 03:03 AM.
Old Apr-28-2012, 04:34 AM
#59
Patrik is offline Patrik
Big grins
Done, but I can't login. The gallery is public and has no password.
http://www.patrikwinge.com/Clients/test4

I'm not sure if I follow your thoughts... Does this mean that I have to give the visitors a unique url to their gallery?
Old Apr-28-2012, 07:02 AM
#60
dvaughn is offline dvaughn
Big grins
dvaughn's Avatar
Mobile Site question
I am using this and it seems to be working great on a desktop computer. Right now I have the mobile site disabled and it has had issues with people trying to log in on a mobile device. I have it disabled because it shows all the client galleries without making anyone log in. Is there a way to handle this better?

UPDATE: I decided to cut down on confusion, I have enabled the mobile site (which I would rather use) and will use the clients category mostly for testing till I can find a easy way for this to work with the clients category. Basically, if a client has to use a password to see the gallery on a desktop, they should on the mobile site as well. For now there are two galleries in that category that are public. I'm using the one April N Gracie for testing. The password to that gallery is "Test". If there is a way to make this work with the mobile site, please let me know. Thanks for any and all help.
__________________
Never dwell on the past or dread the future, live life in the present, it's better that way.

www.dalevaughnphotography.com

Last edited by dvaughn; Apr-28-2012 at 07:19 AM.
Page 3  of  12
1 2 3 4 5 6 7 Last »
Tell The World!  
Similar Threads Thread Starter Forum Replies Last Post
Please help with changing color of image display area in my galleries RBgunner SmugMug Customization 1 May-08-2009 12:43 PM
Why Can't I see my Client Galleries in Firefox? deegee SmugMug Customization 2 Sep-22-2008 09:48 AM
Your Proofing and Editing process thenimirra Mind Your Own Business 5 Aug-18-2008 11:41 AM
Client proofing and bride picks her top 75 photos and I only see and print them. aacreation SmugMug Customization 4 Jul-23-2008 09:29 AM
San Francisco Bay Area Photography Group dkapp The Big Picture 3 Nov-07-2004 07:35 PM


Thread Tools
Display Modes

Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump