Powered by MediaWiki
Personal tools

Tag item feedback link

From b2evolution manual

Jump to: navigation, search

Displays a link to feedback for an Item. Feedback includes comments, trackbacks & pingbacks.

The tag can display how many feedbacks there are for an item.

The tag can show all feedbacks or only a specific type like just comments, or just tackbacks, etc.

[edit] Example

$Item->feedback_link( array(
     'type'             => 'feedbacks',
     'status'           => 'published',
     'link_before'      => '',
     'link_after'       => '',
     'link_text_zero'   => '#',
     'link_text_one'    => '#',
     'link_text_more'   => '#',
     'link_anchor_zero' => '#',
     'link_anchor_one'  => '#',
     'link_anchor_more' => '#',     
     'link_title'       => '#',
     'use_popup'        => false,
     'url'              => '#',
  ) );

[edit] Parameters

Name Default Usage
type 'feedbacks' Type of the link. It can be one of the following: feedbacks, comments, trackbacks, pingbacks
status 'published' Type of feedbacks to show.
link_before (no space) Displayed before the link.
link_after (no space) Displayed after the link.
link_text_zero '#' Link text if there are zero feedbacks, '#' for default. If 'link_text_zero' => '#' then it displays nothing.
link_text_one '#' Link text if there is one feedback, '#' for default. If 'link_text_one' => '#' then it displays default text.
link_text_more '#' Link text if there are more than one feedback, '#' for default. If 'link_text_more' => '#' then it displays default text.
link_anchor_zero '#' Link anchor if there are zero feedbacks, '#' for default. If 'link_anchor_zero' => '#' then anchor won't be added. This parameter is used with 'url' parameter.
link_anchor_one '#' Link anchor if there is one feedback, '#' for default. If 'link_anchor_one' => '#' then anchor won't be added. This parameter is used with 'url' parameter.
link_anchor_more '#' Link anchor if there are more than one feedback, '#' for default. If 'link_anchor_more' => '#' then anchor won't be added. This parameter is used with 'url' parameter.
link_title '#' Link title/alt. If 'link_title' => '#' then it displays default title/alt.
use_popup false Don't open feedbacks in new popup window. If 'use_popup' => true then feedbacks will be opened in popup window.
url '#' Special feedback URL. If 'url' => '#' then it displays default URL.

[edit] Return value

This function return false, if feedbacks are disabled.
If feedbacks are enabled then this function return true and displays content.