Using MediaPress to add Media Galleries to your site

Version used for this article: V 1.0.6

One feature missing from the default BuddyPress installation is media galleries and the ability to allow BuddyPress users to upload their own images to be shared with others. Typical hosted social platforms allow the addition of media in three ways – media can be uploaded to a members personal profile page, for sharing with others and display on their profile page, Media can be uploaded to groups and held in a group gallery and media can be uploaded “to the site” – typically placed in a single collective gallery for all to see and often these images are displayed in a front page slider showcasing the uploads of those members. Sometimes media uploads can be marked as “Featured” and will be displayed in a featured content area in the main gallery.

Whilst WordPress has numerous gallery plugins only a few have been integrated with BuddyPress and most are designed to be created and managed by a single user – the site admin, designed for simple websites in order to showcase images. these are for the most part not suitable for use as part of a BuddyPress community.

There are really only two main media plugins that are available for BuddyPress – the long established rtMedia for WordPress, BuddyPress and bbPress and also the newly created fledgling plugin MediaPress. Both offer similar base features, rtMedia has a wider range of add-ons available but these are also typically premium and quite expensive, MediaPress on the other hand has it’s add-ons at a more reasonable price. It’s for this reason that I tend to use MediaPress and for this article I intend to take you through setting up MediaPress on your site.

Installing MediaPress

Installing MediaPress is a case of going to Dashboard>>Plugins>>Add New, searching for MediaPress in the WordPress Plugins Repository then clicking on “Install” and then “Activate”.

Configuring MediaPress

The first thing to note is that MediaPress creates a new BuddyPress Component – “Gallery”, this needs a page associated with it, you can go to Dashboard>>Pages>>Add New and create this page (you can call it gallery for example), then go to Dashboard>>Settings>>BuddyPress>>Pages to associate the gallery component to your newly created page. This page will display a view of all galleries on your site, you may wish to link it into your site menu by going to Dashboard>>Appearance>>Menus and adding this new page to your menu there.

The second thing to note is that in order to work at all, MediaPress needs you to save it’s settings, you can access these via Dashboard>>MediaPress>>Settings.

General Settings

The general settings allow you to choose the type of galleries your site will support (Sitewide, Group and User Galleries), the types of media supported by the galleries (Photo, Video, Audio and Documents), it allows you to choose the default and available privacy options (public, private, logged in users only, Friends only and Group only), the types of files supported (i.e. jpg, mp3 etc.) and also the storage limit setting per user/group (the default is 10Mb).

It is worth noting that the larger the files that are uploaded, the longer the upload session will take, especially on slow internet services and you may need to increase you PHP session timeouts to ensure file uploads do not timeout.

For the sake of this configuration exercise I’m going to assume that you are going to configure MediaPress for all Gallery types and for all Media types. what this means is that in effect you are enabling the creation of 12 different types of galleries:

  1. User Photo Galleries
  2. User Video Galleries
  3. User Audio Galleries
  4. User Document Galleries
  5. Group Photo Galleries
  6. Group Video Galleries
  7. Group Audio Galleries
  8. Group Document Galleries
  9. Sitewide Photo Galleries
  10. Sitewide Video Galleries
  11. Sitewide Audio Galleries
  12. Sitewide Document Galleries

You can see that this means that your site will become even more complex than it already is, so some discretion regarding the types of galleries you want to enable should be observed.

Note also that currently video galleries are only for uploaded video, in my opinion most people will upload their videos onto YouTube or similar mass hosting sites and look to share their videos as links so I have asked the developers to add support for video’s from web-links and they have agreed to consider putting this feature into the next release.

You need to consider also the storage limits of your hosting service when considering what types of galleries to enable and the upload limits per user. Personally I would wait for the video web-link gallery type and not install video galleries in order to reduce site load however that point of view is changing as increasing numbers of members have been asking me to allow video from mobile phone footage. If you are going to take media in any seriousness then its wise to find yourself a low cost unlimited data hosting solution.

Sitewide Gallery Settings

The settings available here allow you to create an archive page and set it’s slug name, the default is galleries, if you choose to create this page you will need to create a pages and associate it to the Galleries component in the same way that you did for the Gallery page.

Also here you can choose the types of galleries supported sitewide – Photo, Video, document and Audio. You also get to choose the default layout of those galleries – Grid View, List View and in the case of Audio and Video Galleries – Playlist.

Make sure you save these settings even if you have not changed them

BuddyPress Settings

Here you can choose to enable or disable to BuddyPress Gallery component we set up at the start, so if you do not want a page to list all galleries you can disable that here.

There is also the option to add a “Media” component page that creates a page that displays all media items, this is not currently supported and should be set to no.

You can choose whether or not to allow members to upload images etc. as part of an activity status update. When enabled, a member uploading in this way gets to choose which media gallery the upload is to go to. You can also choose if certain media related actions create a new activity item, such as the creation of a new gallery.

Note that if enabled, members activity updates will create an additional type of member gallery – their Wall Gallery and these will be of up to three types depending on the media supported.

You can also choose the views of the activity upload media items where more than one item is uploaded at a time.

