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


PHP RMPageNav::set_template方法代码示例

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


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

示例1: eventRmcommonTextTodisplay

 public function eventRmcommonTextTodisplay($text, $source)
 {
     if (defined("XOOPS_CPFUNC_LOADED")) {
         return $text;
     }
     $search = "/\\[gallery (.*?)\\]/is";
     $replace = "\$1";
     $amatches = array();
     $count = preg_match_all($search, $text, $amatches);
     if ($count <= 0) {
         return $text;
     }
     for ($ic = 0; $ic < $count; $ic++) {
         $matches = array($amatches[0][$ic], $amatches[1][$ic]);
         $search = explode(" ", strip_tags($matches[1]));
         foreach ($search as $i) {
             $t = explode("=", $i);
             ${$t}[0] = $t[1];
         }
         include_once XOOPS_ROOT_PATH . '/modules/galleries/class/gsfunctions.class.php';
         $data = GSFunctions::load_images($id, $num, 1);
         if (empty($data)) {
             $text = str_replace($matches[0], '', $text);
             continue;
         }
         $images = $data['images'];
         if (!defined("GS_INCLUDED_GALS")) {
             if (RMFunctions::plugin_installed("lightbox")) {
                 RMLightbox::get()->add_element('.gs_gsl_item a');
                 RMLightbox::get()->render();
             }
             RMTemplate::get()->add_xoops_style('inclusion.css', 'galleries');
             RMTemplate::get()->add_local_script('inclusion.js', 'galleries');
             RMTemplate::get()->add_head('<script type="text/javascript">var gsurl = "' . XOOPS_URL . '/modules/galleries";</script>');
             define("GS_INCLUDED_GALS", 1);
         }
         // Pagination
         $page = $data['current'];
         $limit = $data['limit'];
         $num = $data['total'];
         $set = $data['set'];
         if ($full == 'true') {
             $nav = new RMPageNav($num, $limit, $page);
             $nav->set_template(RMTemplate::get()->get_template("other/gs_nav_included.php", "module", "galleries"));
             $nav->target_url($set['id'] . ',' . $limit);
         }
         $content = '';
         ob_start();
         echo '<div class="gals_loader">';
         include RMTemplate::get()->get_template('other/gs_gals_inclusion.php', 'module', 'galleries');
         echo '</div>';
         $content = ob_get_clean();
         $text = str_replace($matches[0], $content, $text);
     }
     return $text;
 }
开发者ID:laiello,项目名称:bitcero-modules,代码行数:56,代码来源:rmcommon.php

示例2: elseif

} elseif ($action == 'load_structure') {
    include RMTemplate::get()->get_template('other/gs_for_editor.php', 'module', 'galleries');
    die;
} elseif ($action == 'load_included') {
    if (!$xoopsSecurity->checkReferer()) {
        die;
    }
    $set = rmc_server_var($_POST, 'set', 0);
    $page = rmc_server_var($_POST, 'page', 1);
    $limit = rmc_server_var($_POST, 'limit', 0);
    $full = true;
    if ($set <= 0 || $limit <= 0) {
        die;
    }
    include_once XOOPS_ROOT_PATH . '/modules/galleries/class/gsfunctions.class.php';
    $data = GSFunctions::load_images($set, $limit, $page);
    if (empty($data)) {
        die;
    }
    $images = $data['images'];
    // Pagination
    $page = $data['current'];
    $limit = $data['limit'];
    $num = $data['total'];
    $set = $data['set'];
    $nav = new RMPageNav($num, $limit, $page);
    $nav->set_template(RMTemplate::get()->get_template("other/gs_nav_included.php", "module", "galleries"));
    $nav->target_url($set['id'] . ',' . $limit);
    include RMTemplate::get()->get_template('other/gs_gals_inclusion.php', 'module', 'galleries');
    die;
}
开发者ID:laiello,项目名称:bitcero-modules,代码行数:31,代码来源:ajax-functions.php


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