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

Matthew Brady Matthew.Brady at usq.edu.au
Tue Jan 22 23:22:38 GMT 2013


Thanks for the feedback Tim, and John.

As well as the export plugins,  also need to make sure hidden docs aren't indexed, so you don't give false positives in search results, (also check that the document links in the search results, aren't including links to non-visible items.)

Cheers,
Matt

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of John Salter
Sent: Tuesday, 22 January 2013 9:08 PM
To: 'eprints-tech at ecs.soton.ac.uk'
Subject: [EP-tech] Re: migrating customised code when upgrading 3.1.0 -> 3.3.10

Matt,
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.

Cheers,
John

-----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?

Hi,

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)" />
            </epc:foreach>

To this:

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

?

--
All the best,
Tim

*** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/

This email (including any attached files) is confidential and is for the
intended recipient(s) only.  If you received this email by mistake,
please, as a courtesy, tell the sender, then delete this email.

The views and opinions are the originator's and do not necessarily
reflect those of the University of Southern Queensland.  Although all
reasonable precautions were taken to ensure that this email contained no
viruses at the time it was sent we accept no liability for any losses
arising from its receipt.

The University of Southern Queensland is a registered provider of education
with the Australian Government.
(CRICOS Institution Code QLD 00244B / NSW 02225M, TEQSA PRV12081 )





More information about the Eprints-tech mailing list