aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authordave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-31 12:39:56 +0000
committerdave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-31 12:39:56 +0000
commit1d236907156a291118c744e6f0bf253f70eb0422 (patch)
tree85beaacd986f0773a9bda06ea5d37dac1f33d13b /mod
parent38c259631071183d630e9bfbf079bc12f35c400f (diff)
downloadelgg-1d236907156a291118c744e6f0bf253f70eb0422.tar.gz
elgg-1d236907156a291118c744e6f0bf253f70eb0422.tar.bz2
blog river view altered to pull out some content
git-svn-id: http://code.elgg.org/elgg/trunk@5563 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/blog/languages/en.php2
-rw-r--r--mod/blog/views/default/river/object/blog/create.php18
2 files changed, 11 insertions, 9 deletions
diff --git a/mod/blog/languages/en.php b/mod/blog/languages/en.php
index d1fc5528a..ecc0e9612 100644
--- a/mod/blog/languages/en.php
+++ b/mod/blog/languages/en.php
@@ -44,7 +44,7 @@ $english = array(
'blog:edit_revision_notice' => '(Old version)',
// river
- 'blog:river:create' => '%s made a new blog post.',
+ 'blog:river:create' => '%s wrote a new blog post',
);
diff --git a/mod/blog/views/default/river/object/blog/create.php b/mod/blog/views/default/river/object/blog/create.php
index fef666814..d59d601f5 100644
--- a/mod/blog/views/default/river/object/blog/create.php
+++ b/mod/blog/views/default/river/object/blog/create.php
@@ -1,20 +1,22 @@
<?php
/**
* Blog river view.
- *
- * @package Blog
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd
- * @copyright Curverider Ltd 2008-2010
- * @link http://elgg.org/
*/
$performed_by = get_entity($vars['item']->subject_guid);
$object = get_entity($vars['item']->object_guid);
$url = $object->getURL();
+$contents = strip_tags($object->description); //strip tags from the contents to stop large images etc blowing out the river view
$url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";
$title = sprintf(elgg_echo('blog:river:create'), $url);
-$string .= "<a href=\"" . $object->getURL() . "\">" . $object->title . "</a> <span class='entity_subtext'>" . friendly_time($object->publish_time) . "</span>";
-
+$string .= $title . " <a href=\"" . $object->getURL() . "\">" . $object->title . "</a> <span class='entity_subtext'>" . friendly_time($object->publish_time) . "</span>";
+$string .= "<div class=\"river_content_display\">";
+ $string .= "<div class='river_object_blog_create'></div>";
+ if(strlen($contents) > 200) {
+ $string .= substr($contents, 0, strpos($contents, ' ', 200)) . "...";
+ }else{
+ $string .= $contents;
+ }
+ $string .= "</div>";
echo $string; \ No newline at end of file