BuddyDev

Pretty Photo Gallery plugin for BP Gallery

We have another addon for the Bp Gallery ready today, and I am sure you will love to use it.

PrettyGallery plugin is a gallery viewer plugin using the well know Pretty Photo jquery plugin from Stephane Caron of  No Margins For Errors. This is one of the best lightbox script available using jquery and after a few members asked me about viewing gallery using lightbox, I liked the idea to show it using Pretty Photo.

This plugin allows viewing of all the images in gallery using Pretty Photo. No need to go to the gallery page, simply clicking on gallery link opens the  images in the viewer. It also allows to view the phots in activity stream, directory and almost everywhere using the lightbox.

What it does:

  • Shows the gallery photos in activity stream in lightbox
  • Shows the gallery photos in directory using lightbox
  • Shows all the Images of a gallery In pretty Photo

How It works

  • When a user clicks on a gallery thumb/link, It finds the gallery id from document.
  • Using ajax, It checks whether some photo exists in the gallery or not, and do the user have the permission to view those set of photos.
  • If Photos are present in the gallery and the user has permissions to view photos(Say if a gallery has 10 public photos and 20 private photos, then a non logged in/non owner will only be able to view the 10 public photos), a JSOn object containing the image details are sent back
  • We parse this JSON object and activate PrettyPhoto using the PrettyPhoto API.

Here is an example screenshot

How to Use it

Install it and visit the settings via Dashboard->BuddyPress->PrettyGallery settings.

Installation

  • Download pretty-gallery from here https://buddydev.com/plugins/pretty-gallery/
  • unzip it and upload pretty-gallery to wp-content/plugins directory
  • Login to WordPress backend
  • Go to Dashboard->Plugins->Installed
  • Activate Pretty Gallery  "sitewide"

Usage

  • Login To WordPress backend.
  • Dashboard->BuddyPress->PrettyGallery settings and save appropriate settings.
  • If you want to use the widget, Go to appearance->Widgets, Add the "SiteWide Pretty Photo Galleries" to the widget area as shown below
  • Once you have added the widget, make sure to check the widget settings as shown below
  • Click save and you are done, you can restrict the gallery type to "Only Galleries from User", or from "Groups"  or all Galleries

Check your site again. Try clicking on a gallery thumb listed by the widget, you will see a new lightbox is opened which shows you all the images from the gallery.

I am done, Now It's your turn to use it, find bugs and helping me improve it 🙂
Do not forget to let me know the enhancement/suggestion in the comment.

