1 capnrob May 26, 2005 00:19
3 capnrob May 26, 2005 12:12
wow - I've been using B2Evo for a couple years now and never found those docs ! I'm gonnna have a ball reading this - thanks much!
4 capnrob May 26, 2005 13:10
and now for my next dumb question - in which file is that set?
5 topanga May 26, 2005 16:20
In your _main.php file ;)
Normally you will have something like this :
<?php $Item->feedback_link( 'comments' ) // Link to comments ?>
change the parameters with whatever you want (looking at the parameters in the tech doc offcourse.
6 capnrob May 26, 2005 19:22
Absolutely perfect! - thanks much.
:D
7 eville84 May 23, 2006 08:32
just an update for folks in here running v0.9.2
I found that you can edit the comment display line easily in this file: b2evocor/_class_item.php
this appears at line 730:
if( $title == '#' ) $title = T_('Display comments / Leave a comment');
if( $zero == '#' ) $zero = T_('Leave a comment');
if( $one == '#' ) $one = T_('1 comment');
if( $more == '#' ) $more = T_('%d comments');
break;
change it to this:
if( $title == '#' ) $title = T_('Display comments / Leave a comment');
if( $zero == '#' ) $zero = T_('Leave a comment');
if( $one == '#' ) $one = T_('Leave a comment - 1 comment');
if( $more == '#' ) $more = T_('Leave a comment - %d comments');
break;
8 yabba May 23, 2006 09:27
There is no need to hack the item class, if you take a look at the code for the function it shows you how to achieve the same effect without hacking :-
/**
* Template function: Displays link to feedback page (under some conditions)
*
* {@internal Item::feedback_link(-)}}
*
* @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 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'
* @param string url to use
*/
function feedback_link( $type = 'feedbacks', $before = '', $after = '',
$zero='#', $one='#', $more='#', $title='#',
$use_popup = '#', $hideifnone = '#', $mode = '', $blogurl='' )
ie/ change skins/<skin name>/_main.php :-
$Item->feedback_link('feedbacks', '', '', 'Leave a comment', 'Leave a comment - 1 comment', 'Leave a comment - %d comments', 'Display comments / Leave a comment' );
¥
feedback_link()
Template function: Displays link to feedback page (under some conditions)
Parameters:
string $type: Type of feedback to link to (feedbacks (all)/comments/trackbacks/pingbacks)
string $before: String to display before the link (if comments are to be displayed)
string $after: String to display after the link (if comments are to be displayed)
string $zero: Link text to display when there are 0 comments
string $one: Link text to display when there is 1 comment
string $more: Link text to display when there are >1 comments (include %d for # of comments)
string $title: Link title
boolean $use_popup: true to use a popup windows ('#' to use if comments_popup_windows() is there)
boolean $hideifnone: true to hide if no feedback ('#' for default)
string $mode: 'pid' or 'title'
string $blogurl: url to use
This is a copy of the technical documentation.
found here : http://doc.b2evolution.net/0.9.0/evocore/Item.html#methodfeedback_link