Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » New Versions, & Updating » Old Version fixes and change logs »

[SOLVED] BUGFIX - 343 - Comments show 'Leave a Comment' even when comments are clos


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Sep 29, 2009, 08:54 AM
juggledad's Avatar
juggledad
 
20,010 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
this is a bug that was first introduced in version 3.3.3 due to a change in the way comment information was checked. The following change will do the following:

if comments are open it will display text string 1, 2, or 3 depending on which is appropriate

if comments are closed it will display
- nothing if text string 4 is 'dontshow'
- text string 4 if there are no comments, or
- text string 2 or 3 depending on the number of comments followed by text string 4

Edit bfa_postinfo.php and replace
line 23 (version 3.4.3)
HTML Code:
	global $bfa_ata;
with
HTML Code:
	global $bfa_ata, $post;
replace lines
lines 346-363 (version 3.4.3)
HTML Code:
	// Comment link
	if ( strpos($postinfo_string,'%comments(') !== FALSE ) {
		
		$comment_options = preg_match("/(.*)%comments\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i",
        $postinfo_string,$comment_matches);
		if ( !comments_open() AND $comment_matches[8] == "dontshow" ) { 
			$comment_link = ''; 
		} else { 
			ob_start(); 
				comments_popup_link($comment_matches[2], $comment_matches[4],
         		 $comment_matches[6], 'comments-link', $comment_matches[8]);
				$comment_link = ob_get_contents(); 
			ob_end_clean(); 
		}
		$postinfo = preg_replace("/(.*)%comments\((.*?)\)%(.*)/i", "\${1}" .
        $comment_link. "\${3}", $postinfo);
        
	}
with
HTML Code:
	// Comment link
	if ( strpos($postinfo_string,'%comments(') !== FALSE ) {
		
		$comment_options = preg_match("/(.*)%comments\('(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*?)'(.*)/i",
        $postinfo_string,$comment_matches);
        
		if ( !comments_open() AND $comment_matches[8] == "dontshow" ) { 
			$comment_link = ''; 
		} else { 
			ob_start(); 
				comments_popup_link($comment_matches[2], $comment_matches[4],
         		 $comment_matches[6], 'comments-link', $comment_matches[8]);
				$comment_link = ob_get_contents(); 
			ob_end_clean(); 
		}

		if (!comments_open() ) {
			if ($post->comment_count == 0) {
				$comment_link = '<strong>' . $comment_matches[8] . '</strong>';
			} else {
				$comment_link = $comment_link . ' - <strong>(' . $comment_matches[8] . ')</strong>';
				}
		}
		if ( !comments_open() AND $comment_matches[8] == "dontshow" ) { 
			$comment_link = ''; 
		}
		
		$postinfo = preg_replace("/(.*)%comments\((.*?)\)%(.*)/i", "\${1}" .
        $comment_link. "\${3}", $postinfo);
        
	}

Last edited by juggledad; Sep 29, 2009 at 08:57 AM.
  #2  
Old Sep 29, 2009, 07:07 PM
juggledad's Avatar
juggledad
 
20,010 posts · Mar 2009
OSX 10.6.8/10.7.3 WP 2.8.x/2.9.x/3.x Atahualpa 3.5.x/3.7.x Safari 5.x Firefox 11 XP
Fixed in 3.4.4

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BUGFIX - 3.4.1-&gt;3.4.6 - Comment form will not show up after first comment on juggledad Comments, trackbacks & pings 49 Jul 29, 2010 06:01 PM
Comment Link Redirects to the Top of Page and No Comments Show The Gourmand & the Peasan Comments, trackbacks & pings 3 Jun 3, 2010 08:47 AM
[SOLVED] How do I show &quot;Leave A Comment&quot; after there are already comments to a post? despr8caregiver Comments, trackbacks & pings 2 Apr 27, 2010 10:49 PM
Show and Hide comments using 'Show Comments' link Alexa Comments, trackbacks & pings 4 Feb 17, 2010 11:51 AM
On comments page for post Leave a Reply and comments are white daisy24 Comments, trackbacks & pings 4 Feb 19, 2009 06:40 AM


All times are GMT -6. The time now is 02:13 AM.


Powered by vBulletin® Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.