| @@ -1,358 +1,379 @@ | ||
| 1 | 1 | <?php |
| 2 | + | |
| 2 | 3 | namespace Photonic_Plugin\Options; |
| 3 | -use Photonic_Plugin\Core\Photonic; | |
| 4 | + | |
| 4 | 5 | use Photonic_Plugin\Core\Utilities; |
| 5 | 6 | |
| 6 | 7 | class SmugMug extends Option_Tab { |
| 7 | - private static $instance; | |
| 8 | - | |
| 9 | - private function __construct() { | |
| 8 | + protected function __construct() { | |
| 10 | 9 | $this->options = [ |
| 11 | - ['name' => "How To", | |
| 12 | - 'desc' => "Control generic settings for the plugin", | |
| 10 | + [ | |
| 11 | + 'name' => "How To", | |
| 12 | + 'desc' => "Control generic settings for the plugin", | |
| 13 | 13 | 'category' => 'smug-how-to', |
| 14 | - 'buttons' => 'no-buttons', | |
| 15 | - 'type' => 'section',], | |
| 14 | + 'buttons' => 'no-buttons', | |
| 15 | + 'type' => 'section', | |
| 16 | + ], | |
| 16 | 17 | |
| 17 | - ['name' => "Creating a gallery", | |
| 18 | - 'desc' => "To create a gallery with SmugMug content you can use either a <strong><em>Gutenberg Block</em></strong> | |
| 18 | + [ | |
| 19 | + 'name' => "Creating a gallery", | |
| 20 | + 'desc' => "To create a gallery with SmugMug content you can use either a <strong><em>Gutenberg Block</em></strong> | |
| 19 | 21 | or the <em>Add / Edit Photonic Gallery</em> button in the <strong><em>Classic Editor</em></strong>:<br/><br/> |
| 20 | - <img src='".PHOTONIC_URL."Options/screenshots/SmugMug-1.png' style='max-width: 600px;' alt='Wizard'/>", | |
| 22 | + <img src='" . PHOTONIC_URL . "Options/screenshots/SmugMug-1.png' style='max-width: 600px;' alt='Wizard'/>", | |
| 21 | 23 | 'grouping' => 'smug-how-to', |
| 22 | - 'type' => 'blurb',], | |
| 24 | + 'type' => 'blurb', | |
| 25 | + ], | |
| 23 | 26 | |
| 24 | - ['name' => "SmugMug settings", | |
| 25 | - 'desc' => "Control settings for SmugMug", | |
| 27 | + [ | |
| 28 | + 'name' => "SmugMug settings", | |
| 29 | + 'desc' => "Control settings for SmugMug", | |
| 26 | 30 | 'category' => 'smug-settings', |
| 27 | - 'type' => 'section',], | |
| 31 | + 'type' => 'section', | |
| 32 | + ], | |
| 28 | 33 | |
| 29 | - ['name' => "SmugMug API Key", | |
| 30 | - 'desc' => "<strong>A SmugMug API key is not required unless you want to show private albums using authentication.</strong><br/> | |
| 34 | + [ | |
| 35 | + 'name' => "SmugMug API Key", | |
| 36 | + 'desc' => "<strong>A SmugMug API key is not required unless you want to show private albums using authentication.</strong><br/> | |
| 31 | 37 | To make use of the SmugMug authentication you have to use your <a href='https://api.smugmug.com/api/developer/apply'>SmugMug API Key</a>.<br/> |
| 32 | 38 | See <a href='https://aquoid.com/plugins/photonic/smugmug/#api-key'>here</a> for help.", |
| 33 | - 'id' => "smug_api_key", | |
| 39 | + 'id' => 'smug_api_key', | |
| 34 | 40 | 'grouping' => 'smug-settings', |
| 35 | - 'type' => 'text' | |
| 41 | + 'type' => 'text' | |
| 36 | 42 | ], |
| 37 | 43 | |
| 38 | - ['name' => "SmugMug API Secret", | |
| 39 | - 'desc' => "You have to enter the Secret provided by SmugMug after you have registered your application.", | |
| 40 | - 'id' => "smug_api_secret", | |
| 44 | + [ | |
| 45 | + 'name' => "SmugMug API Secret", | |
| 46 | + 'desc' => "You have to enter the Secret provided by SmugMug after you have registered your application.", | |
| 47 | + 'id' => 'smug_api_secret', | |
| 41 | 48 | 'grouping' => 'smug-settings', |
| 42 | - 'type' => 'text' | |
| 49 | + 'type' => 'text' | |
| 43 | 50 | ], |
| 44 | 51 | |
| 45 | - ['name' => "Access Token (for authentication)", | |
| 46 | - 'desc' => "To get your token go to <em>Photonic → Authentication → SmugMug</em>, and authenticate. Save the token you get here. <br/>If you have set | |
| 52 | + [ | |
| 53 | + 'name' => "Access Token (for authentication)", | |
| 54 | + 'desc' => "To get your token go to <em>Photonic → Authentication → SmugMug</em>, and authenticate. Save the token you get here. <br/>If you have set | |
| 47 | 55 | up a token, your users can see protected SmugMug photos without a SmugMug account. See <a href='https://aquoid.com/plugins/photonic/authentication/'>here</a> for more.", |
| 48 | - 'id' => "smug_access_token", | |
| 56 | + 'id' => 'smug_access_token', | |
| 49 | 57 | 'grouping' => 'smug-settings', |
| 50 | - 'type' => 'text' | |
| 58 | + 'type' => 'text' | |
| 51 | 59 | ], |
| 52 | 60 | |
| 53 | - ['name' => "Access Token Secret (for authentication)", | |
| 54 | - 'desc' => "To get your token secret go to <em>Photonic → Authentication → SmugMug</em>, and authenticate. Save the token secret you get here. Your token secret works with the token set in the prvious option. See <a href='https://aquoid.com/plugins/photonic/authentication/'>here</a> for more.", | |
| 55 | - 'id' => "smug_token_secret", | |
| 61 | + [ | |
| 62 | + 'name' => "Access Token Secret (for authentication)", | |
| 63 | + 'desc' => "To get your token secret go to <em>Photonic → Authentication → SmugMug</em>, and authenticate. Save the token secret you get here. Your token secret works with the token set in the prvious option. See <a href='https://aquoid.com/plugins/photonic/authentication/'>here</a> for more.", | |
| 64 | + 'id' => 'smug_token_secret', | |
| 56 | 65 | 'grouping' => 'smug-settings', |
| 57 | - 'type' => 'text' | |
| 66 | + 'type' => 'text' | |
| 58 | 67 | ], |
| 59 | 68 | |
| 60 | - ['name' => 'Default user', | |
| 61 | - 'desc' => 'If no user is specified in the shortcode this one will be used. This is the username from https://<span style="text-decoration: underline">username</span>.smugmug.com/', | |
| 62 | - 'id' => 'smug_default_user', | |
| 69 | + [ | |
| 70 | + 'name' => 'Default user', | |
| 71 | + 'desc' => 'If no user is specified in the shortcode this one will be used. This is the username from https://<span style="text-decoration: underline">username</span>.smugmug.com/', | |
| 72 | + 'id' => 'smug_default_user', | |
| 63 | 73 | 'grouping' => 'smug-settings', |
| 64 | - 'type' => 'text' | |
| 74 | + 'type' => 'text' | |
| 65 | 75 | ], |
| 66 | 76 | |
| 67 | - ['name' => 'Media to show', | |
| 68 | - 'desc' => 'You can choose to include photos as well as videos in your output. This can be overridden by the <code>media</code> parameter in the shortcode:', | |
| 69 | - 'id' => "smug_media", | |
| 77 | + [ | |
| 78 | + 'name' => 'Media to show', | |
| 79 | + 'desc' => 'You can choose to include photos as well as videos in your output. This can be overridden by the <code>media</code> parameter in the shortcode:', | |
| 80 | + 'id' => 'smug_media', | |
| 70 | 81 | 'grouping' => 'smug-settings', |
| 71 | - 'type' => 'select', | |
| 72 | - 'options' => Utilities::media_options() | |
| 82 | + 'type' => 'select', | |
| 83 | + 'options' => Utilities::media_options() | |
| 73 | 84 | ], |
| 74 | 85 | |
| 75 | - ['name' => "Thumbnail size", | |
| 76 | - 'desc' => "Pick a standard size provided by SmugMug for your thumbnails:", | |
| 77 | - 'id' => "smug_thumb_size", | |
| 86 | + [ | |
| 87 | + 'name' => "Thumbnail size", | |
| 88 | + 'desc' => "Pick a standard size provided by SmugMug for your thumbnails:", | |
| 89 | + 'id' => 'smug_thumb_size', | |
| 78 | 90 | 'grouping' => 'smug-settings', |
| 79 | - 'type' => 'select', | |
| 80 | - 'options' => ["Tiny" => "Tiny", "Thumb" => "Thumb", "Small" => "Small"] | |
| 91 | + 'type' => 'select', | |
| 92 | + 'options' => ['Tiny' => 'Tiny', 'Thumb' => 'Thumb', 'Small' => 'Small'] | |
| 81 | 93 | ], |
| 82 | 94 | |
| 83 | - ['name' => "Main image size", | |
| 84 | - 'desc' => "When you click on a thumbnail this size will be displayed if you are using a slideshow. If you are not using a slideshow you will be taken to the SmugMug page:", | |
| 85 | - 'id' => "smug_main_size", | |
| 95 | + [ | |
| 96 | + 'name' => "Main image size", | |
| 97 | + 'desc' => "When you click on a thumbnail this size will be displayed if you are using a slideshow. If you are not using a slideshow you will be taken to the SmugMug page:", | |
| 98 | + 'id' => 'smug_main_size', | |
| 86 | 99 | 'grouping' => 'smug-settings', |
| 87 | - 'type' => 'select', | |
| 88 | - 'options' => [ | |
| 89 | - '4K' => '4K (not always available)', | |
| 90 | - '5K' => '5K (not always available)', | |
| 91 | - "Medium" => "Medium", | |
| 92 | - "Original" => "Original (not always available)", | |
| 93 | - "Large" => "Large", | |
| 94 | - 'Largest' => 'Largest', | |
| 95 | - "XLarge" => "XLarge (not always available)", | |
| 96 | - "X2Large" => "X2Large (not always available)", | |
| 97 | - "X3Large" => "X3Large (not always available)", | |
| 98 | - "X4Large" => "X3Large (not always available)", | |
| 99 | - "X5Large" => "X3Large (not always available)", | |
| 100 | + 'type' => 'select', | |
| 101 | + 'options' => [ | |
| 102 | + '4K' => '4K (not always available)', | |
| 103 | + '5K' => '5K (not always available)', | |
| 104 | + 'Medium' => "Medium", | |
| 105 | + 'Original' => "Original (not always available)", | |
| 106 | + 'Large' => "Large", | |
| 107 | + 'Largest' => 'Largest', | |
| 108 | + 'XLarge' => "XLarge (not always available)", | |
| 109 | + 'X2Large' => "X2Large (not always available)", | |
| 110 | + 'X3Large' => "X3Large (not always available)", | |
| 111 | + 'X4Large' => "X3Large (not always available)", | |
| 112 | + 'X5Large' => "X3Large (not always available)", | |
| 100 | 113 | ] |
| 101 | 114 | ], |
| 102 | 115 | |
| 103 | - ['name' => "Tile image size", | |
| 104 | - 'desc' => "<strong>This is applicable only if you are using the random tiled gallery, masonry or mosaic layouts.</strong> This size will be used as the image for the tiles. Picking a size smaller than the Main image size above will save bandwidth if your users <strong>don't click</strong> on individual images. Conversely, leaving this the same as the Main image size will save bandwidth if your users <strong>do click</strong> on individual images:", | |
| 105 | - 'id' => "smug_tile_size", | |
| 116 | + [ | |
| 117 | + 'name' => "Tile image size", | |
| 118 | + 'desc' => "<strong>This is applicable only if you are using the random tiled gallery, masonry or mosaic layouts.</strong> This size will be used as the image for the tiles. Picking a size smaller than the Main image size above will save bandwidth if your users <strong>don't click</strong> on individual images. Conversely, leaving this the same as the Main image size will save bandwidth if your users <strong>do click</strong> on individual images:", | |
| 119 | + 'id' => 'smug_tile_size', | |
| 106 | 120 | 'grouping' => 'smug-settings', |
| 107 | - 'type' => 'select', | |
| 108 | - 'options' => [ | |
| 109 | - "same" => "Same as Main image size", | |
| 110 | - "Small" => "Small", | |
| 111 | - '4K' => '4K (not always available)', | |
| 112 | - '5K' => '5K (not always available)', | |
| 113 | - "Medium" => "Medium", | |
| 114 | - "Original" => "Original (not always available)", | |
| 115 | - "Large" => "Large", | |
| 116 | - 'Largest' => 'Largest', | |
| 117 | - "XLarge" => "XLarge (not always available)", | |
| 118 | - "X2Large" => "X2Large (not always available)", | |
| 119 | - "X3Large" => "X3Large (not always available)", | |
| 120 | - "X4Large" => "X3Large (not always available)", | |
| 121 | - "X5Large" => "X3Large (not always available)", | |
| 121 | + 'type' => 'select', | |
| 122 | + 'options' => [ | |
| 123 | + 'same' => "Same as Main image size", | |
| 124 | + 'Small' => "Small", | |
| 125 | + '4K' => '4K (not always available)', | |
| 126 | + '5K' => '5K (not always available)', | |
| 127 | + 'Medium' => "Medium", | |
| 128 | + 'Original' => "Original (not always available)", | |
| 129 | + 'Large' => "Large", | |
| 130 | + 'Largest' => 'Largest', | |
| 131 | + 'XLarge' => "XLarge (not always available)", | |
| 132 | + 'X2Large' => "X2Large (not always available)", | |
| 133 | + 'X3Large' => "X3Large (not always available)", | |
| 134 | + 'X4Large' => "X3Large (not always available)", | |
| 135 | + 'X5Large' => "X3Large (not always available)", | |
| 122 | 136 | ] |
| 123 | 137 | ], |
| 124 | 138 | |
| 125 | - ['name' => "Video size", | |
| 126 | - 'desc' => "When you click on a thumbnail this size will be displayed if you are using a slideshow. If you are not using a slideshow you will be taken to the SmugMug page:", | |
| 127 | - 'id' => "smug_video_size", | |
| 139 | + [ | |
| 140 | + 'name' => "Video size", | |
| 141 | + 'desc' => "When you click on a thumbnail this size will be displayed if you are using a slideshow. If you are not using a slideshow you will be taken to the SmugMug page:", | |
| 142 | + 'id' => 'smug_video_size', | |
| 128 | 143 | 'grouping' => 'smug-settings', |
| 129 | - 'type' => 'select', | |
| 130 | - 'options' => [ | |
| 131 | - '110' => '110px along longest side', | |
| 132 | - '200' => '200px along longest side', | |
| 133 | - '320' => '320px along longest side', | |
| 134 | - '640' => '640px along longest side', | |
| 135 | - '1280' => '1280px along longest side', | |
| 136 | - '1920' => '1920px along longest side', | |
| 144 | + 'type' => 'select', | |
| 145 | + 'options' => [ | |
| 146 | + '110' => '110px along longest side', | |
| 147 | + '200' => '200px along longest side', | |
| 148 | + '320' => '320px along longest side', | |
| 149 | + '640' => '640px along longest side', | |
| 150 | + '1280' => '1280px along longest side', | |
| 151 | + '1920' => '1920px along longest side', | |
| 137 | 152 | 'Largest' => 'Largest', |
| 138 | 153 | ] |
| 139 | 154 | ], |
| 140 | 155 | |
| 141 | - ['name' => "Disable lightbox linking", | |
| 142 | - 'desc' => "Check this to disable linking the album title and/or thumbnail, or the title in the lightbox to the SmugMug page for the album / photo.", | |
| 143 | - 'id' => "smug_disable_title_link", | |
| 156 | + [ | |
| 157 | + 'name' => "Disable lightbox linking", | |
| 158 | + 'desc' => "Check this to disable linking the album title and/or thumbnail, or the title in the lightbox to the SmugMug page for the album / photo.", | |
| 159 | + 'id' => 'smug_disable_title_link', | |
| 144 | 160 | 'grouping' => 'smug-settings', |
| 145 | - 'type' => 'checkbox' | |
| 161 | + 'type' => 'checkbox' | |
| 146 | 162 | ], |
| 147 | 163 | |
| 148 | - ['name' => "Show \"Buy\" link", | |
| 149 | - 'desc' => "Click to show a link to purchase the photo. This shows up in a lightbox, enabled.", | |
| 150 | - 'id' => "smug_show_buy_link", | |
| 164 | + [ | |
| 165 | + 'name' => "Show \"Buy\" link", | |
| 166 | + 'desc' => "Click to show a link to purchase the photo. This shows up in a lightbox, enabled.", | |
| 167 | + 'id' => 'smug_show_buy_link', | |
| 151 | 168 | 'grouping' => 'smug-settings', |
| 152 | - 'type' => 'checkbox' | |
| 169 | + 'type' => 'checkbox' | |
| 153 | 170 | ], |
| 154 | 171 | |
| 155 | - ['name' => "Photo titles and captions", | |
| 156 | - 'desc' => "What do you want to show as the photo title in the tooltip and lightbox?", | |
| 157 | - 'id' => "smug_title_caption", | |
| 172 | + [ | |
| 173 | + 'name' => "Photo titles and captions for the galleries / slideshows", | |
| 174 | + 'desc' => "What do you want to show as the photo title in the gallery / slideshow? This is used for the tooltips and title displays.", | |
| 175 | + 'id' => 'smug_title_caption', | |
| 158 | 176 | 'grouping' => 'smug-settings', |
| 159 | - 'type' => 'select', | |
| 160 | - 'options' => Utilities::title_caption_options() | |
| 177 | + 'type' => 'select', | |
| 178 | + 'options' => Utilities::title_caption_options() | |
| 161 | 179 | ], |
| 162 | 180 | |
| 163 | - ['name' => "Album Thumbnails (with other Albums)", | |
| 164 | - 'desc' => "Control settings for SmugMug Album thumbnails", | |
| 165 | - 'category' => "smug-albums", | |
| 166 | - 'type' => 'section',], | |
| 181 | + $this->get_layout_engine_options('smug_layout_engine', 'smug-settings'), | |
| 167 | 182 | |
| 168 | - ['name' => "What is this section?", | |
| 169 | - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/> | |
| 170 | - <img src='".PHOTONIC_URL."Options/screenshots/SmugMug-2.png' style='max-width: 600px;' alt='Albums'/><br/><br/> | |
| 183 | + [ | |
| 184 | + 'name' => "Album Thumbnails (with other Albums)", | |
| 185 | + 'desc' => "Control settings for SmugMug Album thumbnails", | |
| 186 | + 'category' => 'smug-albums', | |
| 187 | + 'type' => 'section', | |
| 188 | + ], | |
| 189 | + | |
| 190 | + [ | |
| 191 | + 'name' => "What is this section?", | |
| 192 | + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/> | |
| 193 | + <img src='" . PHOTONIC_URL . "Options/screenshots/SmugMug-2.png' style='max-width: 600px;' alt='Albums'/><br/><br/> | |
| 171 | 194 | If you are using the shortcode, the settings kick in for <code>[gallery type='smugmug' nick_name='abc']</code> or |
| 172 | 195 | <code>[gallery type='smugmug' nick_name='abc' view='albums']</code> or <code>[gallery type='smugmug' nick_name='abc' view='tree']</code>. |
| 173 | 196 | They are used to control the Album's thumbnail display", |
| 174 | - 'grouping' => "smug-albums", | |
| 175 | - 'type' => 'blurb',], | |
| 197 | + 'grouping' => 'smug-albums', | |
| 198 | + 'type' => 'blurb', | |
| 199 | + ], | |
| 176 | 200 | |
| 177 | - ['name' => "Album Title Display", | |
| 178 | - 'desc' => "How do you want the title of the Album?", | |
| 179 | - 'id' => "smug_albums_album_title_display", | |
| 180 | - 'grouping' => "smug-albums", | |
| 181 | - 'type' => 'radio', | |
| 182 | - 'options' => $this->title_styles(), | |
| 201 | + [ | |
| 202 | + 'name' => "Album Title Display", | |
| 203 | + 'desc' => "How do you want the title of the Album?", | |
| 204 | + 'id' => 'smug_albums_album_title_display', | |
| 205 | + 'grouping' => 'smug-albums', | |
| 206 | + 'type' => 'radio', | |
| 207 | + 'options' => $this->title_styles(), | |
| 183 | 208 | ], |
| 184 | 209 | |
| 185 | - ['name' => "Hide Photo Count in Title Display", | |
| 186 | - 'desc' => "This will hide the number of photos in your Album's title.", | |
| 187 | - 'id' => "smug_hide_albums_album_photos_count_display", | |
| 188 | - 'grouping' => "smug-albums", | |
| 189 | - 'type' => 'checkbox' | |
| 210 | + [ | |
| 211 | + 'name' => "Hide Photo Count in Title Display", | |
| 212 | + 'desc' => "This will hide the number of photos in your Album's title.", | |
| 213 | + 'id' => 'smug_hide_albums_album_photos_count_display', | |
| 214 | + 'grouping' => 'smug-albums', | |
| 215 | + 'type' => 'checkbox' | |
| 190 | 216 | ], |
| 191 | 217 | |
| 192 | - ['name' => "Hide thumbnails for Password-protected albums", | |
| 193 | - 'desc' => "This will hide the thumbnail of password-protected albums.", | |
| 194 | - 'id' => "smug_hide_password_protected_thumbnail", | |
| 195 | - 'grouping' => "smug-albums", | |
| 196 | - 'type' => 'checkbox' | |
| 218 | + [ | |
| 219 | + 'name' => "Hide thumbnails for Password-protected albums", | |
| 220 | + 'desc' => "This will hide the thumbnail of password-protected albums.", | |
| 221 | + 'id' => 'smug_hide_password_protected_thumbnail', | |
| 222 | + 'grouping' => 'smug-albums', | |
| 223 | + 'type' => 'checkbox' | |
| 197 | 224 | ], |
| 198 | 225 | |
| 199 | - ['name' => 'Album sort order', | |
| 200 | - 'desc' => 'What should the results be sorted by?', | |
| 201 | - 'id' => 'smug_album_sort_order', | |
| 226 | + [ | |
| 227 | + 'name' => 'Album sort order', | |
| 228 | + 'desc' => 'What should the results be sorted by?', | |
| 229 | + 'id' => 'smug_album_sort_order', | |
| 202 | 230 | 'grouping' => 'smug-albums', |
| 203 | - 'type' => 'select', | |
| 204 | - 'options' => [ | |
| 231 | + 'type' => 'select', | |
| 232 | + 'options' => [ | |
| 205 | 233 | 'Last Updated (Descending)' => 'Last Updated (Descending)', |
| 206 | - 'Last Updated (Ascending)' => 'Last Updated (Ascending)', | |
| 207 | - 'Date Added (Descending)' => 'Date Added (Descending)', | |
| 208 | - 'Date Added (Ascending)' => 'Date Added (Ascending)', | |
| 234 | + 'Last Updated (Ascending)' => 'Last Updated (Ascending)', | |
| 235 | + 'Date Added (Descending)' => 'Date Added (Descending)', | |
| 236 | + 'Date Added (Ascending)' => 'Date Added (Ascending)', | |
| 209 | 237 | ] |
| 210 | 238 | ], |
| 211 | 239 | |
| 212 | - ['name' => "Constrain Albums Per Row", | |
| 213 | - 'desc' => "How do you want the control the number of album thumbnails per row? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 214 | - 'id' => "smug_albums_album_per_row_constraint", | |
| 215 | - 'grouping' => "smug-albums", | |
| 216 | - 'type' => 'select', | |
| 217 | - 'options' => ["padding" => "Fix the padding around the thumbnails", | |
| 218 | - "count" => "Fix the number of thumbnails per row", | |
| 240 | + [ | |
| 241 | + 'name' => "Constrain Albums Per Row", | |
| 242 | + 'desc' => "How do you want the control the number of album thumbnails per row? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 243 | + 'id' => 'smug_albums_album_per_row_constraint', | |
| 244 | + 'grouping' => 'smug-albums', | |
| 245 | + 'type' => 'select', | |
| 246 | + 'options' => [ | |
| 247 | + 'padding' => 'Automatically calculate thumbnails per row', | |
| 248 | + 'count' => 'Fix the number of thumbnails per row', | |
| 219 | 249 | ] |
| 220 | 250 | ], |
| 221 | 251 | |
| 222 | - ['name' => "Constrain by padding", | |
| 223 | - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", | |
| 224 | - 'id' => "smug_albums_album_constrain_by_padding", | |
| 225 | - 'grouping' => "smug-albums", | |
| 226 | - 'type' => 'text', | |
| 227 | - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored." | |
| 252 | + [ | |
| 253 | + 'name' => "Fixed number of thumbnails", | |
| 254 | + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails", | |
| 255 | + 'id' => 'smug_albums_album_constrain_by_count', | |
| 256 | + 'grouping' => 'smug-albums', | |
| 257 | + 'type' => 'select', | |
| 258 | + 'options' => $this->selection_range(1, 10) | |
| 228 | 259 | ], |
| 229 | 260 | |
| 230 | - ['name' => "Constrain by number of thumbnails", | |
| 231 | - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", | |
| 232 | - 'id' => "smug_albums_album_constrain_by_count", | |
| 233 | - 'grouping' => "smug-albums", | |
| 234 | - 'type' => 'select', | |
| 235 | - 'options' => $this->selection_range(1, 25) | |
| 261 | + [ | |
| 262 | + 'name' => "Photos (Main Page)", | |
| 263 | + 'desc' => "Control settings for SmugMug Photos when displayed in your page", | |
| 264 | + 'category' => 'smug-photos', | |
| 265 | + 'type' => 'section', | |
| 236 | 266 | ], |
| 237 | 267 | |
| 238 | - ['name' => "Photos (Main Page)", | |
| 239 | - 'desc' => "Control settings for SmugMug Photos when displayed in your page", | |
| 240 | - 'category' => "smug-photos", | |
| 241 | - 'type' => 'section',], | |
| 242 | - | |
| 243 | - ['name' => "What is this section?", | |
| 244 | - 'desc' => "Options in this section are in effect when you pick the following gallery creation options:<br/><br/> | |
| 245 | - <img src='".PHOTONIC_URL."Options/screenshots/SmugMug-3.png' style='max-width: 600px;' alt='Photos'/><br/><br/> | |
| 268 | + [ | |
| 269 | + 'name' => "What is this section?", | |
| 270 | + 'desc' => "Options in this section are in effect when you pick the following wizard options:<br/><br/> | |
| 271 | + <img src='" . PHOTONIC_URL . "Options/screenshots/SmugMug-3.png' style='max-width: 600px;' alt='Photos'/><br/><br/> | |
| 246 | 272 | If you are using the shortcode, the settings kick in for <code>[gallery type='smugmug' nick_name='abc' view='album' album='pqr']</code> |
| 247 | 273 | or <code>[gallery type='smugmug' nick_name='abc' view='images' album='pqr']</code>. In other words, the photos are printed directly on the page.", |
| 248 | - 'grouping' => "smug-photos", | |
| 249 | - 'type' => 'blurb',], | |
| 274 | + 'grouping' => 'smug-photos', | |
| 275 | + 'type' => 'blurb', | |
| 276 | + ], | |
| 250 | 277 | |
| 251 | - ['name' => "Hide Album Thumbnail", | |
| 252 | - 'desc' => "This will hide the thumbnail for your SmugMug Album.", | |
| 253 | - 'id' => "smug_hide_album_thumbnail", | |
| 254 | - 'grouping' => "smug-photos", | |
| 255 | - 'type' => 'checkbox' | |
| 278 | + [ | |
| 279 | + 'name' => "Hide Album Thumbnail", | |
| 280 | + 'desc' => "This will hide the thumbnail for your SmugMug Album.", | |
| 281 | + 'id' => 'smug_hide_album_thumbnail', | |
| 282 | + 'grouping' => 'smug-photos', | |
| 283 | + 'type' => 'checkbox' | |
| 256 | 284 | ], |
| 257 | 285 | |
| 258 | - ['name' => "Hide Album Title", | |
| 259 | - 'desc' => "This will hide the title for your SmugMug Album.", | |
| 260 | - 'id' => "smug_hide_album_title", | |
| 261 | - 'grouping' => "smug-photos", | |
| 262 | - 'type' => 'checkbox' | |
| 286 | + [ | |
| 287 | + 'name' => "Hide Album Title", | |
| 288 | + 'desc' => "This will hide the title for your SmugMug Album.", | |
| 289 | + 'id' => 'smug_hide_album_title', | |
| 290 | + 'grouping' => 'smug-photos', | |
| 291 | + 'type' => 'checkbox' | |
| 263 | 292 | ], |
| 264 | 293 | |
| 265 | - ['name' => "Hide Number of Photos", | |
| 266 | - 'desc' => "This will hide the number of photos in your SmugMug Album.", | |
| 267 | - 'id' => "smug_hide_album_photo_count", | |
| 268 | - 'grouping' => "smug-photos", | |
| 269 | - 'type' => 'checkbox' | |
| 294 | + [ | |
| 295 | + 'name' => "Hide Number of Photos", | |
| 296 | + 'desc' => "This will hide the number of photos in your SmugMug Album.", | |
| 297 | + 'id' => 'smug_hide_album_photo_count', | |
| 298 | + 'grouping' => 'smug-photos', | |
| 299 | + 'type' => 'checkbox' | |
| 270 | 300 | ], |
| 271 | 301 | |
| 272 | - ['name' => "Photo Title Display", | |
| 273 | - 'desc' => "How do you want the title of the photos?", | |
| 274 | - 'id' => "smug_photo_title_display", | |
| 275 | - 'grouping' => "smug-photos", | |
| 276 | - 'type' => 'radio', | |
| 277 | - 'options' => $this->title_styles(), | |
| 302 | + [ | |
| 303 | + 'name' => "Photo Title Display", | |
| 304 | + 'desc' => "How do you want the title of the photos?", | |
| 305 | + 'id' => 'smug_photo_title_display', | |
| 306 | + 'grouping' => 'smug-photos', | |
| 307 | + 'type' => 'radio', | |
| 308 | + 'options' => $this->title_styles(), | |
| 278 | 309 | ], |
| 279 | 310 | |
| 280 | - ['name' => "Constrain Photos Per Row", | |
| 281 | - 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 282 | - 'id' => "smug_photos_per_row_constraint", | |
| 283 | - 'grouping' => "smug-photos", | |
| 284 | - 'type' => 'select', | |
| 285 | - 'options' => ["padding" => "Fix the padding around the thumbnails", | |
| 286 | - "count" => "Fix the number of thumbnails per row", | |
| 311 | + [ | |
| 312 | + 'name' => "Constrain Photos Per Row", | |
| 313 | + 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 314 | + 'id' => 'smug_photos_per_row_constraint', | |
| 315 | + 'grouping' => 'smug-photos', | |
| 316 | + 'type' => 'select', | |
| 317 | + 'options' => [ | |
| 318 | + 'padding' => 'Automatically calculate thumbnails per row', | |
| 319 | + 'count' => 'Fix the number of thumbnails per row', | |
| 287 | 320 | ] |
| 288 | 321 | ], |
| 289 | 322 | |
| 290 | - ['name' => "Constrain by padding", | |
| 291 | - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", | |
| 292 | - 'id' => "smug_photos_constrain_by_padding", | |
| 293 | - 'grouping' => "smug-photos", | |
| 294 | - 'type' => 'text', | |
| 295 | - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored." | |
| 323 | + [ | |
| 324 | + 'name' => "Fixed number of thumbnails", | |
| 325 | + 'desc' => " If you have fixed the number of thumbnails per row above, enter the number of thumbnails", | |
| 326 | + 'id' => 'smug_photos_constrain_by_count', | |
| 327 | + 'grouping' => 'smug-photos', | |
| 328 | + 'type' => 'select', | |
| 329 | + 'options' => $this->selection_range(1, 10) | |
| 296 | 330 | ], |
| 297 | 331 | |
| 298 | - ['name' => "Constrain by number of thumbnails", | |
| 299 | - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", | |
| 300 | - 'id' => "smug_photos_constrain_by_count", | |
| 301 | - 'grouping' => "smug-photos", | |
| 302 | - 'type' => 'select', | |
| 303 | - 'options' => $this->selection_range(1, 25) | |
| 332 | + [ | |
| 333 | + 'name' => "Photos (Popup Panel)", | |
| 334 | + 'desc' => "Control settings for SmugMug Photos when displayed in a popup", | |
| 335 | + 'category' => 'smug-photos-pop', | |
| 336 | + 'type' => 'section', | |
| 304 | 337 | ], |
| 305 | 338 | |
| 306 | - ['name' => "Photos (Popup Panel)", | |
| 307 | - 'desc' => "Control settings for SmugMug Photos when displayed in a popup", | |
| 308 | - 'category' => "smug-photos-pop", | |
| 309 | - 'type' => 'section',], | |
| 339 | + [ | |
| 340 | + 'name' => "What is this section?", | |
| 341 | + 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='smugmug' nick_name='abc' view='albums']</code>, and you click on an album thumbnail to open its photos in an overlaid panel.", | |
| 342 | + 'grouping' => 'smug-photos-pop', | |
| 343 | + 'type' => 'blurb', | |
| 344 | + ], | |
| 310 | 345 | |
| 311 | - ['name' => "What is this section?", | |
| 312 | - 'desc' => "Options in this section are in effect when you use the shortcode format <code>[gallery type='smugmug' nick_name='abc' view='albums']</code>, and you click on an album thumbnail to open its photos in an overlaid panel.", | |
| 313 | - 'grouping' => "smug-photos-pop", | |
| 314 | - 'type' => 'blurb',], | |
| 346 | + [ | |
| 347 | + 'name' => "Photo Title Display", | |
| 348 | + 'desc' => "How do you want the title of the photos?", | |
| 349 | + 'id' => 'smug_photo_pop_title_display', | |
| 350 | + 'grouping' => 'smug-photos-pop', | |
| 351 | + 'type' => 'radio', | |
| 352 | + 'options' => $this->title_styles(), | |
| 353 | + ], | |
| 315 | 354 | |
| 316 | - ['name' => "Photo Title Display", | |
| 317 | - 'desc' => "How do you want the title of the photos?", | |
| 318 | - 'id' => "smug_photo_pop_title_display", | |
| 319 | - 'grouping' => "smug-photos-pop", | |
| 320 | - 'type' => 'radio', | |
| 321 | - 'options' => $this->title_styles(), | |
| 355 | + [ | |
| 356 | + 'name' => "Advanced", | |
| 357 | + 'desc' => "Advanced settings for SmugMug", | |
| 358 | + 'category' => 'smug-advanced', | |
| 359 | + 'type' => 'section', | |
| 322 | 360 | ], |
| 323 | 361 | |
| 324 | - ['name' => "Constrain Photos Per Row", | |
| 325 | - 'desc' => "How do you want the control the number of photo thumbnails per row by default? This can be overridden by adding the '<code>columns</code>' parameter to the '<code>gallery</code>' shortcode.", | |
| 326 | - 'id' => "smug_photos_pop_per_row_constraint", | |
| 327 | - 'grouping' => "smug-photos-pop", | |
| 328 | - 'type' => 'select', | |
| 329 | - 'options' => ["padding" => "Fix the padding around the thumbnails", | |
| 330 | - "count" => "Fix the number of thumbnails per row", | |
| 362 | + [ | |
| 363 | + 'name' => "Tree Nesting Levels", | |
| 364 | + 'desc' => "When you click on a thumbnail this size will be displayed if you are using a slideshow. If you are not using a slideshow you will be taken to the SmugMug page:", | |
| 365 | + 'id' => 'smug_nesting_levels', | |
| 366 | + 'grouping' => 'smug-advanced', | |
| 367 | + 'type' => 'select', | |
| 368 | + 'options' => [ | |
| 369 | + '1' => '1', | |
| 370 | + '2' => '2', | |
| 371 | + '3' => '3', | |
| 372 | + '4' => '4', | |
| 373 | + '5' => '5', | |
| 331 | 374 | ] |
| 332 | 375 | ], |
| 333 | 376 | |
| 334 | - ['name' => "Constrain by padding", | |
| 335 | - 'desc' => " If you have constrained by padding above, enter the number of pixels here to pad the thumbs by", | |
| 336 | - 'id' => "smug_photos_pop_constrain_by_padding", | |
| 337 | - 'grouping' => "smug-photos-pop", | |
| 338 | - 'type' => 'text', | |
| 339 | - 'hint' => "Enter the number of pixels here (don't enter 'px'). Non-integers will be ignored." | |
| 340 | - ], | |
| 341 | - | |
| 342 | - ['name' => "Constrain by number of thumbnails", | |
| 343 | - 'desc' => " If you have constrained by number of thumbnails per row above, enter the number of thumbnails", | |
| 344 | - 'id' => "smug_photos_pop_constrain_by_count", | |
| 345 | - 'grouping' => "smug-photos-pop", | |
| 346 | - 'type' => 'select', | |
| 347 | - 'options' => $this->selection_range(1, 25) | |
| 348 | - ], | |
| 349 | 377 | ]; |
| 350 | - } | |
| 351 | - | |
| 352 | - public static function get_instance() { | |
| 353 | - if (self::$instance == null) { | |
| 354 | - self::$instance = new SmugMug(); | |
| 355 | - } | |
| 356 | - return self::$instance; | |
| 357 | 378 | } |
| 358 | 379 | } |