-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
99 lines (95 loc) · 3.52 KB
/
index.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
<?php
$content = parse_smileys($content, site_url() . 'assets/img/smilies/');
if (strpos($content, '<code class="') !== FALSE)
{
add_css_minify('assets/css/github.css');
add_js_jquery('
hljs.tabReplace = " ";
hljs.initHighlightingOnLoad();', 'assets/js/highlight.pack.js', 'link');
}
?>
<h1><?php echo $title; ?></h1>
<div class="content">
<?php if (isset($image)): ?>
<?php echo post_image($image, $created_at->sec, $title); ?>
<?php endif; ?>
<?php echo $content; ?>
<?php $last_update = ($updated_at->sec != '') ? $updated_at->sec : $created_at->sec; ?>
<?php if ($last_update < now() - 5184000): ?>
<div class="alert-message block-message warning">
Bu yazı en son <?php echo tr_date('d F Y', $last_update); ?> tarihinde düzenlenmiştir ve güncelliğini yitirmiş
olabilir.
</div>
<?php endif; ?>
</div>
<div class="post post-info">
<span class="date">
<?php echo tr_date('d F Y', $created_at->sec); ?>
</span>
<span class="category">
<?php echo categories($categories); ?>
</span>
<span class="tags">
<?php echo tags($tags); ?>
</span>
<span class="read">
<?php echo $counter; ?> kez okundu.
</span>
</div>
<div class="row post-share">
<div class="span5">
<?php echo anchor('http://feeds.feedburner.com/' . get_option('feedburner_username'), 'Yazılarımızı RSS ile takip edebilirsiniz.'); ?>
<div>
<g:plusone size="tall"></g:plusone>
<a href="https://twitter.com/share" class="twitter-share-button" data-count="vertical" data-via="navruzm"
data-lang="tr">Tweet</a>
<?php add_js_link('//apis.google.com/js/plusone.js') ?>
<?php add_js_link('//platform.twitter.com/widgets.js'); ?>
</div>
</div>
<div class="span6">
<?php if (count($related)): ?>
<div class="title">Benzer Yazılar</div>
<ul>
<?php foreach ($related as $_related) : ?>
<li><?php echo anchor($_related['slug'], $_related['title']); ?></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</div>
</div>
<hr/>
<?php if ($comments_enabled == 1 && get_option('disqus') != ''): ?>
<div id="disqus_thread">
<?php if (isset($comments) && count($comments)): ?>
<div id="dsq-content">
<ul id="dsq-comments">
<?php foreach ($comments as $comment) : ?>
<li>
<cite>
<?php if (isset($comment['author_url'])) : ?>
<?php echo anchor($comment['author_url'], $comment['author_name'], 'target="_blank" rel="nofollow"'); ?>
<?php else : ?>
<span><?php echo $comment['author_name']; ?></span>
<?php endif; ?>
</cite>
<div><?php echo $comment['message']; ?></div>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>
</div>
<?php add_js_inline("
function disqus_config() {
this.callbacks.onNewComment = [function(comment) {
$.get('".site_url('post/sync?id='.$_id.'&ident='.$disqus_identifier)."');
}];
}
var disqus_shortname = '" . get_option('disqus') . "';
var disqus_identifier = '" . $disqus_identifier . "';
var disqus_url = '" . site_url($slug) . "';", 'before'); ?>
<?php add_js_link('//' . get_option('disqus') . '.disqus.com/embed.js'); ?>
<a href="http://disqus.com" class="dsq-brlink" rel="nofollow">blog comments powered by <span
class="logo-disqus">Disqus</span></a>
<?php endif; ?>