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
Archive:Https3
(section)
Archive
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!
=== Missing Images === A number of image links will be broken because eprints is looking for them on urlpath rather than on secureurl. In some cases this can be fixed by replacing urlpath with secureurl in the code, but some phrases may appear on both secure and insecure pages. Therefore we also need a solution which can be evaluated by a epin in a template. The cleanest way I could find of doing this is as follows: Add two methods to EPrints::Session ###################################################################### =pod =item $foo = $session->get_baseurl() Gets the base url for images, depending on whether the session is secure or not (N.B. by secure we mean EPrints_secure is yes) Added by CSH 26 June 2007 =cut ###################################################################### sub get_baseurl { my( $self ) = @_; my $esec = $self->get_request->dir_config( "EPrints_Secure" ); if( defined $esec && $esec eq "yes" ) { return $self->get_repository->get_conf( "securepath" ); } else { return $self->get_repository->get_conf( "base_url" ); } } ###################################################################### =pod =item $foo = $session->get_imageurl() Gets the base url for images, depending on whether the session is secure or not (N.B. by secure we mean EPrints_secure is yes) Added by CSH 26 June 2007 =cut ###################################################################### sub get_imageurl { my( $self ) = @_; return $self->get_baseurl."/style/images/"; } Search through the eprints code for every occurrence of the string /style/images/ and replace with a call to get_imageurl e.g. In /opt/eprints/perl_lib/EPrints/Plugin/Screen/Items.pm, change the line my $imagesurl = $self->{session}->get_repository->get_conf( "urlpath" )."/style/images"; to my $imagesurl = $self->{session}->get_imageurl; We will add a variable called baseurl to the variables available in a script: In the execute method of EPrints::Script, add: $state->{baseurl} = [$state->{session}->get_baseurl, "STRING" ]; before the run command is called on the compiler. It will now be possible to get the url for images in a phrase through {$baseurl} In /opt/eprints3/lib/lang/en/phrases/system.xml, change the links to images in the following phrases to use $baseurl sys:ep_form_required Plugin/InputForm/Surround/Default:show_help Plugin/InputForm/Surround/Default:hide_help lib/session:show_help lib/session:hide_help e.g. the ep_form_required phrase becomes: <epp:phrase id="sys:ep_form_required"><img src="{$baseurl}/style/images/required.png" border="0" class="ep_required" alt="Required"/> <epc:pin name="label"/></epp:phrase> If some repositories aren't using https, you may prefer to override these phrases on a per repository basis.
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)