PERMALINK.php

Last updated by mariano Comments (2)

<?php

/**

 * permalink_page

 * 

 */

 

gatekeeper();

 

set_page_owner(get_loggedin_userid());

 

// what are we replying to

$original_post_guid = (int) get_input('annotation_id');

 

// choose the required canvas layout and items to display

$sidebar = elgg_view("river:post", array('add' => 'yes'));

$sidebar_ext = elgg_view("thewire/twitter");

 

$content = elgg_view_title(elgg_echo('thewire:reply'));

$content .= elgg_view("river/item/list", array('guid' => $original_post_guid));

 

$body = elgg_view_layout("sidebar_boxes", $sidebar, $content, $sidebar_ext);

 

page_draw(elgg_echo('river:permalink'), $body);

?>

 

I need help to display a single item of the river according to its id

  • Is there a way to direct the user to the actual river post in the notify section of actions/comment.php

    // notify if poster wasn't owner
    if ($entity->owner_guid != $user->guid) {
                
        notify_user($entity->owner_guid,
                    $user->guid,
                    elgg_echo('generic_comment:email:subject'),
                    sprintf(elgg_echo('generic_comment:email:body'),
                        $entity->title,
                        $user->name,
                        $comment_text,
                        $entity->getURL(),
                        $user->name,
                        $user->getURL()
                    )
                        );
    }

    system_message(elgg_echo("generic_comment:posted"));

     

     

    $user->getURL() takes the user to all their wire posts.  is there a way to direct them to just the post being commented on?  like when you disable ajax on "river comments" and you click view all, it directs to a page that shows just the 1 wire post and any comments underneath. 

    any help would be great.  thanks