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


PHP Channel::parse_weblog_entries方法代码示例

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


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

示例1: prep_occurrences_output


//.........这里部分代码省略.........
         }
         unset($CDT);
         //	----------------------------------------
         //	Redeclare
         //	----------------------------------------
         //	We will reassign the $channel->query->result with our
         //	reordered array of values. Thank you PHP for being so fast with array loops.
         //	----------------------------------------
         if (APP_VER < 2.0) {
             $channel->query->result = $channel->query->result;
         } else {
             $channel->query->result_array = $channel->query->result;
         }
         // --------------------------------------------
         //  Typography
         // --------------------------------------------
         if (APP_VER < 2.0) {
             if (!class_exists('Typography')) {
                 require PATH_CORE . 'core.typography' . EXT;
             }
             $channel->TYPE = new Typography();
             $channel->TYPE->convert_curly = FALSE;
         } else {
             ee()->load->library('typography');
             ee()->typography->initialize();
             ee()->typography->convert_curly = FALSE;
         }
         $channel->fetch_categories();
         // -------------------------------------
         //  Parse
         // -------------------------------------
         //ee()->TMPL->log_item('Calendar: Parsing, via channel module');
         if (APP_VER < 2.0) {
             $channel->parse_weblog_entries();
         } else {
             $channel->parse_channel_entries();
         }
         // -------------------------------------
         //  Paginate
         // -------------------------------------
         //$channel->add_pagination_data();
         // -------------------------------------
         //  Related entries
         // -------------------------------------
         if (count(ee()->TMPL->related_data) > 0 and count($channel->related_entries) > 0) {
             $channel->parse_related_entries();
         }
         if (count(ee()->TMPL->reverse_related_data) > 0 and count($channel->reverse_related_entries) > 0) {
             $channel->parse_reverse_related_entries();
         }
         // -------------------------------------
         //  Send 'em home
         // -------------------------------------
         $tagdata = $channel->return_data;
         // -------------------------------------
         //  Collect the tagdata
         // -------------------------------------
         preg_match_all("/" . LD . 'occurrences id="(\\d+)"' . RD . '(.*?)' . LD . preg_quote(T_SLASH, '/') . 'occurrences' . RD . '/s', $tagdata, $matches);
         foreach ($matches[1] as $k => $id) {
             $tagdatas[$id] = $matches[2][$k];
         }
         //ee()->TMPL = ee()->TMPL_orig;
     }
     // -------------------------------------
     //  Date and time variables
     // -------------------------------------
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:67,代码来源:mod.calendar.php

示例2: rank


//.........这里部分代码省略.........
            $channel->favorites_date = TRUE;
            $channel->sql = preg_replace("/\\s+FROM\\s+/s", ", f.entry_date AS favorites_date FROM ", ltrim($channel->sql));
            $channel->sql = preg_replace("/LEFT JOIN\\s+{$this->sc->db->channels}/is", "LEFT JOIN \texp_favorites AS f \r\n\t\t\t\t ON \t\t(t.entry_id = f.entry_id\r\n\t\t\t\t AND \t\tf.favorites_id \r\n\t\t\t\t IN \t\t(SELECT MAX(favorites_id) FROM exp_favorites GROUP BY entry_id))\r\n        \t\t LEFT JOIN \t{$this->sc->db->channels}", $channel->sql);
        }
        $channel->query = ee()->db->query($channel->sql);
        if (APP_VER < 2.0) {
            $channel->query->result = $channel->query->result_array();
        }
        //	----------------------------------------
        //	Empty?
        //	----------------------------------------
        if (!isset($channel->query) or $channel->query->num_rows() == 0) {
            return $this->no_results();
        }
        //	----------------------------------------
        //	typography
        //	----------------------------------------
        if (APP_VER < 2.0) {
            if (!class_exists('Typography')) {
                require PATH_CORE . 'core.typography' . EXT;
            }
            $channel->TYPE = new Typography();
            $channel->TYPE->convert_curly = FALSE;
        } else {
            ee()->load->library('typography');
            ee()->typography->initialize();
            ee()->typography->convert_curly = FALSE;
        }
        $channel->fetch_categories();
        // ----------------------------------------
        //  Parse and return entry data
        // ----------------------------------------
        if (APP_VER < 2.0) {
            $channel->parse_weblog_entries();
        } else {
            $channel->parse_channel_entries();
        }
        // --------------------------------------------
        //  Render the Pagination Data
        // --------------------------------------------
        if (APP_VER >= '2.4.0') {
            $channel->return_data = $channel->pagination->render($channel->return_data);
        } else {
            $channel->add_pagination_data();
        }
        // --------------------------------------------
        //  Reverse and Related Entries
        // --------------------------------------------
        if (count(ee()->TMPL->related_data) > 0 and count($channel->related_entries) > 0) {
            $channel->parse_related_entries();
        }
        if (count(ee()->TMPL->reverse_related_data) > 0 and count($channel->reverse_related_entries) > 0) {
            $channel->parse_reverse_related_entries();
        }
        // ----------------------------------------
        //  Handle problem with pagination segments
        //	in the url
        // ----------------------------------------
        if (preg_match("#(/P\\d+)#", ee()->uri->uri_string, $match)) {
            $channel->return_data = str_replace($match['1'], "", $channel->return_data);
        } elseif (preg_match("#(P\\d+)#", ee()->uri->uri_string, $match)) {
            $channel->return_data = str_replace($match['1'], "", $channel->return_data);
        }
        // ----------------------------------------
        //  Pagination Replace
        // ----------------------------------------
