本文整理汇总了PHP中Blorg::displayAd方法的典型用法代码示例。如果您正苦于以下问题:PHP Blorg::displayAd方法的具体用法?PHP Blorg::displayAd怎么用?PHP Blorg::displayAd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blorg
的用法示例。
在下文中一共展示了Blorg::displayAd方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: build
public function build()
{
$this->layout->startCapture('content');
Blorg::displayAd($this->app, 'top');
$this->displayPosts();
Blorg::displayAd($this->app, 'bottom');
$this->displayFooter();
$this->layout->endCapture();
}
示例2: build
public function build()
{
parent::build();
ob_start();
Blorg::displayAd($this->app, 'top');
echo $this->layout->data->content;
Blorg::displayAd($this->app, 'bottom');
$this->layout->data->content = ob_get_clean();
}
示例3: build
public function build()
{
if (isset($this->layout->navbar)) {
$this->buildNavBar();
}
$this->layout->startCapture('content');
Blorg::displayAd($this->app, 'top');
$this->displayArchive();
Blorg::displayAd($this->app, 'bottom');
$this->layout->endCapture();
$this->layout->data->title = Blorg::_('Archive');
}
示例4: displayComments
protected function displayComments()
{
if ($this->post->comment_status != SiteCommentStatus::CLOSED) {
Blorg::displayAd($this->app, 'post_comments');
$div_tag = new SwatHtmlTag('div');
$div_tag->id = 'comments';
$div_tag->class = 'entry-comments';
$div_tag->open();
$comments = $this->post->getVisibleComments();
$view = SiteViewFactory::get($this->app, 'post-comment');
$count = count($comments);
if ($count > 0) {
echo '<h3 class="comments-title">', Blorg::_('Comments'), '</h3>';
}
// display message for locked comments
if ($this->post->comment_status == SiteCommentStatus::LOCKED) {
$div_tag = new SwatHtmlTag('div');
$div_tag->class = 'comments-locked-message';
$div_tag->setContent(Blorg::_('Comments are locked. No additional comments may be ' . 'posted.'));
$div_tag->display();
}
foreach ($comments as $i => $comment) {
if ($i == $count - 1) {
$div_tag = new SwatHtmlTag('div');
$div_tag->id = 'last_comment';
$div_tag->open();
$view->display($comment);
$div_tag->close();
} else {
$view->display($comment);
}
}
$div_tag->close();
}
}
示例5: displayBodytext
protected function displayBodytext(BlorgPost $post)
{
switch ($this->getMode('bodytext')) {
case SiteView::MODE_ALL:
$div_tag = new SwatHtmlTag('div');
$div_tag->class = 'entry-content';
$div_tag->setContent($post->bodytext, 'text/xml');
$div_tag->display();
if ($this->getMode('extended_bodytext') == SiteView::MODE_ALL && ($post->extended_bodytext != '' || $this->app->config->blorg->ad_post_comments == '')) {
Blorg::displayAd($this->app, 'post_content');
}
break;
case SiteView::MODE_SUMMARY:
$bodytext = null;
$link = $this->getLink('bodytext');
// don't summarize microblogs
if ($post->title == '') {
$stripped_bodytext = strip_tags($post->bodytext);
$stripped_bodytext = html_entity_decode($stripped_bodytext, ENT_COMPAT, 'UTF-8');
if (strlen($stripped_bodytext) <= $this->microblog_length) {
$bodytext = $post->bodytext;
}
}
if ($bodytext === null) {
$flag = false;
$bodytext = SwatString::ellipsizeRight(SwatString::condense($post->bodytext), $this->bodytext_summary_length, ' …', $flag);
if ($flag && $link !== false) {
$anchor_tag = new SwatHtmlTag('a');
if (is_string($link)) {
$anchor_tag->href = $link;
} else {
$anchor_tag->href = $this->getRelativeUri($post);
}
$anchor_tag->setContent(Blorg::_('read more »'));
$bodytext .= ' ' . $anchor_tag;
}
}
$div_tag = new SwatHtmlTag('div');
$div_tag->class = 'entry-content';
$div_tag->setContent($bodytext, 'text/xml');
$div_tag->display();
break;
}
}
示例6: build
public function build()
{
if (isset($this->layout->navbar)) {
$this->buildNavBar();
}
$this->buildTitle();
$this->layout->startCapture('content');
Blorg::displayAd($this->app, 'top');
$this->displayAuthor();
if ($this->app->config->blorg->show_author_posts) {
$this->displayPosts();
$this->displayFooter();
}
Blorg::displayAd($this->app, 'bottom');
$this->layout->endCapture();
}
示例7: build
public function build()
{
if (isset($this->layout->navbar)) {
$this->buildNavBar();
}
$this->layout->startCapture('content');
Blorg::displayAd($this->app, 'top');
$this->displayMonths();
Blorg::displayAd($this->app, 'bottom');
$this->displayFooter();
$this->layout->endCapture();
$this->layout->data->title = $this->year;
}
示例8: build
public function build()
{
if (isset($this->layout->navbar)) {
$this->buildNavBar();
}
$this->layout->startCapture('content');
Blorg::displayAd($this->app, 'top');
$this->displayPosts();
Blorg::displayAd($this->app, 'bottom');
$this->layout->endCapture();
$date = new SwatDate();
$date->setDate($this->year, $this->month, 1);
$date->setTZ($this->app->default_time_zone);
$this->layout->data->title = $date->formatLikeIntl(SwatDate::DF_MY);
}
示例9: build
public function build()
{
if (isset($this->layout->navbar)) {
$this->buildNavBar();
}
$this->buildAtomLinks();
$this->layout->startCapture('content');
Blorg::displayAd($this->app, 'top');
$this->displayPosts();
$this->displayFooter();
Blorg::displayAd($this->app, 'bottom');
$this->layout->endCapture();
$this->layout->data->title = sprintf(Blorg::_('Posts Tagged: <em>%s</em>'), $this->tag->title);
}