mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 15:26:10 -06:00
watermark settings
This commit is contained in:
parent
2e07a12e6f
commit
4f9ffb46f1
@ -62,6 +62,7 @@ return [
|
|||||||
'ads_image' => [
|
'ads_image' => [
|
||||||
'title' => 'visiosoft.module.advs::section.ads_image',
|
'title' => 'visiosoft.module.advs::section.ads_image',
|
||||||
'fields' => [
|
'fields' => [
|
||||||
|
'watermark',
|
||||||
'image_resize_backend',
|
'image_resize_backend',
|
||||||
'full_image_width',
|
'full_image_width',
|
||||||
'full_image_height',
|
'full_image_height',
|
||||||
|
|||||||
@ -295,6 +295,12 @@ return [
|
|||||||
'default_value' => 600,
|
'default_value' => 600,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
'watermark' => [
|
||||||
|
'type' => 'anomaly.field_type.boolean',
|
||||||
|
'config' => [
|
||||||
|
'default_value' => false,
|
||||||
|
]
|
||||||
|
],
|
||||||
'watermark_type' => [
|
'watermark_type' => [
|
||||||
'type' => 'anomaly.field_type.select',
|
'type' => 'anomaly.field_type.select',
|
||||||
'bind' => 'adv.watermark_type',
|
'bind' => 'adv.watermark_type',
|
||||||
|
|||||||
@ -247,4 +247,8 @@ return [
|
|||||||
'name' => 'GET Categories',
|
'name' => 'GET Categories',
|
||||||
'instructions' => 'It represents the categories in which the GET property will be valid.'
|
'instructions' => 'It represents the categories in which the GET property will be valid.'
|
||||||
],
|
],
|
||||||
|
'watermark' => [
|
||||||
|
'name' => 'Watermark',
|
||||||
|
'instructions' => 'Is watermark active?'
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@ -118,6 +118,7 @@ class UploadController extends AdminController
|
|||||||
|
|
||||||
foreach ($image_types as $key => $image) {
|
foreach ($image_types as $key => $image) {
|
||||||
|
|
||||||
|
if (setting_value('visiosoft.module.advs::watermark', false)) {
|
||||||
if ($settings_value['watermark_type'] == 'image') {
|
if ($settings_value['watermark_type'] == 'image') {
|
||||||
|
|
||||||
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
|
if ($watermarkimage = $this->files->find($settings_value['watermark_image'])) {
|
||||||
@ -139,6 +140,7 @@ class UploadController extends AdminController
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($key === "full") {
|
if ($key === "full") {
|
||||||
$fileName = $file->getAttributes()['name'];
|
$fileName = $file->getAttributes()['name'];
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user