Changeset 408941
- Timestamp:
- 07/12/2011 09:52:45 PM (15 years ago)
- Location:
- jj-nextgen-jquery-slider/trunk
- Files:
-
- 3 edited
-
includes/jj_ngg_jquery_slider.php (modified) (4 diffs)
-
jj-ngg-jquery-slider.php (modified) (1 diff)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
jj-nextgen-jquery-slider/trunk/includes/jj_ngg_jquery_slider.php
r408907 r408941 21 21 $height = $this->get_val_numeric($instance, 'height'); 22 22 $order = $this->get_val($instance, 'order', 'asc', false); 23 $tags = $this->get_val($instance, 'tags'); 23 24 $shuffle = $this->get_val($instance, 'shuffle'); 24 25 $limit = $this->get_val_numeric($instance, 'max_pictures'); … … 98 99 $p_size = 0; 99 100 if(is_array($results)) 100 { 101 $p_size = count($results); 101 { 102 // Filter by tag if entered 103 if($tags != '') 104 { 105 $tagged_images = nggTags::find_images_for_tags($tags); 106 107 if($tagged_images) 108 { 109 $tagged_image_ids = array(); 110 foreach($tagged_images as $image) 111 { 112 $tagged_image_ids[] = $image->pid; 113 } 114 115 if(sizeof($tagged_image_ids) > 0) 116 { 117 foreach($results as $result) 118 { 119 if(in_array($result->pid, $tagged_image_ids)) 120 { 121 $filtered_results[] = $result; 122 } 123 } 124 $results = $filtered_results; 125 } 126 } 127 else 128 { 129 $results = array(); 130 } 131 } 132 133 $p_size = count($results); 102 134 } 103 135 … … 359 391 'height' => '', 360 392 'order' => 'random', 393 'tags' => '', 361 394 'shuffle' => 'false', 362 395 'max_pictures' => '', … … 443 476 </p> 444 477 <p> 478 <label for="<?php echo $this->get_field_id('tags'); ?>"><strong>Only display images tagged:</strong></label><br /><small>comma separated list<br/ >(Note: Doesn't work with Max pictures)</small><br /> 479 <input type="text" id="<?php echo $this->get_field_id('tags'); ?>" name="<?php echo $this->get_field_name('tags'); ?>" value="<?php echo $instance['tags']; ?>" class="widefat" /> 480 </p> 481 <p> 445 482 <label><strong>Shuffle:</strong> <small>(Only for random order)</small></label><br /> 446 483 <input type="radio" id="<?php echo $this->get_field_id('shuffle'); ?>_true" name="<?php echo $this->get_field_name('shuffle'); ?>" value="true" style="vertical-align: middle;"<?php if($instance['shuffle'] == 'true') { echo " checked=\"checked\""; } ?> /><label for="<?php echo $this->get_field_id('shuffle'); ?>_true" style="vertical-align: middle;">true</label> -
jj-nextgen-jquery-slider/trunk/jj-ngg-jquery-slider.php
r408907 r408941 4 4 Description: Allows you to pick a gallery from the 'NextGen Gallery' plugin to use as a 'JQuery Nivo Slider'. 5 5 Author: JJ Coder 6 Version: 1.3. 66 Version: 1.3.7 7 7 */ 8 8 -
jj-nextgen-jquery-slider/trunk/readme.txt
r408907 r408941 5 5 Requires at least: 2.8 6 6 Tested up to: 3.2 7 Stable tag: 1.3. 67 Stable tag: 1.3.7 8 8 9 9 Allows you to pick a gallery from the 'NextGen Gallery' plugin to use as a 'JQuery Nivo slider'. … … 31 31 - Gallery: Leave blank to use all galleries or choose a gallery to use. (sc: gallery="galleryid") 32 32 - Order: Order to display results in. You can choose; Random, Latest First, Oldest First, or NextGen Sortorder. Random will still work when a page is cached. (sc: order="random"|"asc"|"desc"|"sortorder") 33 - Tags: comma separated list of tags to filter results by. Note: Doesn't work with Max pictures parameter. (sc: tags="tag1, tag2") 33 34 - Shuffle: If order is random and this is true will shuffle images with javascript. Useful if your are caching your pages. (sc: shuffle="true"|"false") 34 35 - Max pictures: The maximum amount of pictures to use. (sc: max_pictures="6") … … 162 163 == Changelog == 163 164 165 - 1.3.7: Ability to filter results by tags. (Thanks to #henare) 164 166 - 1.3.6: Got rid of border on image and added alt text even though alt text its pretty useless for nivo slider but should validate. (#Chad) 165 167 - 1.3.5: Arrow fix. Make sure stylesheets and javascript is refreshed. (AGAIN!)
Note: See TracChangeset
for help on using the changeset viewer.