Photos

Photos for a User (🔗)

With effect from version 2.00 of Photonic all photos for a user can be displayed using this invocation:

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

The following are some of my photos:

In the above I use this:

[gallery type='smugmug' view='images' nick_name='sayontan' count=10]

Photos from a Folder (🔗)

With effect from version 2.00 of Photonic photos within a folder can be displayed using this invocation:

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

The following are some of my photos from my “Nature” folder:

In the above I use this:

[gallery type='smugmug' view='images' folder='43NgwD' count=10]

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. With effect from version 2.00 you will not require the “Helpers” if you use the “Add / Edit Photonic Gallery” button to insert your gallery.

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:

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:

Here I have made use of filters:

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

Videos (🔗)

What if you had some videos in the mix? Photonic can handle that too. I have the philosophy that Photonic is meant for photos, not videos, because Photonic’s primary goal is to assist in making photos easily and beautifully presented for photographers using WordPress. In fact most online photo services deprioritize videos with the same philosophy, and some services don’t even have videos! At the time of writing 500px.com doesn’t have videos, and guess what? Native WordPress galleries don’t support videos! That being said, people often use photo services to share personal videos with family, and so, with effect from version 1.66 of Photonic, videos are supported.

Videos are turned off by default for each provider. For SmugMug the setting is under Photonic → Settings → SmugMug → SmugMug Settings → Media to show. Regardless of this setting, you can explicitly pass the media parameter to your shortcode. This parameter takes values photos (to show photos only), videos (to show videos only) and all (to show both photos and videos). I have videos turned off on my website, so I will use the media parameter to show videos from my account:

[gallery type='smugmug' view='album' album='bNPSWr' layout='square' media='all']

The above shows the following:

Note that lightboxes have notoriously flaky support for externally hosted videos. Please refer to the lightboxes page to see which ones can be used.

Videos can be incorporated into any layout.

Filtering by Text (🔗)

With effect from version 2.00 of Photonic photos for users and those within albums and folders can be searched using a text or keywords attribute:

[gallery type='smugmug' view='images' nick_name='abcdef' text='xyz']

You can replace nick_name='abcdef' with album='pqrst' or folder='defgh'.

The following are some of my photos with text “bridge”:

The above was generated using:

[gallery type='smugmug' view='images' nick_name='sayontan' text='bridge']

“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='zCKf5m' layout='mosaic' password='Saffa' count=10 more='Show More']