86 Responses to Pretty Photo Gallery plugin for BP Gallery

  • Oh, now that is too cool Brajesh!

    It works perfectly on my main site, and I like the way you've linked the gallery title to the gallery main page.

    On a user blog though, I get the following error:
    Fatal error: Call to undefined function bp_has_galleries() in /home6/rspaceor/public_html/wp-content/plugins/pretty-gallery/prettyGallery.php on line 187

    Plus, the bp admin bar disappears from the user blog when the sidebar widget is activated. Removing the widget from the sidebar brings back the admin bar.

    Great start!

    • hi Patrick
      Thanks for the comment.
      Please make sure buddypress and bp-gallery are active sitewide, It seems bp-gallery is only active on your main site, that's why this error is appearing. Let me know if you already have the gallery active sitewide.

      • Doh, he says, slapping his forehead. You're right: bp-gallery was not activated sitewide.

        The error message is gone (hooray!) but no thumbnail appears; just the link to the gallery. I've tried different themes to rule that out but, no luck: no thumbnail.

        • hi Patrick, there is a bug in bp-gallery causing that issue. I am putting it in the update 2.

  • Is there any way to restrict gallery display to the website admin account only?

  • Or by role?

    • of course, why not, but I am confused by your questions. The gallery display can be restricted in any way you want(even you can disallow the member who created the gallery from visiting gallery by using the filters available, but I am not sure, what is the purpose. Can you clarify, which galleries you want to restrict to admins only. Further why not make a gallery private, if you want admin only listing).

  • Also ability to launch the pretty photo gallery popup from the Gallery Directory page by clicking on the gallery thumbnail. So it doesnt forward to the user profile.

    Maybe an option to do either in gallery admin panel.

    • These all the things are possible, just a little bit of jquery manipulation is required.

      If you check the file, You will see how I have triggered the popup after receiving ajax response. In the upcoming version, I will put it as an option in admin, to allow triggering of Pretty Photo gallery on Directory page/widget sections/short code section.
      (This version was just there to show how it could be accomplished as you had asked for the code :))

  • Yah that would be perfect. When do you think you will be posting another update?

    • hi
      Next week Tuesday for another major release(and If something goes wrong(I mean if gallery works abnormal in case), then a point release can be at any moment).

  • and also is it possible to set it to randomly display the gallery?

    • hi Anthony
      Sorry, your comment was caught in spam. Yes, It is possible to set random gallery.But no available in this plugin. you may have to pass the orderby="random" for that.

      Thanks
      Brajesh

  • Hi Brajesh,

    Thanks for the plugin. Will be checking it out tonight 🙂

    Cheers.

    • hi Mercime
      Thanks for the comment.
      Looking forward to it, and yes, we missed you for last 2-3 days, hope you are doing well 🙂

      • Doing well, thank you Brajesh. I was creating a new layout for the gallery pages rendered by BP Gallery and did all via CSS tweaks instead of touching template files. The hard part was making tweaks compatible with IE6.
        Will be posting those in forum and in a knightly site 🙂
        Cheers.

  • Hey there,
    I have a MAJOR issue. The website just did a soft launch and the Gallery addon is NOT working – only admin users can upload pictures!

    I have one admin user and the rest are basic contributors.. When i go to the gallery feature in the admin's profile, I can create new galleries and then add pics to it.

    When in a NON ADMIN profile, It seems like its allowing me to create galleries and add pictures. I can add the gallery, browse files, click upload.. but when the loading bars are done, it reverts me back to a page that says "NO PICTURES HAVE BEEN UPLOADED" and the gallery that I created is also gone

    Here is the url
    http://connecticutaquaticplantenthusiasts.com

    Please feel free to make a test account and try it. I appreciate any help

  • What is the best way to go about styling the widget thumbnail output? I would like to add my custom styles to the borders. Thanks. I tried editing your output code but it didn't seem to work correctly. Can you add a class to the images so I can style their borders?

    • how About using parent selector
      Like

      .widget_bp_gallery_sitewide_media_widget img{border:2px solid #ccc;}

  • How do I go about creating a public page and inserting this type of lightbox gallery into it? Page shortcode? I would very much like this type of option. So the public can view the galleries on a wp page but not have access to profiles. Thanks.

    • In rc4 Update 1, Lightbox is not supported on Short codes page. In next update coming in 2 days you will have this option.
      You can use shortcode to insert public galleries on a page.

  • Any updates on this?

    • hi Leland
      You may have to wait a few more days. Buddypress 1.2.4 is about to be released early this week. So, Releasing something for bp 1.2.3 and then releasing for bp 1.2.4 is not a good option in my view. I am waiting for them to release bp 1.2.4(as Andy announced a few days ago) and will take then 2 days to put the plugin for bp 1.2.4 which will include all the features I have mentioned here/and in forums. Further bp 1.2.4 is going to support wp 3.0, so just waiting for it .

      Thanks
      Brajesh

  • (1) is there a way to make it display random galleries?

    (2) and how do I activate the plugin sitewide? I activated it in the plugins section, but Im obviously a newb. 🙂

    • hi Shane
      If you are on wpmu you will see an option to activate the plugin sitewide. If it is already activated, deactivate it and the option should appear.

      Currently you may not use it to show random gallery, It is just a lghtbox.

      If you can explain me what do you mean by showing random gallery in pretty Photo lightbox, I may find the solution.

  • I have just installed this plugin using MAMP and running WPMU 2.9.2. Plugins bp-gallery & this one are all activated sitewide.

    I cannot get the prettyPhoto window to appear.

    • Please use the updated version of this plugin for bp-gallery update2 or 3
      https://buddydev.com/http//buddydev.com/download/pretty-gallery-v1.1.zip

      let me know if it works or not ?

      • Hi Brajesh, Pretty Gallery V 1.1 is working in BP 1.2.5.2 and WP 3.0.1 multisite with subdomain. Thank you.

        I just noticed during FTP upload that there are 5 Pretty Photo skins available per pretty-gallery-license included inside the plugin folder – light_rounded, dark_rounded, light_square, dark_square, facebook 🙂

        Thank you.

        • Hi Mercime,
          Thanks for confirming. Highly appreciate it 🙂
          Yeh, there are the skins, I had used the default one as provided, but these skins can be activated.

        • Hi Brajesh, yes I found it in jquery.prettyPhoto.js of the plugin where I can set what theme I prefer.

          Cheers.

      • Hi,
        l would love to see a gallery or album plugin that lets other members/visitors to the site leave comments/feedback and be able to check a 'like' box. a bit like fb does.
        On my website this function is vital for feedback for members with their photos/videos.
        do you think you could add this sometime soon?
        Many thanks
        Lucy

  • Any idea when we would get an update? I'd like to use these features on other places of my blog instead just as a widget?

    Cheers

    Jens

    • Hi jens,
      It works with blog shortcodes. sorry, I forgot to reply here.

  • Mas #

    This is a great addon for a great plugin, but I'm having an issue with the video thumbnails. They no longer work as links, though the cursor shows them as links. Opening the link in a new tab does work, and so does clicking on the text link. It seems that, when I click the video thumbnail, Prettygallery is trying (and failing) to open the video in the lightbox, as if it were a photo gallery. Is there a workaround for this?

    Thanks much.

  • Does the plugin work now on the gallery directory, I mean not only on the sitewide widget?

  • Can you make it pull from flickr too?

  • Hi,

    is there a way to display certain name of gallery folder(s) in the site wide photo/media widget?

    For example, users will create a gallery named "Xmas" and the widget will display only galleries from users /groups with the name "Xmas.

    • Not in the current version, but going to add this feature too this weekend.

  • I just installed this and when i try to click on a image in the gallery all i get is a lil white box (about a thumbnail size) that pops up and no image

    • Any chance you are using tweetstream or buddystream ?

      • yes is that the problem then

        • and is there a fix for it? (using buddystream)

        • Currently, it does not work with them, as buddystream also uses prettyPhoto jquery plugin and catches the ajax request made via the activity stream, so that makes this plugin unable to work on activity stream.

          We tried to find a solution, but could not get rid of the issue, as buddystream uses global ajax handler. Hopefully, I am working on a fix and will be providing to Peter Hofman. Let us hope the things get sorted in a couple of days.

  • Hallo Brajesh,

    1. I use budrypres 1.26 and install bp galery with pretty galery add on.
    Problem is that cant create any galery,if create galery button only short working and nothing.
    you may please provide you skype name for online consult this ?
    I try change theme and some over.I use theme bp mag 1,0 is any new ?
    galery bp and prety galery I download latest from your site.

    2.how I add your custom widget for show registration new user and show login on main site ?registration and login choice in 1 widged,customize without wordpress link

    • Hi,
      Thanks for the question?:-
      1. Please always make sure to upgrade to latest version of Bp(i.e. 1.2.7 currently)
      1. Please upgrade to bpmag 1.0.1 as It has support template for gallery(earlier version did not include gallery template, so you had issues). Please post the question in forum for faster resolution.

      I am unable to understand your other points, can you please clarify what you mean ?

  • Hi,

    I set the site wide pretty gallery widget to show 3 galleries.

    When users add more galleries, it keeps showing the 3 old galleries and does not show the new ones.

    Ideally it should replace the oldest ones with the newest one.

  • I have no option for "sitewide" on either the BP-gallery plug-in or the Pretty Photo plug-in…

  • Hi Brajesh,

    I'm having problems with the pretty gallery: http://www.kellimarshall.net/family/

    I've installed everything just as you suggested in the directions but I've never gotten a lightbox.

    Any help would be appreciated.

    Thanks!
    KMarshall

    • Hi Kelli,
      Just checked that. seems like an error with current version. Please allow me to check and update in 15 minutes.

      Thanks
      Brajesh

  • Will do. Thanks!

  • Hello, I really like this plugin. It works like a charm!

    I would like to use the widget that comes with this plugin, but it always seems to just show the oldest galleries. Is there a way you can add more options to the choice of gallery sorting, like random, alphanumeric, newest to oldest?

    I would like to set it so it will pick random galleries to show, but it doesn't seem to do anything like that as it is right now. Thanks!

  • EDIT: we had some database problems and restored it, which solved a lot of issues including this one! Sorry to bother you guys about this one!

  • tim #

    Hi Braj,

    For some reason now, my lightbox won't work. It used to though.

    I can see both css and js in the page source. The js comes after jquery 1.4.4.

    I notice though there is no class or anything on the thumbnails.

    Any thoughts please?

  • tim #

    Got it working, was a conflict with superfish. 🙂

  • Hi! I have a trouble with gallery, which has a Cyrillic title. Url of button "View & Comment" seems like View & Comment… Please, help

    • Hi Eduard,
      sorry for delayed reply. Is the link pointing incorrectly or do yu want to change the text of view and comment ?

  • Hi Brajesh,
    is it possible to trigger the images of a gallery in the lightbox by clicking on a link that is located above the pictures of the gallery?

    thanks,
    peter

  • Hi Brajesh, for some reason pretty gallery has stopped working on my site, it used to work. I have downloaded and installed the latest plugin but it did not fix it.
    http://eembroiderydesigns.com/social/
    Alice.

  • I am sure I just posted a comment but now I can't see it. I had pretty gallery working but now it is not. I have uploaded the latest plugin but it didn't fix it. any ideas?
    http://eembroiderydesigns.com/social/
    Alice

    • Hi Alice,
      I checked on your site. The problem is one of your plugin is loading jquery from google. So, jquery is loaded twice on your site causing the problem.
      Please check your plugins(which you activated recently) and try to disable one by one to find the culprit.

      hope that helps.

  • Hello Brajesh,

    When ever I turn this feature ON, it will turn right off again.

    Also, when someone will post a single picture, and then click on that pic under the activity wall, it will not pop up with the Pretty Gallery. Nothing happens when you click. Please try with this link:

    http://sharemickey.com/groups/my-favourite-character/

    Thanks!

    • Sorry, this feature under general settings: Enable Lighbox on Gallery Image Listing page for single galleries(click on any of the media will show all media in lightbox on single gallery page).

  • Hi.
    The Pretty Gallery plugin works but conflicts with FancyBox for WordPress. Is there a way to make the 2 play nicely together? Or can Pretty Gallery be configured to do much the same lightbox effect for post images?

  • Pretty Gallery is not compatible with Buddypress Version 1.2.10. Any idea when this will be working?

    • Please download older version of Pretty Gallery for bp 1.2.x series. the present version if for Bp 1.5

  • Doesn't work on IE. When you click the photo, status bar says "Error on page."

  • I had mentioned here a few days ago that I can't get Pretty Gallery to work with IE, Somehow my comment has disappeared. Anyway, I still haven't figured out why it doesn't work on IE. It says "Error on Page" on status bar. Any help/tips would be greatly appreciated.

  • Adding to the comment above, I tested Pretty Gallery on IE 8

  • Hi there,
    I am using Fancybox plugin too and would not like to disable it. I am interested in becoming a member and trying the bp gallery and the pretty photo plugin.

    Is there a way to make the two plugins fancybox for wordpress and pretty photo play together?

  • Hi Brajesh,

    I've installed and activated this plugin, and would love to use the widget for my homepage in BP Mag Classic. However, the widget is not appearing in my widgets area. I'm only getting the normal site wide gallery widget. Any idea why this would be?

    Thanks,

    Sean

  • Hi @sbrajesh really want to use this but on my site it opens and shows a white area and that's it… Some of the buttons look messed up as well… any ideas??

  • Hi @sbrajesh.

    I downloaded this plugin but i'm running into a problem.
    When you upload a picture to your gallery, via the activity page it will update your activity, showing that you uploaded a new picture. If you click on the thumbnail, the Lightbox doesn't pop out.

    If you upload pictures directly from the gallery page, Lightbox works. From activity page doesn't work.

    Any ideas? I really like, and want to use this plugin.

    Thanks

    • Hi Nuno,
      Thank you for reporting the issue. It will work with the images uploaded from activity. It needs to refresh the page(currently It is not getting bound to ajax updated elements). In future version, I will try to update that.

  • Hey Brijesh,

    Skeptical if the lightbox would work with my theme (Salutation)
    Had the same issue with RT Media aswell, where user would click on the image and no result. So I had to turn off lightbox.
    Considering signing up for this plugin. Would you provide support ?

    Thank you.

    • HI Vir,
      This plugin should work with any theme. If It does not, I will help you to get it working. In case our efforts does not work for you, you can always get a refund.
      hope that helps 🙂

      • Happy to hear that Brajesh*
        Is there any demo site where I could test the plugin out first.
        Will subscribe soon and keep in touch with you 🙂

Subscribe