PDA

View Full Version : Homepage picture showing in footer for galleries page


dannyk
Oct-28-2007, 12:31 AM
Hello,
Been browsing forums for few days and got my starting site up and running.
I wanted my homepage to have a picture that links to separate page with the galleries (done). I'm able to get the nav bar set up and working as well. Got the picture with the link (on main homepge) from the code that I found on forums but the only problem is that the picture shows in the footer part of the galleries page as well which I don't want. (I guess because the code is added for the footer part) I used the code for making second homepage to have galleries on separate pages.
Any help appreciated, and I'm sorry if it's too messy when it comes to code.

(site address: http://www.dkphotoservices.smugmug.com)

CSS:
/* hides your name (including any 's) */
#userName {
display: none;
}
/* hides the word home */
#userHome {
display: none;
}
/* remove the 's */
.possess {
display: none;
}
p.updated {
display: none;
}
/* this part hides the your photos/home, login and help links */
#toolbar a.nav {display: none;}
/* THIS PART ADDS NAV BAR */
#navcontainer ul {
margin: 0;
padding: 10px;
list-style-type: none;
text-align: center;
}
#navcontainer ul li {
display: inline;
}
#navcontainer ul li a {
text-decoration: none;
padding: .2em 1em;
color: #fff;
background-color: #000;
}
#navcontainer ul li a:hover {
color: #fff;
background-color: #5E5E5E;
}
/* html only page for gallery 3720214 */
.gallery_3720214 .nophotos {
display: none;
}
.gallery_3720214 .pageNav {
display: none;
}
/* CODE FOR NO GALLERY ON HOMEPAGE */
.homepage #galleriesBox,
.homepage #categoriesBox,
.homepage #featuredBox {
display: none;
}
.galleries #bioBox {
display: none;
}
.galleries #galleriesBox,
.galleries #categoriesBox,
.galleries #featuredBox {
display: block;
}
.loggedIn .homepage #galleriesBox,
.loggedIn .homepage #categoriesBox {
display: block;
}
.myhomepagepic {
margin: 0 auto;
width: 600px;
height: 400px;
background: url(http://dkphotoservices.smugmug.com/photos/213393551-M.jpg) no-repeat;
}
.homepage .myhomepagepic {display: block;}

Java:
// removes the pipes characters in the toolbar header
YE.onAvailable('toolbar', function(e) {
this.innerHTML = this.innerHTML.replace(new RegExp(/\|/g),"");
});
YE.onAvailable('galleryTitle', function() {this.innerHTML = 'Photos'});
function hasPath(sPath)
{
re = new RegExp("\/" + sPath + "(\/|$)");
return re.test(window.location)
}

Footer:
********>
if (hasPath("galleries"))
YD.addClass(document.body, "galleries");
</********
<div class="myhomepagepic"><a href="<A href="http://dkphotoservices.smugmug.com/galleries"><img">http://dkphotoservices.smugmug.com/galleries"><img src="http://dkphotoservices.smugmug.com/photos/213393551-M.jpg" width="600" height="399" border="0" /></a></div>

denisegoldberg
Oct-28-2007, 04:49 AM
You have the code there to suppress your galleries on your home page, but you're missing the code to suppress your homepage picture on the galleries page.

You created a div for your homepage pic called - .myhomepagepic

So what you need to add is
.galleries #myhomepagepic,
.featured #myhomepagepic {
display: none;
}

--- Denise

dannyk
Oct-28-2007, 06:29 PM
So what you need to add is
.galleries #myhomepagepic,
.featured #myhomepagepic {
display: none;
}
--- Denise

After i changed # to . (not a biggy) it didn't work since i put the code at the end (i'm a code newb lol) well it worked on only 1 page right after my homepage rest of them still showed the pic in the footer.


.myhomepagepic {
margin: 0 auto;
width: 600px;
height: 400px;
background: url(http://dkphotoservices.smugmug.com/photos/213393551-M.jpg) no-repeat;
}
.homepage .myhomepagepic {
display: block;
}
.galleries .myhomepagepic,
.featured .myhomepagepic {
display: none;


for some reason this one solved it, pic with link only on home page nowhere else. Thank you for your help :)


.homepage .myhomepagepic {
display: block;
}
.myhomepagepic {
display: none;
}
.galleries .myhomepagepic,
.featured .myhomepagepic {
display: none;
}
.myhomepagepic {
margin: 0 auto;
width: 600px;
height: 400px;
background: url(http://dkphotoservices.smugmug.com/photos/213393551-M.jpg) no-repeat;
}