[EP-tech] Re: migrating customised code when upgrading 3.1.0 -> 3.3.10

John Salter J.Salter at leeds.ac.uk
Tue Jan 22 11:08:01 GMT 2013

You may also want to consider how the nonvisible documents appear in the export plugins.
If you look in the <head> section of an abstract page, you may find things aren't as 'hidden' as you first thought...

I'm just going through the same thing (we have 'hidden' documents - which shouldn't be seen anywhere other than the workflow - by the depositing user and the admins).

Currently (3.1.1) I've added lines to plugin/Export/ files to make sure references to 'hidden' files don't appear.


-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Tim Brody
Sent: 22 January 2013 10:10
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: migrating customised code when upgrading 3.1.0 -> 3.3.10

On Tue, 2013-01-22 at 13:05 +1100, Matthew Brady wrote:

> In previous versions (3.1.x),  there used to be a line in the
> file /opt/eprints3/archives/<repoid>/cfg/cfg.d/eprint_render.pl
>        my @documents = $eprint->get_all_documents();
> Which could be replaced to allow supporting documents etc., related to
> the eprint item, to be stored but not made visible on abstract pages
> etc..  
>        my @documents = ();
>        foreach my $doc ( $eprint->get_all_documents() )
>        {
>              next if $doc->get_value( "security" ) eq "nonvisible";
>              push @documents, $doc;
>        }
> Does anyone know of a way to do this in 3.3.10?


get_all_documents() has never changed but rendering has been moved into
the XML, which allows you to customise the abstract page without having
to hack in Perl. NB that doesn't mean you have to use XML, you can still
do your rendering in Perl and pass it as a fragment to the XML.

So from this (in citations/eprint/summary_page.xml):

            <epc:foreach expr="$docs" iterator="doc">
                <epc:print expr="$doc.citation('eprint_page', 'eprint',
$item)" />

To this:

            <epc:foreach expr="$docs" iterator="doc">
<epc:if test="$doc.security != 'nonvisible'">
                <epc:print expr="$doc.citation('eprint_page', 'eprint',
$item)" />


All the best,

More information about the Eprints-tech mailing list