How to add thumbnail to activity page for market plugin?

Hi

 in the market plugin,

http://community.elgg.org/plugins/407901/1.8f/market-plugin

When I upload an image I would like to have it show up in the River with a thumbnail of the picture.

I use add this  code to the mod/market/views/default/river/object/market/create.php

'attachments' => elgg_view_entity_icon($object,'small'),

but it does not work.

  • THis is how it's done in mod/market/views/default/river/object/market/create.php :

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

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

    $img = elgg_view('output/img', array(
        'src' => "market/image/{$object->guid}/medium/{$object->time_updated}",
        'class' => 'elgg-photo',
    ));
    $image = elgg_view('output/url', array(
        'href' => "market/view/{$object->guid}/" . elgg_get_friendly_title($object->title),
        'text' => $img,
    ));

    echo elgg_view('river/item', array(
        'item' => $vars['item'],
        'message' => $excerpt,
        'attachments' => $image,
    ));

Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking