Guest User

Untitled

a guest
Oct 11th, 2012
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.97 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  * @template  Mystique
  5.  * @revised   December 22, 2011
  6.  * @author    digitalnature, http://digitalnature.eu
  7.  * @license   GPL, http://www.opensource.org/licenses/gpl-license
  8.  */
  9.  
  10. // This is a generic template that styles post teasers on homepage and archive pages (or all pages except those of "singular" type).
  11. //
  12. // Priority (highest to lowest):
  13. //   - teaser-ID.php
  14. //   - teaser-postType-postFormat.php
  15. //   - teaser-postType.php
  16. //   - teaser-postFormat.php
  17. //   - teaser.php
  18. //
  19. // Notes:
  20. //  1) The atom()->post methods are not required, you can choose to use default WP functions instead. Atom methods are more flexible, and theoretically faster...
  21. //
  22. //  2) Notice the difference between getMethod() and Method().
  23. //     The first one will return the value, while the second one will output the value to the screen
  24. //
  25. //  3) In case you're writing your own template inside a child theme, you don't have to do any option checks, just choose to display what you want.
  26. //     That's the purpose of creating and using a child theme...
  27.  
  28. ?>
  29.  
  30. <?php if(atom()->options('post_title', 'post_date', 'post_category', 'post_tags', 'post_author', 'post_comments', 'post_content') === FALSE && atom()->options('post_thumbs')): ?>
  31.  
  32. <!-- post -->
  33. <div id="post-<?php the_ID(); ?>" <?php post_class('thumb-only'); ?>>
  34.   <a class="post-thumb tt" id="thumb-<?php the_ID(); ?>" href="<?php atom()->post->URL(); ?>" title="<?php atom()->post->title(); ?>">
  35.     <?php atom()->post->thumbnail(); ?>
  36.   </a>
  37. </div>
  38. <!-- /post -->
  39.  
  40. <?php else: ?>
  41.  
  42. <!-- post -->
  43. <div id="post-<?php the_ID(); ?>" <?php post_class('clear-block'); ?>>
  44.  
  45.   <div class="post-details">
  46.     <?php if(!(is_sticky() && is_home()) && atom()->options('post_thumbs')): ?>
  47.     <a class="post-thumb <?php if(!atom()->post->hasThumbnail()) echo 'none'; ?>" id="thumb-<?php the_ID(); ?>" href="<?php atom()->post->URL(); ?>" title="<?php atom()->post->title(); ?>">
  48.       <?php atom()->post->thumbnail(); ?>
  49.     </a>
  50.    <?php endif; ?>
  51.  
  52.     <?php if(atom()->options('post_title')): ?>
  53.     <h2 class="title">
  54.       <a href="<?php atom()->post->URL(); ?>" rel="bookmark" title="<?php atom()->te('Permanent Link: %s', atom()->post->getTitle()); ?>"><?php atom()->post->title(); ?></a>
  55.     </h2>
  56.     <?php endif; ?>
  57.  
  58.     <?php if(atom()->options('post_comments') && comments_open()): ?>
  59.     <a class="comments" href="<?php atom()->post->URL(); ?>#comments"><?php atom()->post->commentCount(); ?></a>
  60.     <?php endif; ?>
  61.  
  62.     <?php if((atom()->options('post_date') || atom()->options('post_category') || atom()->options('post_author')) && !(is_sticky() && is_home())): ?>
  63.     <div class="post-std clear-block">
  64.       <?php if(atom()->options('post_date')): ?>
  65.       <div class="post-date"><span class="ext"><?php atom()->post->date(); ?></span></div>
  66.       <?php else: ?>
  67.       <span class="ext"></span>
  68.       <?php endif; ?>
  69.  
  70.       <div class="post-info">
  71.  
  72.         <?php if(atom()->options('post_author')): ?>
  73.         <span class="a"><?php atom()->te('por %s', atom()->post->author->getNameAsLink()); ?></span>
  74.         <?php endif; ?>
  75.    
  76.         <?php if(atom()->options('post_category') && atom()->post->getTerms('category')): ?>
  77.         <?php atom()->te('em %s', atom()->post->getTerms('category', ', ')); ?>
  78.         <?php endif; ?>
  79.     | Visualizações <?php echo atom()->post->getViews(); ?>
  80.    
  81.         <?php // atom()->nte('%s view', '%s views', atom()->post->getViews(), number_format_i18n(atom()->post->getViews())); ?>
  82.       </div>
  83.  
  84. <p><span class='st_fblike_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='fblike'></span><span class='st_facebook_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='facebook'></span><span class='st_twitter_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='twitter'></span><span class='st_linkedin_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='linkedin'></span><span class='st_plusone_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='plusone'></span><span class='st_email_hcount' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='email'></span></p>
  85.  
  86. <a href="<?php atom()->post->URL(); ?>" rel="bookmark" title="<?php atom()->te('Permanent Link: %s', atom()->post->getTitle()); ?>"><?php the_post_thumbnail( $size, $attr ); ?></a>
  87.     </div>
  88.     <?php endif; ?>
  89.  
  90.     <?php if(atom()->options('post_content')): ?>
  91.     <div class="post-content clear-block">
  92.       <?php (is_sticky() && is_home()) ? the_content() : the_excerpt(); ?>
  93.  
  94.     </div>
  95.     <?php endif; ?>
  96.  
  97.     <?php if(atom()->options('post_tags') && atom()->post->getTerms()): ?>
  98.     <div class="post-extra">
  99.        <div class="post-tags"> <?php atom()->post->terms(); ?> </div>
  100.     </div>
  101.     <?php endif; ?>
  102.  
  103.   </div>
  104.  
  105.   <?php atom()->controls('post-edit'); ?>
  106. </div>
  107. <!-- /post -->
  108.  
  109. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment