Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
danpros committed Jul 14, 2015
1 parent b2ceb92 commit c7bf485
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion system/includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ function get_teaser($text)
{
$teaserType = config('teaser.type');

if (strlen(strip_tags($text)) < config('teaser.char') || $teaserType === 'full') {
if ($teaserType === 'full') {
echo $text;
} else {
$string = preg_replace('/\s\s+/', ' ', strip_tags($text));
Expand Down
4 changes: 3 additions & 1 deletion themes/clean/main.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
<?php } ?>
<div class="teaser-body" itemprop="articleBody">
<?php echo get_thumbnail($p->body) ?>
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
<p><?php echo get_teaser($p->body) ?>
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
</p>
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion themes/default/main.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
<?php } ?>
<div class="teaser-body" itemprop="articleBody">
<?php echo get_thumbnail($p->body) ?>
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
<p><?php echo get_teaser($p->body) ?>
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
</p>
</div>
</div>
</div>
Expand Down
4 changes: 3 additions & 1 deletion themes/logs/main.html.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
<?php } ?>
<div class="teaser-body" itemprop="articleBody">
<?php echo get_thumbnail($p->body) ?>
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
<p><?php echo get_teaser($p->body) ?>
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
</p>
</div>
</div>
</div>
Expand Down

0 comments on commit c7bf485

Please sign in to comment.