Adding File Thumbnail to River

Hello. When I upload a file I would like to have it show up in the River with a thumbnail of the picture. I would like it to display just as it does within the file menu but have it on the activity page.

 

 

Thanks

  • Hello i have this feature on my site. I'm busy right now. I will supply code later in the day.

    Thanks

  • That would be terriffic. What is your sites' address?  Thanks 

  • Sorry for the delay

    Here is the code. Visit mod/file/views/default/river/object/file
    and replace the code in create.php with this one

    <?php
    /**
    * New file river entry
    *
    * @package File
    */

    $object = $vars['item']->getObjectEntity();

    echo elgg_view('river/item', array(
    'item' => $vars['item'],
    'attachments' => elgg_view('object/file/river', array('entity' => $object)),
    ));

  • That's exacty my site.

    Here is the code. Visit mod/file/views/default/river/object/file
    and replace that of create.php with this

    <?php
    /**
    * New file river entry
    *
    * @package File
    */

    $object = $vars['item']->getObjectEntity();

    echo elgg_view('river/item', array(
    'item' => $vars['item'],
    'attachments' => elgg_view('object/file/river', array('entity' => $object)),
    ));

  • not working with elgg 1.8.8

    using 3c river and rivertalk plugin