• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP getCommentCount函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中getCommentCount函数的典型用法代码示例。如果您正苦于以下问题:PHP getCommentCount函数的具体用法?PHP getCommentCount怎么用?PHP getCommentCount使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了getCommentCount函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: getBareImageTitle

                echo getBareImageTitle();
                ?>
"><img src="<?php 
                echo $_zp_themeroot;
                ?>
/images/search.png" alt="Zoom Image" /></a><?php 
            }
            ?>
						<?php 
            if (function_exists('printCommentForm') && $_zp_current_image->getCommentsAllowed() && $_zp_current_image->getCommentCount() > 0) {
                ?>
						<a class="album-tool" href="<?php 
                echo htmlspecialchars(getImageURL());
                ?>
" title="<?php 
                echo getCommentCount();
                ?>
 Comments"><img src="<?php 
                echo $_zp_themeroot;
                ?>
/images/shout.png" alt="Comments" /></a>
						<?php 
            }
            ?>
				</div>
				<a class="thumb" href="<?php 
            echo htmlspecialchars(getImageURL());
            ?>
" title="<?php 
            echo getBareImageTitle();
            ?>
开发者ID:kokyandrei,项目名称:Unsupported,代码行数:31,代码来源:album.php


示例2: printCommentForm

/**
 * Prints a form for posting comments
 *
 * @param bool $showcomments defaults to true for showing list of comments
 * @param string $addcommenttext alternate text for "Add a comment:"
 * @param bool $addheader set true to display comment count header
 * @param string $comment_commententry_mod use to add styles, classes to the comment form div
 * @param bool $desc_order default false, set to true to change the comment order to descending ( = newest to oldest)
 */
