forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: blueberg on January 25, 2010, 02:08:33 pm

Title: Rollover code not working
Post by: blueberg on January 25, 2010, 02:08:33 pm
Hello,

I have  a rollover code in my template.html that is supposed to exchange button images when a link is rolled over , and a different picture when the link is clicked. When looking at my template directly...the rollover works perfectly. But when it actually gets applied to my gallery, the links work...but the rollover feature does not. Can I tweak this code so it will work with coppermine?

Thanks

My Theme Page:  http://birdmarks.com/coppermine/themes/natsel/template.html (http://birdmarks.com/coppermine/themes/natsel/template.html)
My test gallery : http://birdmarks.com/copperminel (http://birdmarks.com/copperminel)
Title: Re: Rollover code not working
Post by: blueberg on January 25, 2010, 02:10:26 pm
Sorry..here's the link to my gallery

http://birdmarks.com/coppermine (http://birdmarks.com/coppermine)
Title: Re: Rollover code not working
Post by: Jeff Bailey on January 25, 2010, 05:23:14 pm
Are you talking about the buttons at the bottom of the page? They work as expected.
Title: Re: Rollover code not working
Post by: Joachim Müller on January 25, 2010, 05:30:04 pm
You need to create the relative links/paths inside template.html as if the file resided inside the coppermine root, because that's what happens when the template is actuall being "parsed": a script that sits in the root folder of your coppermine gallery loads your template and sends the contents to the output.
However: you already appear to have realized that (sort-of), as you have the full URLs in your script. For me, the rollovers work as expected on your page (although I can't recommend to rely on images with text on it as navigation elements - that's pretty nineties and not a god thing in terms of search engine friendliness, accessability or visually).
If that is not the case for you (i.e. if the rollovers don't work for you, post details).
Title: Re: Rollover code not working
Post by: blueberg on January 26, 2010, 12:14:20 am
Thanks for your answer. Sorry about being lost in the 90's. I have built sites for years....but only using HTML. Coppermine is my first excursion into a database-driven, server-generated pages type of web site. I love what I am learning. I am eager to get Coppermine off my test site and into my actual real web site.

Here are the links to both my template page and a link into my test gallery.

My template.html Page (http://birdmarks.com/coppermine/themes/natsel/template.html)

My Sample Gallery Page (http://birdmarks.com/coppermine)

Yes....it is the buttons on the bottom of the page that I am referring to. When viewed in the template alone, the rollover effect works perfectly and the links are hot. But when viewed after it parses to the gallery page, the rollover effect (changing to a different image on mouseover, and a third effect when clicked) no longer works. The links themselves are still hot and work fine...but the buttons don't change.

After searching the forum I did find one where you mentioned the relative path to the images. So I changed one of the full URL paths into a relative path as if it were residing in the Coppermine folder (   /images/buttongray/buttonmarklight.gif    also tried   images/buttongray/buttonmarklight.gif )
and that couldn't even find the images.

So I went back to using the full URLs to call up the images.

If you have a better way of creating the desired effect, I am all ears. I'm certainly not married to this rollover code.
Title: Re: Rollover code not working
Post by: phill104 on January 26, 2010, 12:43:45 am
Yep, creating buttons with css is the right way to go. Take a look at one of the many tutorials out there. This is the first one good old Google showed up for me, there are thousands more. Once you know it your life will be a lot easier.

http://www.search-this.com/css_buttons3.html or http://www.elated.com/articles/css-rollover-buttons/
Title: Re: Rollover code not working
Post by: blueberg on January 26, 2010, 12:47:56 am
Thanks Phill,

I will take a look at what you sent me. Always looking for a better way to do things :-)
Title: Re: Rollover code not working
Post by: blueberg on January 26, 2010, 05:01:58 am
Thanks Phill,
Your recommendations worked perfectly. I used one of those two CSS codes as a staring place and made the nexessary changes to work with my site.

here's a link to a page to see how it looks and functions.

http://www.birdmarks.com/coppermine/displayimage.php?album=3&pos=6 (http://www.birdmarks.com/coppermine/displayimage.php?album=3&pos=6)

I'm new to CSS but I already love it.

Thanks again