Changeset 514003
- Timestamp:
- 03/03/2012 06:22:50 PM (14 years ago)
- Location:
- blog-in-blog
- Files:
-
- 2 edited
- 4 copied
-
tags/1.1.1 (copied) (copied from blog-in-blog/trunk)
-
tags/1.1.1/blog-in-blog.php (copied) (copied from blog-in-blog/trunk/blog-in-blog.php) (6 diffs)
-
tags/1.1.1/options.php (copied) (copied from blog-in-blog/trunk/options.php)
-
tags/1.1.1/readme.txt (copied) (copied from blog-in-blog/trunk/readme.txt) (2 diffs)
-
trunk/blog-in-blog.php (modified) (6 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
blog-in-blog/tags/1.1.1/blog-in-blog.php
r448848 r514003 5 5 Plugin URI: http://informationtakesover.co.uk/blog-in-blog-wordpress-plugin/ 6 6 Description: Create a blog within a blog using a category, post_type or tag. This plugin basically shows selected posts on a page using shortcodes. 7 Version: 1.1 7 Version: 1.1.1 8 8 Author: Tim Hodson 9 9 Author URI: http://timhodson.com … … 33 33 34 34 if (!defined('BIB_VERSION')) 35 define('BIB_VERSION', '1.1 ');35 define('BIB_VERSION', '1.1.1'); 36 36 37 37 // Pre-2.6 compatibility … … 209 209 210 210 $data['post_id'] = $post->ID; 211 // Because some filters are not working in the same context as our individual posts, 212 // we need to track the current post id in a global variable! 213 $blog_in_blog_opts['current_post_id'] = $post->ID; 211 214 212 215 $data['post_date'] = date_i18n($blog_in_blog_opts['date_format'], strtotime($post->post_date)); … … 346 349 // adjust the offsett 347 350 if($blog_in_blog_opts['hidefirst'] != '' ){ 348 $params['offset'] = intval($blog_in_blog_opts['hidefirst']) + intval($blog_in_blog_opts['offset']); 351 if($blog_in_blog_opts['offset'] != ''){ 352 $params['offset'] = intval($blog_in_blog_opts['hidefirst']) + intval($blog_in_blog_opts['offset']); 353 } else { 354 $params['offset'] = intval($blog_in_blog_opts['hidefirst']); 355 } 349 356 }else{ 350 357 $params['offset'] = $blog_in_blog_opts['offset']; … … 648 655 } 649 656 657 /** 658 * We need to know the post id of the post we are dealing with and not 659 * the post of the page containing the BIB shortcode, so have a global being 660 * reset with the current post id each time. 661 */ 650 662 add_filter('excerpt_more', 'bib_filter_excerpt_more' , 99 ,2); 651 663 function bib_filter_excerpt_more($more, $excerpt=''){ 652 664 //$more isn't actually used, because we want to dump whatever has been applied to more already, and use our own. 653 665 global $post ; 666 global $blog_in_blog_opts ; 654 667 bib_write_debug(__FUNCTION__, "Using excerpt more filter"); 655 $output = "$excerpt <a href=\"" . get_permalink($post->ID). "#more-{$post->ID}'\" class=\"more-link\">".get_option('bib_more_link_text')."</a>"; 668 669 bib_write_debug(__FUNCTION__, "The permalink from wordpress is: ".get_permalink($blog_in_blog_opts['current_post_id'])); 670 bib_write_debug(__FUNCTION__, "The post ID is: ".$blog_in_blog_opts['current_post_id']); 671 672 $output = "$excerpt <a href=\"" . get_permalink($blog_in_blog_opts['current_post_id']) . "#more-{$blog_in_blog_opts['current_post_id']}'\" class=\"more-link\">".get_option('bib_more_link_text')."</a>"; 656 673 bib_write_debug(__FUNCTION__, "Generated this link:{$output}"); 657 674 … … 1122 1139 function bib_write_debug($function, $msg) { 1123 1140 global $blog_in_blog_opts; 1124 1125 $msg = "; " . $function . " :: ".$msg."\n" ; 1126 1127 if(!isset ($blog_in_blog_opts['debug_output'])){ 1128 $blog_in_blog_opts['debug_output'] = "==================== Started Ouput ==================\n"; 1129 $blog_in_blog_opts['debug_output'] .= $msg."\n"; 1130 } 1131 else { 1132 $blog_in_blog_opts['debug_output'] .= $msg; 1133 } 1134 1141 1142 $OPT = get_option('bib_debug'); 1143 if($OPT){ 1144 $msg = "; " . $function . " :: ".$msg."\n" ; 1145 1146 if(!isset ($blog_in_blog_opts['debug_output'])){ 1147 $blog_in_blog_opts['debug_output'] = "==================== Started Ouput ==================\n"; 1148 $blog_in_blog_opts['debug_output'] .= $msg."\n"; 1149 } 1150 else { 1151 $blog_in_blog_opts['debug_output'] .= $msg; 1152 } 1153 } 1135 1154 } 1136 1155 -
blog-in-blog/tags/1.1.1/readme.txt
r448848 r514003 4 4 Tags: categories, blog, hide, cms 5 5 Requires at least: 3.0 6 Tested up to: 3. 27 Stable tag: 1.1 6 Tested up to: 3.3.1 7 Stable tag: 1.1.1 8 8 9 9 This plugin shows posts from a category on any page you like using shortcodes. Create multiple blogs within a blog using a category. Hode posts in a specific category from your homepage. … … 193 193 == Changelog == 194 194 195 = 1.1.1 = 196 197 * Fixed: Read more links for post excerpts are now fixed. 198 * Fixed: Better calculation of offset if hidefirst n posts is used. 199 195 200 = 1.1 = 196 201 -
blog-in-blog/trunk/blog-in-blog.php
r448848 r514003 5 5 Plugin URI: http://informationtakesover.co.uk/blog-in-blog-wordpress-plugin/ 6 6 Description: Create a blog within a blog using a category, post_type or tag. This plugin basically shows selected posts on a page using shortcodes. 7 Version: 1.1 7 Version: 1.1.1 8 8 Author: Tim Hodson 9 9 Author URI: http://timhodson.com … … 33 33 34 34 if (!defined('BIB_VERSION')) 35 define('BIB_VERSION', '1.1 ');35 define('BIB_VERSION', '1.1.1'); 36 36 37 37 // Pre-2.6 compatibility … … 209 209 210 210 $data['post_id'] = $post->ID; 211 // Because some filters are not working in the same context as our individual posts, 212 // we need to track the current post id in a global variable! 213 $blog_in_blog_opts['current_post_id'] = $post->ID; 211 214 212 215 $data['post_date'] = date_i18n($blog_in_blog_opts['date_format'], strtotime($post->post_date)); … … 346 349 // adjust the offsett 347 350 if($blog_in_blog_opts['hidefirst'] != '' ){ 348 $params['offset'] = intval($blog_in_blog_opts['hidefirst']) + intval($blog_in_blog_opts['offset']); 351 if($blog_in_blog_opts['offset'] != ''){ 352 $params['offset'] = intval($blog_in_blog_opts['hidefirst']) + intval($blog_in_blog_opts['offset']); 353 } else { 354 $params['offset'] = intval($blog_in_blog_opts['hidefirst']); 355 } 349 356 }else{ 350 357 $params['offset'] = $blog_in_blog_opts['offset']; … … 648 655 } 649 656 657 /** 658 * We need to know the post id of the post we are dealing with and not 659 * the post of the page containing the BIB shortcode, so have a global being 660 * reset with the current post id each time. 661 */ 650 662 add_filter('excerpt_more', 'bib_filter_excerpt_more' , 99 ,2); 651 663 function bib_filter_excerpt_more($more, $excerpt=''){ 652 664 //$more isn't actually used, because we want to dump whatever has been applied to more already, and use our own. 653 665 global $post ; 666 global $blog_in_blog_opts ; 654 667 bib_write_debug(__FUNCTION__, "Using excerpt more filter"); 655 $output = "$excerpt <a href=\"" . get_permalink($post->ID). "#more-{$post->ID}'\" class=\"more-link\">".get_option('bib_more_link_text')."</a>"; 668 669 bib_write_debug(__FUNCTION__, "The permalink from wordpress is: ".get_permalink($blog_in_blog_opts['current_post_id'])); 670 bib_write_debug(__FUNCTION__, "The post ID is: ".$blog_in_blog_opts['current_post_id']); 671 672 $output = "$excerpt <a href=\"" . get_permalink($blog_in_blog_opts['current_post_id']) . "#more-{$blog_in_blog_opts['current_post_id']}'\" class=\"more-link\">".get_option('bib_more_link_text')."</a>"; 656 673 bib_write_debug(__FUNCTION__, "Generated this link:{$output}"); 657 674 … … 1122 1139 function bib_write_debug($function, $msg) { 1123 1140 global $blog_in_blog_opts; 1124 1125 $msg = "; " . $function . " :: ".$msg."\n" ; 1126 1127 if(!isset ($blog_in_blog_opts['debug_output'])){ 1128 $blog_in_blog_opts['debug_output'] = "==================== Started Ouput ==================\n"; 1129 $blog_in_blog_opts['debug_output'] .= $msg."\n"; 1130 } 1131 else { 1132 $blog_in_blog_opts['debug_output'] .= $msg; 1133 } 1134 1141 1142 $OPT = get_option('bib_debug'); 1143 if($OPT){ 1144 $msg = "; " . $function . " :: ".$msg."\n" ; 1145 1146 if(!isset ($blog_in_blog_opts['debug_output'])){ 1147 $blog_in_blog_opts['debug_output'] = "==================== Started Ouput ==================\n"; 1148 $blog_in_blog_opts['debug_output'] .= $msg."\n"; 1149 } 1150 else { 1151 $blog_in_blog_opts['debug_output'] .= $msg; 1152 } 1153 } 1135 1154 } 1136 1155 -
blog-in-blog/trunk/readme.txt
r448848 r514003 4 4 Tags: categories, blog, hide, cms 5 5 Requires at least: 3.0 6 Tested up to: 3. 27 Stable tag: 1.1 6 Tested up to: 3.3.1 7 Stable tag: 1.1.1 8 8 9 9 This plugin shows posts from a category on any page you like using shortcodes. Create multiple blogs within a blog using a category. Hode posts in a specific category from your homepage. … … 193 193 == Changelog == 194 194 195 = 1.1.1 = 196 197 * Fixed: Read more links for post excerpts are now fixed. 198 * Fixed: Better calculation of offset if hidefirst n posts is used. 199 195 200 = 1.1 = 196 201
Note: See TracChangeset
for help on using the changeset viewer.