Suggestion - Images for standard elgg_views such as output/confirmlink & output/url

This has probably already been mentioned but it should be standard to be able to include images with or instead of text for standard elgg_views like output/confirmlink, and output/url.  The implementation is simple:

  * @uses $vars['image'] Use an image for the link (this must include the entire image tag <img ... />)

$confirm = $vars['confirm'];
$image = $vars['image'];
if (!$confirm) {
    $confirm = elgg_echo('question:areyousure');

// always generate missing action tokens
$link = elgg_add_action_tokens_to_url($vars['href']);

if (isset($vars['class']) && $vars['class']) {
    $class = 'class="' . $vars['class'] . '"';
} else {
    $class = '';
<a href="<?php echo $link; ?>" <?php echo $class; ?> onclick="return confirm('<?php echo addslashes($confirm); ?>');"><?php echo $image; echo htmlentities($vars['text'], ENT_QUOTES, 'UTF-8'); ?></a>

Feedback and Planning

Feedback and Planning

Discussions about the past, present, and future of Elgg and this community site.