Skip to content

Commit c7bf485

Browse files
committed
Improvements
1 parent b2ceb92 commit c7bf485

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

system/includes/functions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ function get_teaser($text)
909909
{
910910
$teaserType = config('teaser.type');
911911

912-
if (strlen(strip_tags($text)) < config('teaser.char') || $teaserType === 'full') {
912+
if ($teaserType === 'full') {
913913
echo $text;
914914
} else {
915915
$string = preg_replace('/\s\s+/', ' ', strip_tags($text));

themes/clean/main.html.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
<?php } ?>
3737
<div class="teaser-body" itemprop="articleBody">
3838
<?php echo get_thumbnail($p->body) ?>
39-
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
39+
<p><?php echo get_teaser($p->body) ?>
40+
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
41+
</p>
4042
</div>
4143
</div>
4244
</div>

themes/default/main.html.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
<?php } ?>
3737
<div class="teaser-body" itemprop="articleBody">
3838
<?php echo get_thumbnail($p->body) ?>
39-
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
39+
<p><?php echo get_teaser($p->body) ?>
40+
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
41+
</p>
4042
</div>
4143
</div>
4244
</div>

themes/logs/main.html.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
<?php } ?>
3737
<div class="teaser-body" itemprop="articleBody">
3838
<?php echo get_thumbnail($p->body) ?>
39-
<p><?php echo get_teaser($p->body) ?>... <a href="<?php echo $p->url;?>#more">more</a></p>
39+
<p><?php echo get_teaser($p->body) ?>
40+
<?php if (config('teaser.type') === 'trimmed'):?> ... <a href="<?php echo $p->url;?>#more">more</a><?php endif;?>
41+
</p>
4042
</div>
4143
</div>
4244
</div>

0 commit comments

Comments
 (0)