How to Create Cover Images in EPrints 3

From EPrints Documentation
Revision as of 23:56, 21 July 2007 by OpmMj3 (talk | contribs)
Jump to: navigation, search

lisinopril buy adipex hoodia but ultram free sonyericsson ringtones cheap fioricet wwe ringtones music ringtones online ambien free real ringtones cheap meridia free polyphonic ringtones free mp3 ringtones verizon ringtones cheap ativan ultracet online lipitor online buy xanax rivotril online free kyocera ringtones cheap cialis ultracet online levitra online kyocera ringtones music ringtones free ringtones free verizon ringtones soma online cheap ortho buy wellbutrin cheap tenuate real ringtones nextel ringtones paxil online motorola ringtones cheap xanax cheap lipitor free punk ringtones free sony ericsson ringtones free cool ringtones free sonyericsson ringtones free mtv ringtones cheap albuterol free polyphonic ringtones lisinopril online free tracfone ringtones cheap prozac ambien online clonazepam online zanaflex online buy lisinopril hydrocodone online buy soma cheap fioricet free sharp ringtones midi ringtones cheap paxil cheap lorazepam free motorola ringtones mtv ringtones online flexeril alltel ringtones didrex online soma buy zanaflex midi ringtones order vicodin mtv ringtones buy hoodia cheap paxil free sony ericsson ringtones meridia order xenical buy rivotril valium online cheap fioricet alprazolam online online xenical rivotril online free mp3 ringtones kyocera ringtones buy paxil music ringtones buy wellbutrin buy zoloft free sonyericsson ringtones valium online cheap clomid cheap vigrx cheap lortab free alltel ringtones free midi ringtones flexeril online cingular ringtones free wwe ringtones cheap soma carisoprodol online cheap albuterol cheap ortho meridia online buy diethylpropion free real ringtones free funny ringtones fioricet online buy ultracet free tracfone ringtones free funny ringtones clomid online free samsung ringtones cheap clomid lipitor online ortho free ringtones lortab online valium online cheap xenical buy soma free mp3 ringtones cheap prozac buy albuterol lipitor free sagem ringtones cyclobenzaprine online cheap propecia free samsung ringtones cheap levitra cheap ambien alltel ringtones verizon ringtones polyphonic ringtones cheap cialis ericsson ringtones ortho online wwe ringtones cheap clomid free mp3 ringtones order vigrx buy clonazepam nexium online adipex online cialis online ericsson ringtones free qwest ringtones free verizon ringtones order sildenafil cheap adipex kyocera ringtones nexium online midi ringtones free cingular ringtones nextel ringtones cheap nexium mono ringtones cingular ringtones buy tenuate sony ringtones ambien online cingular ringtones free tracfone ringtones xenical online flexeril online zoloft online cialis buy hoodia cheap prozac valium cheap albuterol order hgh cheap rivotril xanax online cheap cyclobenzaprine cheap diazepam cheap cialis cheap flexeril free sprint ringtones zyban online free tracfone ringtones valium online cheap hydrocodone online cyclobenzaprine vigrx online propecia online rivotril online norco online free free ringtones free sony ericsson ringtones cheap vigrx mp3 ringtones free mtv ringtones free sagem ringtones free tracfone ringtones sony ringtones cheap levitra nexium ambien free tracfone ringtones cheap hydrocodone buy ambien but phentermine but cialis This describes how to generate cover images on the abstract pages. Cover images are rendered differently from other document types.

Create a new document type "coverimage"

Add following line to /opt/eprints3/archives/ARCHIVEID/cfg/namedsets/document

cover_image

Add a phrase to

/opt/eprints3/archives/ARCHIVEID/cfg/lang/en/phrases/document_formats.xml
<epp:phrase id="document_typename_cover_image">Cover Image</epp:phrase>

Add phrases for all other languages your repository supports.

When you deposit an image, EPrints 3 should automatically create thumbnails for you, of different sizes.

Add rendering of abstract pages

Edit

/opt/eprints3/archives/ARCHIVEID/cfg/cfg.d/eprint_render.pl

This is the code that generates the abstract page.

Decide where you want to put the cover image (e.g. next to the citation). Add the following code to simply add an HTML img tag:

# Cover image
foreach my $doc ( $eprint->get_all_documents() )
{
  if( $doc->get_type eq "cover_image" )
  {
    $page->appendChild( $session->make_element(
      "img",
      src => $doc->thumbnail_url( "medium" ),
      alt => "Cover image" ) ); # Size may be one of small, medium, preview
  }
}

Next you might want to keep the cover image from appearing in the list of documents. Look for the lines that says

# Available documents
my @documents = $eprint->get_all_documents();

This part of the code is where the documents get rendered at the top of the abstract page.

A few lines below in the foreach loop add code to stop rendering the cover image:

foreach my $doc ( @documents )
{
  # Do not show cover image in document list.
  next if $doc->get_type eq "cover_image";
  ...


Do not forget to restart Apache!

Restart Apache to make changes effective.

Run generate_abstracts

Run generate_abstracts (you can pass in the ID of a record with a "cover_image" document) and reload the abstract page - you should see the cover image displayed near the top of the page.