PDA

View Full Version : hiding keywords in gallery


fsalesi
Sep-14-2007, 07:36 AM
Hi,

Is it possible to hide the keywords which appear under the photos to everyone except "me"? If not, can they be hidden from anyone who is not logged in?

I assume there is some javascript which can determine if admin is logged in or anyone else is, then i can put some pseudo-code similiar to this:

if (not me) {
var photoKeywords = document.getElementsById("photoKeywords");
photoKeywords.style.display = "none";
}

Thanks,
Frank

fsalesi
Sep-14-2007, 11:13 AM
figured it out, I think.

#photoKeywords {display:none; }
.loggedIn #photoKeywords {display:block;}

is the loggedIn class only set when the owner logs in or anyone is logged in?

richW
Sep-14-2007, 11:41 AM
figured it out, I think.

#photoKeywords {display:none; }
.loggedIn #photoKeywords {display:block;}

is the loggedIn class only set when the owner logs in or anyone is logged in?Owner or a guest signed in on a Pro account: http://www.smugmug.com/help/guest-passwords

fsalesi
Sep-14-2007, 11:54 AM
Owner or a guest signed in on a Pro account: http://www.smugmug.com/help/guest-passwords

Thanks Rich, I think I get it but I just want to make sure I'm 100% crystal.

Let's say I'm logged into my account, then I browse to your home page. Would I be considered logged in when at your page? Meaning, do I log into smugmug or do I log into my account at smugmug? To further clarify, if I don't setup any guest passwords, then the only time the "loggedIn" class will be set is when my username logs in to my site. For all other users, it won't be set.

Thanks
Frank

richW
Sep-14-2007, 12:11 PM
Thanks Rich, I think I get it but I just want to make sure I'm 100% crystal.

Let's say I'm logged into my account, then I browse to your home page. Would I be considered logged in when at your page? Meaning, do I log into smugmug or do I log into my account at smugmug? To further clarify, if I don't setup any guest passwords, then the only time the "loggedIn" class will be set is when my username logs in to my site. For all other users, it won't be set.

Thanks
FrankYou are correct, only you will see them. When you log into your site you will see somethings on other user's sites the normal visitor will not see when they are logged out. Like the communities and friends & family invite links. Other than that your visitors won't see the keywords on your site....

fsalesi
Sep-14-2007, 12:26 PM
You are correct, only you will see them. When you log into your site you will see somethings on other user's sites the normal visitor will not see when they are logged out. Like the communities and friends & family invite links. Other than that your visitors won't see the keywords on your site....

Thanks for your help Rich. The keywords were just a test, now I get to have some real fun.