EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #07539
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] resize name-Field
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>, "Stenger, Avischai" <avischai.stenger@ulb.tu-darmstadt.de>
- Subject: Re: [EP-tech] resize name-Field
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Tue, 23 Oct 2018 10:00:08 +0000
Hi Avi, I haven't had to do this. Your approach should work, but I think it can be done in a different (better) way - without altering core files in perl_lib/EPrints. In the eprints configuration file, you can override the default field lengths (e.g. for a name): { name => 'creators', type => 'compound', multiple => 1, fields => [ { sub_name => 'name', type => 'name', hide_honourific => 1, hide_lineage => 1, family_first => 1, # duplicated from Metafield::Name, and altered to suit fields => [ { sub_name => "family", type => "text", maxlength => 64, input_cols => 25, }, { sub_name => "given", type => "text", maxlength => 100, input_cols => 25, }, { sub_name => "lineage", type => "text", maxlength => 10, }, { sub_name => "honourific", type => "text", maxlength => 10, }, ], }, { sub_name => 'id', type => 'text', input_cols => 20, allow_null => 1, } ], input_boxes => 4, }, If you add this for a new field, it will be created with the correct length fields. If you add this for an existing field, it will not alter the existing table configuration - so you will still need to run the 'alter
table' SQL. Hope that helps! Cheers, John From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Stenger, Avischai via Eprints-tech Hi, i need to resized the eprint_creators_name.creators_name_given because we really have a creator with 9(!) given names… did someone „out there“ did that? do i need to do something else but: 1. DB-change: ALTER Table eprint_creators_name Modify COLUMN creators_name_given varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL; 2. change the maxlength in EPrints/MetaField/Name.pm for sub_name „given“: {
sub_name => „given“,
type => „text",
maxlength => 100,
input_cols => 25, },
Tanks & Regards Avi
|
- Follow-Ups:
- Re: [EP-tech] resize name-Field
- From: John Salter <J.Salter@leeds.ac.uk>
- Re: [EP-tech] resize name-Field
- References:
- [EP-tech] resize name-Field
- From: "Stenger, Avischai" <avischai.stenger@ulb.tu-darmstadt.de>
- Re: [EP-tech] resize name-Field
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] resize name-Field
- Prev by Date: Re: [EP-tech] create download reports for each user
- Next by Date: Re: [EP-tech] resize name-Field
- Previous by thread: [EP-tech] EPrints/CRIS
- Next by thread: [EP-tech] DOI handling in orcid_support_advance
- Index(es):