Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.0.5 #21

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<author>JoomShaper</author>
<authorEmail>support@joomshaper.com</authorEmail>
<authorUrl>http://www.joomshaper.com</authorUrl>
<copyright>@JoomShaper 2010 - 2021. All rights reserved.</copyright>
<copyright>@JoomShaper 2010 - 2023. All rights reserved.</copyright>
sanjana4khan marked this conversation as resolved.
Show resolved Hide resolved
<license>GNU General Public License version 2 or later</license>
<version>2.0.2</version>
<version>2.0.4</version>
<description>A simple image gallery component for Joomla.</description>
<scriptfile>installer.script.php</scriptfile>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-- v2.0.4
6 changes: 3 additions & 3 deletions administrator/language/en-GB/en-GB.com_speasyimagegallery.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ COM_SPEASYIMAGEGALLERY_GLOBAL_THUMB_HEIGHT="Thumbnail Height"
COM_SPEASYIMAGEGALLERY_GLOBAL_THUMB_HEIGHT_DESC="Set gallery images thumbnail height."

;Submenu
COM_SPEASYIMAGEGALLERY_SUBMENU_ALBUMS="<span class="icon-pictures"></span> Albums"
COM_SPEASYIMAGEGALLERY_SUBMENU_CATEGORIES="<span class="icon-folder"></span> Categories"
COM_SPEASYIMAGEGALLERY_SUBMENU_OPTIONS="<span class="icon-options"></span> Options"
COM_SPEASYIMAGEGALLERY_SUBMENU_ALBUMS="<span class='icon-pictures'></span> Albums"
COM_SPEASYIMAGEGALLERY_SUBMENU_CATEGORIES="<span class='icon-folder'></span> Categories"
COM_SPEASYIMAGEGALLERY_SUBMENU_OPTIONS="<span class='icon-options'></span> Options"

;Toolbar
COM_SPEASYIMAGEGALLERY_DELETE = "Delete"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ COM_SPEASYIMAGEGALLERY_GLOBAL_LIMIT="Limit"
COM_SPEASYIMAGEGALLERY_GLOBAL_LIMIT_DESC="Set the limit of albums that you want to show per page."

;Submenu
COM_SPEASYIMAGEGALLERY_SUBMENU_ALBUMS="<span class="icon-pictures"></span> Albums"
COM_SPEASYIMAGEGALLERY_SUBMENU_CATEGORIES="<span class="icon-folder"></span> Categories"
COM_SPEASYIMAGEGALLERY_SUBMENU_OPTIONS="<span class="icon-options"></span> Options"
COM_SPEASYIMAGEGALLERY_SUBMENU_ALBUMS="<span class='icon-pictures'></span> Albums"
COM_SPEASYIMAGEGALLERY_SUBMENU_CATEGORIES="<span class='icon-folder'></span> Categories"
COM_SPEASYIMAGEGALLERY_SUBMENU_OPTIONS="<span class='icon-options'></span> Options"

;Installation
COM_SPEASYIMAGEGALLERY_DESCRIPTION="A simple image gallery component for Joomla."
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const config = {
buildPath: './dist/component/',
rootPath: './dist/',
componentName: 'speasyimagegallery',
com_package_name: 'com_speasyimagegallery_fullpackage_v2.0.2.zip',
com_package_name: 'com_speasyimagegallery_fullpackage_v2.0.4.zip',
moduleExts: ['xml','php','js','css','jpg','png','gif','ttf','otf','woff','woff2','svg','eot']
}

Expand Down
4 changes: 3 additions & 1 deletion language/en-GB/en-GB.mod_speasyimagegallery.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ MOD_SPEASYIMAGEGALLERY_GLOBAL_LAYOUT_MOSAIC="Mosaic"
MOD_SPEASYIMAGEGALLERY_GLOBAL_LAYOUT_RECTANGLE="Rectangle"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_TITLE="Show Title"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_TITLE_DESC="Select yes if you want to show image title on popup."
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_DESC="Show Description"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_DESC="Show Image Description"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_DESC_DESC="Select yes if you want to show image description on popup."
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_COUNT="Show Image Count"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_COUNT_DESC="Select yes if you want to show images count on popup."
Expand All @@ -43,6 +43,8 @@ MOD_SPEASYIMAGEGALLERY_GLOBAL_LIMIT="Limit"
MOD_SPEASYIMAGEGALLERY_GLOBAL_LIMIT_DESC="Set limit to display maximum images in a single album or maximum albums in a album list."
MOD_SPEASYIMAGEGALLERY_NO_ALBUMS="No Albums"
MOD_SPEASYIMAGEGALLERY_NO_IMAGES="No Images"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_ALBUM_DESC="Show Album Description"
MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_ALBUM_DESC_DESC="Select yes if you want to show album description"

MOD_SPEASYIMAGEGALLERY_PHOTOS="Photos"
MOD_SPEASYIMAGEGALLERY_PHOTO="Photo"
29 changes: 28 additions & 1 deletion modules/mod_speasyimagegallery/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
defined('_JEXEC') or die('Restricted access');

