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