function printCommentForm($showcomments = true, $addcommenttext = NULL, $addheader = true, $comment_commententry_mod = '', $desc_order = false)
{
    global $_zp_gallery_page, $_zp_current_admin_obj, $_zp_current_comment, $_zp_captcha, $_zp_authority, $_zp_HTML_cache, $_zp_current_image, $_zp_current_album, $_zp_current_page, $_zp_current_article;
    if (getOption('email_new_comments')) {
        $email_list = $_zp_authority->getAdminEmail();
        if (empty($email_list)) {
            setOption('email_new_comments', 0);
        }
    }
    if (is_null($addcommenttext)) {
        $addcommenttext = '<h3>' . gettext('Add a comment:') . '</h3>';
    }
    switch ($_zp_gallery_page) {
        case 'album.php':
            if (!getOption('comment_form_albums')) {
                return;
            }
            $obj = $_zp_current_album;
            break;
        case 'image.php':
            if (!getOption('comment_form_images')) {
                return;
            }
            $obj = $_zp_current_image;
            break;
        case 'pages.php':
            if (!getOption('comment_form_pages')) {
                return;
            }
            $obj = $_zp_current_page;
            break;
        case 'news.php':
            if (!getOption('comment_form_articles') || !is_NewsArticle()) {
                return;
            }
            $obj = $_zp_current_article;
            break;
        default:
            return;
            break;
    }
    $comments_open = $obj->getCommentsAllowed();
    ?>
	<!-- printCommentForm -->
	<div id="commentcontent">
		<?php 
    $num = getCommentCount();
    if ($showcomments) {
        if ($num == 0) {
            if ($addheader) {
                echo '<h3 class="empty">' . gettext('No Comments') . '</h3>';
            }
            $display = '';
        } else {
            if ($addheader) {
                echo '<h3>' . sprintf(ngettext('%u Comment', '%u Comments', $num), $num) . '</h3>';
            }
            if (getOption('comment_form_toggle')) {
                ?>
					<div id="comment_toggle"><!-- place holder for toggle button --></div>
					<script type="text/javascript">
						// <!-- <![CDATA[
						function toggleComments(hide) {
							if (hide) {
								$('div.comment').hide();
								$('.Pagination').hide();
								$('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(false);"><?php 
                echo gettext('show comments');
                ?>
</button>');
							} else {
								$('div.comment').show();
								$('.Pagination').show();
								$('#comment_toggle').html('<button class="button buttons" onclick="toggleComments(true);"><?php 
                echo gettext('hide comments');
                ?>
</button>');
							}
						}
						$(document).ready(function () {
							toggleComments(window.location.hash.search(/#zp_comment_id_/));
						});
						// ]]> -->
					</script>
					<?php 
                $display = ' style="display:none"';
            } else {
                $display = '';
            }
        }
        $hideoriginalcomments = '';
//.........这里部分代码省略.........
开发者ID:ariep,项目名称:ZenPhoto20-DEV,代码行数:101,代码来源:comment_form.php


示例3: getCommentCount

 /**
  * Get the number of comments/replies for current entry
  *
  * @return integer
  */
 public function getCommentCount()
 {
     if (array_key_exists('commentcount', $this->_data)) {
         return $this->_data['commentcount'];
     }
     $commentcount = $this->getExtension('Thread') > getCommentCount();
     if (!$commentcount) {
         $commentcount = $this->getExtension('Atom')->getCommentCount();
     }
     $this->_data['commentcount'] = $commentcount;
     return $this->_data['commentcount'];
 }
开发者ID:mtday,项目名称:timesheet-system,代码行数:17,代码来源:Atom.php


示例4: commonComment

function commonComment()
{
    if (function_exists('printCommentForm')) {
        ?>
		<div id="commentbox">
			<?php 
        if (getCommentErrors() || getCommentCount() == 0) {
            $style = NULL;
            $head = '';
        } else {
            //TODO: if the following line is used as intended the comment textarea is hidden to start with and when shown is not full width.
            //				$style = ' class="comment" style="display:none;"';
            $style = ' class="commentx" style="display:block;"';
            $head = "<div{$style}><h3>" . gettext('Add a comment') . '</h3></div>';
        }
        printCommentForm(true, $head, true, $style);
        ?>
		</div><!-- id="commentbox" -->
		<?php 
    }
}
开发者ID:rb26,项目名称:zenphoto,代码行数:21,代码来源:functions.php


示例5: gettext

<?php

// force UTF-8 Ø
?>
<!-- stopdesign comment form -->
<?php 
$showhide = "<a href=\"#comments\" id=\"showcomments\"><img src=\"" . $_zp_themeroot . "/images/btn_show.gif\" width=\"35\" height=\"11\" alt=\"" . gettext("SHOW") . "\" /></a> <a href=\"#content\" id=\"hidecomments\"><img src=\"" . $_zp_themeroot . "/images/btn_hide.gif\" width=\"35\" height=\"11\" alt=\"" . gettext("HIDE") . "\" /></a>";
$num = getCommentCount();
?>
<h2>
	<?php 
if ($num == 0) {
    echo gettext("No comments yet");
} else {
    printf(ngettext('%u comment so far', '%u comments so far', $num), $num) . ' ' . $showhide;
}
?>
</h2>
<?php 
printCommentErrors();
?>

<!-- BEGIN #comments -->
<div id="comments">
	<?php 
$autonumber = 0;
while (next_comment()) {
    if (!$autonumber) {
        ?>
				<dl class="commentlist">
				<?php 
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:comment.php


示例6: shortenContent

        ?>
<div><?php 
        echo shortenContent(getAlbumDesc(), 115, '...');
        ?>
</div><?php 
    }
    ?>
						<small>
	<?php 
    printAlbumDate();
    ?>
	<?php 
    if (getCommentCount() > 0) {
        ?>
&bull;&nbsp;<?php 
        echo getCommentCount() . ' ' . gettext('Comment(s)');
    }
    ?>
						</small>
					</li>
	<?php 
    $x++;
}
?>
			</ul>
		</div>
		<div class="paging">
<?php 
if (getPrevPageURL() || getNextPageURL()) {
    ?>
	<?php 
开发者ID:Imagenomad,项目名称:Unsupported,代码行数:31,代码来源:gallery.php


示例7: printNewsTitle

    }
    ?>
		<?php 
    if (getPrevNewsURL() or getPrevNewsURL()) {
        ?>
<br clear:both /><?php 
    }
    ?>
		<h3><?php 
    printNewsTitle();
    ?>
</h3>

		<div class="newsarticlecredit">
			<span class="newsarticlecredit-left"> <?php 
    $count = getCommentCount();
    $cat = getNewsCategories();
    printNewsDate();
    if ($count > 0) {
        echo ' | ';
        printf(gettext("Comments: %d"), $count);
    }
    if (!empty($cat)) {
        echo ' | ';
    }
    ?>
			</span>
			<?php 
    if (!empty($cat)) {
        printNewsCategories(", ", gettext("Categories: "), "newscategories");
    }
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:31,代码来源:news.php


示例8: sendCommentPing

                 $pool->setQualifier('draft', 'equals', 0);
                 $pool->setQualifier('visibility', 'equals', 3);
                 $pool->setQualifier('acceptcomment', 'equals', 1);
                 $row = $pool->getAll('*');
                 if (!empty($row)) {
                     sendCommentPing($entryId, $context->getProperty('uri.default') . "/" . ($context->getProperty('blog.useSloganOnPost') ? "entry/{$row['slogan']}" : $entryId), is_null($user) ? $comment['name'] : $user['name'], is_null($user) ? $comment['homepage'] : $user['homepage']);
                 }
             }
             importlib('model.blog.skin');
             $skin = new Skin($context->getProperty('skin.skin'));
             if ($entryId > 0) {
                 $commentBlock = getCommentView($entry, $skin);
                 dress('article_rep_id', $entryId, $commentBlock);
                 $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock)));
                 $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), null, $skin->recentCommentItem)));
                 $commentCount = getCommentCount($blogid, $entryId);
                 $commentCount = $commentCount > 0 ? $commentCount : 0;
                 list($tempTag, $commentView) = getCommentCountPart($commentCount, $skin);
             } else {
                 $commentView = '';
                 $commentBlock = getCommentView($entry, $skin);
                 dress('article_rep_id', $entryId, $commentBlock);
                 $commentBlock = escapeCData(revertTempTags(removeAllTags($commentBlock)));
                 $commentCount = 0;
                 $recentCommentBlock = escapeCData(revertTempTags(getRecentCommentsView(getRecentComments($blogid), $skin->recentComment, $skin->recentCommentItem)));
             }
             Respond::PrintResult(array('error' => 0, 'commentView' => $commentView, 'commentCount' => $commentCount, 'commentBlock' => $commentBlock, 'recentCommentBlock' => $recentCommentBlock));
             exit;
         }
     }
 }
