LightBox Slideshow Plugin LightBox Slideshow Plugin
 

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

LightBox Slideshow Plugin

Started by jeepguy_1980, April 13, 2009, 06:40:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jeepguy_1980

I have converted Sawey's mod, LightBox JS for Full Size Popup Slideshow, into a plugin.  This is my first attempt to do any work in PHP, so I cannot really support this plugin.  As I learn more about PHP, I expect to enhance this plugin with a configuration panel.

v1.1 - Renamed for standards compliance, removed unneeded files, added readme.txt, modified credits
v1.2 - Fixes conflict with Nibbler's Displaying videos from Youtube in Coppermine that caused videos to appear as pictures only.
v1.3 - Fixes random problem.  Contributed by pie86

Joachim Müller

#1
Thanks for your contribution - a very valid and welcome one. I have only applied some minor tweaks (renamed for standards compliance, removed unneeded files, added readme.txt, modified credits) and re-packaged. Please use the version I have packaged for your future edits.

Download

Joachim

P.S. Added to plugins page as well


[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_light-box_v1.4.zip/download
[/Edit]

Joe Carver

#2
Fantastic! Very well done. Thank You
Running here i-imagine.net and here http://gallery.josephcarver.com/natural/
i-imagine
(notes from a newbie:1) ie7 shows "error on page" - 'document.getElementById(...)'is null or not an object, does not appear to affect function 2) (off topic) had to remove comments recaptcha mod. due to ie7 crash, but no crash with FF and Opera(/off topic) Thanks Again

lurkalot

Thanks for this plugin version, installed and works very nicely.

Is there a way to remove the "Click here to save a version of this image" link?   Not wanting to encourage people to steal my members images etc.  What file would I have to edit, and how please.

Thanks again.  ;)

www.cameracraniums.com
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Timos-Welt

This one is really beautiful! Thanks for it!

jeepguy_1980

Quote from: lurkalot on April 14, 2009, 10:03:02 AM


Is there a way to remove the "Click here to save a version of this image" link?   

open js/lightbox_s.js

replace:
// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length + "<br><a target=_blank href=" + imageArray[activeImage][0] + ">Click here to save a version of this image</a>");
}


with:

// if image is part of set display 'Image x of x'
if(imageArray.length > 1){
Element.show('numberDisplay');
Element.setInnerHTML( 'numberDisplay', "Image " + eval(activeImage + 1) + " of " + imageArray.length);
}

lurkalot

Many thanks Jeepguy, that fixed it a treat.  ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Davide Renda

First of all, thanks and chapeau bas for the great work.
I have an issue on my gallery, when clicking on last addictions and/or recently seen images, instead of "landing" in the intermediate page, I get a 500 Internal Server Error. It may be a kind of conflict with the EnlargeIt! plugin; which I have set only active for unregistered users.
I'll make a few tests tomorrow, now it's too late and need some rest...!

Joachim Müller

I'm pretty sure that this plugin and enlargeIt will create conflicts. I recommend deciding for one of them. An internal server error is what the name suggests - we can't tell what is wrong. The webserver admin (i.e. your webhost) should take a look at the server's log to figure out what is actually wrong, i.e. what causes the error 500.

lurkalot

Quote from: Joachim Müller on April 16, 2009, 08:44:33 AM
I'm pretty sure that this plugin and enlargeIt will create conflicts. I recommend deciding for one of them. An internal server error is what the name suggests - we can't tell what is wrong. The webserver admin (i.e. your webhost) should take a look at the server's log to figure out what is actually wrong, i.e. what causes the error 500.

I have the enlargeIt plugin installed at the same time, and no problems.   That said, I only have enlargeIt enabled for the slider plugin that I'm using ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

#10
lurkalot, Nice gallery, you have a lot going on.  You might want to check your random images on your gallery page. I had the same effect. Also (from very little experience) you might want to look at your error logs in the LightBox plugin directory. The ie errors I saw in my browser (see above) might have something to do with what I saw logged on the server (guess and only guess is that it has something to do with the counter) I got 1.5Mb of error log in <24 hours.
PHP Warning:  require(include/init.inc.php) [<a href='function.require'>function.require</a>]: failed to open stream: No such file or directory in /home/..../public_html/artists/plugins/light_box/addhit.php on line 4
PHP Fatal error:  require() [<a href='function.require'>function.require</a>]: Failed opening required 'include/init.inc.php' (include_path='.:/usr/lib/php:/usr/local/lib/php')

