diff options
Diffstat (limited to 'mod/groups/views/default/forum')
| -rw-r--r-- | mod/groups/views/default/forum/topicposts.php | 81 | ||||
| -rw-r--r-- | mod/groups/views/default/forum/topics.php | 33 | ||||
| -rw-r--r-- | mod/groups/views/default/forum/viewposts.php | 61 |
3 files changed, 0 insertions, 175 deletions
diff --git a/mod/groups/views/default/forum/topicposts.php b/mod/groups/views/default/forum/topicposts.php deleted file mode 100644 index 9c0d33726..000000000 --- a/mod/groups/views/default/forum/topicposts.php +++ /dev/null @@ -1,81 +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-2010 - * @link http://elgg.com/ - * - * @uses $vars['entity'] The posted comment to view - */ - - -?> - -<div class="entity_listing topic clearfloat"> -<a name="<?php echo $vars['entity']->id; ?>"></a> - <?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='entity_listing_icon'>" . elgg_view("profile/icon",array('entity' => $post_owner, 'size' => 'tiny')) . "</div>"; - // display the user name - echo "<div class='entity_listing_info'>"; - // if comment owner, group owner, or site admin - display edit and delete options - if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { - echo "<div class='entity_metadata'>"; - echo "<span class='delete_button'>".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') - ))."</span>"; - echo "<span class='entity_edit'><a class='link' onclick=\"elgg_slide_toggle(this,'.topic','.edit_comment');\">".elgg_echo('edit')."</a></span>"; - echo "</div>"; - - } - - echo "<p class='entity_title'>" . $post_owner->name . "</p>"; - } else { - echo "<div class='entity_listing_icon'><img src=\"" . elgg_view('icon/user/default/tiny') . "\" /></div>"; - echo "<div class='entity_listing_info'><p class='entity_title'>" . elgg_echo('profile:deleteduser') . "</p>"; - } - - //display the date of the comment - echo "<p class='entity_subtext'>" . friendly_time($vars['entity']->time_created) . "</p>"; - - //display the actual message posted - echo parse_urls(elgg_view("output/longtext",array("value" => $vars['entity']->value))); - - // if comment owner, group owner, or site admin - display edit-form - if (groups_can_edit_discussion($vars['entity'], page_owner_entity()->owner_guid)) { - //get the edit form and details - $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); - $text_textarea = elgg_view('input/longtext', array('internalname' => 'postComment'.$vars['entity']->id, 'value' => $vars['entity']->value)); - $post = elgg_view('input/hidden', array('internalname' => 'post', 'value' => $vars['entity']->id)); - $field = elgg_view('input/hidden', array('internalname' => 'field_num', 'value' => $vars['entity']->id)); - $topic = elgg_view('input/hidden', array('internalname' => 'topic', 'value' => get_input('topic'))); - $group = elgg_view('input/hidden', array('internalname' => 'group', 'value' => get_input('group_guid'))); - $edittopic_title = elgg_echo('groups:edittopic'); - - $form_body = <<<EOT - - <p class='longtext_inputarea'> - <label>$edittopic_title</label> - $text_textarea</p> - $post - $topic - $group - $field - $submit_input -EOT; - echo "<div class='edit_comment margin_top hidden'>"; - echo elgg_view('input/form', array('action' => "{$vars['url']}action/groups/editpost", 'body' => $form_body, 'internalid' => 'editforumpostForm')); - echo "</div>"; - } - echo "</div>"; // close entity_listing_info -?> - -</div>
\ 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 6280fe31a..000000000 --- a/mod/groups/views/default/forum/topics.php +++ /dev/null @@ -1,33 +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-2010 - * @link http://elgg.com/ - */ - -?> -<div id="content_header" class="clearfloat"> - <div class="content_header_title"> - <h2><?php echo elgg_echo("groups:forum"); ?></h2> - </div> - <?php // only show the add topic button if the user is a member - if(page_owner_entity()->isMember($vars['user'])) { - ?> - <div class="content_header_options"> - <a class="action_button" href="<?php echo $vars['url']; ?>mod/groups/addtopic.php?group_guid=<?php echo vars('group_guid'); ?>"><?php echo elgg_echo("groups:addtopic"); ?></a> - </div> - <?php - } - ?> -</div> -<?php - if($vars['topics']) - echo $vars['topics']; - else - echo "<p class='margin_top'>". elgg_echo("grouptopic:notcreated") . "</p>"; - -?>
\ 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 0ff70a38a..000000000 --- a/mod/groups/views/default/forum/viewposts.php +++ /dev/null @@ -1,61 +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-2010 - * @link http://elgg.com/ - */ - - // set up breadcrumbs - $group_guid = get_input('group_guid'); - $group = get_entity($group_guid); - elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/"); - elgg_push_breadcrumb($group->name, $group->getURL()); - elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), $CONFIG->wwwroot."pg/groups/forum/{$vars['entity']->container_guid}"); - elgg_push_breadcrumb($vars['entity']->title); - - echo elgg_view('navigation/breadcrumbs'); - - //display follow up comments - $count = $vars['entity']->countAnnotations('group_topic_post'); - $offset = (int) get_input('offset',0); - - $baseurl = $vars['url'] . "mod/groups/topicposts.php?topic={$vars['entity']->guid}&group_guid={$vars['entity']->container_guid}"; - echo elgg_view('navigation/pagination',array( - 'limit' => 50, - 'offset' => $offset, - 'baseurl' => $baseurl, - 'count' => $count, - )); - -?> -<!-- grab the topic title --> -<h2><?php echo $vars['entity']->title; ?></h2> -<?php - - foreach($vars['entity']->getAnnotations('group_topic_post', 50, $offset, "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 { - } - -?> |
