Changeset 623444
- Timestamp:
- 11/10/2012 07:03:21 PM (13 years ago)
- Location:
- post-tiles/trunk
- Files:
-
- 4 edited
-
post-tiles-frontend.js (modified) (2 diffs)
-
post-tiles.js (modified) (1 diff)
-
post-tiles.php (modified) (10 diffs)
-
readme.txt (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-tiles/trunk/post-tiles-frontend.js
r605963 r623444 11 11 $('#category-key a').not('#category-all').click(function() { 12 12 var categoryClass = '.'+$(this).attr('id'); 13 $('ul#post-tiles li a').not(categoryClass).fadeTo('slow', 0.3);13 $('ul#post-tiles li').not(categoryClass).fadeTo('slow', 0.3); 14 14 $('.post-tile-selected').removeClass('post-tile-selected') 15 15 $(categoryClass).fadeTo('fast', 1.0); 16 $(categoryClass). parent('li').addClass('post-tile-selected');16 $(categoryClass).addClass('post-tile-selected'); 17 17 return false; 18 18 }); … … 20 20 // This returns all category types to accent when all is clicked 21 21 $('#category-all').click(function() { 22 $('ul#post-tiles li a').fadeTo('fast', 1.0);22 $('ul#post-tiles li').fadeTo('fast', 1.0); 23 23 return false; 24 24 }); -
post-tiles/trunk/post-tiles.js
r485208 r623444 8 8 // Define X as the background color of the class "colorwell-selected" - Defined later on .focus 9 9 var x = $('.colorwell-selected').css('backgroundColor'); 10 // Run the hexc function which changes an RBG value to a hexadecimal value.11 hexc(x);12 10 13 11 // Apply the color value to the 14 12 $('#example-post').css('backgroundColor', color); 15 16 // Setup hexc function to convert RBG to Hexadecimal example - #ffffff 17 function hexc(colorval) { 18 var parts = colorval.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/); 19 delete(parts[0]); 20 for (var i = 1; i <= 3; ++i) { 21 parts[i] = parseInt(parts[i]).toString(16); 22 if (parts[i].length == 1) parts[i] = '0' + parts[i]; 23 } 24 color = '#' + parts.join(''); 25 } 13 26 14 }, 100); 27 15 -
post-tiles/trunk/post-tiles.php
r606934 r623444 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. 27 Version: 1.3.3 8 8 Author URI: http://www.posttiles.com 9 9 … … 61 61 //Loop Through Each Category 62 62 foreach($categories as $category) { 63 $cat_var = "cat_".$category->name; 64 // Make lowercase 65 $cat_var = strtolower($cat_var); 66 $cat_var = str_replace(" ", "_", $cat_var); 67 $cat = $category->name; 68 63 // Get category slug incase of special characters 64 $cat_slug = "cat_".$category->slug; 69 65 // Creates a registered setting for each category. 70 register_setting('tc-plugin-settings', $cat_ var);66 register_setting('tc-plugin-settings', $cat_slug); 71 67 } 72 68 } … … 159 155 foreach($categories as $category) { 160 156 $cat_var = "cat_".$category->name; 157 $cat_slug = "cat_".$category->slug; 161 158 // Make lowercase 162 159 $cat_var = strtolower($cat_var); … … 165 162 $id = $category->cat_ID; 166 163 // Retrieves option value 167 $cat_var_value = get_option($cat_ var);164 $cat_var_value = get_option($cat_slug); 168 165 // Checks the value to see if it's empty. If it is use default. 169 166 if (empty($cat_var_value)){ … … 173 170 // Echo out each list Category Name > Id > Input 174 171 echo "<li><strong>".$cat." </strong> <em>(".$id.")</em> 175 <input type='text' class='colorwell' name='".$cat_ var."' value='".$cat_var_value."' />172 <input type='text' class='colorwell' name='".$cat_slug."' value='".$cat_var_value."' /> 176 173 </li>"; 177 174 } … … 384 381 height: <?php echo $posttiles_height; ?>px; 385 382 } 386 </style><?php 383 </style> 384 <?php 387 385 388 386 // If jquery is on(true) then output the following … … 416 414 $excerpt_length = '19'; 417 415 } 416 418 417 // Truncates the excerpt length (Not using default wordpress for plugin conflicts) 419 418 $words = explode(' ', $temp_excerpt); … … 427 426 $category = get_the_category(); 428 427 $category_name = $category[0]->cat_name; 428 $category_slug = $category[0]->slug; 429 429 430 430 // Recovering Saved Color Values 431 431 // Define the Settings for recording 432 $cat_var = "cat_".$category_ name;432 $cat_var = "cat_".$category_slug; 433 433 // Make lowercase 434 $cat_var_value = strtolower($cat_var);435 $cat_var = str_replace(" ", "_", $cat_var);434 //$cat_var_value = strtolower($cat_var); 435 //$cat_var = str_replace(" ", "_", $cat_var); 436 436 // Retrieve the option "hexadecimal value" for this category 437 437 $cat_var_value = get_option($cat_var); … … 460 460 // Strip featured image down to the url. 461 461 $url = $thumb['0']; 462 $featured_style = "style='background: url(".$url.") 0 0;' class='featured-image ".$animation_style."'"; 463 } 462 $featured_style = "style='background: url(".$url.") 0 0;' class='featured-image ".$animation_style." ".$cat_var."'"; 463 } else { 464 $featured_style = "class='".$cat_var."'"; 465 } 464 466 } 465 467 // Each output creates the li > link > title > exerpt 466 $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";468 $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"; 467 469 // Each output_key creates a li > category color block > category name 468 470 … … 502 504 // Set's category names 503 505 $cat_var = $category->name; 506 // Sets the slug 507 $cat_slug = $category->slug; 504 508 // Cleans up category names that have spaces 505 $cat_var = str_replace(" ", "_", $cat_var); 506 // Joins the cat_ with the category name to retrieve option 507 $cat_var_key = "cat_".$cat_var; 509 $cat_var_key = "cat_".$cat_slug; 508 510 // Get's the category options which are the hexadecimal colors 509 511 $cat_var_key_val = get_option($cat_var_key); -
post-tiles/trunk/readme.txt
r606934 r623444 5 5 Requires at least: 3.0 6 6 Tested up to: 3.4.2 7 Stable tag: 1.3. 27 Stable tag: 1.3.3 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. 225 Version 1.3.3 26 26 27 27 == Installation == … … 45 45 46 46 == Changelog == 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 47 54 48 55 = 1.3.2 = … … 85 92 == Upgrade Notice == 86 93 87 * Responsive functionality added (Alternate fluid design responds to location width) 88 * Admin controlled animation styles (Bottom, top, right, left and fade) 89 * Admin controlled Tile width and Height 90 * Admin controlled excerpt length 91 * Fixed spelling errors 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 92 98 93 99 == Frequently Asked Questions == … … 96 102 97 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-thumbnails 98 109 99 110 == Arbitrary section ==
Note: See TracChangeset
for help on using the changeset viewer.