• Gear
  • Shots
  • Photo Craft
  • Video
  • Wide Angle
  • Support
  • New Stuff
  • More
Support Legacy SmugMug Customization Hiding specific categories from visitors

Need some help with your New SmugMug Site?

Dgrin Challenges

Our Challenges moderator has lined up an new set of challenges for you. The Weekly Word Challenge. Get all the details and participate in the conversation Weekly Word Challenge.

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

Looking for a little challenge? The Dgrin Mini-Challenges are a great way to challenge yourself. Take a moment to look through past winners and find the current Mini Challenge here.

From Around the Net

Enjoy a few of our favorite articles from around the 'net. If you have something you think we should see, post it here and we'll have a look.

Journeys

Landscapes

Sports

 
Thread Tools Display Modes
Old Nov-28-2008, 09:41 AM
#1
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Hiding specific categories from visitors
Hi,

Can anybody give me the link to the thread that explains how to show certain categories only when logged in?

Looked around for a while but cannot seem to find it.

Thanks guys,

zizka.smugmug.com
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Old Nov-28-2008, 11:40 AM
#2
denisegoldberg is offline denisegoldberg
Major grins
denisegoldberg's Avatar
See if this thread helps - http://www.dgrin.com/showthread.php?...e+category</b>.

--- Denise
__________________
http://www.denisegoldberg.com ... http://denise.smugmug.com

Musings & ramblings at http://denisegoldberg.blogspot.com, quick posts in google+
Old Nov-28-2008, 12:06 PM
#3
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by mountainpz
Hi,

Can anybody give me the link to the thread that explains how to show certain categories only when logged in?

Looked around for a while but cannot seem to find it.

Thanks guys,

zizka.smugmug.com
Before you go adding javascript to hide categories from visitors, you should know two things first.

1) You should know that hiding a category with javascript is only a superficial, cosmetic hide. The existence of that data is still in your page for search engines and for any inquisitive viewer. And, furthermore, the existence of the category and the galleries in it is available through Smugmug's open API and through the iPhone interface. I'm not saying you can't or shouldn't hide them with javascript, but you should know what you are getting if you do so.

2) The BEST way to hide a category from a viewer is to simply mark all the galleries in the category as "Unlisted". By marking them unlisted, you are telling Smugmug that you don't want the viewing public to be able to browse to these galleries via your homepage. If a category has only unlisted galleries in it, it will not be shown either. The reason this is the best way to hide a category is that it has NONE of the drawbacks listed in item 1). It is truly hidden from the public.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Nov-28-2008, 08:29 PM
#4
Allen is online now Allen
"tweak 'til it squeaks"
Allen's Avatar
Quote:
Originally Posted by jfriend
...
2) The BEST way to hide a category from a viewer is to simply mark all the galleries in the category as "Unlisted". ..
Major problem with this, you lose the ability to browse the category or
sub-cats as the category and sub-cat pages will show nothing. If there are
a hundred galleries under there you'll have to provide all hundred individual
direct gallery links.
__________________
Al - Just a volunteer here having fun :D
My Website my Blog
Mozilla Firefox Web Developer Firebug
Customization FAQ Banner/Navbar/Slideshow Tutor
Old Nov-28-2008, 08:38 PM
#5
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by Allen
Major problem with this, you lose the ability to browse the category or
sub-cats as the category and sub-cat pages will show nothing. If there are
a hundred galleries under there you'll have to provide all hundred individual
direct gallery links.
I just want to make sure people understand the options.

It depends upon why you're hiding it and how much you really want them hidden. If you just want them cosmetically hidden and don't care if some people find them anyway, you can do it any way you want. I just want to make sure that people understand they have the unlisted option to keep a category from showing and make sure people understand that delCategory doesn't hide things very well because they are all still in the page source.

Basically you can't have a browsable hierarchy by others and have them well hidden. Smugmug doesn't support that. If you're OK with a flat list of galleries, you can use a sharegroup to put them all in a sharegroup and have them well hidden. Or, if you don't care how well hidden they are, you can use the delCategory code.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Dec-01-2008, 03:09 PM
#6
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Quote:
Originally Posted by jfriend
I just want to make sure people understand the options.

It depends upon why you're hiding it and how much you really want them hidden. If you just want them cosmetically hidden and don't care if some people find them anyway, you can do it any way you want. I just want to make sure that people understand they have the unlisted option to keep a category from showing and make sure people understand that delCategory doesn't hide things very well because they are all still in the page source.

Basically you can't have a browsable hierarchy by others and have them well hidden. Smugmug doesn't support that. If you're OK with a flat list of galleries, you can use a sharegroup to put them all in a sharegroup and have them well hidden. Or, if you don't care how well hidden they are, you can use the delCategory code.
Thanks everyone for your help. I have been using the delCategory code for some time, but I want to have access to the categories as the owner (for editing purposes; my Contact, Bio, FAQ, etc. pages are in a category I want hidden from visitors) without having to remove the delCategory code everytime I need to edit. Isn't there a loggedin code one can use to do that?

