当前位置: 首页>>代码示例>>PHP>>正文


PHP plugins::get_server_plugins方法代码示例

本文整理汇总了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'));
    }
开发者ID:donseba,项目名称:Piwigo,代码行数:31,代码来源:plugins_new.php


注:本文中的plugins::get_server_plugins方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。