Messageboard to River

with the Messageboard mod enabled, is there a way to have the actual messageboard post appear in the river, rather than 'A' posted on 'B's' messageboard?

I think this would be extremely valuable for users to create more content with less jumping around, especially with mods like rivercomments.

I've looked into the create and add files but haven't found a way to display the actual comment in the river.

Any ideas?

Thanks,

Tri

  • @zeroflares so, is that the solution for this? Please let us know =)

  • @rjcalifornia

    I do not know =). I followed the thread from triout's posting, he did not reveal his final notes. This does not work ^_^. Also in 1.7.8 the river seems to have been removed from add.php- or the one I'm looking at. The $result is not being passed?

  • elgg Human-friendly version name

    release = '1.8-svn';

    create.php

    <?php

    /**

     * Messageboard river view

     */

     

    $performed_by = $vars['item']->getSubjectEntity();

    $performed_on = $vars['item']->getObjectEntity();

     

    $comment = $vars['item']->getAnnotation();

     

    $link = elgg_view('output/url', array(

    'href' => $performed_on->getURL(),

    'text' => elgg_echo('messageboard:river:user', array($performed_on->name)),

    ));

     

    echo elgg_echo("messageboard:river:added");

    echo " $link ";

    echo elgg_echo("messageboard:river:messageboard");

     

    if ($comment) {

    echo '<div class="elgg-river-content">';

    echo elgg_get_excerpt($comment->value);

    echo '</div>';

    }

  • @mariano

    This in elgg 1.8 only?

  • claro es una sugerencia ya que en 1.8 muestra la descripcion 

  • @mariano

    Good to know that 1.8 will support this.

    ---

    A few things to note for currently in 1.7.8 from what I see.

    add_to_river is no longer in add.php.

    The lines::

     

    $result = $owner->annotate('messageboard', $message, $access_id, $poster->guid);

    if (!$result) {

    return FALSE;

    }

    ---

    And

    add_to_river('river/object/messageboard/create','messageboard',$poster->guid,$owner->guid,$access_id,0,$result);

    Are found in start.php

    ----

    Also if anyone knows the reason why... if i add this line to load.php

    $result = $user->annotate('messageboard',$message_content,$user->access_id, $_SESSION['user']->getGUID());
                    if (!$result) {
                        return FALSE;
                    }

    I get double post on the message board? 

     

  • O_0

    i redownloaded 1.7.8 and the messageboard was different from the one I was editing lol. So I donno what I was editing but this 

    Create.php is good for me..

    <?php

     

    $performed_by = get_entity($vars['item']->subject_guid);

    $performed_on = get_entity($vars['item']->object_guid);

      //grab the annotation, if one exists

    if($vars['item']->annotation_id != 0) {

    $comment = get_annotation($vars['item']->annotation_id)->value;

    }

    $comment = strip_tags($comment);//this is so we don't get large images etc in the activity river

    //grab the annotation, if one exists

        $url = "<a href=\"{$performed_by->getURL()}\">{$performed_by->name}</a>";

        $string = sprintf(elgg_echo("messageboard:river:added"),$url)  . " <a href=\"{$performed_on->getURL()}\">" . $performed_on->name .  "'s</a> " . elgg_echo("messageboard:river:messageboard");

        if ($comment) {

    $string .= "<div class=\"river_content_display\">";

    $string .= elgg_get_excerpt($comment);

    $string .= "</div>";

    }

     

    echo $string .  $comment->value;

  • Interesante mariano...

    @zeroflares About three months ago I wanted to do this. Cosmona did it, he actually got this working but I don't know if he wants to share this.

  • @rjcalifornia

    What triout posted works - on 1.7.1.  ^_^

    I was just using some messed up version messageboard LOL!

    ---edit

    Will try to tackle 1.7.8 zzzzzzz