[EP-tech] Re: question thumbmails/icons

Tim Brody tdb2 at ecs.soton.ac.uk
Fri May 25 12:14:17 BST 2012


On Thu, 24 May 2012 10:37:42 +0200, Ulf Laube <ulf.laube at ontochem.com>
wrote:
> Hi all,
> 
> we are adding docs onto an Eprints on follow way:
> 
>         $doc_file_name = basename( $doc_file );
>         $doc = EPrints::DataObj::Document::create( $ep_session, $eprint
);
>         $doc->set_value( "format", "image/jpeg" );
>         $doc->add_file( $doc_file, "$doc_file_name" );
>         $doc->set_value( "main", $doc_file_name );
>         $doc->commit;
> 
> Try to creating a thumbnail
> 
>         $doc->render_icon_link( %ep_doc_render_icon_link_opts );
>         $doc->render_preview_link();
> 
> with  my %ep_doc_render_icon_link_opts = (
>     new_window => 0,
>     preview    => 1,
>     public     => 1,
> );
> 
> has no effect (no lightbox).
> 
> Any Ideas?

Thumbnails are generated on-demand by the indexer. If you want to perform a
manual thumbnails generation you will need to do:

$doc->make_thumbnails();

(render* are just generating links to existing thumbnails)

-- 
All the best,
Tim.


More information about the Eprints-tech mailing list