EPrints Technical Mailing List Archive

Message: #02606


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Random selection


You might want to look at the ‘Kultur’ extension http://files.eprints.org/773/  – specifically the ‘slideshow’ part of the code that produces a random selection of items.

Look at perl_lib/EPrints/Script/Kultur.pm – that writes stuff into the EPrints::Script::Compiled package.

 

**this is a very good example of what to do if you want to extend epscript to do something fancy!**

 

- You can then edit your index.xpage to include:

<epc:print expr="kultur_slideshow(10)" />

to render a 10-image slideshow.

 

The logic in the slideshow could also be used as a basis for random selection in e.g. an RSS feed.

 

Hope that helps!

John

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Derek Lawrie
Sent: 06 February 2014 09:36
To: Eprints
Subject: [EP-tech] Random selection

 



Hi all,
I¹ve not needed to tinker with our repository for a couple of months, but
have just been asked if I change the front page ³latest items² to a random
selection temporarily, as there isn¹t enough new stuff being uploaded
currently and it looks a bit odd.

Is that an easy change to make? Like I say it¹s only temporary so I will
want to keep the current code ready for when they ask to change it back.

Would I be able to do it in latest_tool.pl ?

Thanks
Derek

Derek Lawrie
Web Developer and Administrator
T: 01603 751498 | Ext: 6498
w: www.nua.ac.uk <://www.nua.ac.uk>



Norwich University of the Arts, Francis House, 3-7 Redwell Street,
Norwich, NR2 4SN

Rated top Specialist Arts Institution in the UK (National Student Survey 2013) and best Specialist Institution in Art and Design (Complete University Guide 2014)

Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University.

This email and any files sent with it are intended only for the named recipient and may be confidential. If you are not the named recipient please email the sender immediately then delete this message. You should not disclose the content, distribute or retain any copies of this message.


Norwich University of the Arts,
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Tel: 01603 610561
Fax: 01603 615728
www.nua.ac.uk

NUA Business Limited
Registered office:
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Registered in England & Wales number 3001912