Advanced search  

News:

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

Pages: [1] 2   Go Down

Author Topic: Imageflow for cpg1.5.x  (Read 14280 times)

0 Members and 1 Guest are viewing this topic.

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Imageflow for cpg1.5.x
« on: January 06, 2010, 04:42:59 pm »

==============
    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
« Last Edit: March 12, 2010, 11:16:03 am by Timos-Welt »
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: Imageflow for cpg1.5.x
« Reply #1 on: January 06, 2010, 05:42:25 pm »

Nice!  :)

* 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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Imageflow for cpg1.5.x
« Reply #2 on: January 06, 2010, 08:13:07 pm »

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

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Imageflow for cpg1.5.x
« Reply #3 on: January 06, 2010, 10:05:09 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!
Code: [Select]
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.
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Imageflow for cpg1.5.x
« Reply #4 on: January 07, 2010, 01:04:47 am »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: Imageflow for cpg1.5.x
« Reply #5 on: January 07, 2010, 09:07:30 am »

Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Imageflow for cpg1.5.x
« Reply #6 on: January 07, 2010, 05:54:31 pm »

That's weird, I need help.

First I select my pics from the database:
Code: [Select]
$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:
Code: [Select]
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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Imageflow for cpg1.5.x
« Reply #7 on: January 07, 2010, 06:15:13 pm »

Code: [Select]
     $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 ;))
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Imageflow for cpg1.5.x
« Reply #8 on: January 07, 2010, 06:48:51 pm »

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

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #9 on: June 18, 2010, 06:03:02 am »

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
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Imageflow for cpg1.5.x
« Reply #10 on: June 18, 2010, 10:57:42 am »

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

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #11 on: June 18, 2010, 12:05:33 pm »

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

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #12 on: June 18, 2010, 12:07:39 pm »

Here you can see some screenshots.
Logged

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #13 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.
Logged

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #14 on: June 18, 2010, 03:34:24 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.

Code: [Select]
#imgflowcaptions{
z-index:-3;
}
#imgflowscrollbar{
z-index:-2;
}
#imgflowslider{
z-index:-1;
Logged

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #15 on: June 18, 2010, 06:12:35 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

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

with

Code: [Select]
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.
Logged

AK_CCM

  • Coppermine regular visitor
  • **
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 63
  • Mushroom Hobby Photograph
    • Ent◊l◊ma.de – Rötlinge, Wiesenpilze und andere Schwammerln
Re: Imageflow for cpg1.5.x
« Reply #16 on: June 19, 2010, 02:10:06 am »

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

Search in the /js/imageflow.js for

Code: [Select]
cpgif_imageflow_div.style.height = cpgif_max_height + 'px';
and change it to

Code: [Select]
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...
Logged

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: Imageflow for cpg1.5.x
« Reply #17 on: July 06, 2010, 12:59:15 pm »

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

fmk

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 28
    • FMKz Test Bed
Re: Imageflow for cpg1.5.x
« Reply #18 on: January 02, 2011, 09:47:03 am »

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

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

The_Don

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: Imageflow for cpg1.5.x
« Reply #19 on: February 13, 2011, 09:56:54 pm »

hi there, how is it possible to use thumb images and not resized images for this mod?
Logged
Pages: [1] 2   Go Up
 

Page created in 0.029 seconds with 20 queries.