89 $this->
widget = new \YAWK\widget();
124 if (isset($this->galleryMaxWidth) && (empty($this->galleryMaxWidth)))
126 $maxWidthMarkup =
'';
131 'maxWidth': $this->galleryMaxWidth,";
134 <script type=\"text/javascript\">
136 'alwaysShowNavOnTouchDevices': $this->galleryNavOnTouchDevices,
137 'albumLabel': \"$this->galleryAlbumLabel\",
138 'disableScrolling': $this->galleryDisableScrolling,
139 'fadeDuration': $this->galleryFadeDuration,
140 'fitImagesInViewport': $this->galleryFitImagesInViewport,
141 'imageFadeDuration': $this->galleryImageFadeDuration,$maxWidthMarkup
142 'positionFromTop': $this->galleryPositionFromTop,
143 'resizeDuration': $this->galleryResizeDuration,
144 'showImageNumberLabel': $this->galleryShowImageNumberLabel,
145 'wrapAround': $this->galleryWrapAround
158 if (!isset($this->galleryID) || (empty($this->galleryID)))
160 echo
"Error: unable to load photo gallery because there is no gallery selected.";
162 if (
$res =
$db->query(
"SELECT folder from {plugin_gallery} WHERE id = '".$this->galleryID.
"'"))
164 while ($row = mysqli_fetch_assoc(
$res))
166 if (isset($this->galleryShuffle) && ($this->galleryShuffle ===
'true'))
168 $order =
"ORDER BY RAND()";
172 $order =
"ORDER BY sort ASC";
174 if (!$getPreviewImages =
$db->query(
"SELECT id, galleryID, sort, filename, title, author, authorUrl
175 from {plugin_gallery_items}
176 WHERE galleryID = '".$this->galleryID.
"' $order"))
178 $previewError =
"Sorry, could not get preview images";
180 if (isset($previewError))
191 $this->headline = $this->
getHeading($this->galleryHeading, $this->gallerySubtext);
194 echo
'<div class="container-fluid">
195 <div class="row text-center">';
198 if ($this->galleryLayoutRows ===
"1")
203 elseif ($this->galleryLayoutRows ===
"2")
208 elseif ($this->galleryLayoutRows ===
"3")
213 elseif ($this->galleryLayoutRows ===
"4")
218 elseif ($this->galleryLayoutRows ===
"6")
223 elseif ($this->galleryLayoutRows ===
"12")
234 if (isset($this->galleryTnWidth) && (!empty($this->galleryTnWidth)))
236 $this->galleryWidthMarkup =
"width=\"$this->galleryTnWidth\" ";
240 $this->galleryWidthMarkup =
'';
243 foreach ($getPreviewImages as $property => $image)
245 for (
$i = 0;
$i < mb_strlen($property);
$i++)
247 $this->itemID = $image[
'id'];
248 $this->sort = $image[
'sort'];
249 $this->filename = $image[
'filename'];
250 $this->itemTitle = $image[
'title'];
251 $this->itemAuthor = $image[
'author'];
252 $this->itemAuthorUrl = $image[
'authorUrl'];
256 <div class=\"$col text-center\" id=\"imgCol-".$this->itemID.
"\">
257 <a href=\"$row[folder]/$this->filename\" data-lightbox=\"$this->galleryID\" data-title=\"$this->itemTitle\"><img ".$this->galleryWidthMarkup.
"class=\"$this->galleryImageClass\" id=\"img-$this->itemID\" title=\"$this->itemTitle\" src=\"$row[folder]/$this->filename\"></a><br><br>
266 if($count % $divider == 0) echo
'
267 </div> <!-- end row -->
269 <div class="row text-center">';
if(isset($_POST['save'])) $settings