Imageflow for cpg1.5.x Imageflow for cpg1.5.x
 

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

Imageflow for cpg1.5.x

Started by Timos-Welt, January 06, 2010, 04:42:59 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Timos-Welt

==============
   ImageFlow v1.2
==============


What it does:
--------------
Displays a coverflowish JavaScript animation of pics from a meta album (random files, last additions, most viewed or top rated) on album list page. Can make use of the plugin EnlargeIt!
The animation can be controlled by:
- click on a pic
- arrow keys (can be deactivated on config page)
- mouse wheel (can be deactivated on config page)
- automatic by time (one step forward every ... seconds)
- double click or single click on active pic opens intermediate page
No flash needed, so every modern browser works.

Requirements:
---------------
- Your server must run PHP 4.3.2 or above
- GD2 extension has to be installed

Browser Compatibility:
-----------------------
The animation is tested to be fully compatible with these browsers:
- IE 6
- IE 7
- Firefox 2.x (Win)
- Firefox 2.x (Linux)
- Opera 9.x (Win)
- Opera 9.x (Linux)
- Safari 3.1 (Win)
- Konqueror 3.5.x (Linux)
It probably works fine in many other browsers, too.

=========================================================================

How to install:
---------------
* Download
* Uninstall any previous version
* Unzip
* Upload folder 'imageflow' into Coppermine's plugins folder
* Go to plugin manager page and install it
* Empty your browser cache

How to enable:
---------------
* To enable this plugin, you'll have to add "imageflow" to "the content of the main page" in coppermine's config in the section "Album list view". The setting should look like "breadcrumb/catlist/alblist/imageflow" or similar. For details, review the documentation that comes with coppermine (inside the docs folder) in the section "The gallery configuration page" > "Album list view" > "The content of the main page".

How to configure:
-------------------
* Use the additional button 'Imageflow' on plugin manager page.

=========================================================================

Settings in detail:
--------------------
see README.TXT

=========================================================================

Credits:
----------
This plugin is written by Timos-welt.
The plugin uses the incredible ImageFlow script. See http://imageflow.finnrudolph.de
Please note: The author of the Imageflow javascript changed the license of his script with version 1.0, so you have to pay for commercial use now. This release is based on an older Imageflow version (0.9) that is absolutely free, so you may use it wherever you want. Look here for details.
Parts of the code are adapted from the great CPG plugins 'Onlinestats' and 'Highslide' by Nibbler and Sami.
Don't try to contact the plugin author for support - post on the board publicly instead.

=========================================================================

Change log:
-------------

v1.1 (2010/01/07)
-----------------
- fixed: correct handling for $matches
- fixed: a not-found-icon was displayed for pics without intermediate version

v1.0 (2010/01/06)
-----------------
* initial release

Joe Carver

Nice!  :)

Quote from: Timos-Welt on January 06, 2010, 04:42:59 PM
* To enable this plugin, you'll have to add "imageflow" to "the content of the main page" in coppermine's config in the section "Album list view". The setting should look like "breadcrumb/catlist/alblist/imageflow" or similar. For details, review the documentation that comes with coppermine (inside the docs folder) in the section "The gallery configuration page" > "Album list view" > "The content of the main page".

One small suggestion for this...  Joachim had advised me to look at how Onlinestats handles this (for the Iscroll plugin) and the result was helpful for installation and config. of a plugin that needs to change/configure "The content of the main page".

Timos-Welt

Feel free to contribute at any time! :) The plugin is available at the SVN.

My free days are gone and I'll have to go to work tomorrow again; this means I won't have much time to develop things further.

There's some strange SQL error left anyways that will display 'pic not found' for pics that are only visible for registered users, and I simply can't find it. Your SQL knowledge is much appreciated!

Αndré

Quote from: Timos-Welt on January 06, 2010, 08:13:07 PM
There's some strange SQL error left anyways that will display 'pic not found' for pics that are only visible for registered users, and I simply can't find it. Your SQL knowledge is much appreciated!
SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' $imageflow_FORBIDDEN_SET $META_ALBUM_SET

$META_ALBUM_SET has been replaced by a similar mechanism: $RESTRICTED_WHERE.

Timos-Welt

The search function didn't spit out anything about this.

Joachim Müller


Timos-Welt

That's weird, I need help.

First I select my pics from the database:
$imageflow_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename like '%.jpg' AND filename not like 'youtube_%' AND approved = 'YES' $imageflow_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $imageflowlimit";
$imageflow_result = cpg_db_query($imageflow_query);
$imageflow_rowset = array();

