-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathnews.php
88 lines (75 loc) · 2.65 KB
/
news.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
<?php include('inc_header.php'); ?>
<!-- .container main -->
<!-- .page-header -->
<!-- .header -->
<h3><?php printZenpageItemsBreadcrumb(); ?><?php printCurrentNewsCategory(' | ' . gettext('Category') . ' : '); ?><?php printCurrentNewsArchive(' | '); ?></h3>
</div><!-- .header -->
</div><!-- /.page-header -->
<?php if (is_NewsArticle()) {
// single news article
$news_class = 'post'; ?>
<?php if ((getPrevNewsURL()) || (getNextNewsURL())) { ?>
<nav class="row">
<ul class="pager margin-top-reset margin-bottom-reset">
<?php if (getPrevNewsURL()) { ?>
<li class="previous margin-bottom col-sm-6 pull-left">
<a href="<?php $article_url = getPrevNewsURL(); echo $article_url['link']; ?>" title="<?php echo $article_url['title']; ?>"> ← <?php echo shortenContent($article_url['title'], $zpB_shorten_title_size, ' (...)'); ?></a>
</li>
<?php } ?>
<?php if (getNextNewsURL()) { ?>
<li class="next margin-bottom col-sm-6 pull-right">
<a href="<?php $article_url = getNextNewsURL(); echo $article_url['link']; ?>" title="<?php echo $article_url['title']; ?>"><?php echo shortenContent($article_url['title'], $zpB_shorten_title_size, ' (...)'); ?> → </a>
</li>
<?php } ?>
</ul>
</nav>
<?php } ?>
<div class="row">
<?php if (getNewsExtraContent()) { ?>
<div class="col-sm-9">
<?php include('inc_print_news.php'); ?>
</div>
<div class="col-sm-3">
<div class="post extra-content clearfix">
<?php printNewsExtraContent(); ?>
</div>
</div>
<?php } else { ?>
<div class="col-sm-12">
<?php include('inc_print_news.php'); ?>
</div>
<?php } ?>
</div>
<?php if (extensionEnabled('comment_form')) { ?>
<?php include('inc_print_comment.php'); ?>
<?php } ?>
<?php } else {
// news article loop
$news_class = 'list-post'; ?>
<?php if ($_zp_zenpage->getAllCategories()) { ?>
<div class="row margin-bottom-double">
<div class="col-sm-offset-1 col-sm-10">
<?php printAllNewsCategories(gettext('All news'), true, 'news-cat-list', 'active'); ?>
</div>
</div>
<?php } ?>
<?php
if (!getOption('zpB_use_infinitescroll_news')) {
printNewsPageListWithNav('»', '«', true, 'pagination pagination-sm', true, 7);
}
?>
<div class="news-wrap">
<?php while (next_news()) { ?>
<?php include('inc_print_news.php'); ?>
<?php } ?>
</div>
<?php
if (!getOption('zpB_use_infinitescroll_news')) {
printNewsPageListWithNav('»', '«', true, 'pagination pagination-sm margin-top-reset', true, 7);
} else {
include('inc_print_infinitescroll_news.php');
}
?>
<?php } ?>
</div><!-- /.container main -->
<?php include('inc_footer.php'); ?>