AlkantarClanX12

Your IP : 216.73.217.128


Current Path : /var/www/clients/client1/web1/web/sites/all/themes/hawell/tpl/
Upload File :
Current File : /var/www/clients/client1/web1/web/sites/all/themes/hawell/tpl/node--article.tpl.php

<?php
/**
 * @file
 * Default theme implementation to display a node.
 */

	global $base_root, $base_url;
	$user = user_load($uid); // Make sure the user object is fully loaded
	$display_name = field_get_items('user', $user, 'field_display_name');
	$about = field_get_items('user', $user, 'field_about');
	if(!empty($node->field_video_embed)) {
		$video = $node->field_video_embed;
	} else {
		$video = '';
	}
	if(!empty($node->field_video_embed)) {
		$soundcloud = $node->field_soundcloud_url;
	} else {
		$soundcloud = '';
	}
	if(!empty($node->field_images)){
	    $imageone = $node->field_images['und'][0]['uri'];
	    $ni = count($node->field_images['und']);
	    $image_url = file_create_url($imageone);
	    $image_url_style = image_style_url('image_960x540',$imageone);
  	} else {
	    $imageone = '';
	    $ni = 0;
  	}
  	
  	$blog_style = 'right';

	if(!$page){ ?>

		<?php if ($blog_style == 'masonry_2col' || $blog_style == 'masonry_3col' || $blog_style == 'masonry_4col'): ?>
			<?php if($blog_style == 'masonry_2col'): ?>
			<div class="col-sm-6 col-md-6 col-lg-6 pb-70">
			<?php elseif ($blog_style == 'masonry_3col'): ?>
			<div class="col-sm-6 col-md-4 col-lg-4 pb-70">
			<?php else: ?>
			<div class="col-sm-6 col-md-3 col-lg-3 pb-70">
			<?php endif; ?>

			<?php if (!empty($video)): ?>
				<div class="embed-responsive embed-responsive-16by9 mb-25">
				<?php print render($content['field_video_embed']); ?>
				</div>
			<?php elseif (!empty($soundcloud)): ?>
				<div class="mb-25">
				<?php print render($content['field_soundcloud_url']); ?>
				</div>
			<?php elseif ($ni == 1): ?>
				<div class="post-prev-img">
			        <a href="<?php print $node_url; ?>"><?php print theme('image', array('path' => $imageone, 'style_name' => '', 'alt'=>$node->field_images['und'][0]['alt'])); ?></a>
			    </div>
			<?php else: ?>
				<div class="fullwidth-slider owl-carousel owl-dark-bg owl-pag-2 owl-arrows-bg post-prev-img" >
				<?php foreach ($node->field_images['und'] as $key => $value) {
						print '<div class="item m-0"><div>';
						print theme('image_style', array('path' => $node->field_images['und'][$key]['uri'], 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][$key]['alt']));
						print '</div></div>';
					} 
				?>
				</div>
			<?php endif; ?>			
				<div class="post-prev-title">
					<h3><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h3>
				</div>

				<div class="post-prev-info">
				<?php print format_date($node->created, 'custom', 'F d'); ?><span class="slash-divider">/</span><?php print $name; ?>
				</div>

				<div class="post-prev-text">
					<?php print $node->body['und'][0]['summary']; ?>
				</div>

				<div class="post-prev-more-cont clearfix">
					<div class="post-prev-more left">
						<a href="<?php print $node_url; ?>" class="blog-more"><?php print t('READ MORE') ?></a>
					</div>
					<div class="right" >
						<a href="<?php print $node_url; ?>#comments" class="post-prev-count"><span aria-hidden="true" class="icon_comment_alt"></span><span class="icon-count"><?php print $node->comment_count; ?></span></a>
						<a href="#" class="post-prev-count dropdown-toggle" data-toggle="dropdown" aria-expanded="false" >
							<span aria-hidden="true" class="social_share"></span>
						</a>
						<ul class="social-menu dropdown-menu dropdown-menu-right" role="menu">
							<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_facebook"></span></a></li>
							<li><a target="_blank" href="https://twitter.com/intent/tweet?source=webclient&amp;text=<?php print $node->title; ?>+<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_twitter"></span></a></li>
							<li><a target="_blank" href="https://plus.google.com/share?url=<?php print $base_root.$node_url; ?>&amp;title=<?php print $node->title; ?>"><span aria-hidden="true" class="social_googleplus"></span></a></li>
						</ul>
					</div>
				</div>
			</div>
		<?php elseif ($blog_style == 'full_width'): ?>
			<!-- Post Item -->
            <div class="wow fadeIn pb-70">
			<?php if (!empty($video)): ?>
				<div class="embed-responsive embed-responsive-16by9 mb-25">
				<?php print render($content['field_video_embed']); ?>
				</div>
			<?php elseif (!empty($soundcloud)): ?>
				<div class="mb-25">
				<?php print render($content['field_soundcloud_url']); ?>
				</div>
			<?php elseif ($ni == 1): ?>
				<div class="post-prev-img">
			        <a href="<?php print $node_url; ?>"><?php print theme('image_style', array('path' => $imageone, 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][0]['alt'])); ?></a>
			    </div>
			<?php else: ?>
				<div class="fullwidth-slider owl-carousel owl-dark-bg owl-pag-2 owl-arrows-bg post-prev-img" >
				<?php foreach ($node->field_images['und'] as $key => $value) {
						print '<div class="item m-0"><div>';
						print theme('image_style', array('path' => $node->field_images['und'][$key]['uri'], 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][$key]['alt']));
						print '</div></div>';
					} 
				?>
				</div>
			<?php endif; ?>
				<div class="post-prev-title">
					<h3><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h3>
				</div>

				<div class="post-prev-info">
				<?php print format_date($node->created, 'custom', 'F d'); ?><span class="slash-divider">/</span><?php print $name; ?><span class="slash-divider">/</span><?php print strip_tags(render($content['field_categories']), '<a>'); ?>
				</div>

				<div class="post-prev-text">
					<?php print $node->body['und'][0]['summary']; ?>
				</div>

				<div class="post-prev-more-cont clearfix">
					<div class="post-prev-more left">
						<a href="<?php print $node_url; ?>" class="blog-more"><?php print t('READ MORE') ?></a>
					</div>
					<div class="right" >
						<a href="<?php print $node_url; ?>#comments" class="post-prev-count"><span aria-hidden="true" class="icon_comment_alt"></span><span class="icon-count"><?php print $node->comment_count; ?></span></a>
						<a href="#" class="post-prev-count dropdown-toggle" data-toggle="dropdown" aria-expanded="false" >
							<span aria-hidden="true" class="social_share"></span>
						</a>
						<ul class="social-menu dropdown-menu dropdown-menu-right" role="menu">
							<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_facebook"></span></a></li>
							<li><a target="_blank" href="https://twitter.com/intent/tweet?source=webclient&amp;text=<?php print $node->title; ?>+<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_twitter"></span></a></li>
							<li><a target="_blank" href="https://plus.google.com/share?url=<?php print $base_root.$node_url; ?>&amp;title=<?php print $node->title; ?>"><span aria-hidden="true" class="social_googleplus"></span></a></li>
						</ul>
					</div>
				</div>	
            </div>
		<?php elseif ($blog_style == 'small_image'): ?>
			<!-- Post Item -->
            <div class="col-md-6 wow fadeIn pb-70">
			<?php if (!empty($video)): ?>
				<div class="embed-responsive embed-responsive-16by9 mb-25">
				<?php print render($content['field_video_embed']); ?>
				</div>
			<?php elseif (!empty($soundcloud)): ?>
				<div class="mb-25">
				<?php print render($content['field_soundcloud_url']); ?>
				</div>
			<?php elseif ($ni == 1): ?>
				<div class="post-prev-img">
			        <a href="<?php print $node_url; ?>"><?php print theme('image', array('path' => $imageone, 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][0]['alt'])); ?></a>
			    </div>
			<?php else: ?>
				<div class="fullwidth-slider owl-carousel owl-dark-bg owl-pag-2 owl-arrows-bg post-prev-img" >
				<?php foreach ($node->field_images['und'] as $key => $value) {
						print '<div class="item m-0"><div>';
						print theme('image_style', array('path' => $node->field_images['und'][$key]['uri'], 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][$key]['alt']));
						print '</div></div>';
					} 
				?>
				</div>
			<?php endif; ?>
				<div class="post-prev-title">
					<h3><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h3>
				</div>

				<div class="post-prev-info">
				<?php print format_date($node->created, 'custom', 'F d'); ?><span class="slash-divider">/</span><?php print $name; ?><span class="slash-divider">/</span><?php print strip_tags(render($content['field_categories']), '<a>'); ?>
				</div>

				<div class="post-prev-text">
					<?php print $node->body['und'][0]['summary']; ?>
				</div>

				<div class="post-prev-more-cont clearfix">
					<div class="post-prev-more left">
						<a href="<?php print $node_url; ?>" class="blog-more"><?php print t('READ MORE') ?></a>
					</div>
					<div class="right" >
						<a href="<?php print $node_url; ?>#comments" class="post-prev-count"><span aria-hidden="true" class="icon_comment_alt"></span><span class="icon-count"><?php print $node->comment_count; ?></span></a>
						<a href="#" class="post-prev-count dropdown-toggle" data-toggle="dropdown" aria-expanded="false" >
							<span aria-hidden="true" class="social_share"></span>
						</a>
						<ul class="social-menu dropdown-menu dropdown-menu-right" role="menu">
							<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_facebook"></span></a></li>
							<li><a target="_blank" href="https://twitter.com/intent/tweet?source=webclient&amp;text=<?php print $node->title; ?>+<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_twitter"></span></a></li>
							<li><a target="_blank" href="https://plus.google.com/share?url=<?php print $base_root.$node_url; ?>&amp;title=<?php print $node->title; ?>"><span aria-hidden="true" class="social_googleplus"></span></a></li>
						</ul>
					</div>
				</div>
            </div>
		<?php else: ?>
			<!-- Post Item -->
            <div class="wow fadeIn pb-80">
			<?php if (!empty($video)): ?>
				<div class="embed-responsive embed-responsive-16by9 mb-25">
				<?php print render($content['field_video_embed']); ?>
				</div>
			<?php elseif (!empty($soundcloud)): ?>
				<div class="mb-25">
				<?php print render($content['field_soundcloud_url']); ?>
				</div>
			<?php elseif ($ni == 1): ?>
				<div class="post-prev-img">
			        <a href="<?php print $node_url; ?>"><?php print theme('image_style', array('path' => $imageone, 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][0]['alt'])); ?></a>
			    </div>
			<?php else: ?>
				<div class="fullwidth-slider owl-carousel owl-dark-bg owl-pag-2 owl-arrows-bg post-prev-img" >
				<?php foreach ($node->field_images['und'] as $key => $value) {
						print '<div class="item m-0"><div>';
						print theme('image_style', array('path' => $node->field_images['und'][$key]['uri'], 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][$key]['alt']));
						print '</div></div>';
					} 
				?>
				</div>
			<?php endif; ?>
				<div class="post-prev-title">
					<h3><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h3>
				</div>

				<div class="post-prev-info">
				<?php print format_date($node->created, 'custom', 'F d'); ?><span class="slash-divider">/</span><?php print $name; ?><span class="slash-divider">/</span><?php print strip_tags(render($content['field_categories']), '<a>'); ?>
				</div>

				<div class="post-prev-text">
					<?php print $node->body['und'][0]['summary']; ?>
				</div>

				<div class="post-prev-more-cont clearfix">
					<div class="post-prev-more left">
						<a href="<?php print $node_url; ?>" class="blog-more"><?php print t('READ MORE') ?></a>
					</div>
					<div class="right" >
						<a href="<?php print $node_url; ?>#comments" class="post-prev-count"><span aria-hidden="true" class="icon_comment_alt"></span><span class="icon-count"><?php print $node->comment_count; ?></span></a>
						<a href="#" class="post-prev-count dropdown-toggle" data-toggle="dropdown" aria-expanded="false" >
							<span aria-hidden="true" class="social_share"></span>
						</a>
						<ul class="social-menu dropdown-menu dropdown-menu-right" role="menu">
							<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_facebook"></span></a></li>
							<li><a target="_blank" href="https://twitter.com/intent/tweet?source=webclient&amp;text=<?php print $node->title; ?>+<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_twitter"></span></a></li>
							<li><a target="_blank" href="https://plus.google.com/share?url=<?php print $base_root.$node_url; ?>&amp;title=<?php print $node->title; ?>"><span aria-hidden="true" class="social_googleplus"></span></a></li>
						</ul>
					</div>
				</div>
            </div>
		<?php endif; ?>

	<?php } else {
		if (!empty($node->field_sidebar)) {
			$sidebar = $node->field_sidebar['und'][0]['value'];
		} else $sidebar = 'right';
	?> 
		<?php if ($sidebar == 'full'): ?>
		<!-- POST ITEM -->
        <div class="blog-post wow fadeIn pb-50">
		<?php if (!empty($video)): ?>
			<div class="embed-responsive embed-responsive-16by9 mb-25">
				<?php print render($content['field_video_embed']); ?>
			</div>
		<?php elseif (!empty($soundcloud)): ?>
			<div class="mb-25">
				<?php print render($content['field_soundcloud_url']); ?>
			</div>
		<?php elseif ($ni == 1): ?>

		<?php else: ?>
			<div class="fullwidth-slider owl-carousel owl-dark-bg owl-pag-2 owl-arrows-bg post-prev-img" >
				<?php foreach ($node->field_images['und'] as $key => $value) {
						print '<div class="item m-0"><div>';
							print theme('image_style', array('path' => $node->field_images['und'][$key]['uri'], 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][$key]['alt']));
						print '</div></div>';
					}
				?>
			</div>
		<?php endif; ?>

		<?php else: ?>
		<!-- POST ITEM -->
        <div class="blog-post wow fadeIn pb-50">
		<?php if (!empty($video)): ?>
			<div class="embed-responsive embed-responsive-16by9 mb-25">
				<?php print render($content['field_video_embed']); ?>
			</div>
		<?php elseif (!empty($soundcloud)): ?>
			<div class="mb-25">
				<?php print render($content['field_soundcloud_url']); ?>
			</div>
		<?php elseif ($ni == 1): ?>
			<div class="post-prev-img">
				<a href="<?php print $node_url; ?>"><?php print theme('image_style', array('path' => $imageone, 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][0]['alt'])); ?></a>
			</div>
		<?php else: ?>
			<div class="fullwidth-slider owl-carousel owl-dark-bg owl-pag-2 owl-arrows-bg post-prev-img" >
				<?php foreach ($node->field_images['und'] as $key => $value) {
						print '<div class="item m-0"><div>';
							print theme('image_style', array('path' => $node->field_images['und'][$key]['uri'], 'style_name' => 'image_1140x642', 'alt'=>$node->field_images['und'][$key]['alt']));
						print '</div></div>';
					}
				?>
			</div>
		<?php endif; ?>
			<div class="post-prev-title">
				<h3><a href="<?php print $node_url; ?>"><?php print $title; ?></a></h3>
			</div>

			<div class="post-prev-info">
				<?php print format_date($node->created, 'custom', 'F d'); ?><span class="slash-divider">/</span><?php print $name; ?><span class="slash-divider">/</span><?php print strip_tags(render($content['field_categories']), '<a>'); ?>
			</div>
			<?php endif; ?>
			<div class="post-prev-text">
			<?php
	          hide($content['links']);
	          hide($content['field_tags']);
	          hide($content['comments']);
	          hide($content['field_categories']);
	          hide($content['field_images']);
	          hide($content['field_soundcloud_url']);
	          hide($content['field_video_embed']);
	          hide($content['field_sidebar']);
	          print render($content);
          	?>
			</div>
			<div class="post-prev-more-cont clearfix">
				<div class="post-prev-more left">
					<div class="tags">
						<?php print strip_tags(render($content['field_tags']), '<a>'); ?>
					</div>
				</div>
				<div class="right" >
					<a href="<?php print $node_url; ?>#comments" class="post-prev-count"><span aria-hidden="true" class="icon_comment_alt"></span><span class="icon-count"><?php print $node->comment_count; ?></span></a>
					<a href="#" class="post-prev-count dropdown-toggle" data-toggle="dropdown" aria-expanded="false" >
						<span aria-hidden="true" class="social_share"></span>
					</a>
					<ul class="social-menu dropdown-menu dropdown-menu-right" role="menu">
						<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_facebook"></span></a></li>
						<li><a target="_blank" href="https://twitter.com/intent/tweet?source=webclient&amp;text=<?php print $node->title; ?>+<?php print $base_root.$node_url; ?>"><span aria-hidden="true" class="social_twitter"></span></a></li>
						<li><a target="_blank" href="https://plus.google.com/share?url=<?php print $base_root.$node_url; ?>&amp;title=<?php print $node->title; ?>"><span aria-hidden="true" class="social_googleplus"></span></a></li>
					</ul>
				</div>
			</div>
        </div>
        <!-- AUTHOR -->	
		<div class="post-author-container clearfix mb-50">			
			<div class="post-author-avatar">
				<?php print $user_picture ?>
			</div>			
			<div class="comment-content">				
				<div class="comment-author">
					<?php if (!empty($display_name)) {print $display_name[0]['value'];} else print $name; ?>
				</div>
				<?php if (!empty($about)): ?>				
					<p><?php print $about[0]['value'] ?></p>
				<?php endif; ?>
			</div>
		</div>
		<!-- DIVIDER -->
		<hr class="mt-0 mb-0">
		<!-- WORK NAVIGATION -->
		<div class="work-navigation clearfix">
			<?php print single_navigation ($node->type,$node->nid, 'prev') ?>
			<a href="<?php print $base_url; ?>/blog" class="work-all"><span><?php print t('All Posts') ?></span></a>
			<?php print single_navigation ($node->type,$node->nid, 'next') ?>
		</div>
		<!-- DIVIDER -->
		<hr class="mt-0 mb-0">
		<!-- RELATED POSTS -->
		<h4 class="blog-page-title mt-50 mb-25"><?php print t('RELATED POSTS'); ?></h4>
		<?php print getRelatedPosts($node->type,$node->nid, 'field_images'); ?>
		<!-- DIVIDER -->
        <hr class="mt-0 mb-0">
		<!-- COMMENTS -->
		<?php print render($content['comments']); ?>
	<?php }

?>