Advanced search  

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]

Pages: [1]   Go Down

Author Topic: prettyPhoto jquery lightbox  (Read 7627 times)

0 Members and 1 Guest are viewing this topic.

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
prettyPhoto jquery lightbox
« on: November 22, 2013, 07:11:33 pm »

I want to add prettyPhoto to coppermine:

1.I replaced in function theme_html_picture:

Code: [Select]
"$pic_html = "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">"

with:

Code: [Select]
$pic_html = "<a rel=\"prettyPhoto[pp_gal]\" href=\"{$CONFIG['fullpath']}{$CURRENT_PIC_DATA['filepath']}{$CURRENT_PIC_DATA['filename']}\">";

at both positions.

2. added rel=\"prettyPhoto[pp_gal]\" to:

Code: [Select]
$pic_html = "<a href=\"{$picture_url}\" rel=\"prettyPhoto[pp_gal]\" target=\"_blank\" class=\"document_link\" ><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a><br />" . $LINEBREAK;

3. template.html I included the prettyPhoto js and css and added before </body>:

Code: [Select]
<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto();
  });
</script>


but is not loading the next image when I click the next arrow (is loading the same image).

Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: prettyPhoto jquery lightbox
« Reply #1 on: November 22, 2013, 07:12:48 pm »

I think something should be diffrent in:

Code: [Select]

href=\"{$CONFIG['fullpath']}{$CURRENT_PIC_DATA['filepath']}{$CURRENT_PIC_DATA['filename']}\">";


but I don't know what.tryed many options.
Logged

Niecher

  • LocalSupporter
  • Coppermine frequent poster
  • ***
  • Country: es
  • Offline Offline
  • Gender: Male
  • Posts: 191
Re: prettyPhoto jquery lightbox
« Reply #2 on: November 22, 2013, 08:48:14 pm »

For Fullsize perhaps it is best to set prettyPhoto for a single image.

Regards.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: prettyPhoto jquery lightbox
« Reply #3 on: November 22, 2013, 09:35:23 pm »

yes,but this way is no fun.
thanks anyway.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: prettyPhoto jquery lightbox
« Reply #4 on: November 22, 2013, 10:07:43 pm »

for who wants to use prettyPhoto for a single image:

delete all [pp_gal] from the code.this way prev,next arrows and prettyPhoto filmstrip won't show.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: prettyPhoto jquery lightbox
« Reply #5 on: November 27, 2013, 03:33:53 pm »

If you expect help you should at least describe what you third party code should do and how it is supposed to work.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: prettyPhoto jquery lightbox
« Reply #6 on: November 27, 2013, 11:23:22 pm »

already did  that: is not loading the next image when I click the next arrow (is loading the same image)

demo: http://www.allvip.us/prettyphoto/index.html

I want it to work like in demo Unusual sizes or at Gallery but it works like in demo Picture alone

I shoud add prettyphoto to intermediare image not to full size - I thinks that was my mistake.

I will try it again when I will have more time.
Logged

allvip

  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Posts: 1362
Re: prettyPhoto jquery lightbox
« Reply #7 on: November 27, 2013, 11:24:33 pm »

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: prettyPhoto jquery lightbox
« Reply #8 on: November 28, 2013, 01:39:36 pm »

I assume it doesn't load the next image, as the script doesn't know that there are other images. I guess you'd need to apply your changes to the thumbnail pages to load several images.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.