Advertisement
Guest User

Untitled

a guest
Mar 13th, 2019
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 9.06 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @file
  4.  * Adaptivetheme implementation to display a node.
  5.  *
  6.  * Adaptivetheme variables:
  7.  * AT Core sets special time and date variables for use in templates:
  8.  * - $submitted: Submission information created from $name and $date during
  9.  *   adaptivetheme_preprocess_node(), uses the $publication_date variable.
  10.  * - $datetime: datetime stamp formatted correctly to ISO8601.
  11.  * - $publication_date: publication date, formatted with time element and
  12.  *   pubdate attribute.
  13.  * - $datetime_updated: datetime stamp formatted correctly to ISO8601.
  14.  * - $last_update: last updated date/time, formatted with time element and
  15.  *   pubdate attribute.
  16.  * - $custom_date_and_time: date time string used in $last_update.
  17.  * - $header_attributes: attributes such as classes to apply to the header element.
  18.  * - $footer_attributes: attributes such as classes to apply to the footer element.
  19.  * - $links_attributes: attributes such as classes to apply to the nav element.
  20.  * - $is_mobile: Mixed, requires the Mobile Detect or Browscap module to return
  21.  *   TRUE for mobile.  Note that tablets are also considered mobile devices.
  22.  *   Returns NULL if the feature could not be detected.
  23.  * - $is_tablet: Mixed, requires the Mobile Detect to return TRUE for tablets.
  24.  *   Returns NULL if the feature could not be detected.
  25.  *
  26.  * Available variables:
  27.  * - $title: the (sanitized) title of the node.
  28.  * - $content: An array of node items. Use render($content) to print them all,
  29.  *   or print a subset such as render($content['field_example']). Use
  30.  *   hide($content['field_example']) to temporarily suppress the printing of a
  31.  *   given element.
  32.  * - $user_picture: The node author's picture from user-picture.tpl.php.
  33.  * - $date: Formatted creation date. Preprocess functions can reformat it by
  34.  *   calling format_date() with the desired parameters on the $created variable.
  35.  * - $name: Themed username of node author output from theme_username().
  36.  * - $node_url: Direct url of the current node.
  37.  * - $display_submitted: Whether submission information should be displayed.
  38.  * - $classes: String of classes that can be used to style contextually through
  39.  *   CSS. It can be manipulated through the variable $classes_array from
  40.  *   preprocess functions. The default values can be one or more of the
  41.  *   following:
  42.  *   - node: The current template type, i.e., "theming hook".
  43.  *   - node-[type]: The current node type. For example, if the node is a
  44.  *     "Blog entry" it would result in "node-blog". Note that the machine
  45.  *     name will often be in a short form of the human readable label.
  46.  *   - node-teaser: Nodes in teaser form.
  47.  *   - node-preview: Nodes in preview mode.
  48.  *   The following are controlled through the node publishing options.
  49.  *   - node-promoted: Nodes promoted to the front page.
  50.  *   - node-sticky: Nodes ordered above other non-sticky nodes in teaser
  51.  *     listings.
  52.  *   - node-unpublished: Unpublished nodes visible only to administrators.
  53.  * - $title_prefix (array): An array containing additional output populated by
  54.  *   modules, intended to be displayed in front of the main title tag that
  55.  *   appears in the template.
  56.  * - $title_suffix (array): An array containing additional output populated by
  57.  *   modules, intended to be displayed after the main title tag that appears in
  58.  *   the template.
  59.  *
  60.  * Other variables:
  61.  * - $node: Full node object. Contains data that may not be safe.
  62.  * - $type: Node type, i.e. story, page, blog, etc.
  63.  * - $comment_count: Number of comments attached to the node.
  64.  * - $uid: User ID of the node author.
  65.  * - $created: Time the node was published formatted in Unix timestamp.
  66.  * - $classes_array: Array of html class attribute values. It is flattened
  67.  *   into a string within the variable $classes.
  68.  * - $zebra: Outputs either "even" or "odd". Useful for zebra striping in
  69.  *   teaser listings.
  70.  * - $id: Position of the node. Increments each time it's output.
  71.  *
  72.  * Node status variables:
  73.  * - $view_mode: View mode, e.g. 'full', 'teaser'...
  74.  * - $teaser: Flag for the teaser state (shortcut for $view_mode == 'teaser').
  75.  * - $page: Flag for the full page state.
  76.  * - $promote: Flag for front page promotion state.
  77.  * - $sticky: Flags for sticky post setting.
  78.  * - $status: Flag for published status.
  79.  * - $comment: State of comment settings for the node.
  80.  * - $readmore: Flags true if the teaser content of the node cannot hold the
  81.  *   main body content.
  82.  * - $is_front: Flags true when presented in the front page.
  83.  * - $logged_in: Flags true when the current user is a logged-in member.
  84.  * - $is_admin: Flags true when the current user is an administrator.
  85.  *
  86.  * Field variables: for each field instance attached to the node a corresponding
  87.  * variable is defined, e.g. $node->body becomes $body. When needing to access
  88.  * a field's raw values, developers/themers are strongly encouraged to use these
  89.  * variables. Otherwise they will have to explicitly specify the desired field
  90.  * language, e.g. $node->body['en'], thus overriding any language negotiation
  91.  * rule that was previously applied.
  92.  *
  93.  * @see template_preprocess()
  94.  * @see template_preprocess_node()
  95.  * @see template_process()
  96.  * @see adaptivetheme_preprocess_node()
  97.  * @see adaptivetheme_process_node()
  98.  */
  99.  
  100. /**
  101.  * Hide Content and Print it Separately
  102.  *
  103.  * Use the hide() function to hide fields and other content, you can render it
  104.  * later using the render() function. Install the Devel module and use
  105.  * <?php dsm($content); ?> to find variable names to hide() or render().
  106.  */
  107. hide($content['comments']);
  108. hide($content['links']);
  109.  
  110. ?>  <?php print render($content['field_icon']); ?>
  111. <script type="text/javascript" src="https://ssl.gstatic.com/trends_nrtr/1328_RC04/embed_loader.js"></script>
  112.  
  113.  
  114. <article id="node-<?php print $node->nid; ?>" class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>>
  115.   <?php print render($title_prefix); ?>
  116.   <?php if ($title && !$page): ?>
  117.     <header<?php print $header_attributes; ?>>
  118.       <?php if ($title): ?>
  119.         <h1<?php print $title_attributes; ?>>
  120.           <a href="<?php print $node_url; ?>" rel="bookmark"><?php print $title; ?></a>
  121.         </h1>
  122.       <?php endif; ?>
  123.     </header>
  124.   <?php endif; ?>
  125.   <?php if(!empty($user_picture) || $display_submitted): ?>
  126.     <footer<?php print $footer_attributes; ?>>
  127.       <p class="author-datetime"><?php print $date; ?></p>
  128.     </footer>
  129.   <?php endif; ?>
  130.  
  131.  <!-- Two column 66-33 Gpanel -->
  132. <div class="at-panel gpanel panel-display two-66-33 clearfix">
  133.     <?php print render($page['two_66_33_first']); ?> <!-- Тут первое предупреждение-->
  134.         <!-- !Main Content -->
  135.          <?php print render($content['content']); ?>
  136.             <div id="content" class="region region-two-66-33-first">
  137.                 <?php if ($view_mode == 'full') { ?>
  138.                     <?php echo render($GLOBALS['region_before_content']); ?>
  139.                         <?php } ?>
  140.                         <?php
  141.                             $block = block_load('views', 'stats2_cur-block');
  142.                             $blocks = _block_render_blocks(array($block));
  143.                             $blocks_build = _block_get_renderable_array($blocks);
  144.                             unset($blocks_build['views' . '_' . 'stats2_cur-block']['#theme_wrappers']);
  145.                             echo drupal_render($blocks_build);
  146.                             ?> 
  147.                     <?php print render($content['field_hyst_price']); ?>
  148.                     <?php
  149.                         $block = block_load('views', 'event-block');
  150.                         $blocks = _block_render_blocks(array($block));
  151.                         $blocks_build = _block_get_renderable_array($blocks);
  152.                         unset($blocks_build['views' . '_' . 'event-block']['#theme_wrappers']);
  153.                         echo drupal_render($blocks_build);
  154.                     ?>
  155.             </div>
  156.     <?php print render($page['two_66_33_second']);?><!-- Тут второе предупреждение-->
  157.         <div id="content" class="region region-two-66-33-second cur-top">
  158.             <?php print render($content['field_converter']); ?>
  159.             <?php print render($content['field_price']); ?>
  160.             <?php
  161.                 $block = block_load('views', 'stats_cur-block');
  162.                 $blocks = _block_render_blocks(array($block));
  163.                 $blocks_build = _block_get_renderable_array($blocks);
  164.                 unset($blocks_build['views' . '_' . 'stats_cur-block']['#theme_wrappers']);
  165.                 echo drupal_render($blocks_build);
  166.                 ?>
  167.             <?php print render($content['field_cur_whatis']); ?>
  168.             <?php print render($content['field_fivestar']); ?>
  169.         </div>
  170. </div>
  171. <?php
  172. hide($content['field_icon']);
  173. ?> 
  174. <div class="cont-in"<?php print $content_attributes; ?>>
  175.   <!-- Two column 66-33 Gpanel -->
  176.   <div class="at-panel gpanel panel-display two-66-33 clearfix">
  177.         <?php print render($page['two_66_33_first']); ?>    <!-- Тут третье-->
  178.             <?php print render($content['content']); ?>
  179.               <div id="content" class="region region-two-66-33-first">
  180.                     <?php print render($content);?>
  181.               </div>
  182. <?php print render($page['two_66_33_second']);?><!-- Тут 4-->
  183. <div id="content" class="region region-two-66-33-second"></div>
  184.   </div>
  185. <?php if ($view_mode == 'full') { ?>
  186. <?php echo render($GLOBALS['region_after_content']); ?>
  187. <?php } ?>
  188.  <?php print render($content['comments']); ?>    </div>
  189.   <?php print render($title_suffix); ?>
  190. </article>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement