3 if (!isset($language) || (!isset(
$lang)))
7 require_once
'../system/plugins/gallery/classes/gallery.php';
11 $gallery = new \YAWK\PLUGINS\GALLERY\gallery();
16 if (isset(
$_GET[
'id']) && (is_numeric(
$_GET[
'id']) && (!isset(
$_GET[
'edit']))))
20 if (isset(
$_GET[
'edit']) && (
$_GET[
'edit'] ===
"1") && (isset(
$_GET[
'id']) && (is_numeric(
$_GET[
'id']))))
26 if (isset(
$_GET[
'refresh']) && (
$_GET[
'refresh'] ===
"1"))
30 \YAWK\alert::draw(
"success",
"$lang[SUCCESS]",
"$lang[GALLERY_REFRESH_OK] $_GET[folder] $lang[UPDATED]",
"", 5800);
34 \YAWK\alert::draw(
"danger",
"$lang[ERROR]",
"$lang[GALLERY_REFRESH_FAILED]",
"", 5800);
39 <link href=
"../system/engines/jquery/lightbox2/css/lightbox.min.css" rel=
"stylesheet">
40 <script src=
"../system/engines/jquery/lightbox2/js/lightbox.min.js"></script>
41 <script
type=
"text/javascript">
43 'albumLabel':
"<?php echo $lang['IMAGE']; ?> %1 <?php echo $lang['OF']; ?> %2 - <?php echo $lang['GALLERY_SAVE_INFO']; ?>",
50 <!-- Content Wrapper. Contains page content -->
51 <div class=\"content-wrapper\" id=\"content-FX\">
52 <!-- Content Header (Page header) -->
53 <section class=\"content-header\">";
55 echo \YAWK\backend::getTitle(
$lang[
'GALLERY'],
$lang[
'GALLERY_SUBTEXT']);
56 echo
"<ol class=\"breadcrumb\">
57 <li><a href=\"index.php\" title=\"$lang[DASHBOARD]\"><i class=\"fa fa-dashboard\"></i> $lang[DASHBOARD]</a></li>
58 <li><a href=\"index.php?page=plugins\" title=\"$lang[PLUGINS]\"> $lang[PLUGINS]</a></li>
59 <li><a href=\"index.php?plugin=gallery\" title=\"$lang[GALLERY]\"> $lang[GALLERY]</a></li>
60 <li class=\"active\"><a href=\"index.php?plugin=gallery&pluginpage=edit&id=$gallery->id\" title=\"$lang[REFRESH]\"> $lang[GALLERY_REFRESH]</a></li>
64 <section class=\"content\">";
68 <form action=
"index.php?plugin=gallery&pluginpage=edit&edit=1&id=<?php echo $gallery->id; ?>" role=
"form" method=
"POST">
70 <div
class=
"col-md-8">
71 <div
class=
"box box-default">
72 <div
class=
"box-header">
73 <h3
class=
"box-title"><
i class=
"fa fa-edit text-muted"></
i> &
nbsp;edit <i><?php echo
$gallery->title; ?></
i></h3>
75 <div
class=
"box-body">
80 <div
class=
"col-md-4">
81 <div
class=
"box box-default">
82 <div
class=
"box-header">
83 <h3
class=
"box-title"><?php echo
$lang[
'GALLERY_EDIT']; ?></h3>
85 <div
class=
"box-body">
87 <label
for=
"folder"><?php echo
$lang[
'SELECT_FOLDER']; ?></label>
88 <?php echo
$gallery->drawFolderSelectFromGallery(
"media/images/",
"$gallery->folder")?>
89 <label
for=
"customFolder"><?php echo
$lang[
'OR_SET_DIFFERENT_FOLDER']; ?></label>
90 <input
id=
"customFolder"
93 placeholder=
"media/images/your-images-folder"
95 <label
for=
"title"><?php echo
$lang[
'GALLERY_TITLE']; ?></label>
99 placeholder=
"<?php echo $lang['GALLERY_ABOUT']; ?>"
100 value=
"<?php echo $gallery->title; ?>"
101 class=
"form-control">
102 <label
for=
"description"><?php echo
$lang[
'GALLERY_DESC']; ?><small> <?php echo
$lang[
'OPTIONAL']; ?></small></label>
103 <input
id=
"description"
106 placeholder=
"<?php echo $lang['GALLERY_DESC_PLACEHOLDER']; ?>"
107 value=
"<?php echo $gallery->description; ?>"
108 class=
"form-control"><br>
110 <button
type=
"submit"
113 class=
"btn btn-success pull-right">
114 <
i id=
"savebuttonIcon" class=
"fa fa-check"></
i>&
nbsp; <?php print
$lang[
'GALLERY_EDIT']; ?>
119 <div
class=
"box box-default">
120 <div
class=
"box-header">
121 <h3
class=
"box-title"><
i class=
"fa fa-wrench text-muted"></
i>&
nbsp; <?php echo
$lang[
'THUMBNAILS']; ?> <small><?php echo
$lang[
'GALLERY_IMG_RESIZE']; ?></small></h3>
123 <div
class=
"box-body">
124 <input
type=
"hidden" value=
"0" name=
"createThumbnails">
126 if (
$gallery->createThumbnails ===
"1")
128 $createThumbnailsChecked =
"checked";
132 $createThumbnailsChecked =
"";
137 $resizeImagesChecked =
"checked";
141 $resizeImagesChecked =
'';
144 <input
type=
"checkbox" value=
"1" id=
"createThumbnails" name=
"createThumbnails" <?php echo $createThumbnailsChecked; ?>>
145 <label
for=
"createThumbnails"><?php echo
$lang[
'CREATE_THUMBNAILS']; ?></label>
147 <label
for=
"thumbnailWidth"><?php echo
$lang[
'THUMBNAIL_WIDTH_PX']; ?></label>
148 <input
type=
"text" id=
"thumbnailWidth" maxlength=
"11" name=
"thumbnailWidth" class=
"form-control" placeholder=
"200px" value=
"<?php echo $gallery->thumbnailWidth; ?>">
149 <input
type=
"hidden" id=
"thumbnailWidth-old" maxlength=
"11" name=
"thumbnailWidth-old" class=
"form-control" value=
"<?php echo $gallery->thumbnailWidth; ?>">
152 <input
type=
"hidden" value=
"0" name=
"resizeImages">
153 <input
type=
"checkbox" value=
"1" id=
"resizeImages" name=
"resizeImages" <?php echo $resizeImagesChecked; ?>>
154 <label
for=
"resizeImages"><?php echo
$lang[
'RESIZE_ALL_IMAGES']; ?></label>
156 <label
for=
"imageWidth"><?php echo
$lang[
'FULLSCREEN_WIDTH']; ?></label>
158 <input
type=
"text" id=
"imageWidth" maxlength=
"11" name=
"imageWidth" class=
"form-control" placeholder=
"eg. 1024px" value=
"<?php echo $gallery->imageWidth; ?>">
159 <input
type=
"hidden" id=
"imageWidth-old" maxlength=
"11" name=
"imageWidth-old" class=
"form-control" value=
"<?php echo $gallery->imageWidth; ?>">
161 <label
for=
"imageHeight"><?php echo
$lang[
'FULLSCREEN_HEIGHT']; ?></label>
163 <input
type=
"text" id=
"imageHeight" maxlength=
"11" name=
"imageHeight" class=
"form-control" placeholder=
"eg. 1024px" value=
"<?php echo $gallery->imageHeight; ?>">
164 <input
type=
"hidden" id=
"imageHeight-old" maxlength=
"11" name=
"imageHeight-old" class=
"form-control" value=
"<?php echo $gallery->imageHeight; ?>">
166 <label
for=
"resizeType"><?php echo
$lang[
'RESIZE_TYPE']; ?></label>
167 <select
class=
"form-control" id=
"resizeType" name=
"resizeType">
169 $resizeTypes = array(
"fit_to_width",
"fit_to_height",
"thumbnail",
"resize");
174 $gallery->resizeType =
"fit_to_width";
176 if (
$type ===
"$gallery->resizeType")
178 echo
"<option value=\"$type\" selected aria-selected=\"true\">$type</option>";
182 echo
"<option value=\"$type\">$type</option>";
190 <div
class=
"box box-default">
191 <div
class=
"box-header">
192 <h3
class=
"box-title"><
i class=
"fa fa-copyright text-muted"></
i> <?php echo
"$lang[WATERMARK] <small>$lang[AND_COPYRIGHT_SETTINGS]</small>"; ?></h3>
194 <div
class=
"box-body">
195 <input
type=
"hidden" value=
"0" name=
"watermarkEnable">
198 if (
$gallery->watermarkEnabled ===
'1')
200 $watermarkEnabledChecked =
"checked";
204 $watermarkEnabledChecked =
'';
207 <input
type=
"hidden" value=
"0" name=
"watermarkEnabled">
208 <input
type=
"checkbox" value=
"1" id=
"watermarkEnabled" name=
"watermarkEnabled" <?php echo $watermarkEnabledChecked; ?>>
209 <label
for=
"watermarkEnabled"><?php echo
$lang[
'WATERMARK_ENABLE']; ?></label>
211 <label
for=
"watermark"><?php echo
$lang[
'WATERMARK_FROM_CUSTOM_TEXT']; ?></label>
212 <input
type=
"text" id=
"watermark" name=
"watermark" class=
"form-control" placeholder=
"(C) <?php echo date("Y
")." photographer
"; ?>" value=
"<?php echo $gallery->watermark; ?>">
213 <input
type=
"hidden" id=
"watermark-old" name=
"watermark-old" class=
"form-control" value=
"<?php echo $gallery->watermark; ?>">
214 <label
for=
"watermarkImage"><?php echo
$lang[
'OR_FROM_ANY_IMG']; ?></label>
215 <input
type=
"text" id=
"watermarkImage" name=
"watermarkImage" class=
"form-control" placeholder=
"media/images/yourfile.png" value=
"<?php echo $gallery->watermarkImage; ?>">
216 <input
type=
"hidden" id=
"watermarkImage-old" name=
"watermarkImage-old" class=
"form-control" value=
"<?php echo $gallery->watermarkImage; ?>">
217 <label
for=
"watermarkOpacity"><?php echo
$lang[
'OVERLAY_OPACITY']; ?></label>
218 <select
id=
"watermarkOpacity" name=
"watermarkOpacity" class=
"form-control">
220 <option value=
"<?php echo $gallery->watermarkOpacity; ?>" aria-selected=
"true" selected><?php echo
$gallery->watermarkOpacity; ?></option>
221 <option value=
".1">10%</option>
222 <option value=
".2">20%</option>
223 <option value=
".3">30%</option>
224 <option value=
".4">40%</option>
225 <option value=
".5">50%</option>
226 <option value=
".6">60%</option>
227 <option value=
".7">70%</option>
228 <option value=
".8">80%</option>
229 <option value=
".9">90%</option>
230 <option value=
"1">100%</option>
232 <label
for=
"watermarkPosition"><?php echo
$lang[
'WATERMARK_POSITION']; ?></label>
233 <select
id=
"watermarkPosition" name=
"watermarkPosition" class=
"form-control">
234 <option value=
"<?php echo $gallery->watermarkPosition; ?>"><?php echo
$gallery->watermarkPosition; ?></option>
235 <option value=
"bottom right"><?php echo
$lang[
'BOTTOM_RIGHT']; ?></option>
236 <option value=
"bottom left"><?php echo
$lang[
'BOTTOM_LEFT']; ?></option>
237 <option value=
"top left"><?php echo
$lang[
'TOP_LEFT']; ?></option>
238 <option value=
"top right"><?php echo
$lang[
'TOP_RIGHT']; ?></option>
239 <option value=
"bottom"><?php echo
$lang[
'BOTTOM']; ?></option>
240 <option value=
"center"><?php echo
$lang[
'CENTER']; ?></option>
241 <option value=
"top"><?php echo
$lang[
'TOP']; ?></option>
243 <label
for=
"offsetX"><?php echo
$lang[
'OFFSET_X_AXIS']; ?></label>
244 <input
type=
"text" id=
"offsetX" name=
"offsetX" class=
"form-control" placeholder=
"-12" value=
"<?php echo $gallery->offsetX; ?>">
245 <label
for=
"offsetY"><?php echo
$lang[
'OFFSET_Y_AXIS']; ?></label>
246 <input
type=
"text" id=
"offsetY" name=
"offsetY" class=
"form-control" placeholder=
"-12" value=
"<?php echo $gallery->offsetY; ?>">
247 <label
for=
"watermarkFont"><?php echo
$lang[
'WATERMARK_FONT']; ?></label>
248 <select
id=
"watermarkFont" name=
"watermarkFont" class=
"form-control">
249 <option value=
"<?php echo $gallery->watermarkFont; ?>"><?php echo
$gallery->watermarkFont; ?></option>
251 echo
$gallery->scanFonts(
"../system/fonts/");
255 <label
for=
"watermarkTextSize"><?php echo
$lang[
'WATERMARK_TEXT_SIZE']; ?></label>
256 <select
id=
"watermarkTextSize" name=
"watermarkTextSize" class=
"form-control">
261 if (
$i ==
$gallery->watermarkTextSize) { $selected =
"selected"; }
else { $selected =
''; }
262 echo
"<option value=\"$i\" $selected>$i px</option>";
268 <label
for=
"watermarkColor"><?php echo
$lang[
'WATERMARK_TEXT_COLOR']; ?></label>
269 <input
type=
"text" id=
"watermarkColor" name=
"watermarkColor" class=
"form-control color" placeholder=
"pick a color or leave blank" value=
"<?php echo $gallery->watermarkColor; ?>">
270 <label
for=
"watermarkBorderColor"><?php echo
$lang[
'WATERMARK_TEXT_BORDERCOLOR']; ?></label>
271 <input
type=
"text" id=
"watermarkBorderColor" name=
"watermarkBorderColor" class=
"form-control color" placeholder=
"pick a color or leave blank" value=
"<?php echo $gallery->watermarkBorderColor; ?>">
272 <label
for=
"watermarkBorder"><?php echo
$lang[
'WATERMARK_BORDER_THICKNESS']; ?></label>
273 <select
id=
"watermarkBorder" name=
"watermarkBorder" class=
"form-control">
278 if (
$i ==
$gallery->watermarkBorder) { $selected =
"selected"; }
else { $selected =
''; }
279 echo
"<option value=\"$i\" $selected>$i px</option>";
286 <label
for=
"author"><?php echo
$lang[
'PHOTOGRAPHER']; ?></label>
287 <input
type=
"text" id=
"author" name=
"author" class=
"form-control" value=
"<?php echo $gallery->author; ?>" placeholder=
"<?php echo $lang['PHOTOGRAPHER_PLACEHOLDER']; ?>">
288 <label
for=
"author"><?php echo
$lang[
'PHOTOGRAPHER_URL']; ?></label>
289 <input
type=
"text" id=
"authorUrl" name=
"authorUrl" class=
"form-control" value=
"<?php echo $gallery->authorUrl; ?>" placeholder=
"http://">
static draw($type, $title, $text, $redirect, $delay)
static inject(array $lang, string $pathToFile)
allow plugins to inject language tags to $lang array
print $lang['GALLERY_EDIT']
<!-- backend language -->< h3 >< i class="fa fa-language"></i > & nbsp