forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: DaBe on December 04, 2007, 08:55:04 pm

Title: filmstrip current thumbnail?
Post by: DaBe on December 04, 2007, 08:55:04 pm
hello

Title: Re: filmstrip current thumbnail?
Post by: DaBe on December 04, 2007, 08:56:43 pm
sry I press enter...


my question:

How I can in the filmstrip give the current thumbnail another css-class than the other thumbs?

the current thumb must have a bigger border or whatever..


pls help...
Title: Re: filmstrip current thumbnail?
Post by: Nibbler on December 04, 2007, 11:44:06 pm
Copy the theme_display_film_strip function from the sample theme.php to your custom theme.php and change this code in your copy:

find:

Code: [Select]
if ($mode == 'thumb') {

after it, add in a new line

Code: [Select]
if ($thumb['pos'] == $pos) $thumb['image'] = str_replace('class="image"', 'class="image middlethumb"', $thumb['image']);

Then apply the style in your stylesheet

Code: [Select]
img.middlethumb {
    border: 5px solid blue;
}
Title: Re: filmstrip current thumbnail?
Post by: Joachim Müller on December 05, 2007, 08:48:02 am
[ot]
@Nibbler&devs: imo this suggestion should go into the cpg1.5.x core. Thoughts?
[/ot]
Title: Re: filmstrip current thumbnail?
Post by: Abbas Ali on December 05, 2007, 01:15:43 pm
@Joachim: Yes - definitely.
Title: Re: filmstrip current thumbnail?
Post by: DaBe on December 05, 2007, 07:37:17 pm
nice one..thx

I have another question to the filmstrip thumbnails.

can I make the thumbs in the filmstrip with another attrribute then the normal thumbs..

I want display the filmstrip thumbs smaller then the normal thumbnails..

Title: Re: filmstrip current thumbnail?
Post by: Joachim Müller on December 06, 2007, 08:17:52 am
We have a "one question per thread" policy that you agreed to respect when signing up.
Title: Re: filmstrip current thumbnail?
Post by: Joachim Müller on December 06, 2007, 08:43:54 am
Committed suggested changes to SVN for cpg1.5.x, so this will be in the next version.
Title: Re: filmstrip current thumbnail?
Post by: allvip on March 25, 2014, 02:59:08 pm
Committed suggested changes to SVN for cpg1.5.x, so this will be in the next version.

it's not a cpg1.5 future but with some errors:

Code: [Select]
if ($thumb['pos'] == $pos && !$superCage->get->keyExists('film_strip')) {
                $thumb['image'] = str_replace('class="image"', 'class="image middlethumb"', $thumb['image']);

should be(because the fimstrip thumbnails class is .strip_image not image):

Code: [Select]
if ($thumb['pos'] == $pos && !$superCage->get->keyExists('film_strip')) {
                $thumb['image'] = str_replace('class="strip_image"', 'class="strip_image middlethumb"', $thumb['image']);

the css rules already are in the style.css (curve theme):

Code: [Select]
/* pseudo-classes for middlethumb links */
a:link .middlethumb,a:visited .middlethumb,a:focus .middlethumb,a:hover .middlethumb,a:active .middlethumb{
    border: 2px solid blue;
}
Title: Re: filmstrip current thumbnail?
Post by: allvip on March 25, 2014, 03:00:47 pm
it's not a cpg1.5 future but with some errors:

I meant: it's a cpg1.5 future but with some errors:
Title: Re: filmstrip current thumbnail?
Post by: gmc on March 25, 2014, 07:06:31 pm
allvip,
Why are you replying to a 6+ year old post??
The code has clearly changed since then - so would certainly not apply to 1.5.
Greg
Title: Re: Re: filmstrip current thumbnail?
Post by: allvip on March 25, 2014, 07:50:11 pm
allvip,
Why are you replying to a 6+ year old post??
The code has clearly changed since then - so would certainly not apply to 1.5.
Greg

Because I notice the error in sample/theme.php.I use the latest version of cpg.
Someone should adjust this in sample theme and include/themes.inc.php

and for users that find this topic and to not understand why the middlethumb class is not working.

The code has clearly not changed since then.
Title: Re: filmstrip current thumbnail?
Post by: allvip on March 25, 2014, 08:09:51 pm
and because is a cpg1.5x future like Joachim Müller said but not working because the code has a very small error.

Proabibly cpg1.4x used class image for filmstrip thumbnails and nobody upated the code in the cpg1.5x filmstrip function.

The code for the middlethumb in filmstrip function (cpg1.5x) has class image not class strip_image just like cpg1.4x.

No need to start a new topic to say what I find out.
Title: Re: filmstrip current thumbnail?
Post by: gmc on March 25, 2014, 08:15:38 pm
and because is a cpg1.5x future like Joachim Müller said but not working because the code has a very small error.

Proabibly cpg1.4x used class image for filmstrip thumbnails and nobody upated the code in the cpg1.5x filmstrip function.

The code for the middlethumb in filmstrip function (cpg1.5x) has class image not class strip_image just like cpg1.4x.

No need to start a new topic to say what I find out.

I disagree... This post is 6 years old and in the 1.4 support board. If you have an issue with 1.5 - open a new thread in that board... You can certainly link here as the cause or for more more information... But someone searching the 1.5 board should be able to find a 1.5 issue.
Title: Re: filmstrip current thumbnail?
Post by: allvip on March 25, 2014, 08:19:01 pm
Users that will find this thread like I did (I did not found another thread about current thumbnail) and read Joachim Müller post :"Committed suggested changes to SVN for cpg1.5.x, so this will be in the next version." will not understand why is not working if it is a cpg1.5x future now.

but fine I will post in cpg1.5x thread too.