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
Branding, the next level
(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!
== Toolbar == === Changing the separator === The toolbar in a standard EPrints system is a series of <span>'ed items, with a defined separator. To change the seperator to (say) the hash symbol ('#'), edit the file <code>archives/deposit/cfg/lang/en/phrases/dynamic.xml</code> and add <pre> <epp:phrase id="Plugin/Screen:tool_divide"> # </epp:phrase> </pre> (the <code>dynamic.xml</code> file needs to be valid XML, so you can't change the separator to something like <code></li><li></code>.) === Changing the toolbar items === The toolbar is dynamically created. * there is one form for an anonymous user ** (this is where a user logs in, or creates a new account) *** [[image:anon_toolbar.png]] * and one for a logged in user ** The toolbar for an admin-level user could look like: *** [[image:admin_toolbar.png]] To deviate from the default toolbar, you will need to provide your own xhtml. Edit <code>archives/deposit/cfg/lang/en/phrases/dynamic.xml</code> and add: <pre> <epp:phrase id="dynamic:not_logged_in"><!-- --><li><a class="h_menulink" href="/view/">Browse</a></li><!-- --><li><a class="h_menulink" href="{$config{userhome}}">Login</a></li><!-- --><li><a class="h_menulink" href="{$config{perl_url}}/register">Create Account</a></li><!-- --></epp:phrase> <epp:phrase id="dynamic:logged_in"><!-- --><li class="logged_in_as" style="float: right">Logged in as <epc:pin name="user"/></li><!-- --><li><a class="h_menulink" href="/view/">Browse</a></li><!-- --><epc:pin name="tools" /><!-- --><li><a class="h_menulink" href="{$config{perl_url}}/logout">Logout</a></li><!-- --></epp:phrase> </pre> my example is different from the standard EPrints layout in that I am also switching to using a list for each of my toolbar items '''Note''': the use of the xhtml comments as above is part of a CSS "trick" === Removing items from the user list === Items can easily be removed from the toolbar (I have removed the '''Saved Searches''' item.) Edit <code>archives/deposit/cfg/cfg.d/plugins.pl</code> <pre> # option to disable the functionality all together $c->{plugins}->{"Screen::User::SavedSearches"}->{params}->{disable} = 1; </pre> Where <code>Screen::User::SavedSearches</code> corresponds to <code>perl_lib/EPrints/Plugin/<strong>Screen/User/SavedSearches.pm</strong></code> === Changing the actual format === In my example, we have actually changed the toolbar to be a series if List Items (<code><li>foo</li></code>) This is somewhat more complex, and requires code-hacking The toolbar is created in <code>perl_lib/EPrints/Session.pm</code>, in a function called <code>render_toolbar</code>. This needs to be changed in several places, however in essence, you need to replace: <pre> my $first = 1; foreach my $tool ( @core ) { if( $first ) { $first = 0; } else { $core->appendChild( $self->html_phrase( "Plugin/Screen:tool_divide" ) ); } my $a = $self->render_link( $url."?screen=".substr($tool->{screen_id},8) ); $a->appendChild( $tool->{screen}->render_title ); $core->appendChild( $a ); } </pre> with: <pre> foreach my $tool ( @core ) { my $a = $self->render_link( $url."?screen=".substr($tool->{screen_id},8) ); $a->appendChild( $tool->{screen}->render_title ); my $li = $self->make_element('li', class=>""); $li->appendChild($a); $core->appendChild( $li ); } </pre> (Thanks to Ben Wheeler for that)
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)