Deleting items from the activity river?

i'm trying to clear out the river of my site, have been looking into the reference docs and found this but i'm not sure where to include the function??

remove_from_river_by_object ( object_guid  ) 

 

  • When are you wanting things to be deleted?  If you're just doing general cleanup, you'll need to create a PHP file, include engine/start.php, and then call that function with the proper GUIDs of objects for which you want the river items to be removed.

  • Yeah, just general cleanup, so if i add this to my new php file:

    function remove_from_river_by_object($object_guid) {
    // Sanitise
    $object_guid = (int) $object_guid;
    // Load config
    global $CONFIG;
    // Remove
    return delete_data("delete from {$CONFIG->dbprefix}river where object_guid = {$object_guid}");


    and call that file in the riverdashboard start file...how can i call it?
  • this remove_from_river_by_object ( $ object_guid ) will remove definitle the entry for everybody right ? is there something for remove from river but only for the user who remove it ?

    A bit like facebook, exemple i see an entry on the river, i remove it with a remove button for exemple but other user them still have this entry, is that possible ? is there something like that in elgg ?

  • Yes, what we're referring to above will delete all activity, I'm interested in the function your speaking of as well. 

    Anyone have any clues or insight?

  • +1 for a delete from river button..

    anyone know the code for this? a plugin even?

  • This is a good idea, and I have always wanted to bring up thr topic.. Sometime the whole column is filled with repeated update (profile/icon) of a single person. Both user and admin must have the Delete option.

  • esto es lo que yo e tratado de decir pero no encontré una ayuda.

    el the wire si tiene un botón eliminar e copiado su código pero no a funcionado alguna solución ?