mirror of
https://github.com/Terranom674/Piwigo_Bratonien_Tools.git
synced 2026-09-19 23:24:36 +00:00
Complete watermark administration tool registry
This commit is contained in:
@@ -9,13 +9,46 @@ require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark.inc.php');
|
|||||||
require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark_profiles.inc.php');
|
require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark_profiles.inc.php');
|
||||||
require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark_settings.inc.php');
|
require_once(BRATONIEN_TOOLS_PATH . 'tools/watermark_settings.inc.php');
|
||||||
require_once(BRATONIEN_TOOLS_PATH . 'tools/album_rules.inc.php');
|
require_once(BRATONIEN_TOOLS_PATH . 'tools/album_rules.inc.php');
|
||||||
|
require_once(BRATONIEN_TOOLS_PATH . 'include/watermark_engine.inc.php');
|
||||||
|
|
||||||
function bratonien_tools_get_tools()
|
function bratonien_tools_get_tools()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'image_cache_clear' => array('title'=>'Bildcache leeren','description'=>'Loescht erzeugte Bildderivate.','button'=>'Bildcache leeren','confirm'=>'Bildcache wirklich leeren?','handler'=>'bratonien_tools_clear_image_cache'),
|
'image_cache_clear' => array(
|
||||||
'watermark' => array('title'=>'Wasserzeichen verwalten','description'=>'Verwaltet Profile, globale Regeln und Albumregeln.','button'=>'Wasserzeichen speichern','confirm'=>'Wasserzeichen speichern?','handler'=>'bratonien_tools_save_watermark'),
|
'handler' => 'bratonien_tools_clear_image_cache',
|
||||||
'watermark_rule' => array('title'=>'Albumregel','description'=>'Speichert eine Albumregel.','button'=>'Albumregel speichern','confirm'=>'Albumregel speichern?','handler'=>'bratonien_tools_save_album_rule'),
|
),
|
||||||
'watermark_defaults' => array('title'=>'Globale Wasserzeichenregeln','description'=>'Definiert Standardprofile für öffentliche und private Alben.','button'=>'Standards speichern','confirm'=>'Standards speichern?','handler'=>'bratonien_tools_save_watermark_defaults'),
|
'watermark_save' => array(
|
||||||
|
'handler' => 'bratonien_tools_save_watermark',
|
||||||
|
),
|
||||||
|
'watermark_engine' => array(
|
||||||
|
'handler' => 'bratonien_tools_handle_watermark_engine',
|
||||||
|
),
|
||||||
|
'watermark_profile_save' => array(
|
||||||
|
'handler' => 'bratonien_tools_save_watermark_profile',
|
||||||
|
),
|
||||||
|
'watermark_profile_delete' => array(
|
||||||
|
'handler' => 'bratonien_tools_delete_watermark_profile',
|
||||||
|
),
|
||||||
|
'watermark_profile_duplicate' => array(
|
||||||
|
'handler' => 'bratonien_tools_duplicate_watermark_profile',
|
||||||
|
),
|
||||||
|
'watermark_defaults' => array(
|
||||||
|
'handler' => 'bratonien_tools_save_watermark_defaults',
|
||||||
|
),
|
||||||
|
'watermark_rule' => array(
|
||||||
|
'handler' => 'bratonien_tools_save_album_rule',
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function bratonien_tools_handle_watermark_engine()
|
||||||
|
{
|
||||||
|
$enabled = !empty($_POST['engine_enabled']);
|
||||||
|
bratonien_tools_set_watermark_engine($enabled);
|
||||||
|
|
||||||
|
return array(
|
||||||
|
'message' => $enabled
|
||||||
|
? 'Bratonien-Wasserzeichenverwaltung aktiviert. Piwigos bisherige Wasserzeichen-Nutzung wurde gesichert und unterdrueckt.'
|
||||||
|
: 'Bratonien-Wasserzeichenverwaltung deaktiviert. Die zuvor gesicherte Piwigo-Wasserzeichen-Nutzung wurde wiederhergestellt.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user