use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
class ModSpeasyimagegalleryHelper
{
public static function getAlbumList($params) {
Expand Down Expand Up @@ -101,4 +101,31 @@ private static function getItemID() {
return;
}


/**
* Retrieves the album description based on module parameters.
*
* @param object $params -- The module parameters.
* @return string|null -- The album description, or null if not found or not configured to display.
* @since 2.0.5
*/
public static function getAlbumDescription($params)
{
if (!$params->get('show_album_desc',0)) {
sanjana4khan marked this conversation as resolved.
Show resolved Hide resolved
return null;
}

$album_id = $params->get('album_id', 0);

$db = Factory::getDbo();
$query = $db->getQuery(true);

$query->select($db->quoteName('description'));
$query->from($db->quoteName('#__speasyimagegallery_albums'));
$query->where($db->quoteName('id') . ' = ' . $db->quote($album_id));
$query->where($db->quoteName('published') . ' = ' . $db->quote('1'));
$db->setQuery($query);
return $db->loadResult();
}

}
3 changes: 2 additions & 1 deletion modules/mod_speasyimagegallery/mod_speasyimagegallery.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
if($layout == 'albums') {
$albums = ModSpeasyimagegalleryHelper::getAlbumList($params);
} else {
$images = ModSpeasyimagegalleryHelper::getImages($params);
$images = ModSpeasyimagegalleryHelper::getImages($params);
$albumDescription = (!is_null($images) && !empty($images)) ? ModSpeasyimagegalleryHelper::getAlbumDescription($params): null;
sanjana4khan marked this conversation as resolved.
Show resolved Hide resolved
}

require ModuleHelper::getLayoutPath('mod_speasyimagegallery', $layout);
7 changes: 5 additions & 2 deletions modules/mod_speasyimagegallery/mod_speasyimagegallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<authorUrl>http://www.joomshaper.com</authorUrl>
<copyright>@JoomShaper 2010 - 2021. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later</license>
<version>2.0.2</version>
<version>2.0.4</version>
<description>Module to display albums or album images from SP Easy Image Gallery component.</description>

<files>
Expand Down Expand Up @@ -57,7 +57,10 @@
<field name="albums_gutter" type="number" label="MOD_SPEASYIMAGEGALLERY_GLOBAL_GUTTER" description="MOD_SPEASYIMAGEGALLERY_GLOBAL_GUTTER_DESC" default="20" showon="layout:albums" />
<field name="albums_gutter_sm" type="number" label="MOD_SPEASYIMAGEGALLERY_GLOBAL_GUTTER_SM" description="MOD_SPEASYIMAGEGALLERY_GLOBAL_GUTTER_SM_DESC" default="15" showon="layout:albums" />
<field name="albums_gutter_xs" type="number" label="MOD_SPEASYIMAGEGALLERY_GLOBAL_GUTTER_XS" description="MOD_SPEASYIMAGEGALLERY_GLOBAL_GUTTER_XS_DESC" default="10" showon="layout:albums" />

<field name="show_album_desc" type="radio" class="btn-group" label="MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_ALBUM_DESC" description="MOD_SPEASYIMAGEGALLERY_POPUP_SHOW_ALBUM_DESC_DESC" default="0" showon="layout:album">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field name="spacer3" type="spacer" hr="true" showon="layout:album" />
<field name="spacer4" type="spacer" label="MOD_SPEASYIMAGEGALLERY_GLOBAL_ALBUM_OPTIONS" showon="layout:album" />
Expand Down
25 changes: 12 additions & 13 deletions modules/mod_speasyimagegallery/tmpl/album.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
$show_title = $params->get('show_title', 1);
$show_desc = $params->get('show_desc', 1);
$show_count = $params->get('show_count', 1);
$show_album_desc = $params->get('show_album_desc', 1);
$gutter = $params->get('album_gutter', 20)/2;
$gutter_sm = $params->get('album_gutter_sm', 15)/2;
$gutter_xs = $params->get('album_gutter_xs', 10)/2;
Expand Down Expand Up @@ -65,18 +66,16 @@
?>

<div class="mod-speasyimagegallery" id="mod-speasyimagegallery-<?php echo $module->id; ?>">
<?php
if(count($images)) {
?>
<div class="speasyimagegallery-gallery clearfix" <?php echo $gallery_attribs; ?>>
<?php
$layout = new FileLayout('gallery.'. $layout .'.row', JPATH_ROOT .'/modules/mod_speasyimagegallery/layouts');
echo $layout->render(array('images'=>$images, 'params'=>$params));
?>
</div>
<?php
} else {
<?php if(count($images)) { ?>
<?php if ($albumDescription): ?>
<div class="speasyimagegallery-album-description"><?php echo $albumDescription; ?></div>
<?php endif;?>
<div class="speasyimagegallery-gallery clearfix" <?php echo $gallery_attribs; ?>>
<?php $layout = new FileLayout('gallery.'. $layout .'.row', JPATH_ROOT .'/modules/mod_speasyimagegallery/layouts');
echo $layout->render(array('images'=>$images, 'params'=>$params)); ?>
</div>
<?php }
else {
echo '<div class="alert">' . Text::_('MOD_SPEASYIMAGEGALLERY_NO_IMAGES') . '</div>';
}
?>
} ?>
</div>
Loading