View Full Version : Nicenames not so nice here
My3Sons
Sep-21-2009, 07:59 AM
When Nicenames were first created, one of my categories got move to my "Galleries" page. I did not put it there, but noticed it was there after the big changes were made to Smugmug. The category that got moved was "Schedule a Session: Details". I do not want it to appear in "Galleries".
I recently had a customer tell me that they couldn't find my prices. I just checked into that and found that now the "Details" button on the navbar does not work! That button is supposed to take you to 2 galleries within this category: "Schedule a Session: Details", which has this address: http://naturalphotography.smugmug.com/Schedule-a-Session-Details
"Schedule a Session: Details" got moved here:
http://naturalphotography.smugmug.com/galleries but I don't want it there. I want it to work with my details button on the navbar, just the way it used to before the big Nicenames change.
Thanks.
-Melissa
jfriend
Sep-21-2009, 08:07 AM
You can fix the details button in the navbar by just updating the URL to what it is now:
http://naturalphotography.smugmug.com/Schedule-a-Session-Details (http://naturalphotography.smugmug.com/Schedule-a-Session-Details)
You can remove the things from your galleries page that weren't their before by updating the line in red in your bottom javascript to match the new URL links for the galleries you are trying to hide. In most cases, the issue is that what used to be spaces (which was %20 in a URL) is now a dash, but you can just look at the current URLs in your galleries page for each thing you want to hide and make sure that's what is represented int he line in red below:
// Hide Categories
function delCategory() {
re = /\/(Family|Portfolio|Recent%20Portrait%20Sessions|Sch edule%20a%20Session:%20Details)$/;
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]);
}
}
Let me know if you need further help.
My3Sons
Sep-21-2009, 11:07 AM
You can fix the details button in the navbar by just updating the URL to what it is now:
http://naturalphotography.smugmug.com/Schedule-a-Session-Details (http://naturalphotography.smugmug.com/Schedule-a-Session-Details)
You can remove the things from your galleries page that weren't their before by updating the line in red in your bottom javascript to match the new URL links for the galleries you are trying to hide. In most cases, the issue is that what used to be spaces (which was %20 in a URL) is now a dash, but you can just look at the current URLs in your galleries page for each thing you want to hide and make sure that's what is represented int he line in red below:
// Hide Categories
function delCategory() {
re = /\/(Family|Portfolio|Recent%20Portrait%20Sessions|Sch edule%20a%20Session:%20Details)$/;
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]);
}
}
Let me know if you need further help.
I fixed the Details button!
I tried changing the text in red to reflect the url of the category I wanted to hide, but I deffinetly did it wrong because now I have another category I need to hide also! I think I don't understand exactly how to hide those things. I also need to hide: Portfolio, and Family
www.naturalphotography.smugmug.com
Thanks again.
My3Sons
Sep-21-2009, 11:08 AM
I fixed the Details button!
I tried changing the text in red to reflect the url of the category I wanted to hide, but I deffinetly did it wrong because now I have another category I need to hide also! I think I don't understand exactly how to hide those things. I also need to hide: Portfolio, and Family
www.naturalphotography.smugmug.com
Thanks again.
I think I might have just figured it out. Let me play with it again and I'll get back to you.
jfriend
Sep-21-2009, 11:13 AM
I fixed the Details button!
I tried changing the text in red to reflect the url of the category I wanted to hide, but I deffinetly did it wrong because now I have another category I need to hide also! I think I don't understand exactly how to hide those things. I also need to hide: Portfolio, and Family
www.naturalphotography.smugmug.com (http://www.naturalphotography.smugmug.com)
Thanks again.
Try changing that one line to this:
re = /\/(Family|Portfolio|Recent-Portrait-Sessions|Schedule-a-Session-Details)$/;
What you're trying to do is to put just the last part of each URL (just the category part of the URL) into this one line of code. Each one you want to hide is separated by a | as shown in my recommendation.
You will notice that the URLs for these categories are and we've put the red part into this script separated by | chars:
http://naturalphotography.smugmug.com/Family
http://naturalphotography.smugmug.com/Portfolio
http://naturalphotography.smugmug.com/Recent-Portrait-Sessions
http://naturalphotography.smugmug.com/Schedule-a-Session-Details
My3Sons
Sep-21-2009, 11:13 AM
I think I might have just figured it out. Let me play with it again and I'll get back to you.
Whooohoooo!!! I got it! Thanks again.
-Melissa
www.naturalphotography.smugmug.com
www.naturalphotographydesign.blogspot.com
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.