SmugMug Photos

 

Photos from an Album (#)

All photos in a particular album for a user can be displayed using this invocation:

[gallery type='smugmug' view='images' album='abcdef']

You could replace view='images' with view='album' and get the same results.

Note that you don’t need the nickname of the user here.

The value you pass to album can be obtained from the helpers in your dashboard, under Photonic → Helpers → Smugmug.

Older versions of Photonic (≤ 1.56) required the album to be in the format 12345678_abcdef, where 12345678 was the album id and abcdef was the album key. But in version 1.57 of Photonic a switch was made to Smugmug’s API v2 (from v1.3), which helped eliminate the album id altogether. Your older shortcodes will still work, though.

You can additionally provide a columns parameter, similar to the standard gallery short-code invocation.

You can see the results here, for a sample invocation:

The above was created with the shortcode:

[gallery type='smugmug' view='images' album='48060458_csGcG5' layout='random']

Note that the above syntax is equivalent to:

[gallery type='smugmug' view='images' album_id='48060458' album_key='csGcG5' columns=4]

Or:

[gallery type='smugmug' view='album' album='csGcG5' columns=4]

Password-Protected Albums (#)

Contents from a password-protected album from Smugmug can be displayed by using the password attribute in the shortcode. “But, if I pass the password attribute and the photos are seen, what is the point of protecting the gallery?” you might ask.

Here is where the plugin needs a bit of help from WP’s native capabilities. Let’s say you have an album “Bill and Natalie’s Wedding”, and you protect the album with a password, “BNW20160204”, and give it to Bill and Natalie. Here is what you can do on WP:

  1. Create a WP page / post titled “Bill and Natalie’s Wedding”.
  2. Before you publish the page / post, look at the right side of the WP Editor, where there is a section called “Publish”. There is a heading called “Visibility” under that; click it.
  3. Select the option to make the post “Password protected”.
  4. Put in “BNW20160204” here, i.e., the same password that you used for the album on Smugmug
  5. Put your shortcode equivalent of the following into the page:
    [gallery type='smugmug' view='album' album_id='48060458' album_key='csGcG5' password='BNW20160204']
  6. Pass on the link for the WP page / post, “Bill and Natalie’s Wedding” to Bill and Natalie, along with their password, “BNW20160204”. They can share it with whomsoever they please.

By doing the above you have enabled both, WP and Smugmug to have the same password, so you are making life easier for your end-users.

The following shows photos from a password-protected album using the above method:

  • Zebra
  • Impala
  • Wildebeest
  • Red Crested Kohraan
  • Water Buck
  • Giraffe
  • Baboon
  • Guinea Fowl
  • Wart Hog
  • Kingfisher

Here I have used this shortcode:

[gallery type='smugmug' view='album' album='zCKf5m' layout='circle' password='Saffa' count=10]

The count parameter controls the number of photos to be shown in the gallery. SmugMug assumes 100 if nothing is passed.

Password Prompting (#)

As an alternative to the above, you could simply display the album thumbnail and let the user click it to enter the password. This method lets you display all your album thumbnails in one place, and only people who have your password can see the photos in the protected album:

  • Bushveld

    This album is password-protected. Please provide a valid password.

    Access

Here I have made use of filters:

[gallery type='smugmug' view='albums' nick_name='sayontan' filter='zCKf5m']

“Show More” and Paged Results (#)

If a search result has a lot of photos and you want to reduce the count, Photonic offers a couple of approaches:

  1. For SmugMug, use the count attribute documented above, and add an additional tag, more. This will initially show you the number of photos specified in count, and a button to load more images. Upon clicking the button you will see an additional set of photos as limited by count. The button will continue to show until you have exhausted the entire set of photos.
  2. Photonic can be used in conjunction with <!-- nextpage --> to display photos in a paged manner. For this you can structure your page content thus in the WP Editor:
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc porta enim vel tellus dignissim, a venenatis neque congue. Nunc ornare cursus leo ac viverra. Pellentesque suscipit pulvinar metus, non aliquam odio egestas quis. Vestibulum porta viverra magna, vel malesuada ante fermentum vitae.
    [gallery type='smugmug' view='album' album='csGcG5' layout='random' count=10 start=1]
    <!-- nextpage -->
    [gallery type='smugmug' view='album' album='csGcG5' layout='random' count=10 start=11]
    <!-- nextpage -->
    [gallery type='smugmug' view='album' album='csGcG5' layout='random' count=10 start=21]
    

    WP interprets <!-- nextpage --> as a page-break and automatically pages the content for you.

Here is an example using the first approach. The text you provide to the more parameter controls what is shown in the button:

[gallery type='smugmug' view='album' album='csGcG5' layout='random' count=10]