Changeset 776306
- Timestamp:
- 09/21/2013 10:05:56 AM (13 years ago)
- Location:
- amty-thumb-recent-post
- Files:
-
- 6 added
- 2 edited
-
tags/8.1.1 (added)
-
tags/8.1.1/amtyThumbPostsAdminPg.php (added)
-
tags/8.1.1/amtyThumb_posts.php (added)
-
tags/8.1.1/logo.jpg (added)
-
tags/8.1.1/readme.txt (added)
-
tags/8.1.1/supportingfunctions.php (added)
-
trunk/amtyThumb_posts.php (modified) (8 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
amty-thumb-recent-post/trunk/amtyThumb_posts.php
r746570 r776306 8 8 9 9 Author: Amit Gupta 10 Version: 8. 0.110 Version: 8.1.1 11 11 Author URI: http://article-stack.com/ 12 12 */ … … 116 116 </p> 117 117 118 <p> 119 <select id="<?php echo $this->get_field_id( 'constrain' ); ?>" name="<?php echo $this->get_field_name( 'constrain' ); ?>" style="width:100px;" > 120 <option <?php if ( 'stretch' == $instance['widgettype'] ) echo 'selected="selected"'; ?>>stretch</option> 121 <option <?php if ( 'Resize by ratio' == $instance['widgettype'] ) echo 'selected="selected"'; ?>>Resize by ratio</option> 122 </select> 123 </p> 118 124 <!-- Show default image Checkbox --> 119 125 <?php /*<p> … … 163 169 $width = $instance['width']; 164 170 $height = $instance['height']; 171 $constrain = $instance['constrain']; 165 172 $maxpost = $instance['maxpost']; 166 173 $default_img_path = $instance['default_img_path']; //path for default image in case of no image in post … … 177 184 178 185 179 displayPosts($before_title ,$after_title,$title, $width ,$height , $maxpost ,$default_img_path,$pretag ,$template,$posttag,$titlelen,$contentlength ,$categoryName ,$widgetType);186 displayPosts($before_title ,$after_title,$title, $width ,$height , $constrain, $maxpost ,$default_img_path,$pretag ,$template,$posttag,$titlelen,$contentlength ,$categoryName ,$widgetType); 180 187 /* After widget (defined by themes). */ 181 188 echo $after_widget; … … 189 196 'thumb_width' => '70', 190 197 'thumb_height' => '70', 198 'constrain' => '1', 191 199 'default_img_path' => '', 192 200 'pretag' => '', … … 200 208 ), $attr ) ); 201 209 202 displayPosts($before_title, $after_title,$title, $thumb_width,$thumb_height,$ max_post,$default_img_path,$pretag,$template,$posttag,$title_len,$contentlength,$category,$widgettype);203 204 } 205 206 207 function displayPosts($before_title, $after_title, $title = '',$width = 70,$height = 70 ,$ maxpost = 10 ,$default_img_path = '',$pretag = '',$template , $posttag = '',$titlelen = 30,$contentlength=200,$categoryName = 'All',$widgetType = 'Recently Written'){210 displayPosts($before_title, $after_title,$title, $thumb_width,$thumb_height,$constrain,$max_post,$default_img_path,$pretag,$template,$posttag,$title_len,$contentlength,$category,$widgettype); 211 212 } 213 214 215 function displayPosts($before_title, $after_title, $title = '',$width = 70,$height = 70 ,$constrain=1, $maxpost = 10 ,$default_img_path = '',$pretag = '',$template , $posttag = '',$titlelen = 30,$contentlength=200,$categoryName = 'All',$widgetType = 'Recently Written'){ 208 216 global $wpdb; 209 217 if ( $title != '' ){ … … 283 291 //Do nothing 284 292 }else{ 285 $imgpath = lead_img_thumb_post($width ,$height ,$default_img_path , $post->ID );293 $imgpath = lead_img_thumb_post($width ,$height ,$default_img_path , $post->ID , $constrain); 286 294 //echo "<br />" . $imgpath; 287 295 $temp = str_replace("%POST_THUMB%", $imgpath , $temp); … … 304 312 if (function_exists('amty_lead_img')) { 305 313 if($post_id != '') 306 $img_url = amty_lead_img($w,$h,1, $default_src,'',0,$post_id);314 $img_url = amty_lead_img($w,$h,1,'','',0,$post_id,'',$default_src); 307 315 else 308 $img_url = amty_lead_img($w,$h,1,'','',0,''); 316 $img_url = amty_lead_img($w,$h,1,'','',0,'','',$default_src); 317 } 318 else{ 319 echo "amtyThumb plugin is missing"; 320 $img_url = ""; 321 } 322 return $img_url; 323 }//function end 324 325 function lead_img_thumb_post($w=70,$h=70,$default_src='',$post_id,$constrain) { 326 327 if (function_exists('amty_lead_img')) { 328 if($post_id != '') 329 $img_url = amty_lead_img($w,$h,$constrain,'','',0,$post_id,'y',$default_src); 330 else 331 $img_url = amty_lead_img($w,$h,$constrain,'','',0,'','y',$default_src); 309 332 } 310 333 else{ -
amty-thumb-recent-post/trunk/readme.txt
r746566 r776306 4 4 Tags: thumbnail, recent, random, popular, post, amty, image, widget, shortcode, mostly-viewed, rarely-viewed, recently-viewed, most-commented, last-viewed 5 5 Requires at least: 3.0 6 Tested up to: 3. 27 Stable tag: 8. 0.16 Tested up to: 3.5 7 Stable tag: 8.1.1 8 8 9 9 All-In-One. It shows Recently written, Recently viewed, Random, Mostly & Rarely Viewd, Mostly Commented posts with thumbnail in your style. … … 62 62 'thumb_width' => '70', 63 63 'thumb_height' => '70', 64 'constrain' => '1', 64 65 'default_img_path' => '', //should be set 65 66 'pretag' => '', … … 116 117 117 118 == Changelog == 119 120 = 8.1.1 = 121 * fixed a bug of calling amtyThumb plugin 122 * Now user can decide wheter an image should resized in ratio or be stretched as per given dimentions. 123 118 124 119 125 = 8.0.1 = … … 176 182 == Upgrade Notice == 177 183 178 = 7.1.0 = 179 * Addtion of %SHORT_TITLE% template code to display short title 184 = 8.1.1 = 185 * fixed a bug of calling amtyThumb plugin 186 * Now user can decide wheter an image should resized in ratio or be stretched as per given dimentions. 187 188 189 = 8.0.1 = 190 * fixed a vry minor and silly bug of broken image 191 192 = 8.0.0 = 193 * change in template codes for better customized apperance 194 * removed dependecny from 2 external plugins for analysing number of views and last visit time. 195 * Now you can display stripped post content 196 * extra functions to get views count or last visit time 197 * admin panel for admin to view posts stats. 198 * small code imporvment to spped up processing
Note: See TracChangeset
for help on using the changeset viewer.