forked from EddieRingle/wicketpixie
/
single.php
153 lines (128 loc) · 4.57 KB
/
single.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php get_header(); ?>
<?php $wp_auth_credit= wp_get_option( 'auth_credit' ); ?>
<!-- content -->
<div id="content">
<!-- google_ad_section_start -->
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<?php $postid = $post->ID; ?>
<!-- post -->
<div class="post" style="border-bottom:0;">
<?php
require_once(TEMPLATEPATH .'/app/customcode.php');
$glob = fetchcustomcode('global_announcement.php',true);
if($glob != "" && $glob != fetchcustomcode('idontexist.no')): ?>
<div class="highlight">
<?php
echo $glob;
?>
</div>
<?php endif; ?>
<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" style="text-decoration:none;"><?php the_title(); ?></a></h1>
<div class="post-comments">
<div class="post-comments">
<ul>
<?php
$addlink="#respond";
$countlink="#comments";
?>
<li class="post-comments-count"><a href="<?php the_permalink(); echo $countlink; ?>" title="View all <?php comments_number('0', '1', '%'); ?> Comments"><?php comments_number('0', '1', '%'); ?></a></li>
<li class="post-comments-add"><a href="<?php the_permalink(); echo $addlink; ?>" title="Add a Comment"><span> </span>Add a Comment</a></li>
</ul>
</div>
</div>
<div class="post-author">
<?php if( $wp_auth_credit == 1 ) { ?>
<?php echo get_avatar( get_the_author_email(), $size = '36', $default = 'images/avatar.jpg' ); ?>
<p><strong><?php the_time('l, F jS, Y') ?></strong><br/>
by <?php the_author_posts_link(); ?><?php edit_post_link('Edit', ' - ', ''); ?></p>
<?php } else { ?>
<p><strong><?php the_time('l, F jS, Y') ?></strong><br/>
at <?php the_time('g:ia') ?><?php edit_post_link('Edit', ' - ', ''); ?></p>
<?php } ?>
</div>
<div class="clearer"></div>
<!-- post-ad -->
<?php
if(is_enabled_adsense() == true) {
?>
<div id="post-ad">
<?php $adsense->wp_adsense('blog_post_side'); ?>
<ul style="margin: 15px 0 0 5px">
<p align="center">
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</p>
<?php if (wp_get_option('plug_related-posts')):?>
<?php wp_related_posts(5); ?>
<?php endif;?>
</ul>
</div>
<?php
} else {
?>
<div id="post-ad">
<!-- Enable Adsense on the WicketPixie Adsense Ads admin page. -->
<ul style="margin: 15px 0 0 5px">
<p align="center">
<script type="text/javascript" src="http://tweetmeme.com/i/scripts/button.js"></script>
</p>
<?php if (wp_get_option('plug_related-posts')):?>
<?php wp_related_posts(5); ?>
<?php endif;?>
</ul>
</div>
<?php
}
?>
<!-- /post-ad -->
<div class="KonaBody">
<?php the_content(); ?>
</div>
</div>
<!-- /post -->
<!-- google_ad_section_end -->
<!-- post-meta -->
<div class="post-meta">
<?php if(wp_get_option('plug_related-posts') && function_exists(wp_related_posts)):?>
<!-- related-posts -->
<div id="related-posts">
<h3>You might also be interested in...</h3>
<ul>
<?php wp_related_posts(); ?>
</ul>
</div>
<!-- /related-posts -->
<?php endif;?>
<!-- post-meta-right -->
<div class="post-meta-right">
<!-- post-meta-tags -->
<div class="post-meta-tags">
<h6>Tags</h6>
<?php the_tags('<ul><li>','</li><li>','</li></ul>'); ?>
</div>
<!-- /post-meta-tags -->
<!-- post-meta-categories -->
<div class="post-meta-categories">
<h6>Categories</h6>
<p> <?php the_category(); ?></p>
</div>
<!-- /post-meta-categories -->
<!-- post-bigbox -->
<!-- <div class="post-bigbox">
ad code goes here
</div> -->
<!-- /post-bigbox -->
</div>
<!-- /post-meta-right -->
<div class="clearer"></div>
</div>
<!-- /post-meta -->
<?php endwhile; ?>
<?php comments_template(); ?>
<?php endif; ?>
</div>
<!-- content -->
<!-- sidebar -->
<?php get_sidebar(); ?>
<!-- sidebar -->
<?php get_footer(); ?>