EPrints Technical Mailing List Archive

Message: #09235


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

Re: [EP-tech] core recommender on the "preview"


Hi Tomasz,

Originally no box plugins would not appear in the preview tab but this was done in a rather hacky way which checked to see whether the request was over HTTPS or not.  Since people have moved to predominantly using HTTPS, this caused issues with box plugins not appearing on abstract pages if when they were cached they were requested over HTTPS.

Due to this and that probably the main reason box plugins were set not shown in the preview tab was because of the historic lack of width in this tab making the previews with box plugins not a reflective of what the abstract page would ultimately look like.  It was decided that previews in recent versions of 3.4 should include box plugins.

If you wanted to disable a particular plugin from appearing in a preview you would need to edit the box plugin's can_be_viewed function.  I have found that the following line works if put above the "return 1;" line:

return 0 if $self->{repository}->{request}->uri =~ "/cgi/users/home";

Regards

David Newman


On 16/03/2023 11:13 pm, Tomasz Neugebauer via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.

Does anyone know how to disappear the core recommender from the “preview” panels?

The core recommender is great on the abstract pages, but they can be confusing to depositors when it appears on the “preview” while the item is being deposited/edited.

 

Tomasz

 

 


*** 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/