Rollover code not working Rollover code not working
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Rollover code not working

Started by blueberg, January 25, 2010, 02:08:33 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

blueberg

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
My test gallery : http://birdmarks.com/copperminel

blueberg


Jeff Bailey

Are you talking about the buttons at the bottom of the page? They work as expected.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Joachim Müller

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).

blueberg

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

My Sample Gallery Page

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.

phill104

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/
It is a mistake to think you can solve any major problems just with potatoes.

blueberg

Thanks Phill,

I will take a look at what you sent me. Always looking for a better way to do things :-)

blueberg

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

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

Thanks again