Hello,
Is it possible to add access levels to the posts of the wire?
e.g. I publish a string I only want my friends to see ...
Thanks
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.
@zuda: oost a bit more of yr changed code
OR
name the script.php
(is it start or add (i think..not reading code rite @now) or what?)
but code is @where currently parent *needs to be known var/val.
i'll have quick look, maybe 'quack' dbg too ;-O
Matt, I did use Dhrups code. It didn't work. I can't explain as to why it didn't work, but it didn't. I tried it in the reply.php. I tried webgallis solution and it had unexpected issues. whenever you clicked to reply it would automatically send a blank message or no message at all due to the fact that it checks to see if the code is empty. I tried modifying it without any luck. I will continue to work with the code, since I know Dhrup is right and webgalli is right. I'll try to find the answer. Thank you for all your help. As you may know a lot of my site is still open source and is on github https://github.com/planetzuda. I'll send any fixes back to the plugin creator.
oh boy r u just ~lil noob @coding/php? ;-oO;X;P
268: // must do this before saving so notifications pick up that this is a reply
269: if ($parent_guid) {
270: $post->reply = true;
271: }
272:
273: $guid = $post->save();
Q.E.D.
Dhrup: I tried this long before you posted anything about it, but it still doesn't work.
if ($parent_guid) {
$post->reply = true;
$parent_guid = get_entity(get_input('parent_guid'));
$access_id = get_entity($parent_guid)->access_id;
}
$guid = $post->save();
if $parent_guid is already set then use it, no need to go back to get_input()
secondly, you got the access id into the variable $access_id but then you didn't actually set it on the the $post
I revised my code and tried it that way. Still, no go.
if ($parent_guid) {
$post->reply = true;
$post->access_id = get_entity($parent_guid)->access_id;
}
Apologies -- I never tried my own code long before I posted ;-(
But.. So ! I lied ! ;-;OO;X;P
. It is not line# 269 --> a little further down
. it is not 1 line of code --> 2 lines of code
QED.
SELECT *
FROM `elgg1860_base_objects_entity`
ORDER BY `elgg1860_base_objects_entity`.`guid` DESC
LIMIT 0 , 30
[Inline] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ]
SELECT *
FROM `elgg1860_base_entities`
ORDER BY `elgg1860_base_entities`.`guid` DESC
LIMIT 0 , 30
[Inline] [ Edit ] [ Explain SQL ] [ Create PHP Code ] [ Refresh ]
Did you put it on line 287? if ($parent_guid) {
$post->addRelationship($parent_guid, 'parent');
// name conversation threads by guid of first post (works even if first post deleted)
$parent_post = get_entity($parent_guid);
$post->wire_thread = $parent_post->wire_thread;
} else {
// first post in this thread
$post->wire_thread = $guid;
}
I am not sure where that code would fit.
@dhrupdescoop: How does making the base entities descend fix the access problem?
' ..base entities descend ' ?
yo no comprende
' access problem ' ?
yo no comprende
- Previous
- 1
- 2
- 3
- 4
- 5
- 6
- Next
You must log in to post replies.