Difference between revisions of "API:EPrints/Extras"

From EPrints Documentation
Jump to: navigation, search
(New page: <!-- Pod2Wiki=_preamble_ This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost. -...)
 
(Removing all content from page)
Line 1: Line 1:
<!-- Pod2Wiki=_preamble_
 
This page has been automatically generated from the EPrints source. Any wiki changes made between the 'Pod2Wiki=*' and 'End of Pod2Wiki' comments will be lost.
 
-->{{Pod2Wiki}}{{API:Source|file=EPrints/Extras.pm|package_name=EPrints::Extras}}[[Category:API|Extras]]<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_name -->=NAME=
 
'''EPrints::Extras''' - Alternate versions of certain methods.
 
  
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_description -->=DESCRIPTION=
 
This module contains methods provided as alternates to the default render or input methods.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_methods -->=METHODS=
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_xhtml_field -->==render_xhtml_field==
 
 
  $xhtml = EPrints::Extras::render_xhtml_field( $session, $field,$value )
 
 
Return an XHTML DOM object of the contents of $value. In the case of an error parsing the XML in $value return an XHTML DOM object  describing the problem.
 
 
This is intented to be used by the render_single_value metadata  field option, as an alternative to the default text renderer.
 
 
This allows through any XML element, so could cause problems if people start using SCRIPT to make pop-up windows. A later version may allow a limited set of elements only.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_preformatted_field -->==render_preformatted_field==
 
 
  $xhtml = EPrints::Extras::render_preformatted_field( $session, $field, $value )
 
 
Return an XHTML DOM object of the contents of $value.
 
 
The contents of $value will be rendered in an HTML &lt;pre&gt; element.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_hightlighted_field -->==render_hightlighted_field==
 
 
  $xhtml = EPrints::Extras::render_hightlighted_field( $session, $field, $value )
 
 
Return an XHTML DOM object of the contents of $value.
 
 
The contents of $value will be rendered in an HTML &lt;pre&gt; element.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_url_truncate_end -->==render_url_truncate_end==
 
 
  $xhtml = EPrints::Extras::render_url_truncate_end( $session, $field, $value )
 
 
Hyper link the URL but truncate the end part if it gets longer  than 50 characters.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_url_truncate_middle -->==render_url_truncate_middle==
 
 
  $xhtml = EPrints::Extras::render_url_truncate_middle( $session, $field, $value )
 
 
Hyper link the URL but truncate the middle part if it gets longer  than 50 characters.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_related_url -->==render_related_url==
 
 
  $xhtml = EPrints::Extras::render_related_url( $session, $field, $value )
 
 
Hyper link the URL but truncate the middle part if it gets longer  than 50 characters.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_english_title_orderkey -->==english_title_orderkey==
 
 
  $orderkey = EPrints::Extras::english_title_orderkey( $field, $value, $dataset )
 
 
Strip the leading a/an/the and any non alpha numerics from the start of a orderkey value. Suitable for make_single_value_orderkey on the title field.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_possible_doi -->==render_possible_doi==
 
 
  $xhtml_dom = EPrints::Extras::render_possible_doi( $field, $value, $dataset )
 
 
If the field looks like it contains a DOI then link it.
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=head_undocumented_methods -->=UNDOCUMENTED METHODS=
 
{{API:Undocumented Methods}}<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_highlighted_field -->==render_highlighted_field==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=item_render_lookup_list -->==render_lookup_list==
 
 
<!-- End of Pod2Wiki -->
 
<!-- Pod2Wiki=_postamble_ --><!-- End of Pod2Wiki -->
 

Revision as of 15:40, 12 August 2009