daniish
Forum Replies Created
-
Forum: Plugins
In reply to: [WordPress prettyPhoto] Javascript initialisation function/** * Initialize prettyPhoto. */ $.prettyPhoto.initialize = function() { settings = pp_settings; if(settings.theme == 'pp_default') settings.horizontal_padding = 16; // Find out if the picture is part of a set theRel = $(this).attr(settings.hook); galleryRegExp = /\[(?:.*)\]/; isSet = (galleryRegExp.exec(theRel)) ? true : false; // Put the SRCs, TITLEs, ALTs into an array. pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href')); pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt')); pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title')); if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false; set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this)); _build_overlay(this); // Build the overlay {this} being the caller if(settings.allow_resize) $(window).bind('scroll.prettyphoto',function(){ _center_overlay(); }); $.prettyPhoto.open(); return false; }
Forum: Plugins
In reply to: [WP Photo Album Plus] PrettyPhoto Lightbox Grid LayoutHi Jacob,
I have found the following initialisation code in the prettyphoto.js – hopefully this is what you need:
/** * Initialize prettyPhoto. */ $.prettyPhoto.initialize = function() { settings = pp_settings; if(settings.theme == 'pp_default') settings.horizontal_padding = 16; // Find out if the picture is part of a set theRel = $(this).attr(settings.hook); galleryRegExp = /\[(?:.*)\]/; isSet = (galleryRegExp.exec(theRel)) ? true : false; // Put the SRCs, TITLEs, ALTs into an array. pp_images = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return $(n).attr('href'); }) : $.makeArray($(this).attr('href')); pp_titles = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).find('img').attr('alt')) ? $(n).find('img').attr('alt') : ""; }) : $.makeArray($(this).find('img').attr('alt')); pp_descriptions = (isSet) ? jQuery.map(matchedObjects, function(n, i){ if($(n).attr(settings.hook).indexOf(theRel) != -1) return ($(n).attr('title')) ? $(n).attr('title') : ""; }) : $.makeArray($(this).attr('title')); if(pp_images.length > settings.overlay_gallery_max) settings.overlay_gallery = false; set_position = jQuery.inArray($(this).attr('href'), pp_images); // Define where in the array the clicked item is positionned rel_index = (isSet) ? set_position : $("a["+settings.hook+"^='"+theRel+"']").index($(this)); _build_overlay(this); // Build the overlay {this} being the caller if(settings.allow_resize) $(window).bind('scroll.prettyphoto',function(){ _center_overlay(); }); $.prettyPhoto.open(); return false; }
Forum: Plugins
In reply to: [WP Photo Album Plus] Private Photos Viewable by Logged Users OnlyThat’s brilliant Jacob.
Thank you for all your hard work.
Forum: Plugins
In reply to: [WP Photo Album Plus] Private Photos Viewable by Logged Users OnlyWhen logged in you should see all the photos – in this case all 11.
Logged-out users would just see the 6 normal photos.
Forum: Plugins
In reply to: [WP Photo Album Plus] Private Photos Viewable by Logged Users OnlyOK at this point i’m not really sure which approach is most appropriate, so i thought i would just try to clarify what i’m after by way of example:
This post (https://www.globexposure.net/wales/?p=159) has an album attached to it with 11 photos – 5 of these are Private.
So when a logged user visits this page they see an album with 11 photos.
But when a user who is not logged-in visits this page they see the same album but with just 6 photos.In reality there may be 10 different albums and i want to keep the photos in the albums that i have created and not amalgamate them into a single private or public virtual album.
With this in mind, which solution do you think will best meet these requirements?
Many thanks
Forum: Plugins
In reply to: [WP Photo Album Plus] Photo Album Descriptions for Logged Users OnlyThat’s brilliant Jacob, works like a charm.
Forum: Plugins
In reply to: [WP Photo Album Plus] Private Photos Viewable by Logged Users OnlyThanks Jacob.
..i need to ask for help with a conditional statement that only displays photos with a Private status if the user is logged.
Can you tell me the PHP code for Status: Private
Forum: Plugins
In reply to: [WP Photo Album Plus] PrettyPhoto Lightbox Grid LayoutSorry Jacob i have reopened this thread!
I have noticed a glitch:
When i click on a thumbnail in the masonry grid, it loads the thumbnail as a single image. Then if i click back in the browser and repeat by clicking on any thumbnail it then loads the prettyPhoto Lightbox for all subsequent images.
You can see this here: https://www.globexposure.net/wales/?p=186
How can i resolve this?
Forum: Plugins
In reply to: [WP Photo Album Plus] How do i order the sub-albums?Ignore me, i’ve got it working!
Just had to change Album Admin > Sub album sort order > order # reverse
Thank you once again
Forum: Plugins
In reply to: [WP Photo Album Plus] PrettyPhoto Lightbox Grid LayoutBrilliant, thank you ever so much ??
Forum: Plugins
In reply to: [WP Photo Album Plus] How do i order the sub-albums?Silly me!
I have set it to Order # desc and yet it still lists the sub-albums in ascending order.
You can see this here: https://www.globexposure.net/wales/?p=5
Forum: Plugins
In reply to: [WP Photo Album Plus] How do i order the sub-albums?OK. So i’ve added an order number to the sub-albums. The easiest way was to set the first (oldest sun-album) to 0 and then just add 1 for each subsequent album, with 5 being my newest at the moment.
So how do i display them in ascending order?
Forum: Plugins
In reply to: [WP Photo Album Plus] PrettyPhoto Lightbox Grid LayoutThat works properly.
When i click on the thumbnails, how do i make them load in the prettyPhoto lightbox?
Forum: Plugins
In reply to: [WP Photo Album Plus] How do i order the sub-albums?I have it set to Timestamp desc now and it still doesn’t seem to work!
Just to clarify, i am talking about the sub-album covers. Please see this example: https://www.globexposure.net/wales/?p=5
Forum: Plugins
In reply to: [WP Photo Album Plus] PrettyPhoto Lightbox Grid Layoutin my web browser (chrome) it looks like this:
https://www.globexposure.net/wales/wp-content/uploads/2015/06/masonry-problem.png