Add Contributor Galleries to your Author Pages

Required version: 0.3.01+

PhotoSmash lets you add a gallery of contributors’ submitted images to their Author page on your blog. The URL would be something like: http://smashly.net/blog/author/byron/, perhaps minus the blog part in your site.

Enable the galleries on Author pages:

  1. In PhotoSmash Settings, go to Special Galleries
  2. Check “Show Contributor Galleries”
  3. [Optional] – if you want to suppress all the other posts by that author and just show the gallery of their images, Check the “Suppress Contributor posts”.  Why would I ever want to do that???  Well, I have a client who creates a new post for each uploaded image that is submitted.  He also displays the images in a gallery on the front page of the site.  Check it out at SavorySights.  It’s all enabled by PhotoSmash ;-)   He wanted the gallery view on the author pages instead of the single posts view.

A screenshot hopefully shows how easy it is!

Special Galleries

Adding a link to a Contributor’s Author Page

If you’re using the standard gallery layout (not a Custom Layout), there are 2 options in the caption styles that will let you add a link to each image’s contributor’s gallery:

caption-styles

Note: Look at the very bottom of that list (right above this), see that disk_multiple “Mass update galleries”? That allows you to set the Caption style for all of your existing galleries to whatever you have selected.  If you don’t do that, you’ll need to go into each one of your galleries that you want the caption style to apply to and update them individually in Gallery Settings page.

Important! “Mass update galleries” does not save this setting to your PhotoSmash Settings defaults.  It only updates existing galleries.  So be sure to save the options here as well.  The PhotoSmash Settings defaults generally apply to either Global settings or are only defaults for new galleries.  Any time you see the disk_multiple icon, that is a gallery-specific setting, giving you ultimate flexibility in your site design, muhahahaha!!!!

Trick out your Contributor Gallery!

Oh yes, you can go hog wild tricking out your contributor gallery, even using a custom layout.  They operate just like a regular gallery, except they do not allow you to show an Upload Form.

There are 2 ways a contributor gallery definition can be created:

  1. You’ve activated Contributor Galleries, and somebody visits the Author page.  This will automatically generate a new gallery the first time the Author page is visited.  This gallery will be call…drum roll…”Contributor Gallery”, and can be tricked out in Gallery Settings. Note…I just tried this on Smashly, and the first time visiting the author page showed the gallery, but no images…a bug, I think.
  2. You can manually create one in Gallery Settings by setting the “Gallery type” setting to Contributor Gallery:
    gallery-type

    Note: while you can create mulitple galleries that have a Gallery type of “Contributor gallery”, only the first one that has Activated (around the 3rd setting from the top in Gallery Settings) checked will be used.

Once you’ve got your gallery created, you can control it’s look and feel using nearly all of the settings in Gallery Settings, including setting it to use any Custom Layout that you’ve created!

