forked from vincent3569/i-feel-dirty
-
Notifications
You must be signed in to change notification settings - Fork 0
/
inc_print_comment.php
executable file
·39 lines (38 loc) · 1.17 KB
/
inc_print_comment.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
<?php
switch ($_zp_gallery_page) {
case 'album.php':
$comments_open = getOption('comment_form_albums');
$comments_allowed = $_zp_current_album->getCommentsAllowed();
break;
case 'image.php':
$comments_open = getOption('comment_form_images');
$comments_allowed = $_zp_current_album->getCommentsAllowed();
break;
case 'pages.php':
$comments_open = getOption('comment_form_pages');
$comments_allowed = $_zp_current_zenpage_page->getCommentsAllowed();
break;
case 'news.php':
$comments_open = getOption('comment_form_articles');
$comments_allowed = $_zp_current_zenpage_news->getCommentsAllowed();
break;
default:
return;
break;
}
?>
<?php if (($comments_open) && ($comments_allowed || (getCommentCount() > 0 ))){ ?>
<a class="fadetoggler"><img src="<?php echo $_zp_themeroot; ?>/images/icon-comment.png" alt="icon-comment" id="icon-comment" />
<?php
$num = getCommentCount();
if ($num == 0) {
echo gettext('No Comments');
} else {
echo sprintf(ngettext('%u Comment','%u Comments',$num), $num);
}
?>
</a>
<div id="comment-wrap" class="fader clearfix">
<?php printCommentForm(true, NULL, true); ?>
</div>
<?php } ?>