Powered by MediaWiki
Personal tools

Tag item author

From b2evolution manual

Jump to: navigation, search

This is not in any 2.1 skin (yet), but it works just fine:

Display author/creator of item. The tag can display not only author/creator name, but also his/her avatar.

[edit] Example

<source lang="php"> <?php

 $Item->author( array(
     'before'       => T_('By '),
     'after'        => ' ',
     'link_to'      => 'userpage',
     'link_text'    => 'preferredname',
     'link_rel'     => ,
     'link_class'   => ,
     'thumb_size'   => 'crop-32x32',
     'thumb_class'  => 
   ) );

?> </source>

[edit] Parameters

Name Default Usage
before (1 space) Displayed before the author name or avatar.
after (1 space) Displayed after the author name or avatar.
link_to 'userpage' Link to user page, if 'link_to' => 'userpage'. Link to user URL, if 'link_to' => 'userurl'.
link_text 'preferredname' Display user prefered name, if 'link_text' => 'preferredname'. Display avatar instead user name, if 'link_text' => 'avatar'.
link_rel (no space) By adding 'link_rel' => 'tag' to a hyperlink, a page indicates that the destination of that hyperlink is an author-designated "tag" (or keyword/subject).
link_class (no space) Link CSS class.
thumb_size 'crop-32x32' Avatar size used if 'link_text' => 'avatar'.
thumb_class (no space) Avatar(image) CSS class.

[edit] Return value

This tag displays content only, it does not have a return value.