Delete button in the river

Last updated by mariano Comments (9)

Delete button in the river

INGLES

delete button in the river is very ordered and that users would be easier to delete themdirectly from there
I bring a solution here I did not very big but worth a try

----------------------------------------------------------------------------------------------------------------------------------------------------------------

ESPAÑOL

el boton eliminar en el rio es algo muy pedido ya que a los usuarios les seria mas comodo borrarlos directamente desde hay antes que en el plugin thewire 

yo aca les traigo una solucion quisa no muy grande pero valdria la pena intentarlo 

 

1= OPEN FILE  MOD/THEWIRE/VIEWS/DEFAULT/RIVER/OBJECT/THEWIRE/CREATE.PHP

Y COPIAR LAS SIGUIENTES LINEAS 

<span id="delete" style="float:right;">

<?php

 

 

// if the user looking at thewire post can edit, show the delete link

        if ($object->canEdit()){

        echo "<div class='delete_note'>" . elgg_view("output/confirmlink",array(

'href' => $vars['url'] . "action/thewire/delete?thewirepost=" . $vars['item']->object_guid,

'text' => elgg_echo('delete'),

'confirm' => elgg_echo('deleteconfirm'),

)) . "</div>";

}

//end of can edit if statement

?>  

</span>

 

  • Good idea my friend, is just do not want to delete the publication in the wire, just remove it from the river

     

    Español

    Buena idea amigo, solo que en realidad no quiero remover el post del wire, solo la vista desde el river!

  • I did try to do that, and went to the correct file as u said but my site gives error if I place 

    <span id="delete" style="float:right;">

    <?php 

    May I know where I have to insert the above codes in the CREATE.PHP file.

    Because my users can not see REMOVE button in the river in the main home page as an admin I can see but I wanna give the option to the users so they can also remove their post easily from the main home page wire.

    Many thanks in advance & look forward to your help.

     

    Regards

  • judging by the date it was created for 1.7

     

  • if ($thewire->getSubtype() == $thewire->canEdit())

    the delete action.php is looking for a subtype not an object as written in this code

  • @costakisc  thanks for your swfit reply,

    Pls may I know in which file I have to put the following codes u gave me

    if ($thewire->getSubtype() == $thewire->canEdit())


    Many thanks

  • that is not a code to put anywhere, that is the code in the action delete.php as it is written now, was just showing you...........not an even good at elgg, so i might be wrong, but i believe by the directory this is talking about "MOD/THEWIRE/VIEWS/DEFAULT/RIVER/OBJECT/THEWIRE/CREATE.PHP" that if you managed to make it work, it would only delete thewire objects and nothing else and it would only delete items from the river and not delete the item from thewire

  • i use hypewall, which uses it own structure and not elggs so i havent looked at the code for the river, but i believe that if you want to delete items from the river you need to extend or override some core with a plugin. 

  • @costakisc thanks for the reply, dulyn oted.

    I don't know how I can make it work :(

    I am afraid using so many plugins because maybe it make the site slow, u said u r using hypewall plugin but I am worried it will make site slow.

    I want  in the main home page in river activity users can post comments and remove their river post...