Thanks!
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Old Dec-01-2008, 03:14 PM
#7
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by mountainpz
Thanks everyone for your help. I have been using the delCategory code for some time, but I want to have access to the categories as the owner (for editing purposes; my Contact, Bio, FAQ, etc. pages are in a category I want hidden from visitors) without having to remove the delCategory code everytime I need to edit. Isn't there a loggedin code one can use to do that?

Thanks!
You don't need delCategory for this purpose. Just make your Contact, Bio, FAQ, etc.. galleries be unlisted (in customize gallery). Then, they won't show for visitors, but will show for you, exactly what you need. And, any links to the galleries (like in your navbar) will continue to work fine. Unlisted just tells Smugmug to not show it via the homepage. Further, any category that only has unlisted galleries in it won't show for visitors either. No need for delCategory for this issue and you get your other question solved for free (they will show for you, when you are logged in).

Also, delCategory could be coded to not hide the category when you are logged in, but it seems that in this case you should use the built-in capability of unlisted galleries rather than go that way.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Dec-02-2008, 08:35 AM
#8
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Quote:
Originally Posted by jfriend
You don't need delCategory for this purpose. Just make your Contact, Bio, FAQ, etc.. galleries be unlisted (in customize gallery). Then, they won't show for visitors, but will show for you, exactly what you need. And, any links to the galleries (like in your navbar) will continue to work fine. Unlisted just tells Smugmug to not show it via the homepage. Further, any category that only has unlisted galleries in it won't show for visitors either. No need for delCategory for this issue and you get your other question solved for free (they will show for you, when you are logged in).

Also, delCategory could be coded to not hide the category when you are logged in, but it seems that in this case you should use the built-in capability of unlisted galleries rather than go that way.
Thanks John, that is very useful info. However here is my problem:

Here is the hierarchy I have:

In my zizka.smugmug.com/galleries page, I have 9 categories (see below). 6 of those categories I want public, which they are right now. The 3 other categories on there have to do with the design of the website and that I don't want to show to anybody but myself. Making all their content Unlisted worked for 2 of the 3 categories EXCEPT that the last category, Photo Design, contains a Portfolio subcategory I need to make public. How do I make the Portfolio galleries public while making the rest of the Photo Design hidden from visitors?

In other words:

Galleries Page:
-Destination Snapshots Category - Public - OK
-Active Adventure Category - Public -OK
-Around the World Category - Public - OK
-Rocky Mountains of Canada Category - Public - OK
-Sepia, etc. Category - Public - OK
-Panoramas Category - Public - OK
-GuidingFrancais Design Category - Hidden by making all Unlisted - OK
-Guiding Design Category - Hidden by making all Unlisted - OK
-Photo Design Category:
------8 design galleries that are hidden through Unlisted - OK
------1 sub-category called Portfolio that contains two galleries that should be public; my Portfolio navbar link leads to that subcategory.

Hopefully that makes sense. Thanks,

Paul
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Old Dec-02-2008, 10:46 AM
#9
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by mountainpz
Thanks John, that is very useful info. However here is my problem:

Here is the hierarchy I have:

In my zizka.smugmug.com/galleries page, I have 9 categories (see below). 6 of those categories I want public, which they are right now. The 3 other categories on there have to do with the design of the website and that I don't want to show to anybody but myself. Making all their content Unlisted worked for 2 of the 3 categories EXCEPT that the last category, Photo Design, contains a Portfolio subcategory I need to make public. How do I make the Portfolio galleries public while making the rest of the Photo Design hidden from visitors?

In other words:

Galleries Page:
-Destination Snapshots Category - Public - OK
-Active Adventure Category - Public -OK
-Around the World Category - Public - OK
-Rocky Mountains of Canada Category - Public - OK
-Sepia, etc. Category - Public - OK
-Panoramas Category - Public - OK
-GuidingFrancais Design Category - Hidden by making all Unlisted - OK
-Guiding Design Category - Hidden by making all Unlisted - OK
-Photo Design Category:
------8 design galleries that are hidden through Unlisted - OK
------1 sub-category called Portfolio that contains two galleries that should be public; my Portfolio navbar link leads to that subcategory.

Hopefully that makes sense. Thanks,

Paul
Can you just change the galleries that are in the Portfolio sub-category to have just a top level category (you decide what to call it) and no sub-category? That would remove all public galleries from the Photo Design category so it will disappear from the public's view. And the galleries in your Portfolio category will stay public.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Dec-02-2008, 11:34 AM
#10
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Quote:
Originally Posted by jfriend
Can you just change the galleries that are in the Portfolio sub-category to have just a top level category (you decide what to call it) and no sub-category? That would remove all public galleries from the Photo Design category so it will disappear from the public's view. And the galleries in your Portfolio category will stay public.
That sounds like a good idea John. How do I go about doing that to that I create as little extra work as possible for myself? Is there a fast way to convert my Portfolio subcategory into a Portfolio Category (that will appear on the galleries page - that is fine) without having to spend a considerable amount of time changing all the code (since the address of the galleries will no longer be the same)?

Thanks,