Make sure you save these settings even if you have not changed them

Members Gallery Settings

Here you can choose what kinds of media galleries you are going to enable for each member – Photo, Video, Audio and Document. Enabling Filters allows the Member to filter by Gallery type. You can also set the default layout of the Members Galleries.

Make sure you save these settings even if you have not changed them

Groups Gallery Settings

Within this tab you are able to choose the types of media that the group galleries will support, you can also set the default views for those galleries, the group gallery settings which determine if Galleries are enabled in groups by default and who can edit and delete media, also if the My Galleries tab will be enabled within the groups

Make sure you save these settings even if you have not changed them

Theming

Here you can set such things as the number of galleries to list per page and the number of media items to list per gallery page. Note that currently there is no page 2 etc. meaning if you have 23 items in a gallery and your theming is set to 20 items displayed then 3 of those media items will not be displayed at all. I have asked the developer to add paging to the gallery view. For now you should set this number to be a high one.

For grid layouts you can set the default grid layouts here, default is four rows by four columns, what is suitable for you is dependent on your theme’s page settings.

You can also choose whether to show media descriptions on a single gallery and media pages, you can choose to allow playlists and commenting on media items in the Members Gallery and finally there are some light box settings. A Lightbox is a method of displaying media in a pop up window, it avoids loading another page when the media item is clicked.

Make sure you save these settings even if you have not changed them

Setting up a Sitewide Gallery so that all site members can upload to it.

Before setting up the gallery, there is a plugin that you need to install, it’s a short term fix that allows a gallery to be set so that any logged in member can upload to it. It is available from BuddyDev’s repository on GitHub and is called MPP Global Shared Gallery.

Many BuddyPress developers store their development files on GitHub, from here you can download and upload test files and fixes prior to public distribution or as in this case to store plugins with features destined to be included in the main release.

Warning, you must make sure that MediaPress is installed and activated on your site before uploading this plugin, if you plan to uninstall MediaPress make sure you uninstall this plugin first, otherwise your site will get errors, this is extremely important.

The next version of Mediapress will include this feature so you will be able to delete this plugin at that time.

  1. Head to https://github.com/mediapress/mpp-global-shared-gallery
  2. Click on the Download button
  3. Select to download the file as a Zip file
  4. Once it is downloaded, go to Dashboard>>Plugins>>Add New and select “Upload Plugin”
  5. Click on “Choose File” and navigate to the directory where you downloaded the file, on PC’s this is usually the Downloads directory
  6. Choose the file mpp-global-shared-gallery-master.zip
  7. Click on “Install Now”
  8. Click on “Activate Plugin”

The plugin is now installed on your site.

Once you have installed the Global Shared Gallery plugin, head to Dashboard>>MediaPress>>Add New Photo Gallery, this opens the page for adding a new Sitewide Gallery.

Give the Gallery a suitable name, scroll down the page and make sure the box “Allow everyone to upload” is checked, then save the Gallery.

Note that you can also choose to upload a cover image and set a description for this Gallery in the Edit Gallery tab of this page.

Also note that on the right of the Gallery page it tells you the shortcode to Add this gallery to a page. Copy that shortcode, it should look something like this:

[mpp-show-gallery id=36]

Note that in this case the Gallery has an id of 36

Next click on Dashboard>>Pages>>Add New and give the new page a suitable name (Such as Site Wide Photo’s)

In the page content paste the shortcode to display the gallery on this page.

In order to allow members to upload to this gallery you also need to insert the uploader shortcode as follows:

[mpp-uploader gallery_id=36]

Taking care to replace the gallery_Id number with that of your own gallery.

You can now save this Page and add it to your site menu in Dashboard>>Appearance>>Menus

Now if you visit your site, you will see your sitewide gallery in the site menu, clicking on this shows you the gallery uploader which allows you and any other site member to upload images to this gallery. Once there are media items in their it will also show them.

Using the same process you can also add sitewide Video, Document and Audio galleries if you so wish.

Adding a Gallery to a Group

The expectation is that your group admin will typically be the ones adding group galleries however you will want to test this process for yourself. I’m going to assume you do not already have a group created, since I’ve not mentioned that so far in this series. Note, if you have loaded any of the other group plugins that I’ve mentioned previously then the steps I’m mentioning here will be slightly different, I will take you though the creation of a basic group.

Login to your site as a test user, load the groups page, select “Create a Group”

This takes you to the Group Creation Page where you can give the Group a name and description. once these are entered you can click on “Create Group and Continue”.

The next page asks you to choose the Group Privacy Option and who can invite others to the group, select some suitable options.  Also note that on this page there is a new option to “enable the Group Gallery” you can click on this to enable group galleries to be created. Click “Next Step”

The next page allows you to choose if you want a group Gallery, make your choice and click on “Next Step”

The next page you will upload and crop the group avatar image, do this and click on “Next Step”.

On the next page you will upload the Group Cover Image, once done hit “Next Step”.

Finally the group creation will ask you about sending out invites, you can skip this and click on “Finish”

Your group is now created

You can now click on “Gallery” in order to set up your groups Galleries

