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 3 4 5 ... 9   Go Down

Author Topic: LightBox Slideshow Plugin  (Read 158545 times)

0 Members and 1 Guest are viewing this topic.

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
LightBox Slideshow Plugin
« on: April 13, 2009, 06:40:40 pm »

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
« Last Edit: March 05, 2010, 07:38:18 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: LightBox Slideshow Plugin
« Reply #1 on: April 13, 2009, 07:37:40 pm »

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]
« Last Edit: March 05, 2010, 07:37:43 am by Joachim Müller »
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: LightBox Slideshow Plugin
« Reply #2 on: April 14, 2009, 12:26:32 am »

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
« Last Edit: October 02, 2009, 01:30:33 pm by i-imagine »
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: LightBox Slideshow Plugin
« Reply #3 on: April 14, 2009, 10:03:02 am »

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
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

Timos-Welt

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 800
    • Timos-Welt
Re: LightBox Slideshow Plugin
« Reply #4 on: April 14, 2009, 12:09:52 pm »

This one is really beautiful! Thanks for it!
Logged

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: LightBox Slideshow Plugin
« Reply #5 on: April 14, 2009, 01:50:10 pm »



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

open js/lightbox_s.js

replace:
Code: [Select]
// 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:

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

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: LightBox Slideshow Plugin
« Reply #6 on: April 14, 2009, 07:33:40 pm »

Many thanks Jeepguy, that fixed it a treat.  ;)
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

Davide Renda

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1427
  • aka "Lontano"
    • www.daviderenda.eu
Re: LightBox Slideshow Plugin
« Reply #7 on: April 15, 2009, 11:46:13 pm »

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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: LightBox Slideshow Plugin
« Reply #8 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.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: LightBox Slideshow Plugin
« Reply #9 on: April 16, 2009, 06:39:28 pm »

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 ;)
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: LightBox Slideshow Plugin
« Reply #10 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.
Code: [Select]
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.
Code: [Select]
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.
Quote
in file lightbox_s.js find this and remove everything to where shown
Code: [Select]
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)
« Last Edit: October 02, 2009, 01:33:12 pm by i-imagine »
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: LightBox Slideshow Plugin
« Reply #11 on: April 16, 2009, 11:29:39 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.  :-[
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: LightBox Slideshow Plugin
« Reply #12 on: April 18, 2009, 02:58:46 pm »

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
Quote
Critical 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.
Quote
Step 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.

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

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

Quote
In your file include/functions.inc.php find
Code: [Select]
               $query = "SELECT $select_columns FROM {$CONFIG['TABLE_PICTURES']} WHERE approved = 'YES' $META_ALBUM_SET ORDER BY RAND() $limit_random";
Quote
Change to:
Code: [Select]
$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!)


« Last Edit: October 02, 2009, 01:31:32 pm by i-imagine »
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: LightBox Slideshow Plugin
« Reply #13 on: April 18, 2009, 06:41:25 pm »

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.  ;)
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

jeepguy_1980

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 94
    • Loop Family Forum & Gallery
Re: LightBox Slideshow Plugin
« Reply #14 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.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 824
  • +Tinyportal Support team.
Re: LightBox Slideshow Plugin
« Reply #15 on: April 18, 2009, 06:57:44 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.
Logged
Running SMF 2.0.13  / Tinyportal 1.2, bridged with Coppermine 1.5.34, plus cpmfetch 2.0.0

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: LightBox Slideshow Plugin
« Reply #16 on: April 26, 2009, 10:59:04 pm »

great plugin

haw can i have a longer time betwen two pictures. it's to short for me ?
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1498
  • aka 'i-imagine'
    • Home Page
Re: LightBox Slideshow Plugin
« Reply #17 on: April 26, 2009, 11:33:33 pm »

Look in here: lightbox_s.js

for this line
Code: [Select]
var loopInterval = 3000; // image swap interval

It is a great plugin!

François Keller

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 9097
  • aka Frantz
    • Ma galerie
Re: LightBox Slideshow Plugin
« Reply #18 on: April 27, 2009, 07:20:27 am »

ok thank's for the tip  ;) (I was looking into this file, but was missing this line  :-\)
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: LightBox Slideshow Plugin
« Reply #19 on: April 28, 2009, 10:32:36 am »

very wonderful.

Can this reflect the display count of the image?

sorry. The translation site is used.
Logged
Pages: [1] 2 3 4 5 ... 9   Go Up
 

Page created in 0.026 seconds with 21 queries.