* (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');
// If we found an icon, build an img tag to display it. If we didn't
// find an image, we will revert back to the text icon.
if (!is_null($icon_path)) {
- $icon = create_image($icon_path, $alt_text, $w, $h, '', '', '', '', $alt_text);
+ $icon = create_image($icon_path, $alt_text, $w, $h, '', '', '',
+ '', $alt_text, '', '', '', $text_icon);
} else {
$icon = $text_icon;
}
* + $vspace - the image's vspace attribute value
* (optional; may not be present)
* + $onclick - onClick JavaScript handler (optional; may not be present)
+ * + $text_alternative - A text replacement for the entire
+ * image tag, if for some reason the
+ * image tag cannot or should not be
+ * produced (optional; may not be present)
*
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License