Once in the gallery page you will see the option to Create a Gallery, click on that to start the gallery creation process, here you can select the type of gallery and also give it a name and description. Once this is done you can click on “Create” and your gallery will be created.

Creating a members Gallery

Display the members drop down menu by floating your mouse point above the member name on the top right hand corner of the page, from this drop down select Gallery>>Create.

A very similar dialogue will appear as the group gallery creation page that you have just navigated, again you get to choose the media type for the gallery, it’s name and description, clicking “Create” will then add the gallery to that members gallery list, available from the profile drop down menu as previously described. Enter the required information and click on “Create”

Congratulations, you have now installed, configured and Tested your MediaPress Plugin!

Conclusion

In this article I have taken you through adding media galleries to your BuddyPress installation, it’s quite a complex process but by now your site should start to the sorts of features that you need in order to create your ideal site.


Venutius

I've been setting up and managing BuddyPress social networks for a few years. I moved from Ning and other platforms and have come to BuddyPress looking to make sites with similar features to them.

9 Comments

L Susanne · August 20, 2018 at 11:39 pm

Hi I am having issues with contacting you by this website system I have a couple of questions – This is in regard to your article “Add media galleries to your site” 2016

1) is there a media press social share system? I have searched and searched with no luck.

Also, you indicated that in order to allow other members (sitewide) to upload, we need to upload a plugin from GitHub, Has this been worked into media press by now with no issues of other members uploading in 2018?

I am having serious issues with getting ANY of the media press features to work at my website and I am getting very weary (so is my developer) 🙁 we have been working weeks on this and there are continual errors everywhere trying to upload videos, images or add links:( The upload video has never worked for activity wall inspite of all efforts so far. I would like response from the author please.

    Venutius · August 21, 2018 at 4:09 pm

    Hi there, I’ve not seen a social share add on for Mediapress, you might like to ask on the BuddyDev forum for recommendations.

    I’ve been using the sitewide upload feature for over a year now, it works great as far as I can see.

    Your best bet is to get onto the BuddyDev forums, they are very helpfull and I’m pretty certain they can get you working in no time.

Becky Robertson · April 24, 2019 at 8:24 pm

I know this is probably crazy, this post is two years old already, but I have to ask someone and I’m hoping maybe you’ll answer me. I’ve spent almost a week trying to get Mediapress to work and I still haven’t figured out what the problem is.

The first issue is that I cannot for the life of me figure out where the template files that I need to edit in order for it to fit with the rest of the site are located, this is primarily just a major annoyance as I’m sure I’ll track them down eventually there being almost nothing in the way of developer documentation. At least rtMedia gives you that much.

The second issue, and by for the most obnoxious is that clicking on the images, or the “view” button of the image for albums takes me to a 404 page. I’ve spent a couple dozen hours searching Google for an answer and can find absolutely nothing. I’ve gone over your article above several times and followed the instructions to the letter. I’ve gone over the code of the demo and it doesn’t look any different than mine, I just have no idea what’s going on or how to fix it.

Thank you for reading my rant and I really, really hope that you are able to give me some guidance.

    Venutius · April 25, 2019 at 7:37 am

    Hi there, I’d recommend asking BuddyDev your questions as they are better placed to support this than I am.
    For template overloads in Mediapress these go in themes/yourtheme/mediapress/slug-name.php and the source files are located in the plgunis/mediapress/templates directory.
    Regarding your 404 errors, I’d try resaving your permalink settings as this can be the cause of 404’s in general. Otherwise raise an issue on the BuddyDev forums, they are usually quick to respond.

      Becky Robertson · April 25, 2019 at 8:55 pm

      Thank you for being so fast in responding, I really appreciate it. I’ll try with them again on the 404 as I’ve resaved my permalinks a few dozen times already without any success, otherwise I’m going to have to go through the hassle of cobbling something together on my own.

      There seemed to be a possibility that it had something to do with an incompatibility between BuddyPress and NextGen, but after disabling every other plugin I have other than BuddyPress and Mediapress I’m fairly certain that isn’t the case as it had no effect whatsoever. Besides, I don’t actually have any NextGen code on the site because I display the images through JIG.

      Like I said, I’ll either figure it out or try something else. User Post Gallery is looking somewhat promising so far, though it’s a tad bit limited.

      The template overload location information was very useful. I was beginning to think I was going crazy!

        Venutius · April 25, 2019 at 8:59 pm

        Ah yes, NextGen, I had to stop using it on one site as they refused to fix the bugs they cause in BuddyPress.

Chelle Ellis · July 9, 2020 at 11:13 pm

Is there a way to add an option where user can pick a category or tag when uploading, so the photos can be placed in a category for search results?

Associating WordPress Blogs to BuddyPress Groups – BuddyPress User · October 9, 2016 at 9:19 pm

[…] In the next article in this series I will take you through Using MediaPress to add media to your site. […]

Extending the basic BuddyPress Install – BuddyPress User · October 10, 2016 at 12:58 pm

[…] I’ve written a detailed guide to setting up MediaPress Here. […]

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Contact Me
close slider