Recent Topics

1 Apr 19, 2013 18:57    

(using b2evo 4.1.6)

I discovered something today with a blog I'm working on. When I'm logged in, the comment form doesn't display on the index page, just the individual posts. Which is what I want. But if I'm logged out, the comment form shows up after each post on the index page. I'm sure it's an error with my custom skin, but I've compared it to others that I've done that are correct, and I can't figure out what I've done wrong. Any insights?

2 Apr 30, 2013 01:37

Well if it doesn't happen with a default skin then yes it's something you've done. You should be able to remove them. The 'index page' is [posts.main.php[. In it you should have the following code which provides a link:

<?php // Link to comments, trackbacks, etc.:
				  $Item->feedback_link( array(
					 'type' 				=> 'feedbacks',
					 'link_before' 		=> '<span class="feedback">',
					 'link_after' 		=> '</span> ',
					 'link_text_zero' 	=> '#',
					 'link_text_one' 	=> '#',
					 'link_text_more' 	=> '#',
					 'link_title' 		=> '#',
					 'use_popup' 		=> false,
				   ) );
			  ?>

If you have the following code you will have the box. Such code should only be in [page.main.php] and [single.main.php]
The following is from single.main.php

<?php // ------------------ FEEDBACK (COMMENTS/TRACKBACKS) INCLUDED HERE ------------------
		skin_include( '_item_feedback.inc.php', array(
				'before_section_title' => '<h3>',
				'after_section_title'  => '</h3>',
			) );

Line numbers may not be exactly the same

3 May 01, 2013 16:29

I'm not using a custom posts.main.php. It's calling to item.block.php, which has the shorter code you posted. I can send you the files if that would help.

4 May 05, 2013 17:51

Hi have a look at this http://rogerlovejoy.net/blog/b2evo.php/hide-feedback-for-non-members

I made a little hack so that the comments don't show if a) the userID is set and b) if the user level is greater than 1

i.e I have viewers who can't comment as they are level1

You can use the if(isset($current_User)){ which means the user has to be member of the blog. Of course you can set all or any user to be members

EDIT I probably ought to do the same to [page.main.php] to hide comment form from non registered users below level 2
Line numbers on my site are relative not absolute


Form is loading...