Paul
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Old Dec-02-2008, 11:44 AM
#11
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by mountainpz
That sounds like a good idea John. How do I go about doing that to that I create as little extra work as possible for myself? Is there a fast way to convert my Portfolio subcategory into a Portfolio Category (that will appear on the galleries page - that is fine) without having to spend a considerable amount of time changing all the code (since the address of the galleries will no longer be the same)?

Thanks,

Paul
I don't know what "code" you are talking about preserving. Gallery numbers will not change when you change categories, so the only styling that might be affected would be styling that refers to a category or sub-category involved in the change.

To change your galleries, create a new top level category called Portfolio. Then, change the top level category of each of your galleries to it and set their sub-category to nothing.

To fix up your category-specific styling, just change all references to

".category_Photo_Design" in your CSS to ".category_Portfolio"

and

".subcategory_Portfolio" to ".category_Portfolio".

and

".category_Photo_Design.subcategory_Portfolio" to ".category_Portfolio"

and

".subcategory.category_Photo_Design.subcategory_Po rtfolio" to "category.category_Portfolio"

if that's what you name the new top level category. If anything isn't quite right when you're done, just holler and we can sort it out.

Probably worth making a backup copy of your CSS before you start this.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Dec-02-2008, 02:00 PM
#12
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Quote:
Originally Posted by jfriend
I don't know what "code" you are talking about preserving. Gallery numbers will not change when you change categories, so the only styling that might be affected would be styling that refers to a category or sub-category involved in the change.

To change your galleries, create a new top level category called Portfolio. Then, change the top level category of each of your galleries to it and set their sub-category to nothing.

To fix up your category-specific styling, just change all references to

".category_Photo_Design" in your CSS to ".category_Portfolio"

and

".subcategory_Portfolio" to ".category_Portfolio".

and

".category_Photo_Design.subcategory_Portfolio" to ".category_Portfolio"

and

".subcategory.category_Photo_Design.subcategory_Po rtfolio" to "category.category_Portfolio"

if that's what you name the new top level category. If anything isn't quite right when you're done, just holler and we can sort it out.

Probably worth making a backup copy of your CSS before you start this.
Thanks John. Tried doing all that. It is close but I still need to:

1. Move the custom footer from my previous Portfolio page (a subcategory) to my current Portfolio page (a category).
2. Make the Portfolio navbar link go bold when visiting the portfolio
3. I would rather not show the Portfolio category on the Stock page if possible; I would prefer it if visitors accessed those galleries only through the Portfolio link in the navbar; is there a way to do that?

Another thing I would like to do is get rid of the Buy and Shopping Cart buttons on the News and Hire pages.

Everything else looks great - thanks!
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Old Dec-02-2008, 02:14 PM
#13
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by mountainpz
Thanks John. Tried doing all that. It is close but I still need to:

1. Move the custom footer from my previous Portfolio page (a subcategory) to my current Portfolio page (a category).
2. Make the Portfolio navbar link go bold when visiting the portfolio
3. I would rather not show the Portfolio category on the Stock page if possible; I would prefer it if visitors accessed those galleries only through the Portfolio link in the navbar; is there a way to do that?

Another thing I would like to do is get rid of the Buy and Shopping Cart buttons on the News and Hire pages.

Everything else looks great - thanks!
Change:

.subcategory_Portfolio .portfolio_page {display:block;}

to this:

.category_Portfolio .portfolio_page {display:block;}


Change:

category.category_Portfolio #navbar_portfolio {font-weight:bold;}

to this

.category.category_Portfolio #navbar_portfolio {font-weight:bold;}

To remove the Portfolio category from the Stock page, you would use the delCategory function on it. No other easy way.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Dec-02-2008, 02:39 PM
#14
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Quote:
Originally Posted by jfriend
Change:

.subcategory_Portfolio .portfolio_page {display:block;}

to this:

.category_Portfolio .portfolio_page {display:block;}


Change:

category.category_Portfolio #navbar_portfolio {font-weight:bold;}

to this

.category.category_Portfolio #navbar_portfolio {font-weight:bold;}

To remove the Portfolio category from the Stock page, you would use the delCategory function on it. No other easy way.
Thanks John. That worked beautifully. Do I need to show the portfolio on the stock page at all times now or is there a way I can hide it and only allow access to it via the navbar?
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Old Dec-02-2008, 03:20 PM
#15
jfriend is offline jfriend
Scripting dude-volunteer
Quote:
Originally Posted by mountainpz
Thanks John. That worked beautifully. Do I need to show the portfolio on the stock page at all times now or is there a way I can hide it and only allow access to it via the navbar?
See the last line of my previous post.
__________________
--John
Homepage Popular
JFriend's javascript customizations Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Old Dec-02-2008, 03:52 PM
#16
mountainpz is offline mountainpz OP
Gone shooting
mountainpz's Avatar
Quote:
Originally Posted by jfriend
See the last line of my previous post.
Thanks!
__________________
- Paul

Paul Zizka Photography: zizka.smugmug.com
The Blog - Twitter - Facebook
Tell The World!  

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