Advertisement
samclarko

Post php

Sep 4th, 2016
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.51 KB | None | 0 0
  1. <?php Theme::plugins('postBegin') ?>
  2. <div class="details">
  3.         <div class="p-title">
  4.             <h1><?php echo $Post->title() ?></h1>
  5.         </div>
  6.        
  7. <div class="det_pic" align="center">
  8.     <?php
  9.         if($Post->coverImage()) {
  10.             echo '<img src="'.$Post->coverImage().'" alt="Cover Image" class="img-responsive post-cover" >';
  11.         }
  12.     ?>
  13. </div>
  14. <div class="det_text">
  15. <?php echo $Post->content() ?>    
  16.  
  17. </div>
  18. <ul class="links">
  19.     <?php
  20.                         // Get the user who created the post.
  21.                         $User = $Post->user();
  22.  
  23.                         // Default author is the username.
  24.                         $author = $User->username();
  25.  
  26.                         // If the user complete the first name or last name this will be the author.
  27.                 if( Text::isNotEmpty($User->firstName()) || Text::isNotEmpty($User->lastName()) ) {
  28.                     $author = $User->firstName().' '.$User->lastName();
  29.                 }
  30.             ?>
  31.                    
  32.          <li><i class="date"> </i><span class="icon_text"><time class="published" datetime="2015-11-01"><?php echo $Post->date() ?></time></span></li>
  33.          <li><a href="#"><i class="admin"> </i><span class="icon_text"><?php echo $author ?></span></a></li>
  34.       <?php Theme::plugins('postEnd') ?>
  35.  
  36. </ul>
  37. <ul class="links_middle">
  38.    <?php
  39.             $tags = $Post->tags(true);
  40.  
  41.             foreach($tags as $tagKey=>$tagName) {
  42.                
  43.                                  echo '<li><a href="'.HTML_PATH_ROOT.$Url->filters('tag').'/'.$tagKey.'">'.$tagName.'</span></li>';
  44.    
  45.                         }
  46.         ?>
  47.  
  48. </ul>
  49.  
  50. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement