Guest User

wp single php

a guest
Sep 28th, 2011
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.24 KB | None | 0 0
  1. <?php get_header(); ?>
  2. <div id="headgal">
  3.  
  4. <div id="main-content">
  5.  
  6. <div id="content" style="padding-right:0 !important;"> <div id="homepost">
  7.  
  8.  
  9.  
  10. <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  11.  
  12.  
  13. <div id="datemeta">
  14. <div id="datemeta_l"><b><?php _e("Published On", "nt"); ?>:</b> <?php the_time('D, M jS, Y') ?> </div>
  15. <div id="datemeta_r"><?php the_category(' / ') ?> | <?php _e("By", "nt"); ?> <b><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="<?php printf( esc_attr__( 'View all posts by %s'), get_the_author() ); ?>"><?php the_author(); ?> </a></b> <?php edit_post_link('Edit', ' <span>&middot;</span> ', ''); ?> </div>
  16. <div class="cb"></div>
  17. </div>
  18.  
  19.  
  20.  
  21.  
  22. <div class="post">
  23.  
  24.  
  25.  
  26. <h2> <?php the_title(); ?></h2>
  27.  
  28.  
  29.  
  30.  
  31. <?php if(get_option('ad4ok')!="yes"):?><?php endif?>
  32. <?php if(get_option('ad4ok')!="no"):?><center><?php echo get_option('ad4'); ?></center><?php endif?>
  33.  
  34. <div class="entry">
  35.  
  36. <?php if(get_option('shareok')!="no"):?>
  37. <div id="metabox"><div id="metabox_share"><?php _e("Share This", "nt"); ?></div>
  38. <div class="share">
  39. <ul> <li><a href="http://delicious.com/save" onclick="window.open('http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url='+encodeURIComponent('<?php the_permalink() ?>')+'&amp;title='+encodeURIComponent('<?php the_title() ?>'),'delicious', 'toolbar=no,width=550,height=550'); return false;">
  40. <img src="<?php bloginfo('template_directory'); ?>/icon/delicious.png" alt="Add to Delicious" border="0" /></a></li>
  41. <li><a href="javascript:var d=document,f='http://www.facebook.com/share',l=d.location,e=encodeURIComponent,p='.php?src=bm&amp;v=4&amp;i=1245532349&amp;u='+e(l.href)+'&amp;t='+e(d.title);1;try{if (!/^(.*\.)?facebook\.[^.]*$/.test(l.host))throw(0);share_internal_bookmarklet(p)}catch(z) {a=function() {if (!window.open(f+'r'+p,'sharer','toolbar=0,status=0,resizable=1,width=626,height=436'))l.href=f+p};if (/Firefox/.test(navigator.userAgent))setTimeout(a,0);else{a()}}void(0)" onclick="return wait_for_load(this, event, function() { return false });" id="share_bookmark" title="Share on Facebook">
  42. <img src="<?php bloginfo('template_directory'); ?>/icon/facebook.png" border="0" /></a>
  43. </li>
  44. <li><a href="http://friendfeed.com/?url=<?php the_permalink() ?>&amp;title=<?php the_title() ?>" target="_blank">
  45. <img src="<?php bloginfo('template_directory'); ?>/icon/friendfeed.png" alt="Share on FriendFeed" border="0" /></a> </li>
  46. <li><a href='javascript:(function(){var a=window,b=document,c=encodeURIComponent,d=a.open("http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk="+c(b.location)+"&amp;title="+c(b.title),"bkmk_popup","left="+((a.screenX||a.screenLeft)+10)+",top="+((a.screenY||a.screenTop)+10)+",height=420px,width=550px,resizable=1,alwaysRaised=1");a.setTimeout(function(){d.focus()},300)})();'>
  47. <img src="<?php bloginfo('template_directory'); ?>/icon/google.png" border="0" /> </a>
  48. </li>
  49. <li><a href="http://digg.com/submit?phase=2&url=<?php the_permalink();?>&title=<?php the_title();?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/icon/digg.png" alt="Digg" /></a></li>
  50. <li><a href="http://twitter.com/home?status=Currently reading <?php the_permalink(); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/icon/twitter.png" alt="" /></a></li>
  51. <li><a href="http://www.reddit.com/submit" onclick="window.location = 'http://www.reddit.com/submit?url=' + encodeURIComponent(window.location); return false">
  52. <img src="<?php bloginfo('template_directory'); ?>/icon/reddit.png" alt="submit to reddit" border="0" /> </a>
  53. </li>
  54.  
  55. <li><a href="javascript:location.href='http://www.myspace.com/Modules/PostTo/Pages/?c='+encodeURIComponent(location.href)+'&amp;t='+encodeURIComponent(document.title)">
  56. <img src="<?php bloginfo('template_directory'); ?>/icon/myspace.png" border="0" /> </a>
  57. </li>
  58.  
  59. <li><a href="http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>"><img src="<?php bloginfo('template_directory'); ?>/icon/stumbleupon.png" border="0" /></a></li>
  60.  
  61. <li><a href="javascript:void(document.location='http://technorati.com/faves?sub=favthis&amp;add='+escape(document.location))"><img src="<?php bloginfo('template_directory'); ?>/icon/technorati.png" border="0" /></a></li>
  62.  
  63. <li style="margin-left:9px;"><a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('template_directory'); ?>/images/subscribe_rss.png" border="0" /></a></li>
  64. </ul> </div>
  65. <div class="ptags"><span class="ptags_heading"><?php _e("Tags", "nt"); ?></span>
  66. <div style="margin-top:5px;text-align:center;"><?php the_tags('',''); ?></div>
  67. </div>
  68. </div><?php endif?><?php if(get_option('shareok')!="yes"):?><?php endif?>
  69. <?php
  70. ob_start();
  71. the_content(''.__('Read more <span class="meta-nav">»</span>', 'sandbox').'');
  72. $old_content = ob_get_clean();
  73. $new_content = strip_tags($old_content, '<script><p><a><b><br /><input><form><img><textarea><li><ol><ul><table>');
  74. echo $new_content;
  75. ?>
  76.  
  77.  
  78.  
  79. </div>
  80. </div>
  81.  
  82.  
  83.  
  84. <?php endwhile; else: ?>
  85.  
  86.  
  87.  
  88. <h2><?php _e("Not Found", "nt"); ?></h2>
  89.  
  90.  
  91.  
  92. <p><?php _e("Sorry, but you are looking for something that isn't here.", "nt"); ?></p>
  93.  
  94.  
  95.  
  96. <?php endif; ?>
  97.  
  98. <center style="font-weight: bold;"><?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?></center>
  99.  
  100.  
  101. <?php if(get_option('authorok')!="yes"):?><?php endif?>
  102.  
  103.  
  104.  
  105. <?php if(get_option('authorok')!="no"):?> <style>input, textarea{}
  106.  
  107.  
  108.  
  109. #authorarea{ padding-left: 8px; margin:10px 0; width: 635px; } #authorarea h3{ border-bottom: 1px solid #B0B0B0; color: #333333; font-family: georgia; font-size: 19px; font-weight: normal; line-height: 22px; margin:0 4px 5px; padding-left: 8px;}
  110. #authorarea h3 a{text-decoration:none; color:#333; font-weight:bold} #authorarea img{margin:0 5px; float:left; border:1px solid #ddd; width:40px; height:40px;}
  111. #authorarea p{color:#333; margin:0} #authorarea p a{color:#333} .authorinfo{ }
  112.  
  113. </style>
  114.  
  115.  
  116. <?php if(get_option('ad5ok')!="yes"):?><?php endif?>
  117. <?php if(get_option('ad5ok')!="no"):?><center><?php echo get_option('ad5'); ?></center><?php endif?>
  118. <div id="authorarea">
  119.  
  120. <h3><?php _e("About the Author", "nt"); ?></h3>
  121.  
  122. <?php if (function_exists('get_avatar')) { echo get_avatar( get_the_author_email(), '40' ); }?>
  123.  
  124.  
  125.  
  126. <div class="authorinfo">
  127.  
  128.  
  129.  
  130. <p><b><?php the_author_posts_link(); ?></b> - <?php the_author_description(); ?></p>
  131.  
  132.  
  133.  
  134. </div>
  135.  
  136.  
  137.  
  138. </div> <?php endif?>
  139.  
  140.  
  141.  
  142.  
  143.  
  144. <div id="related" class="clearfix">
  145.  
  146.  
  147.  
  148.  
  149. <div id="relatednews"><div id="relatednewsh2"><?php _e("Related News", "nt"); ?></div>
  150. <div style="float:right;height:19px;margin-right:10px;">
  151. <!-- AddThis Button BEGIN -->
  152. <div class="addthis_toolbox addthis_default_style ">
  153. <a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
  154. <a class="addthis_button_tweet"></a>
  155. <a class="addthis_counter addthis_pill_style"></a>
  156. </div>
  157. <script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>
  158. <!-- AddThis Button END -->
  159. </div>
  160. <div class="cb"></div></div>
  161.  
  162. <?php
  163. $categories = get_the_category($post->ID);
  164. if ($categories) { $category_ids = array();
  165. foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
  166. $args=array(
  167. 'category__in' => $category_ids,
  168. 'post__not_in' => array($post->ID),
  169. 'showposts'=> get_option('relatednum'),
  170. 'caller_get_posts'=>1
  171. );
  172. $my_query = new WP_Query($args); if( $my_query->have_posts() ) {
  173. while ($my_query->have_posts()) : $my_query->the_post();
  174. ?>
  175.  
  176. <div class="related">
  177.  
  178. <div class="relatedpost">
  179.  
  180. <?php if(get_option('thumbok')!="no"):?> <?php if( has_post_thumbnail() ) { ?>
  181. <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('relatedimg'); ?></a>
  182. <?php } else { ?>
  183. <a href="<?php the_permalink(); ?>"> <img src="<?php bloginfo('template_directory'); ?>/images/nothumbnail.png" /> </a><?php } ?>
  184. <?php endif?>
  185.  
  186. <?php if(get_option('thumbok')!="yes"):?>
  187. <?php $m_scrp = get_template_directory_uri() . '/includes/timthumb.php?';
  188. $m_image = '';
  189. $customfields = get_post_custom(); if (empty($customfields['image'][0])) {
  190. $m_image = m_theme_capture_first_image(); } else { $m_image = $customfields['image'][0]; } if (empty($m_image)) { $imgpath = $m_image_def; } else {
  191. $imgpath = $m_scrp . 'src=' . $m_image . '&amp;w=' . 150 . '&amp;h=' . 125 . '&amp;zc=1'; } ?>
  192. <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
  193. <img src="<?php echo $imgpath; ?>" alt="" /> </a>
  194. <?php endif?>
  195.  
  196.  
  197.  
  198. <h3><a href="<?php the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h3>
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206. </div>
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214. </div>
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221. <?php endwhile; } wp_reset_query(); } ?>
  222. <div class="cb"></div>
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230. </div>
  231.  
  232.  
  233.  
  234.  
  235.  
  236. <div id="comment_wrapper">
  237.  
  238. <?php comments_template(); ?>
  239. </div>
  240.  
  241.  
  242.  
  243.  
  244. </div> </div><div>
  245.  
  246. </div> </div>
  247.  
  248.  
  249.  
  250. <?php include(TEMPLATEPATH . '/sidebar-post.php'); ?>
  251.  
  252.  
  253.  
  254. <?php get_footer(); ?>
  255.  
Add Comment
Please, Sign In to add comment