Slider (Javascript slider on album list page) Slider (Javascript slider on album list page)
 

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

Main Menu

Slider (Javascript slider on album list page)

Started by Timos-Welt, March 22, 2008, 03:50:45 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Timos-Welt

===========
  Slider
===========


What it does:
--------------

Displays a JavaScript slider of a meta album on album list page, compatible with any modern browser. Can use EnlargeIt! plugin to display the pictures.
This plugin has been created for cpg1.4.x.

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

Browser Compatibility
-----------------------

The JavaScript slider is tested and works fine in these browsers:
- IE 6
- IE 6 sp1
- IE 7
- Firefox 1.5 (Win)
- Firefox 2.x (Win)
- Firefox 2.x (Linux)
- Opera 8.x (Win)
- Opera 9.x (Win)
- Opera 9.x (Linux)
- Konqueror 3.5.x
- Safari 3.x (Win)
It probably works fine in many other browsers, too.

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

Demo:
------

http://cpgdev.timos-welt.de/cpg1416

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

How to install:
---------------

* Download v2.11
* Unzip
* Uninstall any previous version via plugin manager
* Upload folder 'slider' 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 "slider" 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/slider" 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 'Slider' in admin menu.

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

Credits:
--------

This plugin is written by Timos-Welt (http://www.timos-welt.de) based on the "Slider mod" by pbasmo for cpg1.4.x.
The plugin legally uses Javascript code "Conveyor belt slideshow script" by Dynamic Drive DHTML code library (www.dynamicdrive.com).
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:
-----------


v2.12 (2008/12/11)
------------------
fixed: IE would display unwanted tooltips

v2.11 (2008/11/18)
------------------
Fixed global use of $matches in mainpage function.

v2.10 (2008/11/05)
------------------
EnlargeIt! can now be used to play youtube movies, though these will not appear as thumbs in slider

v2.09 (2008/09/11)
------------------
fixed a bug with invalid XHTML (double IDs) if not enough pics available for slider width

v2.08 (2008/07/26)
------------------
fixed a bug where slider in an empty category could lock the webserver

v2.07 (2008/07/15)
------------------
fixed a css issue

v2.06 (2008/07/11)
------------------
bugifx: slow animation in firefox under certain circumstances

v2.05 (2008/07/10)
------------------
* faster reaction on mouseclick with EnlargeIt!
* zoom mouse cursor with EnlargeIt!
* Javascript functions now in seperate js file for faster loading times

v2.03 (2008/06/30)
------------------
better integration with EnlargeIt - slider stops now while enlarging and shrinking

v2.02 (2008/06/30)
------------------
fixed: short flickering at page load

v2.01 (2008/06/27)
------------------
fixed: resizing wouldn't work when slider auto-width enabled and EnlargeIt! darkening was used

v2.00 (2008/06/16)
------------------
Now uses EnlargeIt! plugin engine

v1.73 (2008/05/11)
------------------
* New EnlargeIt! version 0.94 fixes two bugs
* Dutch language file added (thanks Hein)

v1.72 (2008/05/09)
------------------
* Fixed a bug where pics wouldn't be displayed when no intermediate pic had been
 generated when using EnlargeIt!
* New EnlargeIt! version 0.93 with more options

v1.71 (2008/05/05)
------------------
* fixed a small display bug in IE when 'Auto fit slider width' is set to 'no'
 and 'Slider align' set to 'center' or 'left'

v1.7 (2008/05/03)
-----------------
* new option 'Auto fit slider width' (experimental)
* new EnlargeIt! animation mode 'bump-glide'
* new EnlargeIt! version 0.92

v1.61 (2008/04/19)
------------------
* bug fix: slider wouldn't work with EnlargeIt! turned off

v1.6 (2008/04/18)
-----------------
* much better optics when enlarging the pics
* new option 'Show caption'
* new options 'Shadow' / 'Shadow size' / 'Shadow intensity'
* improved JS performance
* Enlarge to normal size or full size pic (selectable)
* improved stability in gallerys with pics of very different sizes

v1.52 (2008/04/16)
------------------
* now out of the box compatible with Highslide, Slider and most other Javascripts
* improved flickering in glide mode when EnlargeIt! is used
* slighter codebase, improved performance

v1.51 (2008/04/14)
------------------
* too much german in english language file - 'yes' and 'no' shouldn't be
 'ja' and 'nein' ;)
* new EnlargeIt! version with drop shadow, now packed only 7,3 KB

v1.5 (2008/04/12)
-----------------
* new option to select meta album (random files, last additions,
  most viewed, top rated)
* now works as intended in multi-user galleries
* EnlargeIt! integration
* if there's not enough pics in a category, they will be repeated to give
  at least 5 pics to prevent the Slider animation from crashing

v1.2 (2008/03/24)
-----------------
* new feature 'Slider align' (left, center, right), so it's adaptable to many more themes now
* now 100% valid XHTML 1.0, had to give up Netscape4 compatibility for that
* much faster, slighter code
* fixed few little bugs

v1.1 (2008/03/23)
-----------------
* fixed few little bugs
* new feature 'skip pics in portrait mode'

v1.0 (2008/03/22)
-----------------
* initial release


[Edit GauGau 2010-03-05]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_slider_v2.16.zip/download
[/Edit]

Timos-Welt

#1
To do for next version v1.3:
- Possibility of more than one slider on page

Pascal YAP

#2
Hi Timos-Welt,
Here is FRENCH.PHP lang file

Note : in codebase.php i need to change line 17 like that :
include_once ('./slider/include/init.inc.php');

Our French user PBasmo will be probably very proud about your work  ;D
Thank's

PYAP

Timos-Welt

