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
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
Yeah, I'm seeing that...it's the 1.7.2 version of the messageboard. It's calling variables like $poster->guid, not sure if that's valid in 1.7.1
anyhow, we're getting close, any suggestions Chad??
Looks like you are having some basic php issues. You should not call a function in php and specify function parameters like annotation_id=0 (unlike python for example).
Also, setting the annotation id to 0 is going to make it impossible to get the annotation.
You also need to realize that there are two different scripts for saving a messageboard post - one as an action and the other as an ajax endpoint (bad job by the core developers there).
@triout:
Exactly, now look at add.php for the 1.7.1 version. Theres a line that looks nearly identical. Make that a variable and use it in the add_to_river function (both of them) and you should be golden.
@Chad
I looked at the line you're referring to, here's what i've added:
$result = $user->annotate('messageboard',$message_content,$user->access_id, $_SESSION['user']->getGUID());
if (!$result) {
return FALSE;
}
and then called it in the call_to_river like this:
add_to_river('river/object/messageboard/create','messageboard',$_SESSION['user']->guid,$user->guid,$result);
still no results...any ideas??
@ Cash
I was under the impression that i'm calling the annotation_object correctly in the create file as posted above...not so?
with that impression, it's the passing of the annotation_id to the create file that everyone has been saying i'm doing incorrectly. can you guide me a bit more? Thanks.
The latest create.php looks ok.
You need to confirm each step starting from the beginning. First, check in your database to see if the entry is being added to the river table.
amateur question: How can i check to see if the entry is being added to the river table?
few different ways - phpmyadmin is probably best for you
Look at the add to river function, you have:
add_to_river('river/object/messageboard/create','messageboard',$_SESSION['user']->guid,$user->guid,$result);
Now look at the function as defined:
""
,0
,0
So you have, the view, action_type, subject_guid, object_guid all set, so the next thing that would be set is the access_id, so before you specify the annotation_id you have to specify an access_id and $posted which according to the documentation is the timestamp. In this case you would want them to be the defaults (whats after the = sign). Also make sure you're edit both add_to_river functions in add.php and load.php
@Chad and Cash
Aha, now i know what you meant by 'both'...the load file has a add_to_river call as well!
Ok, so here's what i've added to both add and load files based on your last post Chad:
add_to_river('river/object/messageboard/create','messageboard',$_SESSION['user']->guid,$user->guid,"",0,$result);
My understanding is that $result is calling the annotation_id that i've given the value of the following in both add and load files:
$result = $user->annotate('messageboard',$message_content,$user->access_id, $_SESSION['user']->getGUID());
if (!$result) {
return FALSE;
}
My feeling is that the 'if' function being called afterwards: if (!$result) {return FALSE;} is interfering because i'm still getting no expected results...any further ideas?
p.s. you guys are awesome, thanks for all your help so far!
get the annotation in create using the id that was passed and then display the value.
And the IF isn't interferring, it's making sure the annotation was actually created.
- Previous
- 1
- ...
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- Next
You must log in to post replies.