Changeset 651739
- Timestamp:
- 01/12/2013 09:59:53 PM (13 years ago)
- Location:
- post-tiles/trunk
- Files:
-
- 3 edited
-
post-tiles.css (modified) (4 diffs)
-
post-tiles.php (modified) (14 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-tiles/trunk/post-tiles.css
r606300 r651739 127 127 /* Frontend CSS */ 128 128 ul#post-tiles { 129 margin: 0 0 0 -10px;130 padding: 1 0px;129 margin: 0; 130 padding: 14px 10px 10px; 131 131 overflow: auto; 132 132 } … … 185 185 #category-key { 186 186 overflow: auto; 187 padding: 1px; 187 padding-top: 14px; 188 padding-right: 0 !important; 189 padding-left: 0 !important; 188 190 } 189 191 #category-key a{ … … 191 193 float: left; 192 194 padding: 5px 10px; 193 border-radius: 10px;194 -moz-border-radius: 10px;195 -webkit-border-radius: 10px;196 195 color: #ffffff; 197 196 margin-right: 5px; 198 197 font-size: 12px; 199 198 } 200 #category-key a:hover{201 text-decoration: none;202 -moz-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.11);203 -webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.11);204 box-shadow: 0 2px 0 rgba(0, 0, 0, 0.11);205 margin-top: -2px;206 }207 199 #category-all { 208 200 border: 1px solid #b1b1b1; 209 color: # b1b1b1!important;201 color: #888888 !important; 210 202 padding: 4px 10px !important; 211 203 } … … 232 224 box-shadow: 0 0 10px rgba(0, 0, 0, 0.62); 233 225 } 226 /* @group Pagination */ 227 .posttiles-pagination { 228 display: block; 229 overflow: auto; 230 padding-bottom: 14px; 231 } 232 233 .posttiles-pagination a { 234 display: block; 235 float: left; 236 display: block; 237 float: left; 238 padding: 4px 10px; 239 margin-right: 5px; 240 font-size: 12px; 241 border: 1px solid #b1b1b1; 242 color: #888888; 243 } 244 .posttiles-pagination a { 245 246 } 247 .posttiles-pagination span { 248 display: block; 249 float: left; 250 display: block; 251 float: left; 252 padding: 4px 10px; 253 margin-right: 5px; 254 font-size: 12px; 255 border: 1px solid #d3d3d3; 256 color: #d3d3d3; 257 } 258 259 /* @end */ 260 234 261 /* Add retina display plus icon */ 235 262 @media screen and (-webkit-min-device-pixel-ratio: 2), -
post-tiles/trunk/post-tiles.php
r623444 r651739 5 5 Description: This plugin displays recent posts as tiles. Posts can choose categories by id and numbeer of posts to display. Example shortcode: [post-tiles] or [post-tiles categories='1,2,4,10' posts='8' excerpt='18']. 6 6 Author: Ethan Hackett 7 Version: 1.3. 37 Version: 1.3.4 8 8 Author URI: http://www.posttiles.com 9 9 … … 54 54 register_setting( 'tc-plugin-settings', 'posttiles-width'); 55 55 register_setting( 'tc-plugin-settings', 'posttiles-height'); 56 register_setting( 'tc-plugin-settings', 'featured-image-width'); 57 register_setting( 'tc-plugin-settings', 'featured-image-height'); 56 58 register_setting( 'tc-plugin-settings', 'excerpt-length'); 59 register_setting( 'tc-plugin-settings', 'pagination-key'); 57 60 58 61 // Get all Post Categories … … 117 120 $show_key_jquery = "true"; 118 121 } 122 $pagination_key = get_option('pagination-key'); 123 if(empty($pagination_key)){ 124 $pagination_key = "true"; 125 } 119 126 $featured_images_key = get_option('featured-images'); 120 127 if(empty($featured_images_key)){ … … 142 149 if(empty($posttiles_height)){ 143 150 $posttiles_height = "175"; 151 } 152 $featured_image_width = get_option('featured-image-width'); 153 if(empty($featured_image_width)){ 154 $featured_image_width = "250"; 155 } 156 $featured_image_height = get_option('featured-image-height'); 157 if(empty($featured_image_height)){ 158 $featured_image_height = "250"; 144 159 } 145 160 $excerpt_length = get_option('excerpt-length'); … … 185 200 </div> 186 201 202 <div id="box-dimentions" style="margin-top: 10px; margin-bottom: 10px;"> 203 <strong>Set Featured Image Dimensions</strong> 204 <br/> 205 <small><em>It can help if the images are larger than the tiles.</em></small><br/> 206 <input type="text" name="featured-image-width" value="<?php echo $featured_image_width; ?>" class="small-input" /> <input type="text" name="featured-image-height" value="<?php echo $featured_image_height; ?>" class="small-input" /> 207 </div> 208 187 209 <div class='category-key-radio'> 188 210 <input type="radio" name="responsive-key" <?php if($responsive_key == 'true') echo 'checked="checked"'; ?> value="true" /> On … … 206 228 <small><em>Excerpt is uses word count. Default is 12.</a></em></small> 207 229 </div> 208 209 210 230 </li> 211 231 … … 233 253 <!-- An alert that this feature requires jQuery be turned on --> 234 254 <?php if($show_key_jquery == 'false') echo '<br/><small class="attention"><em><strong>ATTENTION:</strong> This featured requires jQuery be turned on</em></small>'; ?> 255 </div> 256 </li> 257 258 <li class='category-key-list-item'> 259 <div class='category-key-radio'> 260 <input type="radio" name="pagination-key" <?php if($pagination_key == 'true') echo 'checked="checked"'; ?> value="true" /> Show 261 <input type="radio" name="pagination-key" <?php if($pagination_key == 'false') echo 'checked="checked"'; ?> value="false" /> hide 262 </div> 263 <div class='category-key-admin'> 264 <strong>Display Pagination For Tiles</strong> 265 <br/> 266 <small><em>Pagination enables the viewing of overflow tiles.</em></small> 235 267 </div> 236 268 </li> … … 319 351 } 320 352 } 321 353 354 // Pagination starting point 355 if ( get_query_var('paged') ) { $paged = get_query_var('paged'); } 356 elseif ( get_query_var('page') ) { $paged = get_query_var('page'); } 357 else { $paged = 1; } 358 322 359 // Configure Categories For Query 323 360 $cat_num = $atts['categories']; … … 332 369 } 333 370 else { 334 $posts_query = 'posts_per_page= 8';371 $posts_query = 'posts_per_page=4'; 335 372 } 336 373 337 374 // Configure Both Categories and Number of Posts For Query 338 $the_query = $posts_query.$cat_query ;339 375 $the_query = $posts_query.$cat_query.'&paged='.$paged; 376 340 377 // Run the query 341 378 query_posts($the_query); … … 359 396 360 397 // Retrieves Tile Width 361 $posttiles_ width = get_option('posttiles-width');362 if(empty($posttiles_ width)){363 $posttiles_ width = "175";364 } 365 $posttiles_ li_width = $posttiles_width+20;398 $posttiles_li_width = get_option('posttiles-width'); 399 if(empty($posttiles_li_width)){ 400 $posttiles_li_width = "175"; 401 } 402 $posttiles_width = $posttiles_li_width-20; 366 403 367 404 // Retrieves Tile Height 368 $posttiles_ height = get_option('posttiles-height');369 if(empty($posttiles_ height)){405 $posttiles_li_height = get_option('posttiles-height'); 406 if(empty($posttiles_li_height)){ 370 407 $posttiles_height = "175"; 371 408 } 372 $posttiles_li_height = $posttiles_height+20; 409 $posttiles_height = $posttiles_li_height-20; 410 411 // Retrieve Featured Image Height 412 $featured_image_height = get_option('featured-image-height'); 413 if(empty($featured_image_height)){ 414 $featured_image_height = "250"; 415 } 416 // Retrieves Featured Image Width 417 $featured_image_width = get_option('featured-image-width'); 418 if(empty($featured_image_width)){ 419 $featured_image_width = "250"; 420 } 421 422 423 373 424 ?> 374 425 <style media="screen" type="text/css"> … … 399 450 </style><?php 400 451 } 452 453 // Retrieve Pagination 454 $pagination_key = get_option('pagination-key'); 455 if(empty($pagination_key)){ 456 $pagination_key = "true"; 457 } 458 459 if ($pagination_key == "true") { 460 // Build out the pagination 461 global $wp_query; 462 // Get the total number of pages 463 $total_pages = $wp_query->max_num_pages; 464 // If the total of pages is greater than one create the pagination 465 if ($total_pages > 1){ 466 $current_page = max(1, get_query_var('paged')); 467 $pagination = paginate_links(array( 468 'base' => get_pagenum_link(1) . '%_%', 469 'format' => 'page/%#%', 470 'current' => $current_page, 471 'total' => $total_pages, 472 )); 473 $pagination ="<div class='posttiles-pagination'>".$pagination."</div>"; 474 } else { 475 $pagination = "<!-- There is no Post Tiles pagination because there aren't enough posts for pagination -->"; 476 } 477 } else { 478 $pagination = "<!-- Post Tiles pagination is disabled in the settings -->"; 479 } 480 401 481 402 482 … … 457 537 if ( has_post_thumbnail()) { 458 538 // Retrieve the featured image. 459 $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), array( 350,350));539 $thumb = wp_get_attachment_image_src( get_post_thumbnail_id(), array($featured_image_width,$featured_image_height)); 460 540 // Strip featured image down to the url. 461 541 $url = $thumb['0']; … … 464 544 $featured_style = "class='".$cat_var."'"; 465 545 } 466 }546 } 467 547 // Each output creates the li > link > title > exerpt 468 548 $output .= "<li ".$featured_style." id='".$theID."'><a href='$temp_link' class='".$cat_var."' style='background-color: $cat_var_value; $featured_border'><h3>$temp_title </h3>$temp_excerpt</a></li>\n"; … … 519 599 $key_finished = "<!-- Category Key is turned off. See the admin settings for Post Tiles -->"; 520 600 } 521 522 return $key_finished.'<ul id="post-tiles" '.$responsive.'>'.$output.'</ul>' ;523 601 602 return $key_finished.'<ul id="post-tiles" '.$responsive.'>'.$output.'</ul>'.$pagination; 603 524 604 $plugin_url = plugins_url()."/post-tiles"; 525 605 } -
post-tiles/trunk/readme.txt
r623444 r651739 4 4 Tags: Post tiles, categories, color coated, shortcode 5 5 Requires at least: 3.0 6 Tested up to: 3. 4.27 Stable tag: 1.3. 36 Tested up to: 3.5.0 7 Stable tag: 1.3.4 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 23 23 *NOTE:* The category id numbers are listed below, next to the category names. You can use both the categories and posts attributes **Example: [post-tiles categories='1,2,4' posts='8' excerpt='18']** 24 24 25 Version 1.3. 325 Version 1.3.4 26 26 27 27 == Installation == … … 46 46 == Changelog == 47 47 48 = 1.3.3 = 49 * WARNING This update will remove your current color settings. Please back them up. 50 * Fixed category to allow special characters 51 * Fixed animation to fade featured images too. 52 * Updated a JS issue 53 * Added a link in the FAQ for working with the NextGen Gallery 48 = 1.3.4 = 49 * Added the ability to control tile featured image dimensions 50 * Added the ability to paginate 51 * Removed the category key rounded corners 52 * Fixed the tile dimensions. There was a 10px padding discrepancy causing tiles to be +20px wider and taller than defined in the admin settings. Not the width and height of the tiles includes the padding space. 54 53 55 54 = 1.3.2 = … … 92 91 == Upgrade Notice == 93 92 94 * WARNING there were some big changes in this version which will cause you to loose your current tile colors. Backup your colors before updating. 95 * Fixed some category issue 96 * Fixed a JS issue 97 * Fixed an animation issue 93 * Responsive functionality added (Alternate fluid design responds to location width) 94 * Admin controlled animation styles (Bottom, top, right, left and fade) 95 * Admin controlled Tile width and Height 96 * Admin controlled excerpt length 97 * Fixed spelling errors 98 98 99 99 == Frequently Asked Questions == … … 102 102 103 103 If in the settings jQuery is turned on then by default everything loads invisible and is revealed with a fade. You should check your version of jQuery to make sure you're running at least 1.4 +. To test whether jQuery is the issue in the settings you can disable the jQuery and the plugin should appear. 104 105 = How do I get Post Tiles to work with NextGen Gallery? =106 107 Here's a link to a support thread where CoCha appeared to have a decent solution.108 http://wordpress.org/support/topic/plugin-post-tiles-using-nextgen-gallery-thumbnails109 104 110 105 == Arbitrary section ==
Note: See TracChangeset
for help on using the changeset viewer.