Skip to content

Commit

Permalink
Merge pull request #15 from bramwaas/develop
Browse files Browse the repository at this point in the history
2.1.5
  • Loading branch information
bramwaas authored Dec 9, 2023
2 parents 218243f + 147823a commit 2a5f013
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 51 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Plugin name: Simple iCal Block
Contributors: bramwaas
Tags: Event Calendar, Google Calendar, iCal, Events, Block, Calendar, iCalendar, Outlook, iCloud
Requires at least Joomla: 4.0
Tested up to: 4.2
Tested up to: 5.0.1
Requires PHP: 7
Stable tag: trunk
License: GPLv3 or later
Expand Down Expand Up @@ -172,6 +172,7 @@ This project is licensed under the [GNU GPL](https://www.gnu.org/licenses/gpl-3.
* works with Joomla 4 or higher.

== Changelog ==
* 2.1.5 tested with joomla 5 added compatibility to 5.0.99
* 2.1.4 After a feature request of achimmm (in github on Joomla module) added optional placeholder HTML output when no upcoming events are avalable. Also added optional output after the events list (when upcoming events are available).
* 2.1.3 In response to a support issue of (@marijnvr) (on WP plugin). New lay-out for block with first date line on a higer level li. 'Start with summary' toggle-setting changed in 'layout' select-setting with options 'Startdate higher level', 'Start with summary', 'Old style'.
* 2.1.1 Solved Warning: Array to string conversion in .../Transport/Curl.php on line 183 that occured after using php 8.
Expand Down
6 changes: 3 additions & 3 deletions language/en-GB/en-GB.mod_simple_ical_block.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;
; @version 2.1.3
; @version 2.1.4
; @package simple_ical_block
; @subpackage simple_ical_block module
; @copyright Copyright (C) 2022 - 2023 A.H.C Waasdorp, All rights reserved.
; @copyright Copyright (C) 2022 - 2024 A.H.C Waasdorp, All rights reserved.
; @license http://www.gnu.org/licenses GNU/GPL
; @author url: https://www.waasdorpsoekhan.nl
; @author email [email protected]
Expand Down Expand Up @@ -107,7 +107,7 @@ MOD_SIMPLEICALBLOCK_SUFFIX_LGI_CLASS_HELP="Suffix to add after the css-class aro
MOD_SIMPLEICALBLOCK_SUFFIX_LGIA_CLASS_HELP="Suffix to add after the css-class around the event details link (ical_details),<br>start with space to keep the original class and add another class."
MOD_SIMPLEICALBLOCK_ALLOWHTML_HELP="Check checkbox to allow the use of some safe html in description and summary,<br>otherwise it will only be displayed as text."
MOD_SIMPLEICALBLOCK_AFTER_EVENTS_HELP="Closing (safe) HTML after events list, when events are available.<br>This text with simple HTML will be displayed after the events list.<br>Use &amp;lt; or &amp;gt; if you want to output &lt; or &gt; otherwise they may be removed as unknown and therefore unsafe tags.<br>E.g. &lt;hr class=&quot;module-ft&quot; &gt;"
MOD_SIMPLEICALBLOCK_NO_EVENTS_HELP="Closing (safe) HTML output when no events are available.<br>This text with simple HTML will be displayed when instead of the events list.<br>Use &amp;lt; or &amp;gt; if you want to output &lt; or &gt; otherwise they may be removed as unknown and therefore unsafe tags.<br>E.g. &lt;p class=&quot;warning&quot; &gt;&amp;lt; No events found. &amp;gt;&lt;\p&gt;&lt;hr class=&quot;module-ft&quot;&gt;"
MOD_SIMPLEICALBLOCK_NO_EVENTS_HELP="Closing (safe) HTML output when no events are available.<br>This text with simple HTML will be displayed instead of the events list.<br>Use &amp;lt; or &amp;gt; if you want to output &lt; or &gt; otherwise they may be removed as unknown and therefore unsafe tags.<br>E.g. &lt;p class=&quot;warning&quot; &gt;&amp;lt; No events found. &amp;gt;&lt;\p&gt;&lt;hr class=&quot;module-ft&quot;&gt;"
MOD_SIMPLEICALBLOCK_CLEAR_CACHE_NOW_HELP="Check checkbox to clear calendar cache on save of settings, otherwise it will be cleared after cache time is expired."
MOD_SIMPLEICALBLOCK_ANCHORID_HELP="HTML anchor for this block.<br>Type one or two words - no spaces - to create a unique web address for this block, called an &ldquo;anchor&rdquo; Then you can link directly to this section on your page.<br>You can als use this ID to make parts of your extra css specific for this block"
MOD_SIMPLEICALBLOCK_LAYOUT_HELP="Standard only &ldquo;Default&rdquo; available, but you can add defaults in the template; see Joomla documentation"
Expand Down
4 changes: 2 additions & 2 deletions language/en-GB/en-GB.mod_simple_ical_block.sys.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;
; @version 2.0.0
; @version 2.1.4
; @package simple_ical_block
; @subpackage simple_ical_block module
; @copyright Copyright (C) 2022 - 2022 A.H.C Waasdorp, All rights reserved.
; @copyright Copyright (C) 2022 - 2024 A.H.C Waasdorp, All rights reserved.
; @license http://www.gnu.org/licenses GNU/GPL
; @author url: https://www.waasdorpsoekhan.nl
; @author email [email protected]
Expand Down
6 changes: 3 additions & 3 deletions language/nl-NL/nl-NL.mod_simple_ical_block.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;
; @version 2.1.3.
; @version 2.1.4.
; @package simple_ical_block
; @subpackage simple_ical_block module
; @copyright Copyright (C) 2022 - 2023 A.H.C Waasdorp, All rights reserved.
; @copyright Copyright (C) 2022 - 2024 A.H.C Waasdorp, All rights reserved.
; @license http://www.gnu.org/licenses GNU/GPL
; @author url: https://www.waasdorpsoekhan.nl
; @author email [email protected]
Expand Down Expand Up @@ -66,7 +66,7 @@ MOD_SIMPLEICALBLOCK_SFLGIA="Achtervoegsel class voor detail"
MOD_SIMPLEICALBLOCK_SFLGIA_DESC="Achtervoegsel class voor detail"
MOD_SIMPLEICALBLOCK_ALLOWHTML="Sta veilige html toe."
MOD_SIMPLEICALBLOCK_ALLOWHTML_DESC="Sta veilige html toe in beschrijving en samenvatting."
MOD_SIMPLEICALBLOCK_AFTER_EVENTS="Alsluitende HTML bij beschikbare gebeurtenissen."
MOD_SIMPLEICALBLOCK_AFTER_EVENTS="Afsluitende HTML bij beschikbare gebeurtenissen."
MOD_SIMPLEICALBLOCK_AFTER_EVENTS_DESC="Afsluitende (veilige) HTML-uitvoer na gebeurtenissenlijst, als er gebeurtenissen aanwezig zijn."
MOD_SIMPLEICALBLOCK_NO_EVENTS="Afsluitende HTML bij geen gebeurtenissen."
MOD_SIMPLEICALBLOCK_NO_EVENTS_DESC="Afsluitende (veilige) HTML-uitvoer wanneer er geen gebeurtenissen beschikbaar zijn."
Expand Down
4 changes: 2 additions & 2 deletions language/nl-NL/nl-NL.mod_simple_ical_block.sys.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
;
; @version 2.0.0 stable
; @version 2.1.4 stable
; @package simple_ical_block
; @subpackage simple_ical_block module
; @copyright Copyright (C) 2022 - 2022 A.H.C Waasdorp, All rights reserved.
; @copyright Copyright (C) 2022 - 2024 A.H.C Waasdorp, All rights reserved.
; @license http://www.gnu.org/licenses GNU/GPL
; @author url: https://www.waasdorpsoekhan.nl
; @author email [email protected]
Expand Down
6 changes: 3 additions & 3 deletions mod_simple_ical_block.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* @package simple_ical_block
* @subpackage mod_simple_ical_block Module
* @copyright Copyright (C) 2022 - 2022 AHC Waasdorp, All rights reserved.
* @copyright Copyright (C) 2022 - 2024 AHC Waasdorp, All rights reserved.
* @license GNU General Public License version 3 or later
* @author url: https://www.waasdorpsoekhan.nl
* @author email [email protected]
Expand All @@ -18,7 +18,7 @@

$joomlaverge4 = (version_compare(JVERSION, '4.0', '>='));
$app = Factory::getApplication();
$document = Factory::getDocument();
$document = $app->getDocument();
$params->set('blockid', $module->id);
$params->set('clear_cache_now', FALSE); // only clear transient on save in admin.
$direction = $document->direction;
Expand All @@ -30,7 +30,7 @@
else {
?>
<div id="simpleicalblock<?php echo $params->get('blockid'); ?>" class="simpleicalblock<?php echo $params->get('moduleclass_sfx') ?> " tabindex="0">
<h3>site simpleicalblock needs joomla v4</h3>
<h3>site simpleicalblock needs joomla v4 or v5</h3>
</div>
<?php
}
11 changes: 8 additions & 3 deletions mod_simple_ical_block.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="module" client="site" method="upgrade">
<compatibility>
<include>
<versions from="4.0.0" to="5.99.99" />
</include>
</compatibility>
<name>Simple iCal Block</name>
<creationDate>16-04-2023</creationDate>
<creationDate>09-12-2023</creationDate>
<author>A.H.C. Waasdorp</author>
<copyright>Copyright (C) 2022 - 2023 A.H.C. Waasdorp, All rights reserved.</copyright>
<copyright>Copyright (C) 2022 - 2024 A.H.C. Waasdorp, All rights reserved.</copyright>
<license>https://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://www.waasdorpsoekhan.nl</authorUrl>
<version>2.1.4</version>
<version>2.1.5</version>
<description><![CDATA[<div class="sib-info" style="color: #3f48cc;"><p><img class="sib-img" src="../modules/mod_simple_ical_block/assets/simpleicalicon128x128.svg" style="display: inline-block; width: 2em; height:auto; margin-right: 0.5em;"/>Simple iCal Calendar Events Block</p></div>
]]></description>
<namespace path="src">WaasdorpSoekhan\Module\Simpleicalblock</namespace>
Expand Down
4 changes: 0 additions & 4 deletions src/Helper/SimpleicalblockHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ static function render_attributes($block_attributes) {
$block_attributes = array_merge(
array(
'blockid' => 'AZ',
// 'title' => Text::_('MOD_SIMPLEICALBLOCK_TITLE_DFT'),
'calendar_id' => '',
'event_count' => 10,
'event_period' => 92,
Expand Down Expand Up @@ -113,8 +112,5 @@ static function render_attributes($block_attributes) {


return $block_attributes;

}


}
2 changes: 1 addition & 1 deletion src/Rule/CleartransientnowRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @package Joomla.Site
* @subpackage Templates.dna
*
* @copyright Copyright (C) 2022 - 2022 Bram Waasdorp. All rights reserved.
* @copyright Copyright (C) 2022 - 2023 Bram Waasdorp. All rights reserved.
* @license GNU General Public License version 3 or later
* used to Clear calendar cache before save when asked for.
* 31-7-2022 0.0.4 replace transient by cache type 'output'; split transientId in cahegroup and cacheID to distinguish the group in system clear cache
Expand Down
10 changes: 5 additions & 5 deletions tmpl/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* @version $Id: default.php
* @package simpleicalblock
* @subpackage simpleicalblock Module
* @copyright Copyright (C) 2022 -2023 simpleicalblock, All rights reserved.
* @copyright Copyright (C) 2022 -2024 simpleicalblock, All rights reserved.
* @license GNU General Public License version 3 or later
* @author url: https://www.waasdorpsoekhan.nl
* @author email [email protected]
Expand Down Expand Up @@ -49,13 +49,10 @@
'b','big','blockquote', 'br','button', 'caption','cite','code','col',
'details', 'div', 'em', 'fieldset', 'figcaption', 'figure', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6','hr',
'i', 'img', 'li', 'label', 'legend', 'ol', 'p','q', 'section', 'small', 'span','strike', 'strong', 'u','ul'] ;
$old_timezone = date_default_timezone_get();
$tzid_ui = Factory::getApplication()->get('offset');
$tz_ui = new \DateTimeZone(Factory::getApplication()->get('offset'));
$attributes = SimpleicalblockHelper::render_attributes( $params->toArray());
//$helper = new SimpleicalblockHelper;

echo '<div id="' . $attributes['anchorId'] . '" class="simple_ical_block" >';
echo '<div id="' . $attributes['anchorId'] .'" data-sib-id="' . $attributes['blockid'] . '" ' . '" class="simple_ical_block" >';

/**
* Front-end display of block or module.
Expand All @@ -64,6 +61,9 @@
* from static function display_block($attributes)
*/
{
$old_timezone = date_default_timezone_get();
$tzid_ui = Factory::getApplication()->get('offset');
$tz_ui = new \DateTimeZone($tzid_ui);
$layout = (isset($attributes['sib_layout'])) ? intval($attributes['sib_layout']) : 3;
$dflg = $attributes['dateformat_lg'];
$dflgend =$attributes['dateformat_lgend'];
Expand Down
28 changes: 4 additions & 24 deletions update/mod_simple_ical_block-update.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,18 @@
<description>Simple iCal Block Module Update</description>
<element>mod_simple_ical_block</element>
<type>module</type>
<version>2.0.0</version>
<version>2.1.4</version>
<infourl title="Simple iCal Block Module">https://github.com/bramwaas/joomla_mod_simple_ical_block/blob/main/README.md</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/bramwaas/joomla_mod_simple_ical_block/archive/refs/tags/v2.0.0.zip</downloadurl>
<downloadurl type="full" format="zip">https://github.com/bramwaas/joomla_mod_simple_ical_block/archive/refs/tags/v2.1.4.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>A.H.C. Waasdorp</maintainer>
<maintainerurl>https://www.waasdorpsoekhan.nl</maintainerurl>
<targetplatform name="joomla" version="4.[012]"/>
<php_minimum>5.3.0</php_minimum>
<client>site</client>
<folder/>
</update>
<update>
<name>Simple iCal Block</name>
<description>Simple iCal Block Module Update newest Dev</description>
<element>mod_simple_ical_block</element>
<type>module</type>
<version>2.0.0</version>
<infourl title="Simple iCal Block Module">https://github.com/bramwaas/joomla_mod_simple_ical_block/blob/main/README.md</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/bramwaas/joomla_mod_simple_ical_block/archive/refs/heads/develop.zip</downloadurl>
</downloads>
<tags>
<tag>dev</tag>
</tags>
<maintainer>A.H.C. Waasdorp</maintainer>
<maintainerurl>https://www.waasdorpsoekhan.nl</maintainerurl>
<targetplatform name="joomla" version="(4\.(0|1|2))"/>
<php_minimum>5.3.0</php_minimum>
<targetplatform name="joomla" version="4.[0123]"/>
<php_minimum>7.4.0</php_minimum>
<client>site</client>
<folder/>
</update>
Expand Down

0 comments on commit 2a5f013

Please sign in to comment.