diff options
Diffstat (limited to 'mod/groups/views')
-rw-r--r-- | mod/groups/views/default/discussion/group_module.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/invitationrequests.php | 2 | ||||
-rw-r--r-- | mod/groups/views/default/groups/membershiprequests.php | 5 | ||||
-rw-r--r-- | mod/groups/views/default/groups/profile/widgets.php | 6 | ||||
-rw-r--r-- | mod/groups/views/default/object/groupforumtopic.php | 4 | ||||
-rw-r--r-- | mod/groups/views/rss/annotation/group_topic_post.php | 32 | ||||
-rw-r--r-- | mod/groups/views/rss/discussion/replies.php | 12 | ||||
-rw-r--r-- | mod/groups/views/rss/forum/topicposts.php | 3 | ||||
-rw-r--r-- | mod/groups/views/rss/forum/topics.php | 10 | ||||
-rw-r--r-- | mod/groups/views/rss/forum/viewposts.php | 22 | ||||
-rw-r--r-- | mod/groups/views/rss/groups/contentwrapper.php | 5 | ||||
-rw-r--r-- | mod/groups/views/rss/groups/profile/layout.php | 13 | ||||
-rw-r--r-- | mod/groups/views/rss/groups/profileitems.php | 15 | ||||
-rw-r--r-- | mod/groups/views/rss/object/groupforumtopic.php | 49 |
14 files changed, 91 insertions, 89 deletions
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php index 3c9961f82..e0bcd55d6 100644 --- a/mod/groups/views/default/discussion/group_module.php +++ b/mod/groups/views/default/discussion/group_module.php @@ -31,7 +31,7 @@ $content = elgg_list_entities($options); elgg_pop_context(); if (!$content) { - $content = '<p>' . elgg_echo('grouptopic:notcreated') . '</p>'; + $content = '<p>' . elgg_echo('discussion:none') . '</p>'; } $new_link = elgg_view('output/url', array( diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php index e644b6bdc..94dbdf1f2 100644 --- a/mod/groups/views/default/groups/invitationrequests.php +++ b/mod/groups/views/default/groups/invitationrequests.php @@ -10,7 +10,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) { echo '<ul class="elgg-list">'; foreach ($vars['invitations'] as $group) { if ($group instanceof ElggGroup) { - $icon = elgg_view_entity_icon($group, 'tiny', array('hover' => 'true')); + $icon = elgg_view_entity_icon($group, 'tiny', array('use_hover' => 'true')); $group_title = elgg_view('output/url', array( 'href' => $group->getURL(), diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php index bc6d9af5a..2bac0e32b 100644 --- a/mod/groups/views/default/groups/membershiprequests.php +++ b/mod/groups/views/default/groups/membershiprequests.php @@ -7,10 +7,9 @@ */ if (!empty($vars['requests']) && is_array($vars['requests'])) { - $user = elgg_get_logged_in_user_entity(); echo '<ul class="elgg-list">'; foreach ($vars['requests'] as $user) { - $icon = elgg_view_entity_icon($user, 'tiny', array('hover' => 'true')); + $icon = elgg_view_entity_icon($user, 'tiny', array('use_hover' => 'true')); $user_title = elgg_view('output/url', array( 'href' => $user->getURL(), @@ -44,5 +43,5 @@ if (!empty($vars['requests']) && is_array($vars['requests'])) { } echo '</ul>'; } else { - echo '<p class="mtm">' . elgg_echo('groups:requests:none') . "</p>"; + echo '<p class="mtm">' . elgg_echo('groups:requests:none') . '</p>'; } diff --git a/mod/groups/views/default/groups/profile/widgets.php b/mod/groups/views/default/groups/profile/widgets.php index caf019a3a..7635cad4f 100644 --- a/mod/groups/views/default/groups/profile/widgets.php +++ b/mod/groups/views/default/groups/profile/widgets.php @@ -6,8 +6,8 @@ */ // tools widget area -echo '<div id="groups-tools" class="elgg-gallery elgg-gallery-fluid mtl clearfix">'; - +echo '<ul id="groups-tools" class="elgg-gallery elgg-gallery-fluid mtl clearfix">'; + // enable tools to extend this area echo elgg_view("groups/tool_latest", $vars); @@ -20,5 +20,5 @@ if ($right || $left) { echo $right; } -echo "</div>"; +echo "</ul>"; diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php index f3d5f96d5..34e0ee3cc 100644 --- a/mod/groups/views/default/object/groupforumtopic.php +++ b/mod/groups/views/default/object/groupforumtopic.php @@ -28,7 +28,7 @@ $tags = elgg_view('output/tags', array('tags' => $topic->tags)); $date = elgg_view_friendly_time($topic->time_created); $replies_link = ''; -$replies_text = ''; +$reply_text = ''; $num_replies = elgg_get_annotations(array( 'annotation_name' => 'group_topic_post', 'guid' => $topic->getGUID(), @@ -64,7 +64,6 @@ if ($full) { $params = array( 'entity' => $topic, - 'title' => false, 'metadata' => $metadata, 'subtitle' => $subtitle, 'tags' => $tags, @@ -77,7 +76,6 @@ if ($full) { $body = elgg_view('output/longtext', array('value' => $topic->description)); echo <<<HTML -$header $info $body HTML; diff --git a/mod/groups/views/rss/annotation/group_topic_post.php b/mod/groups/views/rss/annotation/group_topic_post.php new file mode 100644 index 000000000..0d3a40117 --- /dev/null +++ b/mod/groups/views/rss/annotation/group_topic_post.php @@ -0,0 +1,32 @@ +<?php +/** + * RSS view for a discussion reply + * + * @uses $vars['annotation'] + */ + +$annotation = $vars['annotation']; + +$poster = $annotation->getOwnerEntity(); +$poster_name = htmlspecialchars($poster->name, ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $annotation->getTimeCreated()); +$permalink = $annotation->getURL(); + +$title = elgg_echo('discussion:reply:title', array($poster_name)); + +$creator = elgg_view('page/components/creator', array('entity' => $annotation)); +$extensions = elgg_view('extensions/item', $vars); + +$item = <<<__HTML +<item> + <guid isPermaLink='true'>$permalink</guid> + <pubDate>$pubdate</pubDate> + <link>$permalink</link> + <title><![CDATA[$title]]></title> + <description><![CDATA[{$vars['annotation']->value}]]></description> + $creator$extensions +</item> + +__HTML; + +echo $item; diff --git a/mod/groups/views/rss/discussion/replies.php b/mod/groups/views/rss/discussion/replies.php new file mode 100644 index 000000000..419003b21 --- /dev/null +++ b/mod/groups/views/rss/discussion/replies.php @@ -0,0 +1,12 @@ +<?php +/** + * List replies RSS view + * + * @uses $vars['entity'] ElggEntity + */ + +$options = array( + 'guid' => $vars['entity']->getGUID(), + 'annotation_name' => 'group_topic_post', +); +echo elgg_list_annotations($options); diff --git a/mod/groups/views/rss/forum/topicposts.php b/mod/groups/views/rss/forum/topicposts.php deleted file mode 100644 index 15c5adc7f..000000000 --- a/mod/groups/views/rss/forum/topicposts.php +++ /dev/null @@ -1,3 +0,0 @@ -<?php - -?>
\ No newline at end of file diff --git a/mod/groups/views/rss/forum/topics.php b/mod/groups/views/rss/forum/topics.php deleted file mode 100644 index 1cb22aaea..000000000 --- a/mod/groups/views/rss/forum/topics.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php - /** - * Elgg groups plugin - * - * @package ElggGroups - */ - - // If there are any topics to view, view them - echo $vars['topics']; -?>
\ No newline at end of file diff --git a/mod/groups/views/rss/forum/viewposts.php b/mod/groups/views/rss/forum/viewposts.php deleted file mode 100644 index ad52365e6..000000000 --- a/mod/groups/views/rss/forum/viewposts.php +++ /dev/null @@ -1,22 +0,0 @@ -<?php - - /** - * Elgg groups plugin display topic posts - * - * @package ElggGroups - */ - - //display follow up comments - $count = $vars['entity']->countAnnotations('group_topic_post'); - $offset = (int) get_input('offset',0); - - foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "asc") as $post) { - - $post->title = ''; - $post->description = $post->value; - echo elgg_view('object/default', array('entity' => $post)); - // echo elgg_view("forum/topicposts",array('entity' => $post)); - - } - -?>
\ No newline at end of file diff --git a/mod/groups/views/rss/groups/contentwrapper.php b/mod/groups/views/rss/groups/contentwrapper.php deleted file mode 100644 index 15397d552..000000000 --- a/mod/groups/views/rss/groups/contentwrapper.php +++ /dev/null @@ -1,5 +0,0 @@ -<?php - - echo $vars['body']; - -?>
\ No newline at end of file diff --git a/mod/groups/views/rss/groups/profile/layout.php b/mod/groups/views/rss/groups/profile/layout.php new file mode 100644 index 000000000..3eeb9eaf2 --- /dev/null +++ b/mod/groups/views/rss/groups/profile/layout.php @@ -0,0 +1,13 @@ +<?php +/** + * Group profile RSS view + * + * Displays a list of the latest content in the group + * + * @uses $vars['entity'] ElggGroup object + */ + +echo elgg_list_entities(array( + 'type' => 'object', + 'container_guid' => $vars['entity']->getGUID(), +)); diff --git a/mod/groups/views/rss/groups/profileitems.php b/mod/groups/views/rss/groups/profileitems.php deleted file mode 100644 index 5e595a379..000000000 --- a/mod/groups/views/rss/groups/profileitems.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - /** - * Elgg groups items view. - * This is the messageboard, members, pages and latest forums posts. Each plugin will extend the views - * - * @package ElggGroups - */ - - //right column - if ($forae = elgg_get_entities(array('types' => 'object', 'container_guid' => $vars['entity']->guid))) { - foreach($forae as $forum) - echo elgg_view_entity($forum); - } - -?>
\ No newline at end of file diff --git a/mod/groups/views/rss/object/groupforumtopic.php b/mod/groups/views/rss/object/groupforumtopic.php index 19297b350..d730ef796 100644 --- a/mod/groups/views/rss/object/groupforumtopic.php +++ b/mod/groups/views/rss/object/groupforumtopic.php @@ -1,32 +1,35 @@ <?php /** - * Elgg groupforumtopic view + * Elgg groupforumtopic RSS view * - * @package Elgg - * @subpackage Core + * @package ElggGroups */ $title = $vars['entity']->title; - -$body = ''; -$annotation = $vars['entity']->getAnnotations('group_topic_post', 1, 0, "asc"); -if (count($annotation == 1)) { - $body = $annotation[0]->value; +if (empty($title)) { + $title = strip_tags($vars['entity']->description); + $title = elgg_get_excerpt($title, 32); } -?> +$permalink = htmlspecialchars($vars['entity']->getURL(), ENT_NOQUOTES, 'UTF-8'); +$pubdate = date('r', $vars['entity']->getTimeCreated()); + +$description = autop($vars['entity']->description); + +$creator = elgg_view('page/components/creator', $vars); +$georss = elgg_view('page/components/georss', $vars); +$extension = elgg_view('extensions/item', $vars); + +$item = <<<__HTML <item> -<guid isPermaLink='true'><?php echo htmlspecialchars($vars['entity']->getURL()); ?></guid> -<pubDate><?php echo date("r",$vars['entity']->time_created) ?></pubDate> -<link><?php echo htmlspecialchars($vars['entity']->getURL()); ?></link> -<title><![CDATA[<?php echo $title; ?>]]></title> -<description><![CDATA[<?php echo (autop($body)); ?>]]></description> -<?php - $owner = $vars['entity']->getOwnerEntity(); - if ($owner) { -?> -<dc:creator><?php echo $owner->name; ?></dc:creator> -<?php - } -?> -</item>
\ No newline at end of file + <guid isPermaLink="true">$permalink</guid> + <pubDate>$pubdate</pubDate> + <link>$permalink</link> + <title><![CDATA[$title]]></title> + <description><![CDATA[$description]]></description> + $creator$georss$extension +</item> + +__HTML; + +echo $item; |