EPrints Technical Mailing List Archive

Message: #09047


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

[EP-tech] Overwrite a Plugin function


CAUTION: This e-mail originated outside the University of Southampton.

Hi!

  I would like to overwrite this function:

sub render_single_value
{
        my( $self, $session, $value ) = @_;

        my $url = "https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Forcid.org%2F%24value&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5b3f8abae13e4beb5b2f08da8cc6e81f%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637977083889961643%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=dxeq1ZnUBJpcb%2BgegUM6dDIOBgXN4n9PiwhuzhUUS3Q%3D&amp;reserved=0";;

        my $link = $session->render_link( $url, "_blank" );
        $link->appendChild( $session->make_element( "img", src =>
"/images/orcid_16x16.png", class => "orcid-icon" ) );
        $link->appendChild( $session->make_text( "orcid.org/$value" ) );

        return $link;
}

in lib/plugins/EPrints/MetaField/Orcid.pm to remove the "orcid.org/"
text before the orcid. I would like to have the customized version in
my_archive/cfg/cfg.d/z_orcid_render_single_value.pl.Which is the best way?