开发者ID:Avantians,项目名称:Textcube,代码行数:31,代码来源:index.php


示例9: str_innerHTML

Comment");
			obj.innerHTML = "<?php 
                echo str_innerHTML($tempComments);
                ?>
";
		} catch(e) { }
		try {
			obj = loader.document.getElementById("recentComments");
			obj.innerHTML = "<?php 
                echo str_innerHTML($tempRecentComments);
                ?>
";
		} catch(e) { }
		try {
<?php 
                $commentCount = getCommentCount($blogid, $comment['entry']);
                list($tempTag, $commentView) = getCommentCountPart($commentCount, $skin);
                $commentCount = $commentCount > 0 ? "({$commentCount})" : '';
                ?>
			obj = loader.document.getElementById("commentCount<?php 
                echo $comment['entry'];
                ?>
");
			if (obj != null) obj.innerHTML = "<?php 
                echo str_innerHTML($commentView);
                ?>
";
		} catch(e) { }
		try {
			obj = loader.document.getElementById("commentCountOnRecentEntries<?php 
                echo $comment['entry'];
开发者ID:webhacking,项目名称:Textcube,代码行数:31,代码来源:index.php


示例10: sideComments

                }
                $nextID = $photoRes[$nChkN]['picID'];
                $photoPic .= <<<TO
     
   <!-- Right arrow shall be included in the ajax -->
   <div id="allPhotoRightArrow">
   <a href="../libs/aAjaxClass/photoAjax.php?user={$curU}&PN={$nChkN}&imgID={$nextID}&PVB=true&album={$album}"></a>
    </div>
TO;
                break;
            }
        }
        $comInfo = sideComments($pID);
        $approve = getApprove($pID);
        $appPeople = getPeopleApprove($pID);
        $comCount = getCommentCount($pID);
        $pPostID = "post_" . getPostID($pID);
        $title = date('l, M d, Y @ h:ia', $PVBRes[0]['picTime']);
        $time = relativeTime($PVBRes[0]['picTime']);
        /**/
        $allData = ["op" => "YES", "pic" => $photoPic, "picTime" => $time, "com" => $comInfo, "approve" => $approve, "peopleAprove" => $appPeople, "comCount" => $comCount, "postID" => $pPostID, "albumN" => $album, "title" => $title];
        echo json_encode($allData);
        //print_r($allData);
    }
}
//ADD NEW ALBUM TO THE PHOTO ADD
if ($_GET['newAlbum'] == true) {
    $ab = [];
    $fabulm = false;
    $albumName = urldecode($_GET['albumName']);
    //check if its the first album
开发者ID:Neldris,项目名称:Amisti,代码行数:31,代码来源:photoAjax.php


示例11: commonNewsLoop

function commonNewsLoop($paged)
{
    $newstypes = array('album' => gettext('album'), 'image' => gettext('image'), 'video' => gettext('video'), 'news' => gettext('news'));
    while (next_news()) {
        $newstype = getNewsType();
        $newstypedisplay = $newstypes[$newstype];
        if (stickyNews()) {
            $newstypedisplay .= ' <small><em>' . gettext('sticky') . '</em></small>';
        }
        ?>
		<div class="newsarticle<?php 
        if (stickyNews()) {
            echo ' sticky';
        }
        ?>
">
			<h3><?php 
        printNewsTitleLink();
        echo " <span class='newstype'>[" . $newstypedisplay . "]</span>";
        ?>
</h3>
			<div class="newsarticlecredit">
				<span class="newsarticlecredit-left">
					<?php 
        $count = getCommentCount();
        $cat = getNewsCategories();
        printNewsDate();
        if ($count > 0) {
            echo ' | ';
            printf(gettext("Comments: %d"), $count);
        }
        ?>
				</span>
				<?php 
        if (is_GalleryNewsType()) {
            echo ' | ' . gettext("Album:") . " <a href='" . getNewsAlbumURL() . "' title='" . getBareNewsAlbumTitle() . "'>" . getNewsAlbumTitle() . "</a>";
        } else {
            if (!empty($cat) && !in_context(ZP_ZENPAGE_NEWS_CATEGORY)) {
                echo ' | ';
                printNewsCategories(", ", gettext("Categories: "), "newscategories");
            }
        }
        ?>
			</div> <!-- newsarticlecredit -->
			<br clear="all" />
			<?php 
        printCodeblock(1);
        ?>
			<?php 
        printNewsContent();
        ?>
			<?php 
        printCodeblock(2);
        ?>
			<br clear="all" />
			</div>
	<?php 
    }
    if ($paged) {
        printNewsPageListWithNav(gettext('next &raquo;'), gettext('&laquo; prev'), true, 'pagelist', true);
    }
}
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:62,代码来源:functions.php


示例12: getDefaultCenterPanel


//.........这里部分代码省略.........

										<div id="total-information">
											<h4 class="caption"><span><?php 
        echo _t('요약');
        ?>
</span></h4>

											<table class="posts-line">
												<caption><?php 
        echo _t('글');
        ?>
</caption>
												<thead>
													<th>type</th>
													<th>sum</th>
												</thead>
												<tbody>
													<tr>
														<td class="type"><?php 
        echo _t('글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getEntriesTotalCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('댓글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getCommentCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('방명록');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getGuestbookCount($blogid));
        ?>
</td>
													</tr>
													<tr>
														<td class="type"><?php 
        echo _t('걸린 글');
        ?>
</td>
														<td class="sum"><?php 
        echo number_format(getTrackbackCount($blogid));
        ?>
</td>
													</tr>
												</tbody>
											</table>
											<table class="visitors-line">
												<caption><?php 
        echo _t('방문자');
        ?>
</caption>
												<thead>
													<th>type</th>
开发者ID:webhacking,项目名称:Textcube,代码行数:67,代码来源:index.php


示例13: printNewsDate

</h5>
						<div class="news-info">
							<?php 
            if (getNewsDate() && getOption('libratus_date_news')) {
                ?>
<span><i class="fa fa-calendar-o"></i>&nbsp;<?php 
                printNewsDate();
                ?>
&nbsp;&nbsp;&nbsp;&nbsp;</span><?php 
            }
            ?>
							<?php 
            if (function_exists('getCommentCount')) {
                ?>
							<span><i class="fa fa-comments-o"></i>&nbsp;<?php 
                echo gettext('Comments:') . ' ' . getCommentCount();
                ?>
&nbsp;&nbsp;&nbsp;&nbsp;</span>
							<?php 
            }
            ?>
							<?php 
            if (getNewsCategories()) {
                ?>
<span><i class="fa fa-folder-o"></i>&nbsp;<?php 
                printNewsCategories(', ', '', 'taglist');
                ?>
&nbsp;&nbsp;&nbsp;&nbsp;</span><?php 
            }
            ?>
						</div>
开发者ID:ckfreeman,项目名称:libratus,代码行数:31,代码来源:news.php


示例14: getRiverActivity

function getRiverActivity($activities, $user, $login_user)
{
    $handle = array();
    $site_url = get_config('wwwroot');
    foreach ($activities as $activity) {
        $userEntity = get_entity($activity->subject_guid);
        $avatar_url = getProfileIcon($userEntity);
        $object_guid = $activity->object_guid;
        $entity = get_entity($object_guid);
        $activity_like = checkLike($activity->object_guid, $login_user->guid);
        $activity_comment_count = getCommentCount($activity);
        $activity_like_count = likes_count_number_of_likes($activity->object_guid);
        $entityString = "";
        $entityTxt = "";
        $icon_url = "";
        $img_url = "";
        $message_board = "";
        $container_entity = "";
        $batch_images = array();
        $isObject = false;
        if ($activity->subtype == "tidypics_batch") {
            $isObject = true;
            $batch_images = getBatchImages($activity->object_guid, $user->guid);
            if (sizeof($batch_images) > 1) {
                $entityTxt = "added the photos to the album";
                $album_guid = $batch_images[0]['container_guid'];
                $activity_like = checkLike($album_guid, $login_user->guid);
                $activity_comment_count = api_get_image_comment_count($album_guid);
                $activity_like_count = likes_count_number_of_likes($album_guid);
            } else {
                if (sizeof($batch_images) == 1) {
                    $activity_like_count = $batch_images[0]['like_count'];
                    $activity_comment_count = $batch_images[0]['comment_count'];
                    $activity_like = $batch_images[0]['like'];
                    $img = get_entity($batch_images[0]['guid']);
                    $original_file_name = $img->originalfilename;
                    $container_entity = get_entity($entity->container_guid);
                    if ($img->title != null) {
                        $entityTxt = "added the photo " . $img->title . " to the album " . $container_entity->title;
                    } else {
                        $entityTxt = "added the photo " . $original_file_name . " to the album " . $container_entity->title;
                    }
                    if ($img->description != null) {
                        if (strlen($img->description) > 300) {
                            $entityString = substr(strip_tags($img->description), 0, 300);
                            $entityString = preg_replace('/\\W\\w+\\s*(\\W*)$/', '$1', $entityString) . '...';
                        } else {
                            $entityString = strip_tags($img->description);
                        }
                    } else {
                        $entityString = '';
                    }
                }
            }
        } else {
            if ($activity->action_type == "create" && $activity->subtype == "album") {
                $isObject = true;
                $album = get_entity($activity->object_guid);
                $entityTxt = "created a new photo album " . $album->title;
                $container_entity = get_entity($entity->container_guid);
                if ($container_entity->type == 'group') {
                    $entityTxt = $entityTxt . ' in the group ' . $container_entity->name;
                }
                $album_cover = $album->getCoverImage();
                $file_name = $album_cover->getFilenameOnFilestore();
                $image_join_date = $album_cover->time_created;
                $position = strrpos($file_name, '/');
                $position = $position + 1;
                $icon_file_name = substr_replace($file_name, 'largethumb', $position, 0);
                $image_icon_url = $site_url . 'services/api/rest/json/?method=image.get_post';
                $image_icon_url = $image_icon_url . '&joindate=' . $image_join_date . '&guid=' . $album_cover->guid . '&name=' . $icon_file_name;
                $image_icon_url = elgg_format_url($image_icon_url);
                $image_url = $site_url . 'services/api/rest/json/?method=image.get_post';
                $image_url = $image_url . '&joindate=' . $image_join_date . '&guid=' . $album_cover->guid . '&name=' . $file_name;
                $image_url = elgg_format_url($image_url);
                $batch_images[] = createAlbumCoverImage($album_cover, $image_join_date, $image_icon_url, $image_url, $user);
            } else {
                if ($activity->action_type == "friend" && $activity->subtype == "") {
                    $isObject = true;
                    $msg = "is now a friend with";
                    $friendEntity = get_entity($activity->object_guid);
                    $entityTxt = $msg . " " . $friendEntity->name;
                    $icon_url = getProfileIcon($friendEntity);
                    $icon_url = elgg_format_url($icon_url);
                    $img_url = getProfileIcon($friendEntity, 'master');
                    //$friendEntity->getIconURL('master');
                    if (strpos($img_url, 'user/defaultmaster.gif') !== false) {
                        $img_url = getProfileIcon($friendEntity, 'large');
                        //$friendEntity->getIconURL('large');
                    }
                    $img_url = elgg_format_url($img_url);
                } else {
                    if ($activity->action_type == "update" && $activity->view == 'river/user/default/profileiconupdate') {
                        $isObject = true;
                        $entityTxt = "has a new avatar";
                        $entityString = "";
                        $timeCreated = time_ago($activity->posted);
                        $batch_images[] = createProfileImageBatch($activity->object_guid, $timeCreated, $userEntity);
                    } else {
                        if ($activity->subtype == "comment" && $activity->action_type == "comment" && $activity->view == 'river/object/comment/album') {
//.........这里部分代码省略.........
开发者ID:manlui,项目名称:elgg_with_rest_api,代码行数:101,代码来源:core.php


示例15: printCommentForm

/**
 * Prints a form for posting comments
 *
 * @param bool $showcomments defaults to true for showing list of comments
 * @param string $addcommenttext alternate text for "Add a comment:"
 * @param bool $addheader set true to display comment count header
 * @param string $comment_commententry_mod use to add styles, classes to the comment form div
 */
function printCommentForm($showcomments = true, $addcommenttext = NULL, $addheader = true, $comment_commententry_mod = '')
{
    global $_zp_gallery_page, $_zp_themeroot, $_zp_current_admin_obj, $_zp_current_comment;
    if (is_null($addcommenttext)) {
        $addcommenttext = '<h3>' . gettext('Add a comment:') . '</h3>';
    }
    switch ($_zp_gallery_page) {
        case 'album.php':
            if (!getOption('comment_form_albums')) {
                return;
            }
            $comments_open = OpenedForComments(ALBUM);
            $formname = '/comment_form.php';
            break;
        case 'image.php':
            if (!getOption('comment_form_images')) {
                return;
            }
            $comments_open = OpenedForComments(IMAGE);
            $formname = '/comment_form.php';
            break;
        case 'pages.php':
            if (!getOption('comment_form_pages')) {
                return;
            }
            $comments_open = zenpageOpenedForComments();
            $formname = '/comment_form.php';
            break;
        case 'news.php':
            if (!getOption('comment_form_articles')) {
                return;
            }
            $comments_open = zenpageOpenedForComments();
            $formname = '/comment_form.php';
            break;
        default:
            return;
            break;
    }
    $arraytest = '/^a:[0-9]+:{/';
    // this screws up Eclipse's brace count!!!
    ?>
<!-- printCommentForm -->
	<div id="commentcontent">
		<?php 
    $num = getCommentCount();
    if ($showcomments) {
        if ($num == 0) {
            if ($addheader) {
                echo '<h3 class="empty">' . gettext('No Comments') . '</h3>';
            }
            $display = '';
        } else {
            if ($addheader) {
                echo '<h3>' . sprintf(ngettext('%u Comment', '%u Comments', $num), $num) . '</h3>';
            }
            if (getOption('comment_form_toggle')) {
                ?>
					<script type="text/javascript">
						// <!-- <![CDATA[
						function toggleComments(hide) {
							if (hide) {
								$('div.comment').hide();
								$('#comment_toggle').html('<button type="button" onclick="javascript:toggleComments(false);"><?php 
                echo gettext('show comments');
                ?>
</button>');
							} else {
								$('div.comment').show();
								$('#comment_toggle').html('<button type="button" onclick="javascript:toggleComments(true);"><?php 
                echo gettext('hide comments');
                ?>
</button>');
							}
						}
						$(document).ready(function() {
							toggleComments(true);
						});
						// ]]> -->
					</script>
					<?php 
                $display = ' style="display:none"';
            } else {
                $display = '';
            }
        }
        ?>
		<div id="comments">
			<div id="comment_toggle"><!-- place holder for toggle button --></div>
			<?php 
        while (next_comment()) {
            if (!getOption('comment_form_showURL')) {
//.........这里部分代码省略.........
开发者ID:hatone,项目名称:zenphoto-1.4.1.4,代码行数:101,代码来源:comment_form.php



注:本文中的getCommentCount函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getComments函数代码示例发布时间:2022-05-15
下一篇:
PHP getComment函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap