[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[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";


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:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cfca5cf0d868c4537886208db267f8484%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638146101369356096%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3PbB%2BdPzj5fbkGR%2B2zV17T%2F%2FKtPtoG8VCa%2FhOU0pwOg%3D&reserved=0
> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7Cfca5cf0d868c4537886208db267f8484%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638146101369356096%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=eox%2BFdDmzukkt0EiLJBub1t8WidNq5vMHz%2F3uNhOyqA%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230317/5b7894e0/attachment-0001.html