[ Index ]
 

Code source de WordPress 2.1.2

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/wp-content/themes/default/ -> attachment.php (source)

   1  <?php get_header(); ?>
   2  
   3      <div id="content" class="widecolumn">
   4  
   5    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
   6  
   7          <div class="navigation">
   8              <div class="alignleft">&nbsp;</div>
   9              <div class="alignright">&nbsp;</div>
  10          </div>
  11  <?php $attachment_link = get_the_attachment_link($post->ID, true, array(450, 800)); // This also populates the iconsize for the next line ?>
  12  <?php $_post = &get_post($post->ID); $classname = ($_post->iconsize[0] <= 128 ? 'small' : '') . 'attachment'; // This lets us style narrow icons specially ?>
  13          <div class="post" id="post-<?php the_ID(); ?>">
  14              <h2><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> &raquo; <a href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_title(); ?></a></h2>
  15              <div class="entry">
  16                  <p class="<?php echo $classname; ?>"><?php echo $attachment_link; ?><br /><?php echo basename($post->guid); ?></p>
  17  
  18                  <?php the_content('<p class="serif">Read the rest of this entry &raquo;</p>'); ?>
  19  
  20                  <?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
  21  
  22                  <p class="postmetadata alt">
  23                      <small>
  24                          This entry was posted
  25                          <?php /* This is commented, because it requires a little adjusting sometimes.
  26                              You'll need to download this plugin, and follow the instructions:
  27                              http://binarybonsai.com/archives/2004/08/17/time-since-plugin/ */
  28                              /* $entry_datetime = abs(strtotime($post->post_date) - (60*120)); echo time_since($entry_datetime); echo ' ago'; */ ?> 
  29                          on <?php the_time('l, F jS, Y') ?> at <?php the_time() ?>
  30                          and is filed under <?php the_category(', ') ?>.
  31                          You can follow any responses to this entry through the <?php comments_rss_link('RSS 2.0'); ?> feed. 
  32  
  33                          <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
  34                              // Both Comments and Pings are open ?>
  35                              You can <a href="#respond">leave a response</a>, or <a href="<?php trackback_url(true); ?>" rel="trackback">trackback</a> from your own site.
  36  
  37                          <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
  38                              // Only Pings are Open ?>
  39                              Responses are currently closed, but you can <a href="<?php trackback_url(true); ?> " rel="trackback">trackback</a> from your own site.
  40  
  41                          <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  42                              // Comments are open, Pings are not ?>
  43                              You can skip to the end and leave a response. Pinging is currently not allowed.
  44  
  45                          <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
  46                              // Neither Comments, nor Pings are open ?>
  47                              Both comments and pings are currently closed.
  48  
  49                          <?php } edit_post_link('Edit this entry.','',''); ?>
  50  
  51                      </small>
  52                  </p>
  53  
  54              </div>
  55          </div>
  56  
  57      <?php comments_template(); ?>
  58  
  59      <?php endwhile; else: ?>
  60  
  61          <p>Sorry, no attachments matched your criteria.</p>
  62  
  63  <?php endif; ?>
  64  
  65      </div>
  66  
  67  <?php get_footer(); ?>


Généré le : Fri Mar 30 19:41:27 2007 par Balluche grâce à PHPXref 0.7