thumbnail in river

how to set thumbnail in river of uploaded image via embed and file plugin

  • This is only going to show the thumbnails:

    go to elgg/mod/file/views/default/river/object/file and edit create.php.

    delete the whole code and enter this

    <?php
    /**
    * File river view.
    */

    $file = $vars['entity'];
    $object = $vars['item']->getObjectEntity();
    $excerpt = strip_tags($object->description);
    $excerpt = elgg_get_excerpt($excerpt);
    echo elgg_view('river/elements/layout', array(
    'item' => $vars['item'],
    'message' => $excerpt,
    'attachments' => elgg_view_entity_icon($object),

     

    ));

  • very much thanks baljit singh

    please help me to increase thumbnail size too

    very much thanks in advance

     

  • can we remove uploaded image  or file name in river

  • You can increase or decrease the thumbnail size. By default its set to medium, you can either use large or small. for large, use 

    'attachments' => elgg_view_entity_icon($object, 'large'),.

    To remove the file name, you can do that in language file. Go to mod\file\languages\en.php

    search for 'river:create:object:file' and remove %s at the end

    i.e. '%s uploaded the file %s' to '%s uploaded the file'

  • Hello, how can i redirect to the river after file upload??

    Thanks