It might have been related to the js conflict
/////////post edited here///////////
I was working on this when you replied! (and don't want to add another post)
Try clicking one of your /randoms/ they didn't work from here.Critical error
There was an error while processing a database query

This is what I have so far, sorry for the short first post, maybe this will cover what I know.
There were 3 effects that I saw: 1) ie7  "error on page" 2) /random/ thumbs gave db error and 3)  javascript from my captcha mod crashed ie (only ie) I saw similar (ie effect) on your site. IE did behave ok for one or two page views after a cache clean. but always got lost with the other js running.
My "fix" wasn't much, since I was concerned about the conflict with the other js I decided to at least first fix the ie error and move on. I have not yet returned  to fix my fix, but for what it is worth I disabled the counter like this.
Quotein file lightbox_s.js find this and remove everything to where shown var saveSlideShowHeight;
// -------------------------------------------
      REMOVED function download_counter(id){
//
// Additional methods for Element added by SU, Couloir

I also removed the file addhit.php The error in ie then went away. My other problem did not. I did not want to tell you to check your logs with nothing else...The good thing is that I was driven to clean up the captcha mod. that now works happily with the LightBox plugin. I think there was reference in the original thread http://forum.coppermine-gallery.net/index.php/topic,49596.0.html  There is probably a better fix than my "axe first" approach.  Try one of my galleries with ie and you will not see the triangle. i-imagine.net  or  gallery.josephcarver.com/natural/

i-imagine

Hey jeepguy_1980, Great plugin! (low cpu load for user and it instantly improved my galleries)

lurkalot

Quote from: i-imagine on April 16, 2009, 08:57:42 PM
lurkalot, Nice gallery, you have a lot going on.  You might want to check your random images on your gallery page. I had the same effect. Also (from very little experience) you might want to look at your error logs in the LightBox plugin directory. The ie errors I saw in my browser (see above) might have something to do with what I saw logged on the server (guess and only guess is that it has something to do with the counter) I got 1.5Mb of error log in <24 hours.
jeepguy_1980, Nice plugin. I'm not sure if you are aware of those two effects. I'm still learning how this works, and how much I like it too!

Thanks.   I see the Error your talking about now.  I missed that little warning triangle at the bottom left of my browser. IE7

It shows the same as you,

Line: 183
Char: 7
Error: 'document.getElementById(...)'is null or not an object
Code: 0

Not sure what you mean about my Random images, they look fine to me.  And I can't find a error log in the lightbox directory.  :-[
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

Joe Carver

#12
The plugin seems to have a negative effect on /random/.  I also saw the negative effect while trying the Slider mod. Instead of an image when a random thumb was clicked the return value was
QuoteCritical error
There was an error while processing a database query

There seems to be a fix see: gallery.josephcarver.com/natural/ I have enabled /random/ at the bottom of the page. Feedback for any observed trouble/errors is greatly appreciated.

The fix is in the original thread for the LightBox mod.
QuoteStep 7. Making sure the random images are shown:
These changes are in include/functions.inc.php.

Quote from: Nibbler on January 28, 2007, 08:43:13 PM
I don't know if this is a bug or not, doesn't cause problems on its own.


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


change to


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

QuoteIn your file include/functions.inc.php find                $query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";
QuoteChange to:$query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit";

Random thumbs  now lead to their respective intermediate page instead of the error. So far no other effects from this change have been observed.
i-imagine
(functions.inc.php mod. also implemented here i-imagine.net  this plugin is too good to resist!)



lurkalot

i-imagine

Thanks for that info.  I've edited my functions.inc.php file, and that seems to have fixed my random images problem.  Nice one.  ;)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

jeepguy_1980

I never played around with that option, b/c I don't have mine setup for random. But looking at that part of the functions.inc.php, there appears to be a hookpoint there. So, I might be able to add this to the plugin and prevent manual code hacks.

I'm still working on trying to create a configuration page.

lurkalot

Quote from: jeepguy_1980 on April 18, 2009, 06:45:16 PM
I never played around with that option, b/c I don't have mine setup for random. But looking at that part of the functions.inc.php, there appears to be a hookpoint there. So, I might be able to add this to the plugin and prevent manual code hacks.

I'm still working on trying to create a configuration page.

Thanks jeepguy_1980

Did you see the IE7 error mentioned above?

Quote
Thanks.   I see the Error your talking about now.  I missed that little warning triangle at the bottom left of my browser. IE7

It shows the same as you,

Line: 183
Char: 7
Error: 'document.getElementById(...)'is null or not an object
Code: 0

Anything you can do about that one?  ;) 

The config page sounds good, can't wait to try it out.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

François Keller

great plugin

haw can i have a longer time betwen two pictures. it's to short for me ?
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

Joe Carver

Look in here: lightbox_s.js

for this linevar loopInterval = 3000; // image swap interval


It is a great plugin!

François Keller

ok thank's for the tip  ;) (I was looking into this file, but was missing this line  :-\)
Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog

tarako moka

very wonderful.

Can this reflect the display count of the image?

sorry. The translation site is used.