本文整理匯總了PHP中plugins::sort_server_plugins方法的典型用法代碼示例。如果您正苦於以下問題:PHP plugins::sort_server_plugins方法的具體用法?PHP plugins::sort_server_plugins怎麽用?PHP plugins::sort_server_plugins使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類plugins
的用法示例。
在下文中一共展示了plugins::sort_server_plugins方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: extraction
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'));
}
} else {
$page['errors'][] = l10n('Can\'t connect to server.');
}
$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');