* @param string $class The CSS class name (OPTIONAL; default
* not used)
* @param string $id The ID name (OPTIONAL; default not used)
+ * @param string $name The anchor name (OPTIONAL; default not used)
*
* @return string The desired hyperlink tag.
*
* @since 1.5.2
*
*/
-function create_hyperlink($uri, $text, $target='', $onclick='', $class='', $id='') {
+function create_hyperlink($uri, $text, $target='', $onclick='',
+ $class='', $id='', $name='') {
global $oTemplate;
$oTemplate->assign('onclick', $onclick);
$oTemplate->assign('class', $class);
$oTemplate->assign('id', $id);
+ $oTemplate->assign('name', $name);
return $oTemplate->fetch('hyperlink.tpl');
* (OPTIONAL; default not used)
* @param string $vspace The image's vspace attribute value
* (OPTIONAL; default not used)
+ * @param string $text_alternative A text replacement for the entire
+ * image tag, to be used at the
+ * discretion of the template set,
+ * if for some reason the image tag
+ * cannot or should not be produced
+ * (OPTIONAL; default not used)
*
* @return string The desired hyperlink tag.
*
*/
function create_image($src, $alt='', $width='', $height='',
$border='', $class='', $id='', $onclick='',
- $title='', $align='', $hspace='', $vspace='') {
+ $title='', $align='', $hspace='', $vspace='',
+ $text_alternative='') {
global $oTemplate;
$oTemplate->assign('align', $align);
$oTemplate->assign('hspace', $hspace);
$oTemplate->assign('vspace', $vspace);
+ $oTemplate->assign('text_alternative', $text_alternative);
return $oTemplate->fetch('image.tpl');
}
+/**
+ * Generates a span tag
+ *
+ * @param string $value The contents that belong inside the span
+ * @param string $class The CSS class name (OPTIONAL; default
+ * not used)
+ * @param string $id The ID name (OPTIONAL; default not used)
+ *
+ * @return string The desired span tag.
+ *
+ * @since 1.5.2
+ *
+ */
+function create_span($value, $class='', $id='') {
+
+ global $oTemplate;
+
+ $oTemplate->assign('value', $value);
+ $oTemplate->assign('class', $class);
+ $oTemplate->assign('id', $id);
+
+ return $oTemplate->fetch('span.tpl');
+
+}
+
+
/**
* Generates html tags
+//FIXME: this should not be used anywhere in the core, or we should
+// convert this to use templates. We sould not be assuming HTML output.
*
* @param string $tag Tag to output
* @param string $val Value between tags