summaryrefslogtreecommitdiff
path: root/modules/watermark
diff options
context:
space:
mode:
Diffstat (limited to 'modules/watermark')
-rw-r--r--modules/watermark/controllers/admin_watermarks.php2
-rw-r--r--modules/watermark/helpers/watermark.php6
-rw-r--r--modules/watermark/module.info2
-rw-r--r--modules/watermark/views/admin_watermarks.html.php58
4 files changed, 35 insertions, 33 deletions
diff --git a/modules/watermark/controllers/admin_watermarks.php b/modules/watermark/controllers/admin_watermarks.php
index 423196ac..2a1d5f60 100644
--- a/modules/watermark/controllers/admin_watermarks.php
+++ b/modules/watermark/controllers/admin_watermarks.php
@@ -138,7 +138,7 @@ class Admin_Watermarks_Controller extends Admin_Controller {
if ($name = module::get_var("watermark", "name")) {
foreach (array("thumb", "resize") as $target) {
graphics::add_rule(
- "watermark", $target, "composite",
+ "watermark", $target, "gallery_graphics::composite",
array("file" => VARPATH . "modules/watermark/$name",
"width" => module::get_var("watermark", "width"),
"height" => module::get_var("watermark", "height"),
diff --git a/modules/watermark/helpers/watermark.php b/modules/watermark/helpers/watermark.php
index 170ee64c..60d5cb5d 100644
--- a/modules/watermark/helpers/watermark.php
+++ b/modules/watermark/helpers/watermark.php
@@ -23,7 +23,7 @@ class watermark_Core {
$range[$i] = "$i%";
}
- $form = new Forge("admin/watermarks/add", "", "post", array("id" => "gAddWatermarkForm"));
+ $form = new Forge("admin/watermarks/add", "", "post", array("id" => "g-add-watermark-form"));
$group = $form->group("add_watermark")->label(t("Upload Watermark"));
$group->upload("file")->label(t("Watermark"))->rules("allow[jpg,png,gif]|size[1MB]|required");
$group->dropdown("position")->label(t("Watermark Position"))
@@ -41,7 +41,7 @@ class watermark_Core {
$range[$i] = "$i%";
}
- $form = new Forge("admin/watermarks/edit", "", "post", array("id" => "gEditWatermarkForm"));
+ $form = new Forge("admin/watermarks/edit", "", "post", array("id" => "g-edit-watermark-form"));
$group = $form->group("edit_watermark")->label(t("Edit Watermark"));
$group->dropdown("position")->label(t("Watermark Position"))
->options(self::positions())
@@ -54,7 +54,7 @@ class watermark_Core {
}
static function get_delete_form() {
- $form = new Forge("admin/watermarks/delete", "", "post", array("id" => "gDeleteWatermarkForm"));
+ $form = new Forge("admin/watermarks/delete", "", "post", array("id" => "g-delete-watermark-form"));
$group = $form->group("delete_watermark")->label(t("Really delete Watermark?"));
$group->submit("")->value(t("Delete"));
return $form;
diff --git a/modules/watermark/module.info b/modules/watermark/module.info
index abd4a3cf..41a871bd 100644
--- a/modules/watermark/module.info
+++ b/modules/watermark/module.info
@@ -1,3 +1,3 @@
name = "Watermarks"
description = "Allows users to watermark their photos"
-version = 1
+version = 2
diff --git a/modules/watermark/views/admin_watermarks.html.php b/modules/watermark/views/admin_watermarks.html.php
index ac69d21d..fc634b82 100644
--- a/modules/watermark/views/admin_watermarks.html.php
+++ b/modules/watermark/views/admin_watermarks.html.php
@@ -1,37 +1,39 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="#gWatermarks">
+<div class="g-block">
<h1> <?= t("Watermarks") ?> </h1>
<p>
<?= t("You can have one watermark for your Gallery. This watermark will be applied to all thumbnails and resized images, but it will not be applied to your full size images. To make sure that your guests can only see watermarked images, you should restrict access to your full size images.") ?>
</p>
- <? if (empty($name)): ?>
- <a href="<?= url::site("admin/watermarks/form_add") ?>"
- title="<?= t("Upload a watermark")->for_html_attr() ?>"
- class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a>
- <? else: ?>
- <h2> <?= t("Active Watermark") ?> </h2>
- <p>
- <?= t("Note that changing this watermark will require you to rebuild all of your thumbnails and resized images.") ?>
- </p>
- <div>
- <div class="image">
- <img width="<?= $width ?>" height="<?= $height ?>" src="<?= $url ?>"/>
- <p>
- <?= t("Position: %position", array("position" => watermark::position($position))) ?>
- </p>
- <p>
- <?= t("Transparency: %transparency%", array("transparency" => module::get_var("watermark", "transparency"))) ?>
- </p>
- </div>
- <div class="controls">
- <a href="<?= url::site("admin/watermarks/form_edit") ?>"
- title="<?= t("Edit Watermark")->for_html_attr() ?>"
- class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a>
- <a href="<?= url::site("admin/watermarks/form_delete") ?>"
- title="<?= t("Delete Watermark")->for_html_attr() ?>"
- class="gDialogLink gButtonLink ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
+ <div class="g-block-content">
+ <? if (empty($name)): ?>
+ <a href="<?= url::site("admin/watermarks/form_add") ?>"
+ title="<?= t("Upload a watermark")->for_html_attr() ?>"
+ class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-document-b"></span><?= t("Upload a watermark") ?></a>
+ <? else: ?>
+ <h2> <?= t("Active watermark") ?> </h2>
+ <p>
+ <?= t("Note that changing this watermark will require you to rebuild all of your thumbnails and resized images.") ?>
+ </p>
+ <div>
+ <div class="g-photo">
+ <img width="<?= $width ?>" height="<?= $height ?>" src="<?= $url ?>" />
+ <p>
+ <?= t("Position: %position", array("position" => watermark::position($position))) ?>
+ </p>
+ <p>
+ <?= t("Transparency: %transparency%", array("transparency" => module::get_var("watermark", "transparency"))) ?>
+ </p>
+ </div>
+ <div class="controls">
+ <a href="<?= url::site("admin/watermarks/form_edit") ?>"
+ title="<?= t("Edit watermark")->for_html_attr() ?>"
+ class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-pencil"></span><?= t("edit") ?></a>
+ <a href="<?= url::site("admin/watermarks/form_delete") ?>"
+ title="<?= t("Delete watermark")->for_html_attr() ?>"
+ class="g-dialog-link g-button ui-icon-left ui-state-default ui-corner-all"><span class="ui-icon ui-icon-trash"></span><?= t("delete") ?></a>
+ </div>
</div>
+ <? endif ?>
</div>
- <? endif ?>
</div>