|
|
Thread Tools | Display Modes |
|
#1
|
|
|
Inner Tube Pilot
|
Help me hide gallery categories.
I have my site setup so there is an HTML landing page that has links to Gallery Categories. I had certain Gallery Categories hidden so that they could only be accessed from the HTML landing page. I logged into my site today and now all of the Gallery Categories are showing. It's been quite a long time since I created the site so I can't remember how to fix it so they're hidden.
Here is a link to my site: http://www.thesotelos.com/galleries Basically, I want to hide all the Gallery Categories that start with the word Archive. Can you look at my code to see where it got screwed up? Thanks for your help. Alex
__________________
"I have to keep our UPS guy employed so that's why I order so much stuff online." Quote by My Wife Moderator of the People and Go Figure forums My Smug Site |
|
|
|
|
#2
|
||
|
Ummm..
|
Quote:
__________________
|
|
|
|
||
|
#3
|
||
|
"tweak 'til it squeaks"
|
Quote:
http://www.dgrin.com/showthread.php?p=1144549
__________________
Al My Website my Blog Mozilla Firefox Web Developer Firebug Customization FAQ Banner/Navbar/Slideshow Tutor |
|
|
|
||
|
#4
|
||
|
Inner Tube Pilot
|
Quote:
__________________
"I have to keep our UPS guy employed so that's why I order so much stuff online." Quote by My Wife Moderator of the People and Go Figure forums My Smug Site |
|
|
|
||
|
#5
|
||
|
"tweak 'til it squeaks"
|
Quote:
..... hive%20Places|Archive%20Animals)$/; ..... hive%20Places|Archive%20Animals)$/i; This came up in another thread other day.
__________________
Al My Website my Blog Mozilla Firefox Web Developer Firebug Customization FAQ Banner/Navbar/Slideshow Tutor |
|
|
|
||
|
#6
|
|
|
Scripting dude-volunteer
|
First of all, it's the delCategory function in your bottom javascript that is responsible for hiding the categories. With the change the nice names for categories, the URL in the thumbnail changed to a nicer looking name and that's what delCategory was matching. If you want to remove all Archive Categories, then you can do this:
Change this line of code in the delCategory function from this: Code:
re = /\/(Guest%20Book|Archive|Archive%20Family%20&%20Friends|Archive%20Events|Archive%20Random%20Stuff|Archive%20Places|Archive%20Animals)$/; Code:
re = /\/Archive/;
__________________
--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 Last edited by jfriend; Aug-29-2009 at 01:37 PM. |
|
|
|
|
#7
|
||
|
Inner Tube Pilot
|
Quote:
Regarding your suggestion of setting all the galleries to unlisted to hide the categories, I originally went that route but then they don't display at all when someone else view my page. What I wanted was to hide the category thumbs to keep that page clean. Then I created an HTML landing page which is accessed from a button in my toolbar. Once you are at the landing page, you can then link to the all the Archived galleries which are password protected. Basically, I wanted two seperate category pages and this is the only way I could figure out how to do it. Does it make sense the way I did this or was there an easier method? Alex
__________________
"I have to keep our UPS guy employed so that's why I order so much stuff online." Quote by My Wife Moderator of the People and Go Figure forums My Smug Site |
|
|
|
||
|
#8
|
||
|
Scripting dude-volunteer
|
Quote:
__________________
--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 |
|
|
|
||
|
#9
|
||
|
Inner Tube Pilot
|
Quote:
You guys always rock. Thanks a bunch.
__________________
"I have to keep our UPS guy employed so that's why I order so much stuff online." Quote by My Wife Moderator of the People and Go Figure forums My Smug Site |
|
|
|
||
|
#10
|
||
|
Digital Memories
|
Friends,
I suffer deeply from the above described issue. For years I have hidden Categories and some weeks ago they were suddenly shown. And yes, I have now added the "i" as explained above. It still doesn't work. So I have walked through and made all galleries in these "hidden" categories unlisted for time being, which is not what I want. In my Custom Footer I have at the top ... Quote:
Why aren't my Categories hidden? All help appreciated
__________________
================== My focus is on digitizing memories |
|
|
|
||
|
#11
|
||
|
Scripting dude-volunteer
|
Quote:
1) This code in your top javascript is not javascript (it's CSS). Remove it from your top javascript as it is causing errors and preventing all other code from working: /* This code will turn off the caption below and turn on the caption above: */ #caption_top { display: block; } #caption_bottom { display: none; } 2) This code in your top javascript must all be on one line and cannot have a linebreak in the middle of it. re = /\/ (SH-Wedding|Pending|Strandberg|Photobooks|HomePage|Mix ed|Test|SOKQuest|Myrskaren|Cecilia|Sara|Axina|Anne Marie-Svante|Mikael|Family)$/i; 3) You have this code that is calling the hasPath function, but you don't have that function declared anywhere. You must either delete this code or add the hasPath function as show in the galleries page tutorial: if (hasPath("galleries")) YD.addClass(document.body, "galleries"); After you've fixed those three errors, we can see if you have any more that also need fixing.
__________________
--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 |
|
|
|
||
|
#12
|
||||
|
Digital Memories
|
Hidden categories not hidden
Hello Friend,
Quote:
Quote:
Quote:
I also removed some other code while at it ... either because I didn't know what it was or decided I could live without it. But I still have same problem. When using "Visitor's View" I can see the category "HomePage" and while I am myslf I see all the "hidden" categories listed. I am prepared to remove any other code just to get this thing working. To be able to hide categories is a cornerstone in my use of SmugMug.
__________________
================== My focus is on digitizing memories |
|||
|
|
||||
|
#13
|
||
|
Scripting dude-volunteer
|
Quote:
Code:
<script type="text/javascript" language="javascript">
function delCategory() {
re = /\/
(SH-Wedding|Pending|Strandberg|Photobooks|HomePage|Mixed|Test|SOKQuest|Myrskaren|Cecilia|Sara|Axina|AnneMarie-Svante|Mikael|Family)$/i;
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);
</script>
__________________
--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 |
|
|
|
||
|
#14
|
||
|
Digital Memories
|
Thanks John,
I think we are on to something here. First I still believe this has been one line all the time. But you made me look at the line a bit closer and then I started to experiment. First I removed any blanks in the line. Not good enough. And then I thought about the new NN facility recently added. And there are two categories on the line with blanks in them. Earlier I had these as %20 to simulate a blank. So I changed both to - (hyphen, since I had read somewhere about NN wanted - instead of blank) ... still not good. I changed both of them back to %20 ... no good Then I thought about these two categories and realised one was old and one was new ... from late August. So I use %20 in the old one and - in the new one ... bingo. This is the way my line looks right now ... Quote:
When I use Visitotr's View I see none of these categories ... where I earlier saw HomePage, and when I am myself I also see none. And this is what I had before and this is what I want. If you now could just tell me what is going on I would be most greatfull ... I am confused?
__________________
================== My focus is on digitizing memories |
|
|
|
||
|
#15
|
||
|
Scripting dude-volunteer
|
Quote:
If you have one that isn't working and you can supply the link to it, I can tell you why, but I don't honestly know what you want me to look at at this point. These values in this function need to match the nice name that the category has in it's URL. If it previously had a space in it (which required %20), it probably now has a dash in it which can just be expressed as a dash, but you control the nice name for each category/sub-category/gallery now so you can make it whatever you want. Whatever you make it is what will appear in the URL and is what will need to be in this function.
__________________
--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 |
|
|
|
||
|
#16
|
|
|
Digital Memories
|
All Lights Green
Thanks John,
Your help has been very good ... your light has shown me the way out of the dark forrest and I am very glad. Some further testing tells me the Hidden Categories are back in business. I am most gratefull
__________________
================== My focus is on digitizing memories |
|
|
|
| Tell The World! | |
| Thread Tools | |
| Display Modes | |
|
|