LightBox JS for Fullsize Popup Slideshow - Page 8 LightBox JS for Fullsize Popup Slideshow - Page 8
 

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

LightBox JS for Fullsize Popup Slideshow

Started by SaWey, January 08, 2008, 01:01:26 AM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

flapane

Hi
does anybody know why if I start a slideshow in one of my albums, it always shows photos from 1 to 11 and then it ends?
See at http://www.flapane.com/gallery/
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

SaWey

Please read the instructions more carefully, it is explained in there:

Quote from: SaWey on January 08, 2008, 01:01:26 AM
The slideshow, by default, only takes the next 10 images in the album, this to prevent overloading big albums.
If you want to change that, you will have to do this in your theme.php function 'lightbox_list()'.
The first line of that function has a variable to set the maximum images for a slideshow.

flapane

My bad, I don't know how I didn't see that piece of the guide.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

low-deluxe

I installed your mod. I have Cpg integrated with mehdi Plugin with Joomla.
When i click on a picture lightbox opens and seems to work, but the lightbox screen is white!?
What is wrong?

Link: bar-racuda.de/fotos

thanks for helping and providing such a beautyful mod.

Greets
Low-deluxe

SaWey

I think the problems is that you are using mootools, jquery and prototype all together.
I don't know how to fix your problem, it might be better to use something like highslide or so (for which a CPG mod is available as well), as it is already loaded on your page.

low-deluxe

well actually i don`t think i am using this kind of stuff... !?
I didn`t install it...
Couldn't it be something else?
Greets

low-deluxe

low-deluxe

ah well. I installed another picture gallery which is still running, because i can`t get coppermine the way i like it ;-)

Would deinstall it help?


SaWey


flapane

Does the photos gets their view counter increased while one is watching them trough lightbox?
I can't verify as visits from my ip aren't counted.
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

flapane

Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

SaWey

No, links aren't counted with lightbox slideshow

flapane

Ah, ok. Do you think it will be implemented one day?
thanks
Flapane
www.flapane.com

Gallery
www.gallery.flapane.com

SaWey


chickchick

quick and dirty hack to count views at lightbox

first u need to edit lightbox_s.js
add this function after the global vars near line 140-150

function download_counter(id){

var xmlHttp;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    try
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    catch (e)
      {
      alert("Your browser does not support AJAX!");
      return false;
      }
    }
  }

  xmlHttp.onreadystatechange=function()
    {
    if(xmlHttp.readyState==4)
      {
      document.getElementById("target").innerHTML=xmlHttp.responseText;
      }
    }

  xmlHttp.open("POST", "addHit.php", false);
  xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");
  xmlHttp.send('pid='+id);
  }


find "showImage: function()" and add patch it like this:
from:

this.preloadNeighborImages();

to:

this.preloadNeighborImages();
download_counter(imageArray[activeImage][3]);


next find this:

for (var i=0; i<anchors.length; i++){
                                var anchor = anchors[i];
                                if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
                                        imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage')));

and patch it like this:

for (var i=0; i<anchors.length; i++){
                                var anchor = anchors[i];
                                if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))){
                                        imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), anchor.getAttribute('picpage'), anchor.getAttribute('pid')));


now u have to patch your theme.php:
find:

$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" title=\"$pic_title\" >";

and replace with:

$picList .= "<a href=\"$picture_url_fullsize\" picpage=\"$picture_page\" rel=\"lightbox[list]\" pid=\"$picture[pid]\" title=\"$pic_title\" >";


comments are welcome

chickchick

sry one file is missing and cant find the mod/edit button.

you need to create a file called "addHit.php" in your cpg dir.


<?php
define
('IN_COPPERMINE'true);

require(
'include/init.inc.php');

if (isset(
$_POST['pid'])) {
  
// Add 1 to hit counter
  
$pid = (int)$_POST['pid'];
  if (isset(
$_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
      
add_hit($pid);
      if (
count($USER['liv']) > 4array_shift($USER['liv']);
      
array_push($USER['liv'], $pid);
      
user_save_profile();
  }
}
?>


the6thday

hi,

just a note:

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:

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


change to

Code:

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


this has changed in 1.4.21! you can still replace the existing code with the "change to" code but you have to remove these two lines instead of just one.

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



SaWey


tardis1916

Hello all!

I installed this great tool on all my galleries and it's been working great! I have run into one issue and that is the text below an image is the same color as the background. Where in the css do I change the font color to black?
"How could you be ringing? What that's about... Ringing? What am I supposed to do with a ringing phone?" Christopher Eccleston - Doctor Who

SaWey


tardis1916

"How could you be ringing? What that's about... Ringing? What am I supposed to do with a ringing phone?" Christopher Eccleston - Doctor Who