EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #05550


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

Re: [EP-tech] making a document upload not appear in summary page


Hi All,

 

Further to this, you also need to turn full text indexing off for any of the ‘hidden’ documents as well, so there aren’t any search results showing up, that then display with no documents (since they are hidden).. might be a telltale sign that you actually do have something tucked away…

 

We have added an extra document type e.g ‘hidden’, but also added an extra tickbox for ‘isIndexed’, which allows fulltext indexing to be set on/off at a document by document level… selecting ‘hidden’ type automatically turns the isIndexed to false.

 

Most of this is also discussed in the list many years ago… (3.1.x days… (20/06/2007)), my doco was updated 3 years ago, but that was for 3.3.xx updates…

 

In the file /opt/eprints3/perl_lib/EPrints/MetaField/Fulltext.pm
add a test for document security in the sub 'get_value'

THIS SUB HANDLES INDEXING OF HIDDEN and ISINDEXED REQUIREMENTS
with the following rules

   Hidden documents NEVER get indexed, regardless of the isindexed field setting.

   IF the document is Hidden, it just skips to the next one.

 

   IF the document isnt Hidden, then

      IF checks the isindexed flag, and if the flag is set to "TRUE"

          Index the document

      ENDIF

   ENDIF

 

sub get_value

{

        my( $self, $object ) = @_;

        my @docs = $object->get_all_documents;

        my $r = [];

        foreach my $doc ( @docs )

        {

    #MB      added test for security of the document....

    #        if the document is hidden, skip and do the next document

    #        if the document isnt hidden, and the isindexed flag is true then process

               next if $doc->get_value( "security" ) eq "hidden";   

               if ($doc->get_value( "isindexed" ) eq "TRUE")

               {

                       push @{$r}, "_FULLTEXT_:".$doc->get_id;

               }

        }

        return $r;

}

 

 

Cheers

 

Matt

 

 

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter
Sent: Thursday, 31 March 2016 2:19 AM
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] making a document upload not appear in summary page

 

Be wary! Here be wolves (with all these approaches)!

 

EPrints does a very good job of getting your stuff out there.

Check how your documents appear (or hopefully don’t appear) in:

- the <head> of the eprint abstract page

- OAI-PMH (in different MD formats)

- export plugins

- search output

 

My solution, where I wanted NO information about the document to be publicly visible (not even the fact that it existed) was:

- add a new ‘security’ option – ‘hidden’

- find any calls to ‘get_all_documents’ anywhere in your repo code or the main perl_lib

- - work out what you want to do with them

- - if it’s an internal ‘edit’ type scope, you probably want to include them

- - if it’s an external scope (e.g. export), you probably don’t

 

If you’re not too bothered about people being able to discover the metadata for a document, adding a new ‘security’ type, and then changing ~/archives/ARCHIVEID/cfg/cfg.d/security.pl to handle it might be another way to go.

 

Cheers,

John

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Adam Field
Sent: 30 March 2016 14:19
To: eprints-tech@ecs.soton.ac.uk
Subject: Re: [EP-tech] making a document upload not appear in summary page

 

I've implemented this in the past by doing the following:

 

* Create a new content type "evidence_documentation" or whatever

* Put code in document_fields_automatic to set all documents of type evidence_documentation to restricted to repository staff

* Change the render function to exclude evidence documents when rendering an abstract page (if necessary).  You should still be able to see all documents on the item control screen.

 

--

Adam

 

 

Jisc

Adam Field
SHERPA services analyst developer

 

From: <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Michael Eadie <Michael.Eadie@glasgow.ac.uk>
Reply-To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Date: Wednesday, 30 March 2016 10:54
To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
Subject: [EP-tech] making a document upload not appear in summary page

 

Hi List

 

Can you store a file in EPrints but make it not appear in the summary page?

 

We are looking at storing evidence of article acceptance with the record (e.g. an email saved as a text file), but don't want these to be publicly viewable.

 

I've looked at editing the document citation, (e.g. if content  = 'email' don't display anything) but this just hides metadata not the icon and link to the doc.

 

Is what we are trying to do possible?

 

Regards

Mick

 

--

Mick Eadie

Research Data Management Officer

University of Glasgow

 

Tel: +44 (0) 141 330 6294

 

 

 

 

*** EPrints community wiki: http://wiki.eprints.org/

*** EPrints developers Forum: http://forum.eprints.org/

 

 


Jisc is a registered charity (number 1149740) and a company limited by guarantee which is registered in England under Company No. 5747339, VAT No. GB 197 0632 86. Jisc’s registered office is: One Castlepark, Tower Hill, Bristol, BS2 0JA. T 0203 697 5800.

Jisc Services Limited is a wholly owned Jisc subsidiary and a company limited by guarantee which is registered in England under company number 2881024, VAT number GB 197 0632 86. The registered office is: One Castle Park, Tower Hill, Bristol BS2 0JA. T 0203 697 5800.

_____________________________________________________________
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 )