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

  • Off-topic but related: The purpose of the site is collaboration on using and developing with Elgg. There are two extremes that should be avoided in the discussion groups:

    1. Asking for help without being willing to do some of the hard work (and this hard work may involve buying a book on PHP or working through an online tutorial). No one should expect someone else to do the work for them. Remember that no one is required to provide assistance in these forums.
    2. Asking for money in exchange for providing assistance. When someone posts in the forums, they are not asking for bids for help. If you are not interested in providing help in the forums to a question, please do not post on that thread asking for money in exchange for code. If the person is interested in paying someone for help, they can go to the professional services group.

    I see that in this case the person seeking the help brought up the topic of remuneration, but in general we are seeing too many requests for money in response to requests for help.

  • @RPG

    I removed the ->value, but i'm still not getting the post to appear in the river...what the heck could be wrong here?

  • when in doubt - add a var_dump() call in there (or use a debugger):

    var_dump($annotation_object);

  • If you removed the ->value from get_annotations and are actually passing the annotation id from the add.php to the create.php, it should be working.

  • hmm, it reads: bool(false) and then the normal string('A' posted on 'B's' messageboard)

    any ideas?

  • check to be sure you are passing the annotation id correctly.

    If you do a google search for

    add_to_river elgg

    You'll get to the docs easily and see how it should be passed.

  • Ok, now using var_dump($annotation_object);  is returning NULL.

  • to call the annotation_id, i've inserted this to the add file:

     add_to_river('river/object/messageboard/create','messageboard',$_SESSION['user']->guid,$user->guid,$access_id="", $posted=0,$annotation_id=0);

    Judging by the docs you suggested, everything looks in order, doesn't it?

  • Alright guys, I really appreciate your help through all this. I've done everything that's been mentioned in this long list of posts, what i've added is in bold, PLEASE have a look and tell me why this is NOT working:

    in the add.php file:

    add_to_river('river/object/messageboard/create','messageboard',$_SESSION['user']->guid,$user->guid,$access_id="",$posted=0,$annotation_id=0);

    in the create.php file:

    if($vars['item']->annotation_id != 0)
        $annotation_object = get_annotation($vars['item']->annotation_id);


        $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");

    echo $string . $annotation_object->value;

    thank you.

     

  • I don't believe the add_to_river line is correct. Look at the variable $result in

    http://reference.elgg.org/mod_2messageboard_2start_8php_source.html