update
This commit is contained in:
parent
7eede35961
commit
b898ffccae
@ -8,7 +8,7 @@ Display the daily scripture from [https://github.com/trueChristian/daily-scriptu
|
|||||||
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
+ *Author*: [Llewellyn van der Merwe](mailto:joomla@vdm.io)
|
||||||
+ *Name*: [Dailyscripture](https://www.vdm.io/)
|
+ *Name*: [Dailyscripture](https://www.vdm.io/)
|
||||||
+ *First Build*: 22nd October, 2015
|
+ *First Build*: 22nd October, 2015
|
||||||
+ *Last Build*: 6th January, 2022
|
+ *Last Build*: 7th January, 2022
|
||||||
+ *Version*: 1.0.1
|
+ *Version*: 1.0.1
|
||||||
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
|
||||||
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
|
44
helper.php
44
helper.php
@ -42,7 +42,7 @@ class ModDailyScriptureHelper
|
|||||||
/**
|
/**
|
||||||
* Scripture
|
* Scripture
|
||||||
*
|
*
|
||||||
* @var mix
|
* @var mixed
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
protected $scripture = null;
|
protected $scripture = null;
|
||||||
@ -74,30 +74,34 @@ class ModDailyScriptureHelper
|
|||||||
/**
|
/**
|
||||||
* Constructor.
|
* Constructor.
|
||||||
*
|
*
|
||||||
* @param Registry $params the module settings
|
* @param Registry|null $params the module settings
|
||||||
*
|
*
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
public function __construct(Registry $params = null)
|
public function __construct(Registry $params = null)
|
||||||
{
|
{
|
||||||
// set the global params
|
// we must have the params or we cant continue
|
||||||
$this->params = $params;
|
if ($params)
|
||||||
// get the version
|
|
||||||
$this->type = $params->get('type', 1);
|
|
||||||
// implementation type = 1 = gitHub
|
|
||||||
if ($this->type == 1)
|
|
||||||
{
|
{
|
||||||
|
// set the global params
|
||||||
|
$this->params = $params;
|
||||||
// get the version
|
// get the version
|
||||||
$version = $params->get('version', 'kjv');
|
$this->type = $params->get('type', 1);
|
||||||
// the link to the scripture for the day
|
// implementation type = 1 = gitHub
|
||||||
$path = "https://raw.githubusercontent.com/trueChristian/daily-scripture/master/scripture/$version/README.json";
|
if ($this->type == 1)
|
||||||
// get the scripture object
|
{
|
||||||
$this->scripture = $this->getFileContents($path);
|
// get the version
|
||||||
}
|
$version = $params->get('version', 'kjv');
|
||||||
// implementation type = 2 = Telegram
|
// the link to the scripture for the day
|
||||||
elseif ($this->type == 2)
|
$path = "https://raw.githubusercontent.com/trueChristian/daily-scripture/master/scripture/$version/README.json";
|
||||||
{
|
// get the scripture object
|
||||||
$this->setTelegram();
|
$this->scripture = $this->getFileContents($path);
|
||||||
|
}
|
||||||
|
// implementation type = 2 = Telegram
|
||||||
|
elseif ($this->type == 2)
|
||||||
|
{
|
||||||
|
$this->setTelegram();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -126,7 +130,7 @@ class ModDailyScriptureHelper
|
|||||||
/**
|
/**
|
||||||
* get the Telegram script
|
* get the Telegram script
|
||||||
*
|
*
|
||||||
* @return string data-color values
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
*/
|
*/
|
||||||
@ -161,6 +165,8 @@ class ModDailyScriptureHelper
|
|||||||
/**
|
/**
|
||||||
* get today's time stamp based on user
|
* get today's time stamp based on user
|
||||||
*
|
*
|
||||||
|
* @param string $getDate the string to get the time stamp for
|
||||||
|
*
|
||||||
* @return int the timestamp
|
* @return int the timestamp
|
||||||
*
|
*
|
||||||
* @since 1.0
|
* @since 1.0
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<extension type="module" version="4" client="site" method="upgrade">
|
<extension type="module" version="4" client="site" method="upgrade">
|
||||||
<name>MOD_DAILYSCRIPTURE</name>
|
<name>MOD_DAILYSCRIPTURE</name>
|
||||||
<creationDate>6th January, 2022</creationDate>
|
<creationDate>7th January, 2022</creationDate>
|
||||||
<author>Llewellyn van der Merwe</author>
|
<author>Llewellyn van der Merwe</author>
|
||||||
<authorEmail>joomla@vdm.io</authorEmail>
|
<authorEmail>joomla@vdm.io</authorEmail>
|
||||||
<authorUrl>https://www.vdm.io/</authorUrl>
|
<authorUrl>https://www.vdm.io/</authorUrl>
|
||||||
|
Loading…
Reference in New Issue
Block a user