本文整理汇总了PHP中plugins::get_server_plugins方法的典型用法代码示例。如果您正苦于以下问题:PHP plugins::get_server_plugins方法的具体用法?PHP plugins::get_server_plugins怎么用?PHP plugins::get_server_plugins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类plugins
的用法示例。
在下文中一共展示了plugins::get_server_plugins方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: extraction
$page['errors'][] = l10n('Can\'t download archive.');
break;
case 'archive_error':
$page['errors'][] = l10n('Can\'t read or extract archive.');
break;
default:
$page['errors'][] = l10n('An error occured during extraction (%s).', htmlspecialchars($_GET['installstatus']));
$page['errors'][] = l10n('Please check "plugins" folder and sub-folders permissions (CHMOD).');
}
}
//---------------------------------------------------------------Order options
$template->assign('order_options', array('date' => l10n('Post date'), 'revision' => l10n('Last revisions'), 'name' => l10n('Name'), 'author' => l10n('Author'), 'downloads' => l10n('Number of downloads')));
// +-----------------------------------------------------------------------+
// | start template output |
// +-----------------------------------------------------------------------+
if ($plugins->get_server_plugins(true)) {
/* order plugins */
if (pwg_get_session_var('plugins_new_order') != null) {
$order_selected = pwg_get_session_var('plugins_new_order');
$plugins->sort_server_plugins($order_selected);
$template->assign('order_selected', $order_selected);
} else {
$plugins->sort_server_plugins('date');
$template->assign('order_selected', 'date');
}
foreach ($plugins->server_plugins as $plugin) {
$ext_desc = trim($plugin['extension_description'], " \n\r");
list($small_desc) = explode("\n", wordwrap($ext_desc, 200));
$url_auto_install = htmlentities($base_url) . '&revision=' . $plugin['revision_id'] . '&extension=' . $plugin['extension_id'] . '&pwg_token=' . get_pwg_token();
$template->append('plugins', array('ID' => $plugin['extension_id'], 'EXT_NAME' => $plugin['extension_name'], 'EXT_URL' => PEM_URL . '/extension_view.php?eid=' . $plugin['extension_id'], 'SMALL_DESC' => trim($small_desc, " \r\n"), 'BIG_DESC' => $ext_desc, 'VERSION' => $plugin['revision_name'], 'REVISION_DATE' => preg_replace('/[^0-9]/', '', $plugin['revision_date']), 'AUTHOR' => $plugin['author_name'], 'DOWNLOADS' => $plugin['extension_nb_downloads'], 'URL_INSTALL' => $url_auto_install, 'URL_DOWNLOAD' => $plugin['download_url'] . '&origin=piwigo_download'));
}