That’s about it!

  • 31 Comments

  • Dawg says:

    HTML Layouts Editor
    can you show or point me to a example to place into the,
    Html Layout
    Html Alternating Layout
    Wrapper

    I’m just wanting a row of 3 single photos on the page. each photo is a link to a gallery,but the gallery opens up in a box that shows ,next, previous, a X to close and a * to grab ahould of with your mouse amd move around. The background should be clear so the person can see the page behind the opened gallery.
    also a caption below the photo.

  • Valerie says:

    Hello!
    I followed the instructions but I still do not have the gallery link on author page… Is there a code I have to put in author.php? I do not know whta I missed…

    Help please!

    • byron says:

      Hi Valerie,

      You shouldn’t have to put in anything in author.php. If you’ve got it turned on, it should show a gallery of the images uploaded by the person you’re viewing. This gallery will not have an Add Photo link, though.

      Can you point me to the page where you’re trying to do this?

      BB

      • Valerie says:

        Sure, here is the link :
        http://expertsoutworld.com/author/admin/

        But the author will see Add photo on his profile page to add pics, no?

        • byron says:

          Hey Valerie,

          Sorry, no, the author will not see the link either. The reason is that the Gallery that is being displayed on the author’s page is a dynamic Gallery, and images have to be part of real galleries. So, if they uploaded to the dynamic gallery, the image wouldn’t have any where to go.

          You could fake this functionality by creating a gallery that doesn’t get shown anywhere else, but it would be a bit complicated.

          As to why the gallery isn’t showing, it appears that your theme prevents that from happening. You’ll notice that the first post listed for an author in the list of posts is “Images by **author**”. That is PhotoSmash trying to show the gallery, but I think your theme is stopping that.

          You could insert some code in your author.php file to show the gallery at the top if you’d like. Let me know if you want to do that and I’ll give you the code.

          Cheers,
          Byron

  • Mathias says:

    Hi Byron!

    Sorry having to bother you, but I read all the comments and questions on the forum and the solution wasn’t there…

    Byron, when I click on the caption linking to the Authors page, it does opens a new something saying “images by admin” (i don’t know if is a page or post because neither of them shows on the admin area as a new page/post) but doesn’t have anything in there, not even the gallery…

    I read up here that that may be a Bug, so i wonder if has any way that i can fix that?

    Thanks

    • Mathias says:

      Hi Byron.

      I just realize it is something with my theme that when it opens a new category it shows it resumed and the theme is overruling my wp-settings that says to open full article. It works perfectly with Kubric. :)

      Anyway if anything comes to your mind that could help, it would be appreciated!

      Cheers

  • Mathias says:

    Hi Byron!

    As you probably know your plugin is EXCELLENT!

    Suggestion: Your plugin is so good, with so many possibilities that in my opinion for someone to understand and be able to use all the options a video tutorial would be GREAT! One video tutorial can save you few pages of explanations…

    Thanks for your good work!

    Ps: as soon as I start to get some money from my website you are on my top list for donations :)

    cheers

    • byron says:

      Hey Mathias,

      Thanks! It does fill a niche that nothing else does right now.

      I do need to do a series of videos…I’ve even bought Camtasia for Mac (woohoo!) But I’ve been so busy with developing PhotoSmash I haven’t had time to do a single video.

      With custom fields, custom forms, and custom layouts, and now in the PhotoSmash Extend plugin the ability to create new posts upon photo uploads, there is a lot of power under the hood.

      I had no idea how much I was biting off when I started this thing, but I needed the functionality ;-)

      Hopefully videos soon!

      Cheers,
      Byron

  • Don says:

    Hi-

    I thought your plug-in would make it easy for people to vote for their favorite images for a contest we’re holding but I”, having problems. Something is wrong in the settings. You can have the images pop in in a larger viewer but can’t vote, or you can vote but not have the pop-up. Can you help at all? I just want it to look like the demo but I can’t get it to function that way.

  • JC says:

    is it possible to add a gallery in a Page? not a Post..

    what is the tag or code do i need to use?
    will it still [photosmash id=xx] ?

    thanks!

  • KonradK says:

    hello to author and thank you for this plugin. it looks that it is what i need, but i have some question:

    is it possible to show author gallery but not at authors’ page? some function which i can implement wherever i want? something like showGalleryOf($user_ID); ?

    this would be very helpful for me :| or you just show me which function in plugin put gallery at athors page and i will rewrite this to fit to my needs

  • Lee says:

    Hi Byron,

    I’m doing something similar to the Savory example above and its coming along. Questions for you:

    1.) Is there a category tag that I can use to allow users to click a category link and have a gallery that shows all of the photos for a single category? I created a custom field for a drop down of WP categories selection at upload. the example above of the contributor gallery works fine when I click on a link for a contributor. A gallery for that contributor shows on a single page (or more depending on the photo count I have configured per page). I would like ot do the same for categories, but I dont see a PS tag for categories that I can use in a layout.

    2.) Can I control the ‘Add Photo’ link position? Right now, I cant seem to figure out how to move the link away from the top of the gallery. I would like to control the position while still using the Ajax upload that you designed.

    3.) I can’t seem to get the moderating of posts to work. I created multiple users and posted, but they automatically are posted to the home page gallery instead of being help for moderation. I have moderation configured in the PS setup, but is always empty. Any guidelines on setup for photo moderation?

    thanks!

    Lee

    • byron says:

      Lee,

      I’m glad to see you taking PhotoSmash outside the normal gallery box :P !

      1) Not yet…but it’s a great suggestion and I’ll put it on the list…What I’ll do is create a special gallery that will query by category.

      2) Yes…You can do a shortcode that will display the Add Photo only, and hide the Add Photo link in the main gallery’s shortcode. To show the Add Photo link try something like [photosmash id=23 no_gallery=true form=std]. To show the gallery without Add Photo link, try [photosmash id=23 no_form=true] The 23 represents your gallery ID, whatever that might be.

      3) Make sure your Gallery Settings (not PhotoSmash Settings) is set properly for that gallery. Hopefully that will do the trick.

      Cheers,
      Byron

      • Lee says:

        Thanks for the response Byron:

        1.) Excellent. I anxiously await the update.

        2.) This worked great for my custom page where the main gallery sits for the home page collection of submitted photos, but couldnt get it to work in the WP header for the site. Anyway, problem solved.

        3.) The main gallery and the contributor gallery are both configured for moderation. I guess my understanding(could be wrong) is that when the gallery is set for moderation, and I allow authors that are log in to add photos to that gallery, they would be held in the PS Photo Manager until I release them to be seen by everyone in the main gallery. My assumption is that this is only a single gallery at work and I can click a deny or accept button to show the image in the gallery. In the Savory example above, it sounds like they are doing this with two galleries. One that ‘hold’ new posts, until the admin assigns the image to the main or public gallery. I tried this, and it works. It just seems like there is a Moderation list available in the photo manager for my main gallery, but nothing is posted here.

        thanks,

        Lee

        • byron says:

          Lee,
          On #3, if you have it set to Authors, it will not require moderation…This means that only Authors or above can upload. So, the only settings for Minimum roles for Uploading that will moderate are Subscribers or Anybody.

          I think I will switch it so that Contributors can be moderated as well, but leave Authors alone, just because it might mess up a bunch of folks. Contributors is a relatively new addition anyway.

          Byron

          • Lee says:

            ah ha! That was it. My new users were contributors. Once I changed the default to Subscriber, moderation worked great!

            Sorry, but another question. Is there a short code that I can use to allow the person that submitted, or the admin, to delete a photo that is theirs?

            Thanks!

            Lee

          • byron says:

            Not yet (no deleting from within the galleries at this time, except an Admin can delete images in moderation from the gallery)…I’ll put it on the list ;-)

          • Lee says:

            Hi Byron. I decided tackle the request above to allow users to delete their own images.

            Basically, I created a custom shortcode in PS called [delete_image] that I can use in the custom layout. The shortcode compares the current user ID to the image contributor ID (all authenticated users are contributors). If they match, then I place a delete button in the custom layout. The link invokes the bwbpsModerateImage() function, using the ‘bury’ action.

            This works great when I’m logged in as the admin, but when I log in as the contributor, I get the error: ‘Failed due to security: invalid nonce’. Obviously a security issue with contributors or level_1 deleting an image that is their own.

            Any ideas how I can modify to allow the contributors to delete their own images before or after they have been approved?

            Thanks,

            Lee

  • Lisandro Moises says:

    Byron, my english sucks. hhehe

    How can I make the users upload their images to a particular area (eg pets gallery) rather than do in each Post, as is currently working … I would eliminate the possibility that users can upload images in the news, and only do so in a particular page.

    its clear now??

  • Lisandro Moises says:

    ok this is greatttttttt but, always theres a “but”.. hehehe i dont know much about PHP or programation…but, what can I do for displays just in ONE page (ex: called Pet Gallery) the upload option… but in all the other post writen by me doesnt???

    can I?? sorry my english.. can you help me please??

    thanks a lot!!! looking this tool for long time!!!

  • byron says:

    Lee,

    It just dawned on me you were asking about the code that lets you create a new post with each image…I’m working on building that code into an Add-on product for PhotoSmash and hope to make it available in the next few weeks.

    But the short answer is that it uses the standard wp_insert_post function. It also uses the special psmash id=## shortcode which lets you call back a single image or the custom field parts of an image.

    More to come on both of those in the not too distant future.

    Byron

    • Lee says:

      Maybe its a terminology thing. When I think of a new post in WP, I think of a blog post oriented (in the typical theme) in a vertical fashion down the page in chronological order. My interpretation of how SavorySights applied Photosmash is a single page that uses a single gallery. Everyone that submits a photo, comment and URL is added to the same common gallery on the presentation or home page. They may have author pages that allow users to click on a contributors name to see all of the their photos posted, but this would likely be a clone of the home page with a query for a specific contributor.

      I am interested in the ability to have all contributors posting photos to be added to a common gallery in chronological order for all visitors to see – unless they want to sort the photos by category or author, then a slightly different page is served up.

      Hope that makes sense.

      • byron says:

        Hey Lee,

        I can outline what Savory has done:

        1) Main page is a regular PhotoSmash gallery with the upload form turned off. It also uses a custom layout that is 100% defined in the Custom Layouts page, though they put the CSS in the theme’s style sheet.
        2) They have a separate page for the upload form (you have to be logged in to get it and upload). This form stores all of its photos in a holding gallery (it could store it directly to the main gallery, but they wanted to moderate between page 1 photos and page 2 photos). The admin goes to Photo Manager and selects whether they want the image to go to Page 1 gallery or page 2. At the same time the image is uploaded, there is some custom code that builds a new WordPress Post (just as you described above). This post is what gets called when a visitor clicks on the Comments link from the main gallery.
        3) The author page they have is only linked when a contributor is logged in. They get a link to the author page so they can see all their uploaded images. This page uses a gallery with a special query as you describe above to show it in gallery format. It also uses the same custom layout as the primary gallery. They have selected to suppress all the individual post pages since they would be redundant, and not as pretty, as you describe, putting the posts down the screen like category or archive pages.

        So, from what you describe, I think you can just use the standard gallery. I don’t have sorting turned on to sort by authors, but that would be possible if that’s what you’re looking for.

        Let me know if I’m missing the mark.

        Cheers,
        Byron

        • Lee says:

          I think that helps Byron. Thanks for sticking with me. I’ll dig in and give it a try. The good thing about WP is that trial and error is quite easy.

          Again, great plugin!

          Lee

  • byron says:

    Hi Lee,

    Yes, you would need the Loop in your template.

    For the front page gallery, you can simply set up a static front page and put a Gallery’s shortcode in that page through the WP Edit Page.

    For the Contributor Gallery, you also need the loop. If you turn on the Contributor gallery, PhotoSmash will insert a Virtual Post into the loop that includes a shortcode for the special gallery type for Contributor Galleries.

    If you turn off the display of the contributor’s other individual posts, PhotoSmash will insert the Virtual Post and remove the other posts that get selected in WP_Query.

    It’s designed so that if you have a working Author or Archive page, you don’t have to do any coding or tweaking of your theme. This works very well for themes that use the normal loop, even ones that use the Excerpt. But you might find a theme out there that does something extra wild and it might not be able to deal with all that.

    Hope that helps,
    Byron

  • Lee says:

    Great plugin Byron! Well Done.

    In the example above where the SavorySights site wanted to place a single gallery on the home page that all contributors can post to, do you need the Loop in your code? I would think the Photosmash you cycle through the posts and publish them in the gallery rather than as seperate posts like the loop does. Do you have any sample code to demonstrate the single gallery on a home page that gets appended with each post?