Recent Changes in the OrganicEprintsIssues group   -   WikiHelp   -   Search ecowiki.org:

« 00006 · Edit Form · 00008 »

Summary: Structure in abstracts
Type: Usage

Priority (1<5) = 3
Status: Assigned

Raised by: hal
Project: CORE Organic
Related to Issues?
Date opened: 2005–07–05
Assigned to hal
Hours used (estimates in brackets) =
Date closed:

Description:
People have asked for the ability to write more structure in the abstract text fields. At present, linebreaks are entered, but two linebreaks are shown as just one and not as a new paragraph.

Possible solution on Eprints tech list 12may2005:
Hmm. I’m not sure why that changed. The default rendering for fields of type “longtext” appears to just turn them into a single block of text now.

It’s easily worked around however by adding the a rendering parameter to the “abstract” field config in ArchiveMetadataFieldsConfig.pm:

 { name => “abstract”, input_rows => 10, type => “longtext”, render_single_value => sub 
  {
   my( $session, $field, $value ) = @_;

   my @paras = split( /\r\n\r\n|\r\r|\n\n/ , $value );

   my $frag = $session→make_doc_fragment();
   foreach( @paras )
   {
       my $p = $session→make_element( 
           “p”, 
           class=>$self→{name}.”_paragraph” );
       $p→appendChild( $session→make_text( $_ ) );
       $frag→appendChild( $p );
   }
   return $frag;
  } 
 },

and restart apache and MAKE SURE IT WORKS,as i’ve just cut and pasted the code then run generate_abstracts to fix the ones which are wrong. [tested by two others with success]

The “render” paramters only effect how a value is converted to XHTML, so they can
safely be played with without effecting the underlying data.

15aug2005: Seems like we cannot have both the present (linebreaks rendered as linebreaks) and 2 linebreaks rendered as paragraphs. Mail to Eprints tech.

New Issue

Open Issues

(Edit SideBar)


Organic Eprints Wiki



Based on PmWiki

(Edit SideBar)

Page last modified on August 15, 2005, at 03:08 PM - Edit Page