#3

QuoteOur French user PBasmo will be probably very proud about your work

I hope so - that's why he gets a lot of credits inside the code and the readme.  :)

QuoteNote : in codebase.php i need to change line 17 like that :
include_once ('./slider/include/init.inc.php');

Here is FRENCH.PHP lang file

Thanks for that, I've fixed that in the ZIP file and added the french language.

Timo

Pascal YAP

#4
Hello Timos-Welt,

Weird issue !
When i'm in Admin Mode all work clearly.
In Admin Mode and Admin-User Style it's OK too.

But in true User Mode, there is an access problem : There was an error while processing a database query.

Investigate....


Other :

In PLUGIN_CONFIG.PHP no need to add PX for Title !
<input id="slider_title" name="slider_title" type="text" value="<?php echo $SLIDERSET['slider_title']?>"> px

PYAP

Timos-Welt

#5
Please look in slider.php for line

$query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p WHERE filename LIKE '%.jpg' $FORBIDDEN_SET ORDER BY RAND() LIMIT $limit";

Sounds to me as if "AS p" was missing (the very first version I uploaded had this error, but I corrected it 3 minutes later).

If the line is exactly like above, you could replace it (just for a test) with

$query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' ORDER BY RAND() LIMIT $limit";

BTW: What's 'Skip portrait mode pics' in french?

Timo

Pascal YAP

Quoteyou could replace it (just for a test)
I'll Try it tomorow, i'm not on my TestMachine...

Quote
"Skip portrait mode pics' in french?"
Depend about context !
I think : "Ignorez les images verticales".

Maybe you can add "Skip Horizontal pics" (in FR " Ignorez les images horizontales")

PYAP

Timos-Welt

#7
Hi Pascal,

QuoteWhen i'm in Admin Mode all work clearly.
In Admin Mode but User Style it's OK too.

But in true User Mode, there is an access problem : There was an error while processing a database query.

I've found the problem. If v1.1 doesn't work for you either, another mod/script that queries the database is modifying the global variable $FORBIDDEN_SET. Find the modification and correct it, you find the information you need in this thread:
http://forum.coppermine-gallery.net/index.php/topic,6819.0.html

regards
Timo

Timos-Welt

I have just released v1.2.

As far as no show stopper bug is found, this will be the last version for some time. Have fun with it.

Have fun  ;)
Timo

Pascal YAP

Timos-Welt,
Quotethis will be the last version for some time. Have fun with it.
That's right. Your Slider 1.2 work as expected on various machines and browsers.
Nice work  ;D

In some days, i will translate your Topic to our French board.
Thank's.

PYAP

ngul

Hi Timos, your plugin is very cool!!!  :)
If i want put the sliders in top of a homepage, what type of html code (or php) put in the body of index.html file? (after plugin installed, obviously)

Regards
ngul

martinkatz

Great Job!!
Spanish translation attached

Timos-Welt

Thanks martinkatz,

I've added the spanish translation to the 1.2 ZIP.

regards
Timo

Timos-Welt

Quote from: ngul on March 23, 2008, 11:08:26 PM
If i want put the sliders in top of a homepage, what type of html code (or php) put in the body of index.html file? (after plugin installed, obviously)

Regards
ngul

This thread deals with the PLUGIN for Coppermine. I think this thread about the MOD the plugin is based on will answer your questions:
http://forum.coppermine-gallery.net/index.php/topic,41197.0.html

Have fun  ;)
Timo

ngul

Thank you for reply, i've solved!!!

For your great plugin, i've translated in Italian...and attached!!  ;)

p.s.: rename file in italian.php

Timos-Welt

Thanks ngul.

I've added the italian translation to the 1.2 ZIP.

Have fun  ;)
Timo

jake

Great plugin!
Any hope of getting Slider v1.2 to work with Highslide v3.02?  I have both on my album page, but the Slider plugin doesn't have the Highslide functionality.
http://woodardphotos.net/coppermine
Also FYI . . . with Firefox (v2.0.0.12), the slider stops scrolling when the cursor moves on any part of the browser window (as opposed to the slider scrolling stopping only when the cursor is over the slider feature).  This does not happen in IE7.
Thanks for your time.
- Jake

Timos-Welt

Hi jake,

Coppermine 1.4x doesn't have an JS onload table. This means, you can't use more than one Javascript, that includes a line like this:
window.onload=....;

The plugins I know of, that won't work with each other ATM are:
- Highslide
- Slider
- Imageflow

There's only one way to solve this: The plugins must register their onload calls in a central instance.

There could be two solutions for that:
1. The developers include a mechanism for plugins to register their onload functions in a database table, and on which pages to call them. A few lines PHP read the table and call these functions one after the other with a single window.onload call.
2. Someone codes a "JavaScript OnLoader" plugin for the same purpose.

The second solution is nearest, but has a few disadvantages:
- Users would have to install the "JavaScript OnLoader" plugin separately, otherwise their plugins won't work at all.
- The "JavaScript OnLoader" plugin has to be installed before the first plugin is installed that needs it.
- Such a plugin would need an HTML filter function that slows down performance.

So I hope, some of the developers read this and think about this feature for CPG 1.5.

At this point of time, I can't help you - there's only one way to make these plugins work together ATM: Hack them.

regards
Timo

Nibbler

Instead of window.onload = function you should use window.addEventListener('load', function, false);

Timos-Welt

Hi Nibbler,

quite some browsers don't support window.addEventListener, but nearly all of them support window.onload. Using it would stop many browsers working (e. g. Mozilla < 2, IE<6, Safari<3).

On the other hand: Someone who uses such an old browser won't probably have fun with these plugs at all...

regards
Timo