private function _get_form() { $form = new Forge("admin/strip_exif", "", "post", array("id" => "g-admin-strip_exif-form")); $group = $form->group("system")->label(t("System")); $exivPath = strip_exif::whereis("exiv2"); $group->input("exiv_path")->id("exiv_path")->label(t("Path to exiv2 binary:"))->value(module::get_var("strip_exif", "exiv_path", $exivPath))->callback("strip_exif::verify_exiv_path")->error_messages("required", t("You must enter the path to exiv2"))->error_messages("invalid", t("File does not exist"))->error_messages("is_dir", t("File is a directory"))->message("Auto detected exiv2 here: " . $exivPath); $group = $form->group("tags")->label(t("Tags")); $group->checkbox("exif_remove")->label(t("Strip these EXIF tags:"))->checked(module::get_var("strip_exif", "exif_remove", true) == 1); if (($exifTags = module::get_var("strip_exif", "exif_tags", self::$defExifTags)) == "") { $exifTags = self::$defExifTags; } $group->input("exif_tags")->id("exif_tags")->value($exifTags); $group->checkbox("iptc_remove")->label(t("Strip these IPTC tags:"))->checked(module::get_var("strip_exif", "iptc_remove", true) == 1); if (($iptcTags = module::get_var("strip_exif", "iptc_tags", self::$defIptcTags)) == "") { $iptcTags = self::$defIptcTags; } $group->input("iptc_tags")->id("iptc_tags")->value($iptcTags); $form->submit("submit")->value(t("Save")); return $form; }
static function item_updated_data_file($item) { strip_exif::strip($item); }