Changeset 450207
- Timestamp:
- 10/12/2011 10:18:33 AM (13 years ago)
- Location:
- ssp-director-tools/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
ssp-director-tools/trunk/css/sspdt-admin.css
r409240 r450207 15 15 margin-bottom: 0px !important; 16 16 } 17 18 .sspdt_info { 19 font-size:10px !important; 20 line-height:100%; 21 padding:0px 6px; 22 background-color: #FFFFE0; 23 border: 1px solid #E6DB55; 24 } -
ssp-director-tools/trunk/includes/SSPDT.php
r409240 r450207 138 138 $width = (int)$content->grid->width; 139 139 $height = (int)$content->grid->height; 140 140 141 $title = ($content->caption) ? $this->prep($content->caption) : $this->prep($content->iptc->caption); 142 //$title = $this->get_meta($content); 141 143 $alt = ($content->caption) ? $this->prep($content->caption) : $this->prep($content->iptc->caption); 142 144 $out .= sprintf ("<a class='%s' rel='%s' href='%s' title='%s'> 143 145 <img class='sspdt_grid' src='%s' alt='%s' width='%s' height='%s' type='image/jpeg'/> 144 </a>\n", "fancybox", $rel, $content->large->url, $title, $content->grid->url, $alt, $width, $height); 145 } 146 </a>\n", "sspdt-fancybox", $rel, $content->large->url, $title, $content->grid->url, $alt, $width, $height); 147 148 $out .= $this->meta_html($content, "large"); 149 150 } 151 146 152 147 153 $out .= ( "</div>\n" ); … … 178 184 $rel = "post-" . $post_id; 179 185 $alt = $content->caption ? $this->prep($content->caption) : ""; 186 187 //debug_var($content->iptc); 180 188 181 189 if($showcaption) { 182 190 $caption = ($content->caption) ? $this->prep($content->caption) : $this->prep($content->iptc->caption); 191 $caption = $this->meta_html($content, "thumb"); 183 192 184 193 if($caption != "") { 185 returnsprintf("<div id='sspdt-content-%s' class='wp-caption %s' style='width:%spx'>194 $out = sprintf("<div id='sspdt-content-%s' class='wp-caption %s' style='width:%spx'> 186 195 <a class='%s' href='%s' rel='%s' title='%s'> 187 196 <img src='%s' alt='%s' width='%s' height='%s' /> 188 197 </a> 198 %s 189 199 <p class='wp-caption-text'>%s</p> 190 200 </div>", 191 $image, $align, $captionwidth, "fancybox", $large, $rel, $title, $thumb, $alt, $width, $height, $caption); 201 $image, $align, $captionwidth, "fancybox", $large, $rel, $title, $thumb, $alt, $width, $height, $this->meta_html($content, "large"), $caption); 202 203 return $out; 192 204 } 193 205 } 194 206 195 returnsprintf("<a class='%s sspdt_thumb' href='%s' rel='%s' title='%s'>207 $out = sprintf("<a class='%s sspdt_thumb' href='%s' rel='%s' title='%s'> 196 208 <img class='%s' src='%s' alt='%s' width='%s' height='%s' /> 197 209 </a>", 198 210 "fancybox", $large, $rel, $title, $align, $thumb, $alt, $width, $height); 199 211 212 $out .= $this->meta_html($content, "large"); 213 214 return $out; 215 } 216 217 218 /** 219 * Formats content metadata 220 * @param array content object with content metadata 221 * @param string size content size (thumb|large) 222 * @return string The formatted html output 223 */ 224 private function meta_html($content, $size) { 225 226 if($size == "large") { 227 $format = htmlspecialchars_decode( $this->format_options['large_caption_format'] ); 228 } elseif ($size == "thumb") { 229 $format = htmlspecialchars_decode( $this->format_options['thumb_caption_format'] ); 230 } else { 231 return ""; 232 } 233 234 $date_format = $this->format_options['date_format']; 235 236 $caption = ($content->caption) ? $this->prep($content->caption) : $this->prep($content->iptc->caption); 237 $byline = $this->prep($content->iptc->byline); 238 $date = date($date_format, $content->captured_on); 239 $city = $this->prep($content->iptc->city); 240 $country = $this->prep($content->iptc->country); 241 $latitude = $content->exif->latitude; 242 $longitude = $content->exif->longitude; 243 244 $search = array("%caption%", "%byline%", "%date%", "%city%", "%country%"); 245 $replace = array($caption, $byline, $date, $city, $country); 246 247 $html = ""; 248 if($size == "large") { 249 $html .= "<div style='display:none;'>"; 250 $html .= str_replace($search, $replace, $format); 251 $html .= "</div>"; 252 } elseif ($size == "thumb") { 253 $html .= str_replace($search, $replace, $format); 254 } 255 256 257 258 return $html; 200 259 } 201 260 -
ssp-director-tools/trunk/includes/helpers.php
r409240 r450207 47 47 function sspdt_nohtml($val) { 48 48 return wp_kses($val, array()); 49 } 50 51 //sanitize html formats 52 function sspdt_html_format($val) { 53 $allowed = array( 54 "div" => array( 55 "style" => array(), 56 "align" => array() 57 ), 58 "p" => array("style" => array()), 59 "b" => array(), 60 "i" => array(), 61 "strong" => array(), 62 "em" => array(), 63 "br" =>array() 64 ); 65 return wp_kses($val, $allowed); 49 66 } 50 67 -
ssp-director-tools/trunk/includes/sspdt-options-page.php
r409240 r450207 60 60 $format_options['thumb_align'] = sspdt_align( $_POST['thumb_align'] ); 61 61 $format_options['thumb_caption'] = sspdt_bool( $_POST['thumb_caption'] ); 62 $format_options['thumb_caption_format'] = htmlspecialchars( sspdt_html_format( $_POST['thumb_caption_format'] ), ENT_COMPAT, "UTF-8", false ); 62 63 63 64 $format_options['large_width'] = sspdt_posint( $_POST['large_width'] ); … … 66 67 $format_options['large_quality'] = sspdt_posint( $_POST['large_quality'] ); 67 68 $format_options['large_sharpen'] = sspdt_bool( $_POST['large_sharpen'] ); 69 $format_options['large_caption_format'] = htmlspecialchars( sspdt_html_format( $_POST['large_caption_format'] ), ENT_COMPAT, "UTF-8", false ); 70 71 $format_options['date_format'] = sspdt_nohtml( $_POST['date_format'] ); 68 72 69 73 $defaults = array(); … … 127 131 <?php 128 132 } 129 130 131 132 if(get_option('sspdt_format_options') == null) { 133 134 $format_options['grid_width'] = '60'; 135 $format_options['grid_height'] = '60'; 136 $format_options['grid_crop'] = '1'; 137 $format_options['grid_quality'] = '75'; 138 $format_options['grid_sharpen'] = '1'; 139 140 $format_options['thumb_width'] = '240'; 141 $format_options['thumb_height'] = '240'; 142 $format_options['thumb_crop'] = '0'; 143 $format_options['thumb_quality'] = '80'; 144 $format_options['thumb_sharpen'] = '1'; 145 $format_options['thumb_align'] = 'alignleft'; 146 $format_options['thumb_caption'] = '1'; 147 148 $format_options['large_width'] = '1000'; 149 $format_options['large_height'] = '720'; 150 $format_options['large_crop'] = '0'; 151 $format_options['large_quality'] = '85'; 152 $format_options['large_sharpen'] = '1'; 153 154 update_option( 'sspdt_format_options', $format_options ); 155 } 156 157 if(get_option('sspdt_defaults') == null) { 158 $defaults['model'] = 'gallery'; 159 $defaults['model_id'] = '1'; 160 $defaults['limit'] = '12'; 161 $defaults['tags'] = ''; 162 $defaults['tagmode'] = 'one'; 163 $defaults['sort_on'] = 'captured_on'; 164 $defaults['sort_direction'] = 'DESC'; 165 $defaults['rss'] = '0'; 166 167 update_option( 'sspdt_defaults', $defaults ); 168 } 169 170 if(get_option('sspdt_fancybox') == null) { 171 $fb['padding'] = '10'; 172 $fb['margin'] = '20'; 173 174 $fb['titleShow'] = '1'; 175 $fb['titlePosition'] = 'outside'; 176 $fb['counterShow'] = '0'; 177 178 $fb['overlayShow'] = '1'; 179 $fb['overlayOpacity'] = '0.3'; 180 $fb['overlayColor'] = '#666'; 181 182 $fb['cyclic'] = '0'; 183 $fb['showNavArrows'] = '1'; 184 $fb['showCloseButton'] = '1'; 185 $fb['enableEscapeButton'] = '1'; 186 187 $fb['transitionIn'] = '1'; 188 $fb['speedIn'] = '300'; 189 $fb['easingIn'] = 'linear'; 190 $fb['transitionOut'] = '1'; 191 $fb['speedOut'] = '400'; 192 $fb['easingOut'] = 'linear'; 193 $fb['changeSpeed'] = '400'; 194 195 update_option( 'sspdt_fancybox', $fb ); 196 } 133 197 134 198 135 $format_options = get_option('sspdt_format_options'); … … 247 184 this.document.getElementById("model_id").disabled = mymodel == "null"; 248 185 } 186 187 var $j = jQuery.noConflict() 188 189 function showhide(what) { 190 var $j = jQuery.noConflict() 191 if (document.getElementById(what).style.display == 'none') { 192 $j('#' + what).slideDown(600); 193 } else { 194 $j('#' + what).hide(200); 195 } 196 } 197 198 199 $j(document).ready(function() { 200 if (window.location.hash) { 201 var h = String(window.location.hash.substring(1)); 202 if ($j(h)) { 203 showhide(h); 204 } 205 } 206 }); 207 249 208 //--> 250 209 </script> … … 355 314 <th class="manage-column"><?php _e('Sharpening', 'sspdt'); ?></th> 356 315 <th class="manage-column"><?php _e('Alignment', 'sspdt'); ?></th> 357 <th class="manage-column"><?php _e('Caption', 'sspdt'); ?></th>358 316 </tr> 359 317 </thead> … … 383 341 </td> 384 342 <td></td> 385 <td></td>386 343 </tr> 387 344 <tr valign="middle"> … … 427 384 </select> 428 385 </td> 429 <td><input id="thumb_caption" name="thumb_caption" type="checkbox"430 value="1"431 <?php if ( $format_options['thumb_caption'] == '1') { echo "checked = 'checked'";} ?> />432 </td>433 386 </tr> 434 387 <tr valign="middle"> … … 456 409 </td> 457 410 <td></td> 458 <td><input id="titleShow" name="titleShow" type="checkbox"459 value="1"460 <?php if ( $fb['titleShow'] == '1') { echo "checked = 'checked'";} ?> />461 </td>462 411 </tr> 463 412 … … 472 421 <th> </th> 473 422 <th> </th> 474 <th> </th>475 423 </tr> 476 424 </tfoot> 425 </table> 426 427 <h3> 428 <?php _e('Captions', 'sspdt'); ?> 429 </h3> 430 <p> 431 <i><?php _e('Define display and formatting of captions based on content metadata.', 'sspdt'); ?> 432 </i> 433 </p> 434 <table class="form-table"> 435 <tr valign="middle"> 436 <th scope="row"><label for="preview_caption"><?php _e('Preview Captions', 'sspdt'); ?></label></th> 437 <td> 438 <input id="thumb_caption" name="thumb_caption" type="checkbox" style="margin-right:20px;" 439 value="1" 440 <?php if ( $format_options['thumb_caption'] == '1') { echo "checked = 'checked'";} ?> /> Format (<a href="javascript:showhide('caption_formatting_help');"><?php _e('Help', 'sspdt'); ?></a>) 441 <input id="thumb_caption_format" name="thumb_caption_format" type="text" size="80" value="<?php echo $format_options['thumb_caption_format'];?>"></input> 442 </td> 443 </tr> 444 <tr valign="middle"> 445 <th scope="row"><label for="large_caption"><?php _e('Presentation Captions', 'sspdt'); ?></label></th> 446 <td><p> 447 <input id="titleShow" name="titleShow" type="checkbox" style="margin-right:20px;" 448 value="1" 449 <?php if ( $fb['titleShow'] == '1') { echo "checked = 'checked'";} ?> /> Format (<a href="javascript:showhide('caption_formatting_help');"><?php _e('Help', 'sspdt'); ?></a>) 450 <input id="large_caption_format" name="large_caption_format" type="text" size="80" value="<?php echo $format_options['large_caption_format'];?>"></input> 451 </p> 452 <p> 453 <?php _e('Position:', 'sspdt'); ?> <select id="titlePosition" 454 name="titlePosition"> 455 <option value="outside" 456 <?php if($fb['titlePosition'] == 'outside') {echo "selected";} ?>> 457 <?php _e('outside frame', 'sspdt'); ?> 458 </option> 459 <option value="inside" 460 <?php if($fb['titlePosition'] == 'inside') {echo "selected";} ?>> 461 <?php _e('inside frame', 'sspdt'); ?> 462 </option> 463 <option value="over" 464 <?php if($fb['titlePosition'] == 'over') {echo "selected";} ?>> 465 <?php _e('over image', 'sspdt'); ?> 466 </option> 467 </select> 468 </p> 469 </td> 470 </tr> 471 <tr valign="middle" id="caption_formatting_help" style="display: none;"> 472 <th scope="row"></th> 473 <td class="sspdt_info"> 474 <h4><?php _e('Placeholders', 'sspdt'); ?></h4> 475 <p><?php _e('The following placeholders for SSP Director metadata are allowed in captions:', 'sspdt'); ?></p> 476 <ul> 477 <li><strong>%caption% </strong> <?php _e('The image caption. If not set, the IPTC caption is used', 'sspdt'); ?></li> 478 <li><strong>%byline% </strong> <?php _e('The IPTC byline', 'sspdt'); ?></li> 479 <li><strong>%date% </strong> <?php _e('The image capture date from the EXIF record', 'sspdt'); ?></li> 480 <li><strong>%city% </strong> <?php _e('The IPTC city', 'sspdt'); ?></li> 481 <li><strong>%country% </strong> <?php _e('The IPTC country', 'sspdt'); ?></li> 482 </ul> 483 <h4><?php _e('HTML Tags', 'sspdt'); ?></h4> 484 <p><?php _e('The following HTML tags are allowed in captions:', 'sspdt'); ?></p> 485 <p><pre><div style="">, <p style="">, <b>, <i> <strong>, <em>, <br></pre></p> 486 </td> 487 </tr> 488 <tr valign="middle"> 489 <th scope="row"><label for="date_format"><?php _e('Date Format', 'sspdt'); ?></label></th> 490 <td> 491 <input id="date_format" name="date_format" type="text" size="8" value="<?php echo $format_options['date_format'];?>"></input><br/> 492 <i><?php printf( __('Use PHP date formats. <a href="%s" target="_blank">Help</a>'), 'http://www.php.net/manual/en/function.date.php' ); ?></i> 493 </td> 494 </tr> 477 495 </table> 478 496 … … 609 627 value="<?php echo $fb['margin']; ?>" />px</td> 610 628 </tr> 611 <tr valign="middle"> 612 <th scope="row"><label for="fb_title"><?php _e('Caption', 'sspdt'); ?> 613 </label> 614 </th> 615 <td><?php _e('Position:', 'sspdt'); ?> <select id="titlePosition" 616 name="titlePosition"> 617 <option value="outside" 618 <?php if($fb['titlePosition'] == 'outside') {echo "selected";} ?>> 619 <?php _e('outside frame', 'sspdt'); ?> 620 </option> 621 <option value="inside" 622 <?php if($fb['titlePosition'] == 'inside') {echo "selected";} ?>> 623 <?php _e('inside frame', 'sspdt'); ?> 624 </option> 625 <option value="over" 626 <?php if($fb['titlePosition'] == 'over') {echo "selected";} ?>> 627 <?php _e('over image', 'sspdt'); ?> 628 </option> 629 </select> 630 </td> 631 </tr> 629 632 630 <tr valign="middle"> 633 631 <th><label for="fb_overlay"><?php _e('Overlay', 'sspdt'); ?> </label> … … 784 782 <?php 785 783 } 784 785 /** 786 * Add default options to the db on plugin activation. Don't overwrite existing options. 787 */ 788 function sspdt_default_options() { 789 790 $options = get_option('sspdt_format_options'); 791 $tmp = $options; 792 793 if( !isset( $options['grid_width'] ) ) $tmp['grid_width'] = '60'; 794 if( !isset( $options['grid_height'] ) ) $tmp['grid_height'] = '60'; 795 if( !isset( $options['grid_crop'] ) ) $tmp['grid_crop'] = '1'; 796 if( !isset( $options['grid_quality'] ) ) $tmp['grid_quality'] = '75'; 797 if( !isset( $options['grid_sharpen'] ) ) $tmp['grid_sharpen'] = '1'; 798 799 if( !isset( $options['thumb_width'] ) ) $tmp['thumb_width'] = '240'; 800 if( !isset( $options['thumb_height'] ) ) $tmp['thumb_height'] = '240'; 801 if( !isset( $options['thumb_crop'] ) ) $tmp['thumb_crop'] = '0'; 802 if( !isset( $options['thumb_quality'] ) ) $tmp['thumb_quality'] = '80'; 803 if( !isset( $options['thumb_sharpen'] ) ) $tmp['thumb_sharpen'] = '1'; 804 if( !isset( $options['thumb_align'] ) ) $tmp['thumb_align'] = 'alignleft'; 805 if( !isset( $options['thumb_caption'] ) ) $tmp['thumb_caption'] = '1'; 806 if( !isset( $options['thumb_caption_format'] ) ) $tmp['thumb_caption_format'] = '%caption%'; 807 808 if( !isset( $options['large_width'] ) ) $tmp['large_width'] = '1000'; 809 if( !isset( $options['large_height'] ) ) $tmp['large_height'] = '720'; 810 if( !isset( $options['large_crop'] ) ) $tmp['large_crop'] = '0'; 811 if( !isset( $options['large_quality'] ) ) $tmp['large_quality'] = '85'; 812 if( !isset( $options['large_sharpen'] ) ) $tmp['large_sharpen'] = '1'; 813 if( !isset( $options['large_caption_format'] ) ) $tmp['large_caption_format'] = '<div style="text-align:left"><b>%caption%</b><br />%byline% (%date% in %city%, %country%)</div>'; 814 815 if( !isset( $options['date_format'] ) ) $tmp['date_format'] = 'd.m.Y'; 816 817 update_option( 'sspdt_format_options', $tmp ); 818 819 $options = get_option('sspdt_defaults'); 820 $tmp = $options; 821 822 if( !isset( $options['model'] ) ) $tmp['model'] = 'gallery'; 823 if( !isset( $options['model_id'] ) ) $tmp['model_id'] = '1'; 824 if( !isset( $options['limit'] ) ) $tmp['limit'] = '0'; 825 if( !isset( $options['tags'] ) ) $tmp['tags'] = ''; 826 if( !isset( $options['tagmode'] ) ) $tmp['tagmode'] = 'one'; 827 828 if( !isset( $options['sort_on'] ) ) $tmp['sort_on'] = 'captured_on'; 829 if( !isset( $options['sort_direction'] ) ) $tmp['sort_direction'] = 'DESC'; 830 if( !isset( $options['rss'] ) ) $tmp['rss'] = '0'; 831 832 update_option( 'sspdt_defaults', $tmp ); 833 834 $options = get_option('sspdt_fancybox'); 835 $tmp = $options; 836 837 if( !isset( $options['padding'] ) ) $tmp['padding'] = '10'; 838 if( !isset( $options['margin'] ) ) $tmp['margin'] = '20'; 839 840 if( !isset( $options['titleShow'] ) ) $tmp['titleShow'] = '1'; 841 if( !isset( $options['titlePosition'] ) ) $tmp['titlePosition'] = 'outside'; 842 if( !isset( $options['counterShow'] ) ) $tmp['counterShow'] = '0'; 843 844 if( !isset( $options['overlayShow'] ) ) $tmp['overlayShow'] = '1'; 845 if( !isset( $options['overlayOpacity'] ) ) $tmp['overlayOpacity'] = '0.3'; 846 if( !isset( $options['overlayColor'] ) ) $tmp['overlayColor'] = '#666'; 847 848 if( !isset( $options['cyclic'] ) ) $tmp['cyclic'] = '0'; 849 if( !isset( $options['showNavArrows'] ) ) $tmp['showNavArrows'] = '1'; 850 if( !isset( $options['showCloseButton'] ) ) $tmp['showCloseButton'] = '1'; 851 if( !isset( $options['enableEscapeButton'] ) ) $tmp['enableEscapeButton'] = '1'; 852 853 if( !isset( $options['transitionIn'] ) ) $tmp['transitionIn'] = '1'; 854 if( !isset( $options['speedIn'] ) ) $tmp['speedIn'] = '300'; 855 if( !isset( $options['easingIn'] ) ) $tmp['easingIn'] = 'linear'; 856 if( !isset( $options['transitionOut'] ) ) $tmp['transitionOut'] = '1'; 857 if( !isset( $options['speedOut'] ) ) $tmp['speedOut'] = '400'; 858 if( !isset( $options['easingOut'] ) ) $tmp['easingOut'] = 'linear'; 859 if( !isset( $options['changeSpeed'] ) ) $tmp['changeSpeed'] = '400'; 860 861 update_option( 'sspdt_fancybox', $tmp ); 862 } 786 863 ?> -
ssp-director-tools/trunk/js/sspdt-admin.js
r409180 r450207 13 13 this.document.getElementById("model_id").disabled = mymodel == "null"; 14 14 } 15 -
ssp-director-tools/trunk/readme.txt
r409240 r450207 1 1 === SSP Director Tools === 2 2 Contributors: parelius 3 Tags: SlideShowPro, images, gallery, album, photos, fancybox, API, SSP, SSP Director, widget, shortcode 3 Tags: SlideShowPro, images, gallery, album, photos, fancybox, API, SSP, SSP Director, widget, shortcode, photo feed, RSS, feed 4 4 Requires at least: 3.0 5 5 Tested up to: 3.2.1 6 Stable tag: 1.0. 16 Stable tag: 1.0.2 7 7 8 8 SSP Director Tools give you means for integrating SlideShowPro Director content into a WordPress blog. … … 10 10 == Description == 11 11 12 This Plugin uses the SSP Director API to pull content from [SlideShowPro Director] (http://slideshowpro.net/products/slideshowpro_director/).12 This Plugin uses the SSP Director API to pull content from [SlideShowPro Director][sspd]. 13 13 14 14 Features: … … 18 18 * Insert widgets into your theme if you want to display a photo grid in a widget area. 19 19 * Sizing and image handling are according to your default settings but can be overridden by shortcode attributes. 20 * Use image metadata provided by SSP Director .20 * Use image metadata provided by SSP Director for formatting image captions. 21 21 * Enable/disable photo feed functionality which generates an encrypted RSS photo feed URL for photo grids. 22 * Use [FancyBox](http://fancybox.net/) to display photos in lightbox style. 22 * Use [FancyBox][] to display photos in lightbox style. 23 24 [sspd]: http://slideshowpro.net/products/slideshowpro_director/ "SlideShowPro Director" 25 [fancybox]: http://fancybox.net/ "Fancybox" 23 26 24 27 == Installation == … … 43 46 = Can I integrate Flash slide shows? = 44 47 45 No. This is not within the scope of this plugin. Use [SlidePress] (http://wordpress.org/extend/plugins/slidepress/)to embed Flash slide shows.48 No. This is not within the scope of this plugin. Use [SlidePress] to embed Flash slide shows. 46 49 47 50 = Can I integrate videos? = 48 51 49 52 No. Currently this is not possible, but it is planned for a future version. 53 54 = What exaclty does the photo feed functionality do? = 55 56 Photo feeds are RSS feeds which can be consumed by other clients. You might for example provide a photo feed for all images shown in a photo grid. This feed could be imported into an application like iPhoto and thus always keep your iPhoto album up to date. 57 58 However, you cannot protect this feed by password. In order to provide minimum protection, the feed URLs are encrypted in a way that they can't be guessed. So, in situations where you restrict access to WordPress, you may want to prevent easy access to your photo feeds and thus use the encrypted feed URLs. 59 60 Be aware that any person who has acces to the feed URL can acces the photos. 61 62 = How can I configure the size of the images provided by photo feeds? = 63 64 You can do this by editing the configuration file of your photo feed installation. When `http://director.myserver.com/feed/` is the location of your photo feed installation, the configuration file is `http://director.myserver.com/feed/includes/config.php`. 65 66 Edit the parameters of the `$sspd_feed_full` variable as desired. The variable `$sspd_feed_preview` is used by some feed readers (like Safari or Firefox) to display image previews. This variable can be configured, too. 67 68 [slidepress]: http://wordpress.org/extend/plugins/slidepress/ "SlidePress" 50 69 51 70 == Screenshots == … … 56 75 57 76 == Changelog == 77 78 = 1.1 = 79 * Configurable captions using a subset of IPTC and EXIF tags 80 * Some minor fixes (including this Readme) 58 81 59 82 = 1.0.1 = … … 66 89 == Upgrade Notice == 67 90 68 No upgrades, yet.91 This version should work without problems when upgrading from earlier versions. 69 92 70 93 == Shortcode Help == … … 80 103 * `caption`: Whether or not to show the caption of a single image (yes|1|no|0, default: 1). 81 104 * `limit`: The maximum number of images to be shown in a grid (integer, default: 0). 0 if unlimited. 82 * `tags : List of tags to filter the content by, separated by commas.105 * `tags`: List of tags to filter the content by, separated by commas. 83 106 * `tagmode`: Mode in which the tag filter works. Match all tags or any out of the list (all|one, default: one). 84 107 * `sort_on`: The sort field (null|created_on|captured_on|modified_on|filename|random, default: null). … … 86 109 * `rss`: Whether or not to show a RSS photo feed link below the photo grid (yes|1|no|0, default: 1). 87 110 88 If no attributes are specified, the default plugin settings apply as defined in the sections "Photo Grid Defaults" and "Image Sizes an Handling".111 If no attributes are specified, the default plugin settings apply as defined in the sections "Photo Grid Defaults" and "Image Sizes and Handling". 89 112 90 113 Example: … … 92 115 `[sspd gallery="6" limit="10" tags="technology" sort_on="captured_on" sort_direction="DESC"]`: This will output the 10 most recent photos of gallery 6 which are tagged with "technology". 93 116 117 == Using captions == 118 119 Image captions are automatically generated using image metadata. You can define different captions for preview images and images presented by FancyBox. Use placehoders like `%placeholder%` in your caption definitions and define how dates will be formatted. 120 121 List of allowed placeholders: 122 123 * `%caption%`: The image caption as provided by Director. If the caption is not set in Director, the IPTC caption is used instead. 124 * `%byline%`: The IPTC byline 125 * `%city%`: The IPTC city 126 * `%country%`: The IPTC country 127 * `%date%`: The image capture date from the EXIF record 128 129 Date formatting: Use common [PHP date][] formats. 130 131 [php date]: http://www.php.net/manual/en/function.date.php "PHP date" 132 133 Using HTML in your captions: You may use the following HTML elements and attributes: 134 135 `<div style="">, <p style="">, <b>, <i> <strong>, <em>, <br>` 136 137 Example: `<b>%caption%</b> (%date%)<br><i>Photograph by %byline%</i>` 94 138 95 139 == Known Issues == 96 140 97 * A bug in the Director API v. 1.5.0 beta generates a wrong result when a query with multiple tags is done. See [SSP Director Forum](http://forums.slideshowpro.net/viewtopic.php?id=29339). 141 * A bug in the Director API v. 1.5.0 beta generates a wrong result when a query with multiple tags is done. See [SSP Director Forum][sspd forum 29339]. 142 * photo grids and photo feeds don't work for smart galleries and albums. (Seems to be a Director bug.) 98 143 * The plugin currently doesn't check if the photo feed feature is installed correctly. 144 * The photo feeds don't show the real sizes of the downloadable enclosures, but the sizes of the originals. 145 146 [sspd forum 29339]: http://forums.slideshowpro.net/viewtopic.php?id=29339 "API 1.5 : Bug with Tags filter on gallery" -
ssp-director-tools/trunk/ssp-director-tools.php
r409240 r450207 3 3 Plugin Name: SSP Director Tools 4 4 Description: SSP Director Tools help you to link content from a SlideShowPro Director installation to WordPress posts and pages. 5 Version: 1.0. 15 Version: 1.0.2 6 6 Text Domain: sspdt 7 7 Author: Matthias Scheidl <[email protected]> … … 79 79 echo ' var $j = jQuery.noConflict();'; 80 80 echo ' $j(document).ready(function() {'; 81 echo ' $j("a. fancybox").fancybox({"type" : "image"';81 echo ' $j("a.sspdt-fancybox").fancybox({"type" : "image"'; 82 82 83 83 if( isset( $fb['padding'] ) ) echo ', "padding" : ' . (int) $fb['padding']; … … 85 85 echo ( $fb['titleShow'] === '1' ? ', "titleShow" : true' : ', "titleShow" : false'); 86 86 if( isset( $fb['titlePosition'] ) && $fb['titlePosition'] != 'outside' ) echo ', "titlePosition" : "' . $fb['titlePosition'] . '"'; 87 /*if( $fb['counterShow'] == '1' && $fb['titlePosition'] == 'inside') echo ', "titleFormat" : function (title, currentArray, currentIndex, currentOpts) {88 return "<div id=\'tip7-title\' style=\'text-align:left\'>" + (title && title.length ? + title + : "" ) + "Image " + (currentIndex + 1) + " of " + currentArray.length + "</div>";89 };';*/90 87 echo ( $fb['overlayShow'] === '1' ? ', "overlayShow" : true' : ', "overlayShow" : false'); 91 88 if( isset( $fb['overlayOpacity'] ) && $fb['overlayShow'] === '1') echo ', "overlayOpacity" : ' . (float) $fb['overlayOpacity'] ; … … 103 100 if( isset( $fb['easingOut'] ) && $fb['transitionOut'] == 'easing' ) echo ', "easingOut" : "' . $fb['easingOut'] . '"'; 104 101 if( isset( $fb['changeSpeed'] ) ) echo ', "changeSpeed" : ' . (int) $fb['changeSpeed']; 102 103 echo ', "onStart" : function(currentArray,currentIndex,currentOpts){ 104 if(currentOpts.titlePosition != "float") { 105 var obj = currentArray[ currentIndex ]; 106 if ($j(obj).next().length) 107 this.title = $j(obj).next().html(); 108 } 109 } '; 105 110 106 111 echo ' });'; … … 155 160 } 156 161 162 /** 163 * Plugin activation handler 164 */ 165 function sspdt_activation_handler() { 166 sspdt_default_options(); 167 } 168 169 //Hooks 170 register_activation_hook(__FILE__, 'sspdt_activation_handler'); 171 157 172 ?>
Note: See TracChangeset
for help on using the changeset viewer.