本文整理汇总了PHP中Articles::parseTitle方法的典型用法代码示例。如果您正苦于以下问题:PHP Articles::parseTitle方法的具体用法?PHP Articles::parseTitle怎么用?PHP Articles::parseTitle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Articles
的用法示例。
在下文中一共展示了Articles::parseTitle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
if ($count > 0) {
//calculate the pages
$pages = $pagies->calculate_pages($count, $perPage, $p);
//get the activity records
$res = $DB->prepare("SELECT \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`id`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`added`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`author`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`article`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`article_comments`.`text`, \r\n\t\t\t\t\t\t\t\t\t\t\t\t`account_data`.`displayName` AS `author_str` \r\n\t\t\t\t\t\t\t\t\t\t\tFROM `article_comments` \r\n\t\t\t\t\t\t\t\t\t\t\tLEFT JOIN `account_data` ON `account_data`.`id` = `article_comments`.`author` \r\n\t\t\t\t\t\t\t\t\t\t\tWHERE `article_comments`.`article` = :id \r\n\t\t\t\t\t\t\t\t\t\t\tORDER BY `article_comments`.`id` DESC \r\n\t\t\t\t\t\t\t\t\t\t\tLIMIT " . $pages['limit'] . ";");
$res->bindParam(':id', $ArticleID, PDO::PARAM_INT);
$res->execute();
//loop the records
while ($arr = $res->fetch()) {
echo '
<div class="comment_row" data-id="', $arr['id'], '">
<div class="headline">
<p><a href="', $config['BaseURL'], '/index.php?page=profile&uid=', $arr['author'], '">', $arr['author_str'], '</a> said:</p>
<span id="time" data-original="', $arr['added'], '">NaN</span>
</div>
<p class="comment">', Articles::parseTitle($arr['text']), '</p>
</div>';
}
}
unset($arr, $res);
?>
</div>
<?php
//Pagination
if ($count > 0 and $count > $perPage) {
echo '
<!-- Pagination -->
<br>
<div class="d-cont pagination-holder">
示例2: while
<h1><?php
echo $Count;
?>
Articles</h1>
<!--<p>/</p>
<h2><b>59</b> Comments</h2>-->
</div>
<?php
if ($Count > 0) {
while ($arr = $res->fetch()) {
echo '
<div class="article_short">
<a class="title" href="', $config['BaseURL'], '/index.php?page=article&id=', $arr['id'], '">', Articles::parseTitle($arr['title']), '</a><br/><br/>
<h4>', date('d M, Y', strtotime($arr['added'])), ' | ', $arr['views'], ' Views</h4>
<p>', Articles::parseTitle($arr['short_text']), '</p>
<a class="read_more" href="', $config['BaseURL'], '/index.php?page=article&id=', $arr['id'], '">Read More</a>
</div>';
}
} else {
echo 'There are no articles.';
}
?>
</div>
<div class="clear"></div>
</div>
<!-- Main side.End-->