Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Rollover code not working  (Read 5462 times)

0 Members and 1 Guest are viewing this topic.

blueberg

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Rollover code not working
« 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
My test gallery : http://birdmarks.com/copperminel
Logged

blueberg

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Rollover code not working
« Reply #1 on: January 25, 2010, 02:10:26 pm »

Sorry..here's the link to my gallery

http://birdmarks.com/coppermine
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Rollover code not working
« Reply #2 on: January 25, 2010, 05:23:14 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Rollover code not working
« Reply #3 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).
Logged

blueberg

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Rollover code not working
« Reply #4 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

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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Rollover code not working
« Reply #5 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/
Logged
It is a mistake to think you can solve any major problems just with potatoes.

blueberg

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Rollover code not working
« Reply #6 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 :-)
Logged

blueberg

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 48
Re: Rollover code not working
« Reply #7 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

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

Thanks again
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.