Slider in Coppermine - Page 3 Slider in Coppermine - Page 3
 

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

Slider in Coppermine

Started by pbasmo, February 12, 2007, 05:06:18 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

JohannM

Hi

Another question, how can I include all pictures from all albums ?

Thanx yet again

Fabricio Ferrero

Use the code from the very first post of this topic.  ;)
Read Docs and Search the Forum before posting. - Soporte en español
--*--
Fabricio Ferrero's Website

Catching up! :)

JohannM

I managed to get the size right.  This slider realy slows down the website ? Or is it just me ?


stardust

Does this work well in all size galleries? Because I read the "Random files" feature doesn't fit well in big galleries & my gallery has 17,000+ pics in it so far.

I'm considering using this Mod but I don't want it to lag anyone's computer

JohannM

Hi

I have a problem with this slider now.

It show with firefox, but not internet explorer !!

Strange though, is when I run the test in internet explorer and firefox, it works, but in my theme it works only with firefox.

Live: http://www.youth-sport-fotos.com/2008/index.php
Test:http://www.youth-sport-fotos.com/2008/slider2.php

Any suggestions ???

Joachim Müller

Upgrade! Your version: cpg1.4.10. Most recent stable release: cpg1.4.19. You're running 9 versions behind. This is not a question of personal taste! Upgrading is mandatory in terms of security as well as functionality.

lineart

Excuse,
I have not understood - as I can make all images of IDENTICAL height. That is to use crop for "portrait" images?

(I not php the programmer))))
Thanks for a prompt reply)))

lineart

If I change the maximal height of the image
All images "are cut off" on the bottom edge and unequal height.

??? ??? ???

Joachim Müller

Are you actually looking for support of the slider mod? I doubt it: if all your thumbnails are meant to have the same height, you specify the corresponding option in coppermine's config. Slider just uses the images that already exist - it doesn't create fresh ones.

lineart

Yes, I understand, that existing images are used.
But it is possible to make certain "container" for slider that the visible (!) height of images was identical.

In the existing version "alignment" of pictures goes on the top edge. And cutting the bottom edge which is already(!) leveled.

I not the programmer))) Excuse, if it was not absolutely clearly expressed)))

jake

Any possibility of getting your fantastic mod to work with Timos-Welt's "EnlargeIt!"? see: http://forum.coppermine-gallery.net/index.php/topic,53290.0.html
Thanks for your time!
- Jake

doffer

I use the code in the first without any change thanks for this mod very nice

only one thing : the size of the index page is not any more good ... too big and I must scroll

any idea?

sorry for my bad english

onthepike

The mod works great with pictures, however my gallery also includes AVI, MP4 and MOV video files. These files have no thumbnail associated with them as individual files -- they each share the file type's generic thumb. This results in a "RED X" scrolling across the screen.

So, my questions are: is it possible to exclude certain filetypes? Or is it possible to include only one file type (JPEG)?

Thanks!

hobert

Quote from: lineart on November 25, 2008, 01:43:56 PM
Yes, I understand, that existing images are used.
But it is possible to make certain "container" for slider that the visible (!) height of images was identical.

In the existing version "alignment" of pictures goes on the top edge. And cutting the bottom edge which is already(!) leveled.

I not the programmer))) Excuse, if it was not absolutely clearly expressed)))

Well, I also wanted all the shots to be the same height.  Here are my changes in the slider.php file.

First, after
if ($image_size['height'] > $max_height) {
$max_height = $image_size['height'];
}
I added
      //pick thumb unless smaller than $max_height, if so pick normal
      $prefix = "thumb_";
            if ($image_size['height'] < $max_height) {
            //check if normal exists, if not pick original file
            $file="albums/".$row['filepath']."normal_".$row['filename'];
                 if (file_exists($file)) {
          $prefix = "normal_";
                 } else {
          $prefix = "";
                 }
}


This will pick the thumb, unless the thumb is smaller than $max_height.  In that case it will pick the normal_ photo unless it doesn't exist, in that case it will pull the original file.

Later, I changed
// path of pic
$file="albums/".$row['filepath']."thumb_".$row['filename'];
to
// path of pic
$file="albums/".$row['filepath'].$prefix.$row['filename'];
so that the correct picture is pulled and
// link of pic
$lien="<a href=\"displayimage.php?album=random&cat=0&pos=-$key\"><img src=\"".$file."\" border=0></a>";
is replaced with
// link of pic
$lien="<a href=\"displayimage.php?album=random&cat=0&pos=-$key\"><img src=\"".$file."\" border=0 height=".$max_height."></a>";
so that all pictures have the same height.

I haven't had much time to test really well, but on a cursury glance it seems to be working.  You can see how it looks at http://www.hobert.net/gallery/slider.php while I am playing with it.  Looks like a really, really fun mod.

Note: as a fun thought experiment, change $max_height from "0" to something larger like "200"...

hobert

Quote from: onthepike on January 25, 2009, 05:00:11 PM
The mod works great with pictures, however my gallery also includes AVI, MP4 and MOV video files. These files have no thumbnail associated with them as individual files -- they each share the file type's generic thumb. This results in a "RED X" scrolling across the screen.

So, my questions are: is it possible to exclude certain filetypes? Or is it possible to include only one file type (JPEG)?

Thanks!

You might can try modifying
// request of your database
$query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' ORDER BY RAND() LIMIT $limit";
with
// request of your database
$query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' WHERE filename LIKE '%.jpg' ORDER BY RAND() LIMIT $limit";
which is shamelessly stolen from Timos-Welts' excellent flow_link mods.

hobert

My bad ^^^^^^^^^^^^

That should be
// request of your database
$query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' AND filename LIKE '%.jpg' ORDER BY RAND() LIMIT $limit";


Sorry.

onthepike

Thanks for the help -- it works just fine!

Alcor

Hi,

Since I upgraded coppermine to last version, I'm having problems with this plugin. When I click an image, a critical error is showing:

"There was an error while processing a database query"

do I forgot something in installation? Does it works with coppermine version 1.4.25?

Joachim Müller

You already have an open thread about the identical issue - don't cross-post nor double-post. Stay out of this thread and stick to the other thread you have.
The plugin should work with all versions of cpg1.4.x

Alcor

Sorry Joachim, but I think this is an error where the slider plugin can't to access the database, while the other open is due to javascript.