diff options
Diffstat (limited to 'mod/groups/views/default/forum')
| -rw-r--r-- | mod/groups/views/default/forum/topicposts.php | 69 | ||||
| -rw-r--r-- | mod/groups/views/default/forum/topics.php | 132 | ||||
| -rw-r--r-- | mod/groups/views/default/forum/viewposts.php | 44 |
3 files changed, 0 insertions, 245 deletions
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php deleted file mode 100644 index 73ba1ee90..000000000 --- a/mod/groups/views/default/forum/topicposts.php +++ /dev/null @@ -1,69 +0,0 @@ -<?php
-
- /**
- * Elgg Topic individual post view. This is all the follow up posts on a particular topic
- *
- * @package ElggGroups
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider Ltd <info@elgg.com>
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- *
- * @uses $vars['entity'] The posted comment to view
- */
-
-?>
-
- <div class="topic_post"><!-- start the topic_post -->
-
- <table width="100%">
- <tr>
- <td>
- <?php
- //get infomation about the owner of the comment
- if ($post_owner = get_user($vars['entity']->owner_guid)) {
-
- //display the user icon
- echo "<div class=\"post_icon\">" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'small')) . "</div>";
-
- //display the user name
- echo "<p><b>" . $post_owner->name . "</b><br />";
-
- } else {
- echo "<p>";
- }
-
- //display the date of the comment
- echo "<small>" . friendly_time($vars['entity']->time_created) . "</small></p>";
- ?>
- </td>
- <td width="70%">
- <?php
- //display the actual message posted
- echo "<p>" . parse_urls(elgg_view("output/longtext",array("value" => $vars['entity']->value))) . "</p>";
- ?>
- </td>
- </tr>
- </table>
- <?php
-
- //if the comment owner is looking at it, they can edit
- if ($vars['entity']->canEdit()) {
- ?>
- <p class="topic-post-menu">
- <?php
-
- echo elgg_view("output/confirmlink",array(
- 'href' => $vars['url'] . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- ));
-
- ?>
- </p>
-
- <?php
- }
- ?>
-
- </div><!-- end the topic_post -->
\ No newline at end of file diff --git a/mod/groups/views/default/forum/topics.php b/mod/groups/views/default/forum/topics.php deleted file mode 100644 index 18a8e4d0a..000000000 --- a/mod/groups/views/default/forum/topics.php +++ /dev/null @@ -1,132 +0,0 @@ -<?php
- /**
- * Elgg groups plugin
- *
- * @package ElggGroups
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-?>
-
-<div id="content_area_group_title"><h2><?php echo elgg_echo("groups:forum"); ?></h2></div>
-
-<?php
- //only show the add link if the user is a member
- if(page_owner_entity()->isMember($vars['user'])){
-
-?>
- <!-- display the add a topic link -->
- <a href="<?php echo $vars['url']; ?>mod/groups/addtopic.php?group_guid=<?php echo get_input('group_guid'); ?>" class="add_topic_button"><?php echo elgg_echo("groups:addtopic"); ?></a>
-
-<?php
- }
-?>
-
-<div id="forum_topics"><!-- start of the forum_topics div -->
-
-
- <!-- display the forum title -->
- <h2><?php echo get_entity(get_input("forum"))->title; ?></h2>
-
- <!-- display the column heading for a forum's topics -->
- <table width="100%" border="0" id="topic_titles">
- <tr>
- <td><b><?php echo elgg_echo("groups:topic"); ?></b></td>
- <td width="70px"><b><?php echo elgg_echo("groups:posts"); ?></b></td>
- <td width="130px"><b><?php echo elgg_echo("groups:lastperson"); ?></b></td>
- <td width="100px"><b><?php echo elgg_echo("groups:when"); ?></b></td>
- </tr>
- </table>
-
-
-<?php
- // If there are any topics to view, view them
- if (is_array($vars['entity']) && sizeof($vars['entity']) > 0) {
-
- foreach($vars['entity'] as $topic) {
-
- //This function controls the alternating background on table cells for topics
- $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
- //get the last reply annotation posted and the user who posted it
- //this is used to display the time and person who made the last post
- $last_post = $topic->getAnnotations("group_topic_post", 1, 0, "desc");
- //get the time and user
- foreach($last_post as $last){
- $last_time = $last->time_created;
- $last_user = $last->owner_guid;
- }
-
- //display the divs
- echo "<div class=\"forum_topics\"><div class=\"{$even_odd}\">";
-?>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>
- <p class="topic_title"><a href="<?php echo $vars['url']; ?>mod/groups/topicposts.php?topic=<?php echo $topic->guid; ?>&group_guid=<?php echo $topic->container_guid; ?>"><?php echo $topic->title; ?></a></p>
- <!-- display edit and delete links if the user has privileges -->
- <?php
-
- // check to see if the current user can edit
- if ($topic->canEdit()) {
-
- ?>
- <a href="<?php echo $vars['url']; ?>mod/groups/edittopic.php?topic=<?php echo $topic->guid; ?>&group=<?php echo $topic->container_guid; ?>"><?php echo elgg_echo("edit"); ?></a>
- <?php
-
- // display the delete link to those allowed to delete
- echo elgg_view("output/confirmlink", array(
- 'href' => $vars['url'] . "action/groups/deletetopic?topic=" . $topic->getGUID() . "&group=" . $topic->container_guid,
- 'text' => elgg_echo('delete'),
- 'confirm' => elgg_echo('deleteconfirm'),
- ));
-
- ?>
- <?php
- }
-
- ?>
- </td>
- <td width="70px" valign="top">
- <p><?php
- echo ($topic->countAnnotations("group_topic_post"));
- ?></p>
- </td>
- <td width="130px" valign="top">
- <p>
- <?php
- //display the last user to post
- if ($u = get_user($last_user))
- echo $u->name;
- ?>
- </p>
- </td>
- <td width="100px" valign="top">
- <p><small>
- <?php
- //display the time of the last post
- echo friendly_time($last_time);
- ?>
- </small></p>
- </td>
- </tr>
- </table>
-
- <!-- close the two display divs -->
- </div></div>
-
-<?php
- }
-
- } else {
-
- // if there are no topics, display a message saying so
- echo "<p>". elgg_echo("grouptopic:notcreated") . "</p>";
-
- }
-
-?>
-
- </div><!-- close the forum_topics div -->
\ No newline at end of file diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php deleted file mode 100644 index a832fd070..000000000 --- a/mod/groups/views/default/forum/viewposts.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php
-
- /**
- * Elgg groups plugin display topic posts
- *
- * @package ElggGroups
- * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
- * @author Curverider
- * @copyright Curverider Ltd 2008
- * @link http://elgg.com/
- */
-
-?>
-
-<div id="topic_posts"><!-- open the topic_posts div -->
-<div id="pages_breadcrumbs"><b><a href="<?php echo $vars['url']; ?>pg/groups/forum/<?php echo $vars['entity']->container_guid; ?>/"><?php echo elgg_echo("groups:forum"); ?></a></b> > <?php echo $vars['entity']->title; ?></div>
- <!-- grab the topic title -->
- <div id="content_area_group_title"><h2><?php echo $vars['entity']->title; ?></h2></div>
-
-<?php
- //display follow up comments
- foreach($vars['entity']->getAnnotations('group_topic_post', 50, 0, "asc") as $post) {
-
- echo elgg_view("forum/topicposts",array('entity' => $post));
-
- }
-
- // check to find out the status of the topic and act
- if($vars['entity']->status != "closed" && page_owner_entity()->isMember($vars['user'])){
-
- //display the add comment form, this will appear after all the existing comments
- echo elgg_view("forms/forums/addpost", array('entity' => $vars['entity']));
-
- } elseif($vars['entity']->status == "closed") {
-
- //this topic has been closed by the owner
- echo "<h2>" . elgg_echo("groups:topicisclosed") . "</h2>";
- echo "<p>" . elgg_echo("groups:topiccloseddesc") . "</p>";
-
- } else {
- }
-
-?>
-</div>
\ No newline at end of file |
