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

  • @LeeLu

    I do believe that you're talking/ posting out-of-line ;) TryOut Jr merely posted a request for help with some heavy duty Elgg/Php coding which he/she could not cut by themselves. There has been sooo much help posted here by some very very experienced Elggsters that it seems a shame that TryOut cannot make the suggestions work. Brett already posted before - "I'll not write the code for you.." 2 days back. Neither will anyone else. I do not expect Brett to post anymore because his 3 comments were *right *on the *ball for anyone that can actually code with Elgg.

  • Your ideas? I thought it was TriOut's idea. You taking credit for it now?

    I had the idea for high definition TVs years ago. Damn those companies for developing MY idea and not giving me anything in return...

    Returning the favor? I'm guessing you are ignoring the advice given by me and others in this thread? Or the reCaptcha plugin I made available. For free. How about you? What have you contributed other than "ideas"?

    As for figuring it out yourselves, guess what? That's how most of us did it...

    Making other people rich? Hahahahahaahahah!

  • thanks again D- you know how to put it into perspective. Good luck triout and others!

  • Thanks for the 1.7.2 tip RPG.

    so looking at the section you guided me to, i'm seeing this:

    $result = $owner->annotate('messageboard', $message, $access_id, $poster->guid);
        if (!$result) {
            return FALSE;
        }

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

    I'm assuming I need to add $result to the add_to_river call in add.php or is the annotation id the 0, ??

  • I'm also seeing this in the messageboard/actions/delete file:

    // Make sure we can get the comment in question
    $annotation_id = (int) get_input('annotation_id');

    //make sure that there is a message on the message board matching the passed id
    if ($message = get_annotation($annotation_id)) {

        //grab the user or group entity
        $entity = get_entity($message->entity_guid);

    So what i'm thinking I need to do is add this to add.php: $annotation_id = (int) get_input('annotation_id');

    and this to the river call: $annotation_id

    am i getting close??

  • Your first post is on the right track, the second, off track.

  • Can't I just replace the start and add files of the messageboard with the ones from 1.7.2 and then just call $annotation_object->value in the create file?

  • Might work, I haven't looked at all the changed made in the 1.7.2 messageboard. Be sure to save copies of the original in case it doesn't work.

    But frankly you don't need to make all those changes.

  • with the file replacements i mentioned above, messageboard seems to be working fine...but still not getting the results i'm looking for though, I may not be calling the right thing the create.php file.  The lines in bold are what i added:

    $performed_by = get_entity($vars['item']->subject_guid); // $statement->getSubject();
        $performed_on = get_entity($vars['item']->object_guid);
        //grab the annotation, if one exists
        if($vars['item']->annotation_id != 0)
        $annotation_object = get_annotation($vars['item']->annotation_id)->value;

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

     

    isn't this what i'm supposed to be calling here in the create file?

  • remove the ->value from the get_annotations line and you should be good to go.