本文整理汇总了PHP中serendipity_plugin_api::generate_plugins方法的典型用法代码示例。如果您正苦于以下问题:PHP serendipity_plugin_api::generate_plugins方法的具体用法?PHP serendipity_plugin_api::generate_plugins怎么用?PHP serendipity_plugin_api::generate_plugins使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类serendipity_plugin_api
的用法示例。
在下文中一共展示了serendipity_plugin_api::generate_plugins方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: serendipity_smarty_printSidebar
/**
* Smarty Function: Prints a list of sidebar plugins
*
* @access public
* @param array Smarty parameter input array:
* side: The plugin side to show (left|right|hidden)
* @param object Smarty object
* @return string The HTML code of a plugin's output
*/
function serendipity_smarty_printSidebar($params, &$smarty)
{
if (!isset($params['side'])) {
trigger_error("Smarty Error: " . __FUNCTION__ . ": missing 'side' parameter", E_USER_WARNING);
return;
}
if (isset($params['template'])) {
return serendipity_plugin_api::generate_plugins($params['side'], false, null, null, $params['template']);
} else {
return serendipity_plugin_api::generate_plugins($params['side']);
}
}
示例2: sprintf
echo sprintf(NO_ENTRIES_BLAHBLAH, $serendipity['GET']['searchTerm']);
break;
}
echo sprintf(YOUR_SEARCH_RETURNED_BLAHBLAH, $serendipity["GET"]["searchTerm"], count($r));
serendipity_printEntries($r);
break;
// Show the archive
// Show the archive
case "archives":
serendipity_printArchives();
break;
// Welcome screen or whatever
// Welcome screen or whatever
default:
serendipity_printEntries(serendipity_fetchEntries(null, true, $serendipity['fetchLimit']));
}
?>
<?php
echo $CLOSESHADOW;
?>
</td>
<td valign="top" align="left" class="serendipitySideBar">
<?php
// serendipity_plugin_api::generate_plugins('left', 'span');
serendipity_plugin_api::generate_plugins('right', 'span');
?>
</td>
</tr>
</table>
示例3: serendipity_smarty_printSidebar
/**
* Smarty Function: Prints a list of sidebar plugins
*
* @access public
* @param array Smarty parameter input array:
* side: The plugin side to show (left|right|hidden)
* @param object Smarty object
* @return string The HTML code of a plugin's output
*/
function serendipity_smarty_printSidebar($params, &$smarty)
{
if (!isset($params['side'])) {
$smarty->trigger_error(__FUNCTION__ . ": missing 'side' parameter");
return;
}
if (isset($params['template'])) {
return serendipity_plugin_api::generate_plugins($params['side'], '', false, null, null, $params['template']);
} else {
return serendipity_plugin_api::generate_plugins($params['side']);
}
}