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


PHP RMFunctions::load_plugin方法代码示例

本文整理汇总了PHP中RMFunctions::load_plugin方法的典型用法代码示例。如果您正苦于以下问题:PHP RMFunctions::load_plugin方法的具体用法?PHP RMFunctions::load_plugin怎么用?PHP RMFunctions::load_plugin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在RMFunctions的用法示例。


在下文中一共展示了RMFunctions::load_plugin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

$modversion['config'][27]['formtype'] = 'textbox';
$modversion['config'][27]['valuetype'] = 'text';
$modversion['config'][27]['default'] = '/usr/sbin/sendmail -bs';
$modversion['config'][28]['name'] = 'rss_enable';
$modversion['config'][28]['title'] = '_MI_RMC_RSSENABLE';
$modversion['config'][28]['description'] = '';
$modversion['config'][28]['formtype'] = 'yesno';
$modversion['config'][28]['valuetype'] = 'int';
$modversion['config'][28]['default'] = 1;
$modversion['config'][29]['name'] = 'blocks_enable';
$modversion['config'][29]['title'] = '_MI_RMC_BLOCKSENABLE';
$modversion['config'][29]['description'] = '';
$modversion['config'][29]['formtype'] = 'yesno';
$modversion['config'][29]['valuetype'] = 'int';
$modversion['config'][29]['default'] = 0;
$modversion['blocks'][] = array('file' => "comments.php", 'name' => __('Comments', 'rmcommon'), 'description' => __('Show comments from internal comments system', 'rmcommon'), 'show_func' => "rmc_bkcomments_show", 'edit_func' => "rmc_bkcomments_edit", 'template' => 'rmc_bk_comments.html', 'options' => "5|1|1|1|1");
$modversion['blocks'][] = array('file' => "custom.php", 'name' => __('Custom Block', 'rmcommon'), 'description' => __('Allows to create a block with custom content.', 'rmcommon'), 'show_func' => "", 'type' => 'custom');
$amod = xoops_getActiveModules();
if (in_array("rmcommon", $amod)) {
    $plugins = RMFunctions::installed_plugins();
    foreach ($plugins as $plugin) {
        $p = RMFunctions::load_plugin($plugin);
        if (!method_exists($p, 'blocks')) {
            continue;
        }
        foreach ($p->blocks() as $block) {
            $block['plugin'] = 1;
            $modversion['blocks'][] = $block;
        }
    }
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:xoops_version.php

示例2: rd_section_forpdf

function rd_section_forpdf($all = 0)
{
    global $section, $res, $xoopsConfig, $xoopsModuleConfig;
    $plugin = RMFunctions::load_plugin('topdf');
    if ($xoopsModuleConfig['permalinks']) {
        $print_book_url = RDFunctions::url() . '/printbook/' . $section->id() . '/';
        $print_section_url = RDFunctions::url() . '/printsection/' . $section->id() . '/';
    } else {
        $print_book_url = XOOPS_URL . '/modules/docs/index.php?page=content&id=' . $section->id() . '&action=printbook';
        $print_section_url = XOOPS_URL . '/modules/docs/index.php?page=content&id=' . $section->id() . '&action=printsection';
    }
    // This options only works when pdfmyurl is enabled on topdf plugin
    $options = array('--filename' => $res->getVar('title') . '.pdf', '--header-left' => $res->getVar('title'), '--header-right' => $xoopsConfig['sitename'], '--header-line' => '1');
    header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
    header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    header("Pragma: no-cache");
    $plugin->create_pdf_url($all ? $print_book_url : $print_section_url, $res->getVar('title') . '.pdf', $options);
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:20,代码来源:content.php

示例3: eventRmcommonEndFlush

 /**
  * This event save the current page if is neccesary
  */
 public function eventRmcommonEndFlush($output)
 {
     global $xoopsUser, $xoopsConfig;
     $plugin = RMFunctions::load_plugin('booster');
     if (!$plugin->get_config('enabled')) {
         return $output;
     }
     if (defined('BOOSTER_NOTSAVE')) {
         return $output;
     }
     $url = RMFunctions::current_url();
     $path = parse_url($url);
     if ($plugin->is_excluded($url)) {
         return $output;
     }
     if ($xoopsUser) {
         $file = XOOPS_CACHE_PATH . '/booster/files/' . md5($url . session_id() . '|' . $xoopsConfig['language']);
         setcookie('booster_session', session_id() . '|' . $xoopsConfig['language'], 0, '/');
     } else {
         $file = XOOPS_CACHE_PATH . '/booster/files/' . md5($url . $xoopsConfig['language']);
     }
     $data = array('uri' => $url, 'created' => time(), 'language' => $xoopsConfig['language']);
     $pos = strpos($output, '<div id="xo-logger-output">');
     if ($pos !== FALSE) {
         file_put_contents($file . '.html', substr($output, 0, $pos) . '<!-- Cached by Booster -->');
     } else {
         file_put_contents($file . '.html', $output . '<!-- Cached by Booster -->');
     }
     file_put_contents($file . '.meta', json_encode($data));
     $plugin->delete_expired();
     return $output;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:35,代码来源:rmcommon.php


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