Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
Translation
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Patches == Apart from translating the language dependent phrase files, some other modification should be done for proper functioning. Theses patches are for Eprints version 3.0.1, please check your current version * [[#Proper utf-8 encoding for outgoing e-mails|proper utf-8 encoding for outgoing e-mails]] * [[#Citation phrases with embedded pins|citation phrases with embedded pins]] * [[#Phrases using the same link twice|phrases using the same link twice]] * [[#Pluralising depends on language|pluralising depens on language]] * [[#Language dependent date and time|expiration time for authentication codes (e.g. at registering) (hardcoded in English)]] * generation time for browse pages (harcoded in English) * [[#Rendering user names depending on session language|user name rendering depends on session language]] === Proper utf-8 encoding for outgoing e-mails === For outgoing e-mails the charset should be "utf-8". The mail headers (From, To, Subject, Reply-To, etc lines) might contain a restricted set of English characters only, other characters should be encoded. This [http://files.eprints.org/273 EPrints.pm.diff patch file] corrects these, PLUS it enables the URL text from links into the text version, PLUS converts wide characters to bytes (the Net::SMTP perl routine complains). See the tech list references [http://www.eprints.org/tech.php/thread-5762.html 5762], [http://www.eprints.org/tech.php/5783.html 5783] and [http://www.eprints.org/tech.php/7114.html 7114]. === Citation phrases with embedded pins === You need to apply the second half of the [http://www.eprints.org/tech.php/7236.html XML/EPC.pm.diff] patch if want to use citations with embedded pins. === Phrases using the same link twice === If in a phrase you are using the same link pin twice, the second time it does not render correctly. E.g. if you want a picture AND a text refer to the same link, such as <ep:phrase id="two_links"> <epc:pin ref="link"><img src="img.png" alt="[img]></epc:pin> <epc:pin ref="link">Click here</epc:pin> <ep:phrase> For both links to work correctly please apply the first half of the [http://www.eprints.org/tech.php/6960.html XML/EPC.pm.diff] patch. === Pluralising depends on language === When invoking a phrase in a citation, the Escript constructs such as <code><epc:if test="..." /></code> or <code><epc print /></code> are not available any more. To transfer pluralising from the citation file into phrases file requires this feature which is achieved by the [http://www.eprints.org/tech.php/7300.html XML/EPC.pm.diff.2] patch. === Language dependent date and time === The wording of grace period (expiration time of the random pin number when someone registers or changes the email address) is generated in the Eprints/Time.pm script by the ''human_delay()'' routine. Also, the creation time at the bottom of browse pages are created here by ''human_time()'. The first routine always yields English text; the second one uses the server's locale setting for all languages. [http://files.eprints.org/274 This patch] replaces ''human_delay()'' with reference to phrases for hour, day, week and their plural forms. See also tech list [http://www.eprints.org/tech.php/7243.html 7243] === Rendering user names depending on session language === All fields can have their separate rendering routine. This routine should be given as the value of the ''render_single_value'' attribute. In our case modify the top of [[EPrints_Directory_Structure/eprints3/archives/ARCHIVEID/cfg/cfg.d|cfg/cfg.d/user_fields.pl]] file which contains the definition of the user fields as follows: $c->{fields}->{user} = [ { 'name' => 'name', 'type' => 'name', 'render_order' => 'gf', 'render_single_value' => \&my_namefield_rendering, }, ... and insert the definition of ''my_namefield_rendering'' e.g. at the end of the same file: sub my_namefield_rendering { my ($session,$field,$value,$object)=@_; my $langid = $session->{lang}->{id}; my $format = { # format: f, g - first, given; h - honourific, l - lineage 'en' => 'hfl,g', 'hu' => 'hlfg', # Further lines should be added for other used languages } -> {$langid} my $all=""; foreach my $fmtchar ( split //, $format ) { my $insert=""; if( $fmtchar eq "l" ) {$insert = $value->{lineage}; } elsif( $fmtchar eq "f" ) { $insert = $value->{family}; } elsif( $fmtchar eq "g" ) { $insert = $value->{given}; } elsif( $fmtchar eq "h" ) { $insert = $value->{honourific}; } elsif( $all ){ $all .= $fmtchar; } next if( ! $insert ); $all .= $insert; } my $span=$session->make_element("span",class=>"person_name"); $span->appendChild($session->make_text($all)); $return $span; }
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)