diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-24 20:02:23 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-05-24 20:02:23 +0000 |
commit | 07727717f2341edc80ba9dc47e78649d1133b29b (patch) | |
tree | a942332e2e3f9599888530aea5af7f704f758126 /mod/blog/blog_lib.php | |
parent | f0c725f29aeb7e5e9b2d1fc9e846f90cdbb152a3 (diff) | |
download | elgg-07727717f2341edc80ba9dc47e78649d1133b29b.tar.gz elgg-07727717f2341edc80ba9dc47e78649d1133b29b.tar.bz2 |
Blog uses elgg_make_excerpt() now instead of its own.
git-svn-id: http://code.elgg.org/elgg/trunk@6190 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/blog/blog_lib.php')
-rw-r--r-- | mod/blog/blog_lib.php | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/mod/blog/blog_lib.php b/mod/blog/blog_lib.php index 9876b0a34..e2724ae0b 100644 --- a/mod/blog/blog_lib.php +++ b/mod/blog/blog_lib.php @@ -244,32 +244,6 @@ function blog_get_page_content_friends($user_guid) { } /** - * Returns an appropriate excerpt for a blog. - * Will return up to 250 chars stopping at the nearest space. - * If no spaces are found (like in Japanese) will crop off at the - * 250 char mark. - * - * @param string $text - * @param int $words - * @return string - */ -function blog_make_excerpt($text, $chars = 250) { - $text = trim(strip_tags($text)); - - // handle cases - $excerpt = elgg_substr($text, 0, $chars); - $space = elgg_strrpos($excerpt, ' ', 0); - - // don't crop if can't find a space. - if ($space === FALSE) { - $space = $chars; - } - $excerpt = trim(elgg_substr($excerpt, 0, $space)); - - return $excerpt ; -} - -/** * Returns a list of years and months for all blogs optionally for a user. * Very similar to get_entity_dates() except uses a metadata field. * |