[EP-tech] Re: editing default pins

John Salter J.Salter at leeds.ac.uk
Thu Nov 28 16:56:04 GMT 2013


If you do things in ~/perl_lib/… it affects all archives running from that install of EPrints.
If you do it in ~/archives/[ID]/ it’s easier to keep track when upgrading EPrints too.

Did it create anything in the error log when you tried it my way?

Cheers,
John


From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Derek Lawrie
Sent: 28 November 2013 16:16
To: eprints-tech at ecs.soton.ac.uk
Subject: [EP-tech] Re: editing default pins



Sorry to come back to this, but I was just thinking about something that I
did slightly differently to what you've suggested John, I copied my
login.pm file to /perl_lib/EPrints/Plugin/Screen/ rather than
/archives/{my archive}/cfg/plugins/Eprints/Plugin/Screen/

When I put the file where you suggested Eprints doesn't see it and just
errors out.

Is there an advantage to doing it that way (ie restricted to that
repository) and am I doing it wrong or badly, by putting it under the
perl_lib folder?

If I am doing it wrong then why doesn't it work when I try it under
archives/myrepository


Thanks
Derek



On 11/6/13 5:38 PM, "John Salter" <J.Salter at leeds.ac.uk<mailto:J.Salter at leeds.ac.uk>> wrote:

>I was close to figuring it out before.
>Once you've followed the stuff below, and made a new template to use
>(e.g. ~/archived/ARCHIVEID/cfg/templates/login.xml) try:
>
>sub render
>{
> my( $self ) = @_;
>
> my $processor = $self->{processor};
> my $repo = $self->{repository};
> my $xml = $repo->xml;
> my $r = $repo->get_request;
>
>#Add this:
> $processor->{template} = "login"; #the template name (without the
>.xml)
>...
>
>Might have to document that in the wiki - if it's the *best* way of
>achieving this (anyone got other ideas how to do this)?
>For future development, it might be nice to be able to do:
>$c->{plugins}->{"Screen::Login"}->{template} = "login";
>(if you can't already!)
>
>Cheers,
>John
>
>-----Original Message-----
>From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>
>[mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of John Salter
>Sent: 06 November 2013 16:51
>To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
>Subject: [EP-tech] Re: editing default pins
>
>Look at ~/perl_lib/EPrints/Plugin/Screen/Login.pm
>
>If what you want to change is contained solely within the phrases it
>uses, copy those phrases from ~/lib/lang/en/phrases/system.xml (or
>wherever they may be) to
>~/archives/ARCHIVEID/cfg/lang/en/phrases/system_overrides.xml (or any
>sensible XML file in there).
>
>If you need to change things bit more radically:
>Copy ~/perl_lib/EPrints/Plugin/Screen/Login.pm to
>~/archives/ARCHIVEID/cfg/plugins/EPrints/Plugin/Screen/... Use a filename
>like ArchiveIDLogin.pm
>
>Change the package name in that file to reflect the new name you've just
>given it.
>
>In ~/archives/ARCHIVEID/cfg/cfg.d/plugins.pl (or some other file in that
>directory), define:
>
>$c->{plugin_alias_map}->{"Screen::Login"} = "Screen::AcrchiveIDLogin";
>#or whatever you've called your new copy
>$c->{plugin_alias_map}->{"Screen::Login"} = undef;
>
>Once you get this working OK (maybe add an extra class to something
>that's being rendered so you can check that the copy is being used to
>generate the login page), start hacking your ArchiveIDLogin.pm to do what
>you want it to.
>
>I thought there was some easy way to set a template for this, but
>currently I haven't been able to work out how :o\
>I was expecting to do something like:
>$self->{template} = 'login';
> - but this doesn't seem to work.
>
>Maybe someone else can offer guidance on how to achieve this?
>
>Cheers,
>John
>
>
>________________________________________
>From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>
>[eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Derek Lawrie
>[d.lawrie at nua.ac.uk]
>Sent: 05 November 2013 14:59
>To: Eprints
>Subject: [EP-tech] editing default pins
>
>I'd like to edit the output of the default login form, I presume the
>output is generated from the epc:pin "page"?
>I don't know if I should be editing that or if I could apply a template to
>only apply to the login?
>
>Any thoughts?
>
>Thanks
>Derek
>
>Rated top Specialist Arts Institution in the UK (National Student Survey
>2013) and best Specialist Institution in Art and Design (Complete
>University Guide 2014)
>
>Internet communications cannot be guaranteed to be secure or error-free
>as information could be intercepted, corrupted, lost, destroyed, arrive
>late or incomplete, or contain viruses. Therefore, we do not accept
>responsibility for any errors or omissions that are present in this
>message, or any attachment, that have arisen as a result of e-mail
>transmission. If verification is required, please request a hard-copy
>version. Any views or opinions presented are solely those of the author
>and do not necessarily represent those of the University.
>
>This email and any files sent with it are intended only for the named
>recipient and may be confidential. If you are not the named recipient
>please email the sender immediately then delete this message. You should
>not disclose the content, distribute or retain any copies of this message.
>
>
>Norwich University of the Arts,
>Francis House,
>3-7 Redwell Street,
>Norwich, NR2 4SN.
>Tel: 01603 610561
>Fax: 01603 615728
>www.nua.ac.uk<http://www.nua.ac.uk<http://www.nua.ac.uk%3chttp:/www.nua.ac.uk>>
>
>NUA Business Limited
>Registered office:
>Francis House,
>3-7 Redwell Street,
>Norwich, NR2 4SN.
>Registered in England & Wales number 3001912
>
>*** 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/
>
>*** 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/

Rated top Specialist Arts Institution in the UK (National Student Survey 2013) and best Specialist Institution in Art and Design (Complete University Guide 2014)

Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, we do not accept responsibility for any errors or omissions that are present in this message, or any attachment, that have arisen as a result of e-mail transmission. If verification is required, please request a hard-copy version. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University.

This email and any files sent with it are intended only for the named recipient and may be confidential. If you are not the named recipient please email the sender immediately then delete this message. You should not disclose the content, distribute or retain any copies of this message.


Norwich University of the Arts,
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Tel: 01603 610561
Fax: 01603 615728
www.nua.ac.uk<http://www.nua.ac.uk>

NUA Business Limited
Registered office:
Francis House,
3-7 Redwell Street,
Norwich, NR2 4SN.
Registered in England & Wales number 3001912
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20131128/fbc86c84/attachment.html 


More information about the Eprints-tech mailing list