Skip to content

Commit

Permalink
Merge pull request #13 from sanjana4khan/php_8_compatible
Browse files Browse the repository at this point in the history
Php 8 compatible
  • Loading branch information
siddik-web authored Jun 20, 2022
2 parents 7ed97b1 + dd0d9fb commit b6e914a
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public static function getVersion($type = 'major')
* @param string $ext file extention
* @return boolean/string
*/
public static function createThumbs($src, $sizes = array(), $folder, $base_name, $ext)
public static function createThumbs($src, $sizes , $folder, $base_name, $ext)
{

list($originalWidth, $originalHeight) = getimagesize($src);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,12 @@ protected function getListQuery()
}
}

// Filter by access level
$access_level = $this->getState('filter.access');
if (!empty($access_level)) {
$query->where('a.access = ' . (int) $access_level);
}

// Add the list ordering clause.
$orderCol = $app->getUserStateFromRequest($this->context.'filter_order', 'filter_order', 'id', 'cmd');
$orderDirn = $app->getUserStateFromRequest($this->context.'filter_order_Dir', 'filter_order_Dir', 'desc', 'cmd');
Expand All @@ -183,5 +189,4 @@ protected function getListQuery()

return $query;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<?php if(SpeasyimagegalleryHelper::getVersion() < 4) :?>
<tr>
<?php else: ?>
<tr class="row<?php echo $i % 2; ?>" data-draggable-group="<?php echo $item->catid; ?>">
<tr class="row<?php echo $i % 2; ?>" data-draggable-group="1">
<?php endif; ?>
<td class="order nowrap center hidden-phone">
<?php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@

$source = json_decode($image->images);
?>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>" data-desc="<?php echo htmlspecialchars($image->description); ?>">
<div>
<img src="<?php echo $source->thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
<?php if($params->get('album_show_desc', false) && $image->description) { ?>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>"
data-desc="<?php echo ($image->description) ? htmlspecialchars($image->description) : ''; ?>">
<div>
<img src="<?php echo $source->thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
<?php if($params->get('album_show_desc', false) && $image->description) { ?>
<span class="speasyimagegallery-gallery-item-title"><small><?php echo $image->description; ?></small></span>
<?php } ?>
<?php } ?>
</div>
</div>
</div>
</a>
</a>
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
$source = json_decode($image->images);
$thumb = $sizes[$index];
?>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>" data-desc="<?php echo strip_tags($image->description); ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>"
data-desc="<?php echo ($image->description) ? strip_tags($image->description) : ''; ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</div>
</a>
</a>
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<?php
/**
* @package com_speasyimagegallery
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2021 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/
* @package com_speasyimagegallery
* @author JoomShaper http://www.joomshaper.com
* @copyright Copyright (c) 2010 - 2022 JoomShaper
* @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPLv2 or later
*/


// No direct access
defined('_JEXEC') or die('Restricted access');

extract($displayData);

if($column == 1) {
if ($column == 1) {
$sizes = array(
array('x_thumb', 'speasyimagegallery-col-xs-12 speasyimagegallery-col-sm-8'),
array('thumb', 'speasyimagegallery-col-xs-6 speasyimagegallery-col-sm-4'),
array('thumb', 'speasyimagegallery-col-xs-6 speasyimagegallery-col-sm-4'),
);
} else if($column == 2) {
} else if ($column == 2) {
$sizes = array(
array('x_thumb', 'speasyimagegallery-col-xs-12 speasyimagegallery-col-sm-8 speasyimagegallery-col-sm-push-4'),
array('thumb', 'speasyimagegallery-col-xs-6 speasyimagegallery-col-sm-4 speasyimagegallery-col-sm-pull-8'),
Expand All @@ -37,12 +37,13 @@
$col = $sizes[$index][1];
?>
<div class="<?php echo $col; ?>">
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>" data-desc="<?php echo strip_tags($image->description); ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</a>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>"
data-desc="<?php echo ($image->description) ? strip_tags($image->description) : ''; ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</a>
</div>
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,4 @@ function componentPackage(callback) {
exports.default = series(
clean,modules, plugins, manifest, admin, site, adminLanguage, siteLanguage,
componentPackage
)
)
15 changes: 8 additions & 7 deletions modules/mod_speasyimagegallery/layouts/gallery/default/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@

$source = json_decode($image->images);
?>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>" data-desc="<?php echo strip_tags($image->description); ?>">
<div>
<img src="<?php echo $source->thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>"
data-desc="<?php echo ($image->description) ? strip_tags($image->description) : ''; ?>">
<div>
<img src="<?php echo $source->thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</div>
</a>
</a>
15 changes: 8 additions & 7 deletions modules/mod_speasyimagegallery/layouts/gallery/mosaic/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,12 @@
$source = json_decode($image->images);
$thumb = $sizes[$index];
?>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>" data-desc="<?php echo strip_tags($image->description); ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>"
data-desc="<?php echo ($image->description) ? strip_tags($image->description) : ''; ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</div>
</a>
</a>
19 changes: 10 additions & 9 deletions modules/mod_speasyimagegallery/layouts/gallery/rectangle/image.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@
$col = $sizes[$index][1];
?>
<div class="<?php echo $col; ?>">
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>" data-desc="<?php echo strip_tags($image->description); ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</a>
</div>
<a class="speasyimagegallery-gallery-item" href="<?php echo $source->original; ?>" data-title="<?php echo $image->title; ?>"
data-desc="<?php echo ($image->description) ? strip_tags($image->description) : ''; ?>">
<div>
<img src="<?php echo $source->$thumb; ?>" title="<?php echo $image->title; ?>" alt="<?php echo $image->alt; ?>">
<div class="speasyimagegallery-gallery-item-content">
<span class="speasyimagegallery-gallery-item-title"><?php echo $image->title; ?></span>
</div>
</div>
</a>
</div>

0 comments on commit b6e914a

Please sign in to comment.