This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/ext/image/theme.php
green-ponies (jgen) 808e477f34 Admins can configure the browser Image Expiration now.
Also renamed the config option for jQuery image delete.
2011-09-05 14:47:30 -04:00

47 lines
1.1 KiB
PHP

<?php
class ImageIOTheme {
/**
* Display a link to delete an image
* (Added inline Javascript to confirm the deletion)
*
* @param $image_id The image to delete
*/
public function get_deleter_html($image_id) {
global $config;
if($config->get_bool("image_jquery_confirm")) {
$html = "
".make_form(make_link("image_admin/delete"),'POST',false,'delete_image')."
<input type='hidden' name='image_id' value='$image_id' />
<input type='submit' value='Delete' id='delete_image_submit' />
</form>
";
} else {
$html = "
".make_form(make_link("image_admin/delete"))."
<input type='hidden' name='image_id' value='$image_id' />
<input type='submit' value='Delete' onclick='return confirm(\"Delete the image?\");' />
</form>
";
}
return $html;
}
/**
* Display link to replace the image
*
* @param $image_id The image to replace
*/
public function get_replace_html($image_id) {
$html = "
".make_form(make_link("image_admin/replace"))."
<input type='hidden' name='image_id' value='$image_id' />
<input type='submit' value='Replace' />
</form>";
return $html;
}
}
?>