Created
June 10, 2010 18:13
-
-
Save stevencwarren/433391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if(strlen($this->item->introtext) < 400): ?> | |
<?php echo $this->item->introtext ?> | |
<?php else: ?> | |
<?php if(!empty($this->item->introtext)): ?> | |
<?php $fulltext_array = explode('</p>', $this->item->introtext); ?> | |
<?php else: ?> | |
<?php $fulltext_array = explode('</p>', $this->item->fulltext); ?> | |
<?php endif; ?> | |
<?php | |
if(strip_tags($fulltext_array[0]) == ' '){ | |
$i = 1; | |
}else{ | |
$i = 0; | |
} | |
?> | |
<p><?php echo strip_tags($fulltext_array[$i]) ?></p> | |
<p><?php echo substr(strip_tags($fulltext_array[$i + 1]), 0, 325) ?></p> | |
<?php endif; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment