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

[EP-tech] Modify summary.xml



Hi Agung,

All the ep_summary_content_X are divs where eprint box screen plugins 
can be added.? If you want to add something in ep_summary_content_left, 
you would create a file in you archive's 
cfg/plugins/EPrints/Plugin/Screen/EPrint/Box/ with contents something 
like that used in:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbazaar.eprints.org%2F512%2F1%2Fplugins%2FEPrints%2FPlugin%2FScreen%2FEPrint%2FBox%2FStats.pm&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C9951175d807a435162df08daf4fcaca7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638091663314617471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xauPI%2FSFvMvOZeIo0pJey0knieTSio614z9%2FGowEcS0%3D&reserved=0

Obviously change 'Stats.pm' to whatever you call your plugin.?? One 
thing you will need to add a 'new' function for this plugin is the 
following:

sub new
{
 ??? my( $class, %params ) = @_;

 ??? my $self = $class->SUPER::new(%params);

 ??? $self->{appears} = [
 ??????? {
 ? ? ? ????? place => "summary_left",
 ?????? ? ?? position => 1000,
 ??????? },
 ??? ];
 ??? return $self;
}

This makes sure the contents of the eprint box screen plugin appears in 
the ep_summary_content_left div.? The '1000' just determines the 
position of that box plugin relative to any other plugins in the same 
location.? Smaller numbers will go first and larger numbers will go 
later.? If you only have one eprint box screen plugin in a location, 
whatever the number is it does not matter, it just need to be a number.

The Stats.pm is a good example as the contents of the eprint box screen 
plugin can be set in a phrase.? This allows it to be customisable from 
the EPrints admin interface (phrase editor) if you want to change it in 
future.? However, if you do change the phrase, as abstract/summary pages 
are cached, you will need to tun refresh abstracts to get them to use 
the new phrase.

One issue you may have with using a eprint box screen plugin is that you 
get a box drawn around whatever you content you add.? You may need to do 
a bit of hack in your archive's CSS to hide the border outline of these 
boxes.

More information about how to build and add eprint box screen plugins 
can be found at:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FBoxes_on_Abstract_Pages&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C9951175d807a435162df08daf4fcaca7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638091663314617471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=h5Gu3NXh8%2FcXbsARjqAxzqKT48LUUluu7Ck7%2BVj1dB4%3D&reserved=0

Regards

David Newman

On 12/01/2023 10:42 pm, Agung Prasetyo W. via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Hi,
>
> I'm trying to change the display of the summary page of eprints. If I 
> look, there is ep_summary_content which includes 
> ep_summary_content_left, ep_summary_content_right, 
> ep_summary_content_top, etc.
> If I want to add a section to ep_summary_content, in which file can I 
> find it?
>
> Thank you.
>
> Regards,
> Agung Prasetyo Wibowo
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fagungprasetyo.net%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C9951175d807a435162df08daf4fcaca7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638091663314617471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OM%2FA%2BOgxAA2tDaFAJcKxkfefv2YBr6WaAGTGUW2HpR4%3D&reserved=0 
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fagungprasetyo.net%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C9951175d807a435162df08daf4fcaca7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638091663314617471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OM%2FA%2BOgxAA2tDaFAJcKxkfefv2YBr6WaAGTGUW2HpR4%3D&reserved=0>
>
> *** 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%7C9951175d807a435162df08daf4fcaca7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638091663314617471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=RKD1pt%2Fm6fF3dg14aIcRhKdUn1Q3505WyTTF0i%2B6Gi4%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%7C9951175d807a435162df08daf4fcaca7%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638091663314617471%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=JJgGj8g0o7XaOZYX05K5aOCntNQ5AM5Q7Nmo7g5j81U%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230113/332800eb/attachment-0001.html