Powered by MediaWiki
Personal tools

Tag plugins call by code

From b2evolution manual

Jump to: navigation, search

This tag display plugin.

[edit] Example

The calendar plugin. Its code is evo_Calr.

// Calendar plugin
$Plugins->call_by_code( 'evo_Calr', array(
     'block_start'        => '',
     'block_end'          => '',
     'displaycaption'     => true,
     'linktomontharchive' => false,
  ) );
// Calendar plugin
$Plugins->call_by_code( 'evo_Calr', array(
     'block_start'        => '',
     'block_end'          => '',
     'displaycaption'     => true,
     'linktomontharchive' => false,
     'headerdisplay'      => 'e',
     'tablestart'         => '<table id="wp-calendar" class="bCalendarTable" cellspacing="0" summary="Monthly calendar with links to each day\'s posts">'."\n",
		) );

The archive plugin. Its code is evo_Arch.

// Archives plugin
$Plugins->call_by_code( 'evo_Arch', array(
     'block_start'       => '<div class="bSideItem">',
     'block_end'         => '</div>',
     'block_title_start' => '<h3>',
     'block_title_end'   => '</h3>',
			) );

The bookmarklet plugin. Its code is cafeBkmk.

// Bookmarklet plugin 
$Plugins->call_by_code( 'cafeBkmk', array(
     'block_start'        => '',
     'block_end'          => '',
     'displaycaption'     => true
  ) );

[edit] Parameters

Name Default Usage
block_start (no space) Displayed before calendar.
block_end (no space) Displayed after calendar.
displaycaption true Display caption, if 'displaycaption' is true.
linktomontharchive false Display link to monthly archive, if 'linktomontharchive' is true.

[edit] Return value

This function return false, if there is no calendar plugin.
If calendar plugin is available then this function return true and displays content.