PDA

View Full Version : hiding gallery categories or sub-categories


eyeDutch
Jul-18-2008, 01:44 AM
Is it possible to hide categories or sub-categories? I know it's possible to get this effect by marking all the galleries inside as hidden, but suppose I have galleries in a particular gallery that I don't want to hide, and yet I still want to hide only the category that contains them, on my main page. Right now I have to mark each gallery as hidden, but I want that type of control over the individual categories as well. -- Paul

Allen
Jul-18-2008, 05:04 AM
Is it possible to hide categories or sub-categories? I know it's possible to get this effect by marking all the galleries inside as hidden, but suppose I have galleries in a particular gallery that I don't want to hide, and yet I still want to hide only the category that contains them, on my main page. Right now I have to mark each gallery as hidden, but I want that type of control over the individual categories as well. -- Paul
You can hide categories from the category box with some js. Example
below shows Family category being hidden.

Put in javascript


<!-- Hide Categories -->
function delCategory() {
re = /\/(Family)$/;

var oList = YD.getElementsByClassName('miniBox', 'div', this);

for (i = 0; i < oList.length; i++) {
if (re.test(oList[i].getElementsByTagName('a')[0].href))
oList[i].parentNode.removeChild(oList[i]);
}
}
YE.onContentReady('categoriesBox', delCategory);
<!-- End Hide Categories -->
For more then one add a | between them. cat1|cat2|cat3

re = /\/(cat1|cat2|cat3)$/;

mbellot
Jul-18-2008, 05:58 AM
Allen's solution works (I use it myself), but you need to be aware of a security "hole" with the method.

Anything hidden with scripts (like the one posted above) will be fully visible on alternate interfaces. The RSS feed, iphone and any application that accesses your site through the API interface do not "respect" this method for hiding assets on your web site.

eyeDutch
Jul-18-2008, 11:54 AM
Allen's solution works (I use it myself), but you need to be aware of a security "hole" with the method.

Anything hidden with scripts (like the one posted above) will be fully visible on alternate interfaces. The RSS feed, iphone and any application that accesses your site through the API interface do not "respect" this method for hiding assets on your web site.

Exactly, and that is not acceptable, nor is it acceptable to have to hack this with javascript. What I meant was that I want to be able to do this via the browser, some buttons, a form you catch my drift, the 21st century ;-)

Can this be made a feature request or is this a really strange thing to want in the standard functions?

-- Paul

mbellot
Jul-18-2008, 08:31 PM
Exactly, and that is not acceptable, nor is it acceptable to have to hack this with javascript. What I meant was that I want to be able to do this via the browser, some buttons, a form you catch my drift, the 21st century ;-)

Can this be made a feature request or is this a really strange thing to want in the standard functions?

-- Paul

I totally "catch your drift"...

The current situation is less than ideal since making galleries private (unlisted, hidden) breaks breadcrumb navigation.

I'd love to be able to tag an entire category (or subcategory) as private/hidden/unlisted so it does not show up when browsing from any public interface, but if I give someone a direct link "inside" then they can navigate around in the lower levels.