PDA

View Full Version : How do I add a message/text to a password protected gallery's access page


Protographer
Jun-10-2007, 07:43 PM
How do I add my own message/text/instructions to the page where a password is requested for a password protected gallery possobly right after the submit button or possibly before the "this gallery requires a password to continue" message? What is this page called, anyway? I am sure that I am missing something simple. :D Thanks.

richW
Jun-10-2007, 09:04 PM
Try adding your text in the password hint box below where you set the gallery password in gallery customization. I just pasted in 255 characters without an problem. (i think 255 is the limit)

http://www.smugmug.com/help/private-albums

Protographer
Jun-12-2007, 05:31 PM
Try adding your text in the password hint box below where you set the gallery password in gallery customization.
I am still curious about how to apply other customizations to that page but
your suggestion helps with my immediate problem. Many thanks.:clap

Protographer
Jun-21-2007, 06:50 PM
How do I add my own message/text/instructions to the page where a password is requested for a password protected gallery possibly right after the submit button or possibly before the "this gallery requires a password to continue" message? What is this page called, anyway? I am sure that I am missing something simple. :D Thanks.How can I do this without using the password hints field?

oxy8384
Jun-22-2007, 07:22 AM
...most of which involve adding elements to your HTML and then populating with whatever stuff you need. Here are the three easiest options I can come up with.
1) Add an element to the bottom of your header code and set display to 'none'. Then, in your footer code, check to see if the document is a passwordPage (hasClass(document.body,'passwordPage') == true) and, if so, set your new element to display:block.
2) add an element to your footer code and turn it on or off, as needed, as described above.
3) use one of the six extraDiv elements smugmug gives you. They will appear above your header unless you move them elsewhere. Use the same techniques to turn it on or off as needed.

I will be happy to walk you through this, if you need help. Unfortunately, I'm off to work and won't be able to help until mid-afternoon or later (Pacific time). You can reply here or email me (click on my user name to the left) and I'll help you anyway I can. If you post here, you're likely to find another helpful sole who can help you sooner.

Bill

Protographer
Jun-23-2007, 06:28 AM
... Here are the three easiest options I can come up with.
1) Add an element to the bottom of your header code and set display to 'none'. Then, in your footer code, check to see if the document is a passwordPage (hasClass(document.body,'passwordPage') == true) and, if so, set your new element to display:block.
2) add an element to your footer code and turn it on or off, as needed, as described above.
3) use one of the six extraDiv elements smugmug gives you. They will appear above your header unless you move them elsewhere. Use the same techniques to turn it on or off as needed.

I will be happy to walk you through this, if you need help. ... You can reply here or email me (click on my user name to the left) and I'll help you anyway I can. If you post here, you're likely to find another helpful sole who can help you sooner.

BillI have created a sample, private, password-protected gallery, http://www.smugmug.com/gallery/3044767. How can I, without using the password hints field, add text, and possibly images (but not photos for sale!), to:
all gallery password pages
all gallery password pages within a category
only this particular gallery password page, http://www.smugmug.com/gallery/3044767Suggestions are very much appreciated. Incidentally, I am in no rush. I am travelling at the moment so I get back to this when I can. Thanks.

Allen
Jun-23-2007, 07:35 AM
I have created a sample, private, password-protected gallery, http://www.smugmug.com/gallery/3044767. How can I, without using the password hints field, add text, and possibly images (but not photos for sale!), to:
all gallery password pages
all gallery password pages within a category
only this particular gallery password page, http://www.smugmug.com/gallery/3044767Suggestions are very much appreciated. Incidentally, I am in no rush. I am travelling at the moment so I get back to this when I can. Thanks. Played with this and think you can get it on all password pages. Trick is
adding it and then turning off everywhere. No way to address individual
password pages to turn off so it stays there, think it should work for all PW
pages. Might have missed some page types in CSS below.

add to header or footer code

<div id="myPasswordPage">xxx x xx xx xx xx x x</div>

add to CSS

.popularGallery #myPasswordPage,
.homepage #myPasswordPage,
.datePage #myPasswordPage,
.keywordPage #myPasswordPage,
.slideshow #myPasswordPage,
.allthumbs #myPasswordPage,
.traditional #myPasswordPage,
.journal #myPasswordPage,
.smugmug_small #myPasswordPage,
.filmstrip #myPasswordPage,
.singleImage #myPasswordPage,
.category #myPasswordPage,
.subcategory #myPasswordPage,
.galleries #myPasswordPage,
.smugmug #myPasswordPage
{display:none;}

At least it's something to play with, have fun.

oxy8384
Jun-23-2007, 09:26 AM
Allen,
Why this CSS wouldn't work just as well -

#myPasswordPage {display:none;}
.galleryPage #myPasswordPage {display:block;}

Or would it?:scratch

Bill

Allen
Jun-23-2007, 10:16 AM
Allen,
Why this CSS wouldn't work just as well -

#myPasswordPage {display:none;}
.galleryPage #myPasswordPage {display:block;}

Or would it?:scratch

Bill
It might, don't recall if I tried it or not. :scratch Should have, seems too obvious.:D

oxy8384
Jun-23-2007, 11:15 AM
Photographer,
In looking at the source for a password page, I don't see any reference to the category for the gallery. So I don't think there's an easy way to identify the category. However, the gallery number appears in the URL for the page. Using the hasPath() routine copied below (author unknown), you could use it in a simple if statement to turn on your myPasswordPage div only for a specific gallery or galleries.

Add this to your javascript (if you don't already have it):
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}
Add this to your footer code.
if (hasPath("xxxxxxx") || hasPath("yyyyyyy") ||.........) {
document.getElementById('myPasswordPage').style.display = 'block';
}
where 'xxxxxxx' and 'yyyyyyy', etc. are the specific galleries in which you want to display myPasswordPage.

Bill

oxy8384
Jun-23-2007, 11:17 AM
Allen,
Sometimes the precedence rules for CSS screw me up, still, so I was just looking for a sanity check.

Thanks,

Bill

Protographer
Jun-24-2007, 03:30 AM
Bill, Allen,
Thanks for your help on this. It is more complicated and involved than I had hoped. I am currently on-the-road and I still have other aspects of my site that are in more pressing need of being "adjusted", so I'll have to leave this for awhile. Thanks again.
:clap