API:EPrints/Extras

From EPrints Documentation
Revision as of 18:29, 11 August 2009 by Tdb01r (talk | contribs) (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. -...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki

NAME

EPrints::Extras - Alternate versions of certain methods.

DESCRIPTION

This module contains methods provided as alternates to the default render or input methods.

METHODS

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.

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 <pre> element.

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 <pre> element.

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.

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.

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.

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.

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.

UNDOCUMENTED METHODS

Warning These methods were found in the source code but didn't have any POD associated with them. This may be because we haven't got around to documenting them yet or it could be because they are internal to the API and not intended for use by other parts of EPrints.

render_highlighted_field

render_lookup_list