Then I want to get the URL to the intermediate pic, if it exists, otherwise the URL to the fullsize pic:
while($imageflow_row = mysql_fetch_array($imageflow_result)){
      $imageflow_reflfile=get_pic_url($imageflow_row,'normal');
      if (!file_exists($imageflow_reflfile)) $imageflow_reflfile=get_pic_url($imageflow_row,'fullsize');
...
}


Result: For pics with intermediate size it works fine. For pics without intermediate pic, I get a 'thumb not found' icon everytime. But I don't know what I'm doing wrong?

Αndré

     $imageflow_reflfile=get_pic_url($imageflow_row,'normal');
     if (!file_exists($imageflow_reflfile)) $imageflow_reflfile=get_pic_url($imageflow_row,'fullsize');


You want to get the normal size pic url. But if that file doesn't exist, what returns get_pic_url? I'm sure it will not return the file path. So your check !file_exists($imageflow_reflfile) doesn't apply. Instead check for the result of get_pic_url. (That's just a theory - I haven't tested anything ;))

Timos-Welt

That was the problem. Thanks a lot Andre, now I can sleep well tonight. ;) Version 1.1 works as it should in every aspect.

AK_CCM

Thanks for the very nice plugin. But how could I reduce the empty space between header and imageflow also between imageflow and gallery? I attach 2 screenshots what I mean, the installation of CPG is here: http://media.pilze-bayern.de/

Thanks in advance

Timos-Welt

On config page 'Correct upper border of animation (value between -200 and 500)'. If this doesn't help, there's no way, sorry.

AK_CCM

This helps to reduce the space between header and animation - thx.

But now the white background of the animation conceals the menu. If I delete the background color the color of the semi transparent overlay at the pictures will be lost and the animation shows a black semi transparent overlay. Is there any way to use no background color and a white semitranparent overlay?

AK_CCM


AK_CCM

A bigger problem belongs to the foreground position of the animation: The animation conceals the pulldown-menus so they couldn't be used.

AK_CCM

Quote from: AK_CCM on June 18, 2010, 02:25:22 PM
A bigger problem belongs to the foreground position of the animation: The animation conceals the pulldown-menus so they couldn't be used.

After I changed the z-index values and adjusted the upper border value to -80 now I could use the menü and pulldown menus.

#imgflowcaptions{
z-index:-3;
}
#imgflowscrollbar{
z-index:-2;
}
#imgflowslider{
z-index:-1;

AK_CCM

Quote from: AK_CCM on June 18, 2010, 12:05:33 PM
If I delete the background color the color of the semi transparent overlay at the pictures will be lost and the animation shows a black semi transparent overlay. Is there any way to use no background color and a white semitranparent overlay?

If i replace the following lines of /js/replace.php

default:
// Wrong values passed, default to black
$red = 0;
$green = 0;
$blue = 0;


with

default:
// Wrong values passed, default to black
$red = 255;
$green = 255;
$blue = 255;


the color of the semi transparent overlay of the reflections changes to white.

AK_CCM

Here's a small hint to reduce the space under the imageflow-animation:

Search in the /js/imageflow.js for

cpgif_imageflow_div.style.height = cpgif_max_height + 'px';

and change it to

cpgif_imageflow_div.style.height = '420px';

420px is a good value for my purposes. Change it to adjust.

If anyone got an idea to reduce the upper space please let me know. I could set the value of the option "Correct upper border of animation" on the config page only up to "-80px". If I set the pixels to -120 the background of imageflow-animation overlays the menu. Perhaps z-index could be useful to solve the problem. But I don't know to change the menu properties...

Timos-Welt

Thanks for your report, but this value is highly dependent on the kind of pics and their format. People with many pictures in portrait orientation (DSLR format 2:3) will probably have issues.

Please note that the javascript part of this plugin is written by Finn Rudolph, and you will find many issues also with the original script; so it's always a good idea to have a look at Finn's support ressources, too.

fmk

Hi Timo,

Seems like I am using all your add-ons Timo ;D. Anyways, when I installed this plugin the EnlargeIT stopped working for all pics. I tried turning EnlargeIt Off/On for imageflow but didn't help either ways.

Also, I found a security problem. When an unregistered user is viewing home page he can only see files that are open to him, but if he clicks on an album list although down there it shows "No image to display" but imageflow shows files from that folder. I found same issue with Slider as well.
FMK

Love doesn't stop by my door, I am always infatuated with new things.

The_Don

hi there, how is it possible to use thumb images and not resized images for this mod?