开发者ID:thomasvandoren,项目名称:teentix-site,代码行数:67,代码来源:mod.favorites.php

示例3: _entries


//.........这里部分代码省略.........
     /**	----------------------------------------
     		/**	Pass params
     		/**	----------------------------------------*/
     ee()->TMPL->tagparams['entry_id'] = $this->entry_id;
     ee()->TMPL->tagparams['inclusive'] = '';
     if (isset($params['dynamic']) and $params['dynamic'] == "off") {
         if (APP_VER < 2.0) {
             ee()->TMPL->tagparams['dynamic'] = 'off';
         } else {
             ee()->TMPL->tagparams['dynamic'] = 'no';
         }
     }
     /**	----------------------------------------
     		/**	Pre-process related data
     		/**	----------------------------------------*/
     ee()->TMPL->tagdata = ee()->TMPL->assign_relationship_data(ee()->TMPL->tagdata);
     ee()->TMPL->var_single = array_merge(ee()->TMPL->var_single, ee()->TMPL->related_markers);
     /**	----------------------------------------
     		/**	Execute needed methods
     		/**	----------------------------------------*/
     if (APP_VER < 2.0) {
         $channel->fetch_custom_weblog_fields();
     } else {
         $channel->fetch_custom_channel_fields();
     }
     $channel->fetch_custom_member_fields();
     // --------------------------------------------
     //  Pagination Tags Parsed Out
     // --------------------------------------------
     if (APP_VER >= '2.4.0') {
         $channel->pagination->get_template();
     } else {
         $channel->fetch_pagination_data();
     }
     if (APP_VER >= '2.4.0') {
         $channel->pagination->cfields = $channel->cfields;
         $channel->pagination->build();
     } else {
         $channel->create_pagination();
     }
     /**	----------------------------------------
     		/**	Grab entry data
     		/**	----------------------------------------*/
     //$channel->create_pagination();
     $channel->build_sql_query();
     if ($channel->sql == '') {
         return $this->no_results();
     }
     $channel->query = ee()->db->query($channel->sql);
     if (APP_VER < 2.0) {
         $channel->query->result = $channel->query->result_array();
     }
     if (!isset($channel->query) or $channel->query->num_rows() == 0) {
         return $this->no_results();
     }
     if (APP_VER < 2.0) {
         if (!class_exists('Typography')) {
             require PATH_CORE . 'core.typography' . EXT;
         }
         $channel->TYPE = new Typography();
         $channel->TYPE->convert_curly = FALSE;
     } else {
         ee()->load->library('typography');
         ee()->typography->initialize();
         ee()->typography->convert_curly = FALSE;
     }
     $channel->fetch_categories();
     /**	----------------------------------------
     		/**	Parse and return entry data
     		/**	----------------------------------------*/
     if (APP_VER < 2.0) {
         $channel->parse_weblog_entries();
     } else {
         $channel->parse_channel_entries();
     }
     if (APP_VER >= '2.4.0') {
         $channel->return_data = $channel->pagination->render($channel->return_data);
     } else {
         $channel->add_pagination_data();
     }
     /**	----------------------------------------
     		/**	Count tag
     		/**	----------------------------------------*/
     if (count(ee()->TMPL->related_data) > 0 and count($channel->related_entries) > 0) {
         $channel->parse_related_entries();
     }
     if (count(ee()->TMPL->reverse_related_data) > 0 and count($channel->reverse_related_entries) > 0) {
         $channel->parse_reverse_related_entries();
     }
     // ----------------------------------------
     //  Handle problem with pagination segments in the url
     // ----------------------------------------
     if (preg_match("#(/P\\d+)#", ee()->uri->uri_string, $match)) {
         $channel->return_data = str_replace($match['1'], "", $channel->return_data);
     } elseif (preg_match("#(P\\d+)#", ee()->uri->uri_string, $match)) {
         $channel->return_data = str_replace($match['1'], "", $channel->return_data);
     }
     $tagdata = $channel->return_data;
     return $tagdata;
 }
开发者ID:TAGraves,项目名称:Compendium-Prototype,代码行数:101,代码来源:mod.user.backup.php


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