forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 themes (visuals) => Topic started by: allvip on November 22, 2013, 07:11:33 pm

Title: prettyPhoto jquery lightbox
Post by: allvip 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).

Title: Re: prettyPhoto jquery lightbox
Post by: allvip 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.
Title: Re: prettyPhoto jquery lightbox
Post by: Niecher on November 22, 2013, 08:48:14 pm
For Fullsize perhaps it is best to set prettyPhoto for a single image.

Regards.
Title: Re: prettyPhoto jquery lightbox
Post by: allvip on November 22, 2013, 09:35:23 pm
yes,but this way is no fun.
thanks anyway.
Title: Re: prettyPhoto jquery lightbox
Post by: allvip 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.
Title: Re: prettyPhoto jquery lightbox
Post by: Αndré 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.
Title: Re: prettyPhoto jquery lightbox
Post by: allvip 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 (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.
Title: Re: prettyPhoto jquery lightbox
Post by: allvip on November 27, 2013, 11:24:33 pm
pretty photo official website:

http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/ (http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/)
Title: Re: prettyPhoto jquery lightbox
Post by: Αndré 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.