API:EPrints/Extras
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
Latest Source Code (3.4, 3.3) | Revision Log | Before editing this page please read Pod2Wiki
Contents
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 )
Returns 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 )
Returns 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 <div> element with class ep_highlight.
render_lookup_list
$xhtml = EPrints::Extras::render_lookup_list( $session, $rows )
Returns an XHTML DOM object of an unordered list (<ul>) with list items (<li>) provided by the $rows array reference.
render_url_truncate_end
$xhtml = EPrints::Extras::render_url_truncate_end( $session, $field, $value )
Returns and XHTML DOM object of a hyperlink for the URL provided by $value 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 )
Returns and XHTML DOM object of a hyperlink for the URL provided by $value but truncate the middle part if it gets longer than 50 characters.
$xhtml = EPrints::Extras::render_related_url( $session, $field, $value )
Hyper link the related URL named by given type or at the end truncated link (if it gets longer than 40 characters) otherwise.
$value is an array reference of hash references containing rows of related URL an related URL type.
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 $value looks like it contains a DOI then returns a DOI link XHTML DOM object. Otherwise just returns an XHTML DOM object of the text in $value.
COPYRIGHT
© Copyright 2000-2024 University of Southampton.
EPrints 3.4 is supplied by EPrints Services.
http://www.eprints.org/eprints-3.4/
LICENSE
This file is part of EPrints 3.4 http://www.eprints.org/.
EPrints 3.4 and this file are released under the terms of the GNU Lesser General Public License version 3 as published by the Free Software Foundation unless otherwise stated.
EPrints 3.4 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with EPrints 3.4. If not, see http://www.gnu.org/licenses/.