Recent Topics

1 Jan 19, 2007 04:26    

Which lines of code that show the "leave Comment" in the _feedback.php file.

I want to display the "Leave Comment" link even if there are comment.

I'm using b2evo 1.9.1

2 Jan 21, 2007 17:04

If you take a look at the possible parameters to the function (inc/model/items/_item.class.php about 1,500 lines down the page ...ish), you should be able to set them up to your preferences from inside your _main.php

	/**
	 * Template function: Displays link to feedback page (under some conditions)
	 *
	 * @param string Type of feedback to link to (feedbacks (all)/comments/trackbacks/pingbacks)
	 * @param string String to display before the link (if comments are to be displayed)
	 * @param string String to display after the link (if comments are to be displayed)
	 * @param string Link text to display when there are 0 comments
	 * @param string Link text to display when there is 1 comment
	 * @param string Link text to display when there are >1 comments (include %d for # of comments)
	 * @param string Link title
	 * @param string Status of feedbacks to count
	 * @param boolean true to use a popup windows ('#' to use if comments_popup_windows() is there)
	 * @param boolean true to hide if no feedback ('#' for default)
	 * @param string 'pid' or 'title'; 'none' for NO LINK
	 * @param string url to use
	 */
	function feedback_link( $type = 'feedbacks', $before = '', $after = '',
													$zero = '#', $one = '#', $more = '#', $title='#', $status = 'published',
													$use_popup = '#',	$hideifnone = '#', $mode = '', $blogurl = '' )

it'd end up looking something like :-

			<?php $Item->feedback_link( 'comments', '' , '', 'Leave a comment', 'Leave a comment', 'Leave a comment') // Link to comments ?>

¥

3 Jan 21, 2007 17:14

Do you mean replace the function line with this one you suggested. I don't want to lose the # comments if there are comments.

Thanks,

4 Jan 21, 2007 17:19

No, that code is for your skins _main.php

Basically it works like this :-

<?php $Item->feedback_link( 'comments', '' , '', 'text when there are no comments', 'text when there is one comment', 'text when there is more than one comment and %d will be replaced by the number of comments') // Link to comments ?>

¥

5 Jan 21, 2007 17:33

Thanks, this is exactly what I want. But is there away to make the link jump to leave comment form?

6 Jan 21, 2007 17:48

Damn, give someone an inch and they want a mile!

You can achieve that by editing /skins/_feedback.php ( or skins/<skinname>/_feedback.php ..... whichever you find this line in ;) ) and moving this line :-

echo '<a id="feedbacks"></a>';


to just above the form (so it looks something like this)

<!-- form to add a comment -->
		<?php
		echo '<a id="feedbacks"></a>';
		$Form = & new Form( $htsrv_url.'comment_post.php', 'bComment_form_id_'.$Item->ID );

¥

7 Jan 21, 2007 17:56

Thanks for the mile. I know I'm asking too much, but believe me I tried so hard to resolve it before I posted my topic.

8 Jan 21, 2007 18:13

Not a problem, glad you've got it sorted ;)

¥

9 Jan 21, 2007 18:50

Sorry Y&BB&,

The leave comment goes to the form in my home blog

http://www.alkhater.net/en_blog

with the code you suggested, but if you go to my guest book it does not do that even when I added the line you proposed.


Form is loading...