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
How to add the structure of an organisation
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!
[[Category:Subject Trees]] '''This page applies to eprints version 2.* and not to version 3 (ep2)''' all the files I discuss are in /opt/eprints2/archives/YOURID/cfg/ 1. modify subjects to add your new tree, with a top level with the id "groups" and its parent set to be "ROOT" (similar to the subjects node). This is the top node of your new subjects tree. 2. add the new field to eprints objects (ArchiveMetadataFieldsConfig.pm): { name => "groups", type=>"subject", top=>"groups", multiple => 1, browse_link => "groups", render_input=>\&EPrints::Extras::subject_browser_input }, for reference, that all means name = id of the field type = type (hierarchical subject) multiple = you can select more than one value at once top = the top node in the tree render_input = use the clever subject input, rather than just a big pull-down menu browse_link = link values in this to pages in /view/groups/ (which we'll make in a minute) Now run erase_archive & create_tables (assuming you've no live data, otherwise it's a bit harder). You may also need to run import_subjects and the other scripts mentioned in the [[http://www.eprints.org/documentation/tech/php/installation.php#creating_the_database_tables_and_website_ 'creating an archive']] documentation. 3. add a human readable description for it: edit phrases-en.xml <ep:phrase ref="eprint_fieldname_groups">Groups</ep:phrase> <ep:phrase ref="eprint_fieldhelp_groups">add some relevant help for selecting groups here!</ep:phrase> <ep:phrase ref="metapage_title_groups">Groups</ep:phrase> <ep:phrase ref="viewname_eprint_groups">Groups</ep:phrase> (the 3rd one is the title for the page on the input form, also called "groups", the 4th is the name which appears on the /view/ pages) 4. add the field to each type of eprint edit metadata-types.xml each time you find <page name="subjects" /> <field name="subjects" required="yes" /> add below or before, which ever you prefer, <page name="groups" /> <field name="groups" required="yes" /> 5. add it to the "abstract" pages: edit ArchiveRenderConfig.pm find: # Subjects... $table->appendChild( _render_row( $session, $session->html_phrase( "eprint_fieldname_subjects" ), $eprint->render_value( "subjects" ) ) ); add below or above or nearby: # Groups... $table->appendChild( _render_row( $session, $session->html_phrase( "eprint_fieldname_groups" ), $eprint->render_value( "groups" ) ) ); 6. add it to the browse /view/ section: Edit ArchiveConfig.pm Add: { id=>"groups", fields=>"groups", order=>"-date_effective/title", hideempty=>1 } 7. Add it to the advanced search screen: Edit ArchiveConfig.pm Look for: $c->{search}->{advanced} = { search_fields => [ { meta_fields => [ $EPrints::Utils::FULLTEXT ] }, { meta_fields => [ "title" ] }, { meta_fields => [ "creators" ] }, { meta_fields => [ "abstract" ] }, { meta_fields => [ "keywords" ] }, { meta_fields => [ "subjects" ] }, { meta_fields => [ "type" ] }, { meta_fields => [ "depts" ] }, { meta_fields => [ "editors" ] }, { meta_fields => [ "ispublished" ] }, { meta_fields => [ "refereed" ] }, { meta_fields => [ "publication" ] }, { meta_fields => [ "date_effective" ] } ], Add a line to the list (at the point you want the new list to appear) : { meta_fields => [ "groups" ] },
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)