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


PHP common_node::nodeDetail方法代码示例

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


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

示例1: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     /**
      * initialise node and get detail
      */
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     /**
      * get node component options
      */
     if ($node_data['component']['provider'] == '') {
         $node_data['component']['provider'] = 'vimeo';
     }
     if ($node_data['component']['autoplay']) {
         $autoplay_param = ":autoplay=1";
     } else {
         $autoplay_param = '';
     }
     /**
      * pass to menu component
      */
     $Onxshop_Request = new Onxshop_Request("component/video_{$node_data['component']['provider']}~video_id={$node_data['component']['video_id']}{$autoplay_param}~");
     $this->tpl->assign("VIDEO", $Onxshop_Request->getContent());
     $this->tpl->assign("NODE", $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:33,代码来源:video.php

示例2: parseContentTagsBeforeHook

 /**
  * hook before parsing
  */
 public function parseContentTagsBeforeHook()
 {
     parent::parseContentTagsBeforeHook();
     /**
      * pass GET.recipe_id into template
      */
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     $this->GET['recipe_id'] = $node_data['content'];
     /**
      * pass GET.taxonomy_ids into template
      */
     $Recipe_Taxonomy = new ecommerce_recipe_taxonomy();
     $taxonomy_ids = (array) $Recipe_Taxonomy->getRelationsToRecipe($this->GET['recipe_id']);
     $this->GET['taxonomy_tree_id'] = implode(",", $taxonomy_ids);
     /**
      * rating & reviews
      */
     require_once 'models/ecommerce/ecommerce_recipe_review.php';
     $Review = new ecommerce_recipe_review();
     $review_data = $Review->getRating($this->GET['recipe_id']);
     if ($review_data['count'] > 0) {
         $rating = round($review_data['rating']);
         $_Onxshop_Request = new Onxshop_Request("component/rating_stars~rating={$rating}~");
         $this->tpl->assign('RATING_STARS', $_Onxshop_Request->getContent());
         if ($review_data['count'] == 1) {
             $this->tpl->assign('REVIEWS', 'Review');
         } else {
             $this->tpl->assign('REVIEWS', 'Reviews');
         }
         $this->tpl->assign('REVIEW', $review_data);
         $this->tpl->parse('content.reviews');
     }
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:37,代码来源:recipe.php

示例3: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     require_once 'models/common/common_file.php';
     $File = new common_file();
     if (is_numeric($this->GET['id'])) {
         $files = $File->listFiles($this->GET['id']);
     }
     if (is_array($files)) {
         foreach ($files as $file) {
             $this->tpl->assign('FILE', $file);
             $this->tpl->parse('content.item');
         }
     }
     $this->tpl->assign('NODE', $node_data);
     /**
      * display title
      */
     if ($node_data['display_title']) {
         if ($node_data['link_to_node_id'] > 0) {
             $this->tpl->parse('content.title_link');
         } else {
             $this->tpl->parse('content.title');
         }
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:32,代码来源:file.php

示例4: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     //get data
     $node_data = $Node->nodeDetail($this->GET['id']);
     $rss_options = $node_data['component'];
     //detect feed specific controller
     if (preg_match('/api.twitter.com/', $rss_options['url'])) {
         $feed_controller = 'feed_twitter';
     } else {
         $feed_controller = 'feed';
     }
     $this->tpl->assign('FEED_CONTROLLER', $feed_controller);
     //prepare data
     $rss_options['url'] = base64_encode(urlencode(trim($rss_options['url'])));
     //get RSS_RESULT
     $nsite_request = "component/{$feed_controller}~url={$rss_options['url']}:items_limit={$rss_options['items_limit']}:channel_title={$rss_options['channel_title']}:image={$rss_options['image']}:copyright={$rss_options['copyright']}:description={$rss_options['description']}:content={$rss_options['content']}:pubdate={$rss_options['pubdate']}~";
     $_Onxshop_Request = new Onxshop_Request($nsite_request);
     $this->tpl->assign("RSS_RESULT", $_Onxshop_Request->getContent());
     //if ajax option enable, allow to update dynamicaly
     if ($rss_options['ajax'] == 1) {
         //AJAX METHOD
         $this->tpl->assign("RSS_OPTIONS", $rss_options);
         $this->tpl->parse('content.ajax');
     }
     $this->tpl->assign('NODE', $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:35,代码来源:feed.php

示例5: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     if (!is_array($node_data['component'])) {
         $node_data['component'] = array();
         $node_data['component']['node_controller'] = 'common_simple';
     }
     if ($node_data['component']['sending_failed'] == '') {
         $node_data['component']['sending_failed'] = 'The provided data is not valid! Required items are marked with an asterisk (*)';
     }
     if ($node_data['component']['text'] == '') {
         $node_data['component']['text'] = "Thank you for your feedback.";
     }
     $this->tpl->assign("NODE", $node_data);
     $template_folder = "component/contact_form/";
     $template_name = "{$template_folder}{$node_data['component']['node_controller']}";
     /**
      * check template file exists
      */
     if (!templateExists($template_name)) {
         // try fallback to old _contact_form folder in case it was locally created (used prior to Onxshop 1.7.6)
         $template_folder = "component/_contact_form/";
         $template_name = "{$template_folder}{$node_data['component']['node_controller']}";
         if (!templateExists($template_name)) {
             msg("selected template {$template_name} was not found");
             return false;
         }
     }
     /**
      * execute controller
      */
     $Form = new Onxshop_Request("component/contact_form@{$template_name}&node_id={$node_data['id']}&mail_to={$node_data['component']['mail_to']}&mail_toname={$node_data['component']['mail_toname']}&spam_protection={$node_data['component']['spam_protection']}");
     $this->tpl->assign("FORM", $Form->getContent());
     $reg_key = "form_notify_" . $node_data['id'];
     if (Zend_Registry::isRegistered($reg_key)) {
         if (Zend_Registry::get($reg_key) == 'sent') {
             //forward
             msg($node_data['component']['text'], 'ok');
             if ($node_data['component']['href'] != '') {
                 onxshopGoTo($node_data['component']['href']);
             }
         } else {
             if (Zend_Registry::get($reg_key) == 'failed') {
                 msg($node_data['component']['sending_failed'], 'error');
                 $this->tpl->parse('content.form');
             } else {
                 $this->tpl->parse('content.form');
             }
         }
     } else {
         $this->tpl->parse('content.form');
     }
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:62,代码来源:contact_form.php

示例6: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     /**
      * initialise node and get detail
      */
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     /**
      * get node component options
      */
     switch ($node_data['component']['template']) {
         case 'menu_SELECT':
             $template = 'component/menu_select';
             break;
         case 'menu_GRID':
             $template = 'component/menu_grid';
             break;
         case 'menu_STACK':
             $template = 'component/menu_stack';
             break;
         default:
             $template = 'component/menu';
     }
     if (is_numeric($node_data['component']['level'])) {
         $level = $node_data['component']['level'];
     } else {
         $level = 0;
     }
     if (is_numeric($node_data['component']['display_all'])) {
         $display_all = $node_data['component']['display_all'];
     } else {
         $display_all = 0;
     }
     if (is_numeric($node_data['component']['open'])) {
         $open = $node_data['component']['open'];
     } else {
         $open = '';
     }
     /**
      * image size
      */
     if ($template == 'component/menu_grid' || $template == 'component/menu_stack') {
         $image_o = $this->getImageSizeOptions($node_data);
     }
     /**
      * pass to menu component
      */
     $Onxshop_Request = new Onxshop_Request("{$template}~id={$node_data['component']['node_id']}:display_teaser={$node_data['component']['display_teaser']}:level={$level}:expand_all={$display_all}:open={$open}:image_width={$image_o['width']}:image_height={$image_o['height']}:image_fill={$image_o['fill']}~");
     $this->tpl->assign("MENU", $Onxshop_Request->getContent());
     $this->tpl->assign("NODE", $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:59,代码来源:menu.php

示例7: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     /**
      * input
      */
     if ($this->GET['sort']['by']) {
         $sort_by = $this->GET['sort']['by'];
     } else {
         $sort_by = null;
     }
     if ($this->GET['sort']['direction']) {
         $sort_direction = $this->GET['sort']['direction'];
     } else {
         $sort_direction = null;
     }
     /**
      * initialize node
      */
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     /**
      * prepare query
      */
     $query_raw = array();
     if ($node_data['component']['template']) {
         $query_raw['template'] = $node_data['component']['template'];
     }
     if ($node_data['component']['offer_group_id']) {
         $query_raw['offer_group_id'] = $node_data['component']['offer_group_id'];
     }
     if ($node_data['component']['campaign_category_id']) {
         $query_raw['campaign_category_id'] = $node_data['component']['campaign_category_id'];
     }
     if ($node_data['component']['campaign_category_id']) {
         $query_raw['campaign_category_id'] = $node_data['component']['campaign_category_id'];
     }
     $query_raw['sort']['by'] = $sort_by;
     $query_raw['sort']['direction'] = $sort_direction;
     $query_raw['limit_per_page'] = 999;
     $query = http_build_query($query_raw, '', ':');
     /**
      * call special offer component
      */
     $_Onxshop_Request = new Onxshop_Request("component/ecommerce/special_offer_list~{$query}~");
     $content = $_Onxshop_Request->getContent();
     if (empty($content)) {
         return true;
     }
     $this->tpl->assign('PRODUCT_LIST', $content);
     $this->tpl->assign('NODE', $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:59,代码来源:special_offer_list.php

示例8: nodeUsesCaptcha

 protected function nodeUsesCaptcha($node_id)
 {
     if ($this->GET['nocheck']) {
         return true;
     }
     // confirm the noded uses javascript captcha
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($node_id);
     return $node_data['component']['spam_protection'] == 'captcha_text_js' || $node_data['node_controller'] == 'news';
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:11,代码来源:captcha_js.php

示例9: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     // set transparent cache
     //$rss->cache_dir = ONXSHOP_PROJECT_DIR . 'var/tmp/';
     //$rss->cache_time = 3600; // one hour
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     if ($this->GET['link']) {
         $url = base64_decode($this->GET['link']);
     } else {
         $url = trim($node_data['component']['url']);
     }
     msg("Opening {$url}", 'ok', 2);
     $wget_url = base64_encode($url);
     $_Onxshop_Request = new Onxshop_Request("component/wget&url={$wget_url}");
     $source = $_Onxshop_Request->getContent();
     $source = translateLinks("", $source);
     //$source = preg_replace("/.*\<body\>(.*)\<\/body\>.*/i", '\\1', $source);
     //grab with pregmatch
     $source = preg_replace("/[\r\n ]{1,}/", " ", $source);
     preg_match("/<body>(?!body)(.*)<\\/body>/mi", $source, $match);
     $source = $match[1];
     //grab by XML
     /*
     //init simple XML
     require_once('lib/simplexml44/class/IsterXmlSimpleXMLImpl.php');
     $SimpleXML = new IsterXmlSimpleXMLImpl;
     
     // load some source file
     if ($doc  = $SimpleXML->load_string($source)) {
     	
     	$component['content'] = '';
     	
     	if (is_object($doc->html->body)) {
     		foreach( $doc->html->body->children() as $child ) {
     			$component['content'] .= $child->asXML();
     		}
     	} else {
     		msg("Source is not valid XHTML", 'error');
     	}
     	
     	$this->tpl->assign("COMPONENT", $component);	
     } else {
     	msg ("Could not open '$url'", 'error');
     }
     */
     $this->tpl->assign("RESULT", $source);
     $this->tpl->assign('NODE', $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:57,代码来源:external_source.php

示例10: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     $this->tpl->assign("NODE", $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:14,代码来源:notice.php

示例11: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     $_Onxshop_Request = new Onxshop_Request("component/comment~node_id={$node_data['id']}:allow_anonymouse_submit={$node_data['component']['allow_anonymouse_submit']}~");
     $node_data['content'] = $_Onxshop_Request->getContent();
     $this->tpl->assign("NODE", $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:16,代码来源:comment.php

示例12: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     $linked_node_id = $node_data['component']['node_id'];
     if (is_numeric($linked_node_id)) {
         $_Onxshop_Request = new Onxshop_Request("node~id={$linked_node_id}:fe_edit=0:shared=1~");
         $node_data['content'] = $_Onxshop_Request->getContent();
         $this->tpl->assign("NODE", $node_data);
     } else {
         msg("Please select a content");
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:18,代码来源:shared.php

示例13: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     if ($node_data['component']['template'] == '') {
         $node_data['component']['template'] = 'menu_UL';
     }
     $Onxshop_Request = new Onxshop_Request("component/menu&type=taxonomy&level=2&display_all=1&id={$node_data['component']['node_id']}&template={$node_data['component']['template']}");
     $this->tpl->assign("FILTER", $Onxshop_Request->getContent());
     $this->tpl->assign("NODE", $node_data);
     if ($node_data['display_title']) {
         $this->tpl->parse('content.title');
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:19,代码来源:filter.php

示例14: mainAction

 /**
  * main action
  */
 public function mainAction()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     $this->tpl->assign("NODE", $node_data);
     if ($node_data['component']['href'] != '') {
         header("HTTP/1.1 301 Moved Permanently");
         if (preg_match('/\\:\\/\\//', $node_data['component']['href'])) {
             onxshopGoTo($node_data['component']['href'], 2);
         } else {
             onxshopGoTo($node_data['component']['href']);
         }
     }
     return true;
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:19,代码来源:symbolic.php

示例15: processLayout

 /**
  * process layout
  */
 public function processLayout()
 {
     require_once 'models/common/common_node.php';
     $Node = new common_node();
     $node_data = $Node->nodeDetail($this->GET['id']);
     if ($node_data['page_title'] == '') {
         $node_data['page_title'] = $node_data['title'];
     }
     if (!isset($node_data['display_title'])) {
         $node_data['display_title'] = $GLOBALS['onxshop_conf']['global']['display_title'];
     }
     $this->tpl->assign("NODE", $node_data);
     /**
      * display title
      */
     $this->displayTitle($node_data);
 }
开发者ID:AppChecker,项目名称:onxshop,代码行数:20,代码来源:default.php


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