Skip to content

Commit

Permalink
Renamed the module to SD Random Module.
Browse files Browse the repository at this point in the history
  • Loading branch information
MSnoeren committed Jul 21, 2020
1 parent 2eea8fd commit ceb28d7
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 43 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This module requires at least PHP 7.2 and Joomla! 3.8.

## Usage
[Download the module](https://github.com/snoeren-development/joomla-random-module/archive/master.zip) and install it directly on your Joomla! powered website. Simply create
a new Random Module module and select the position the module should pick a module from.
a new SD Random Module module and select the position the module should pick a module from.

## Credits
- [Michael Snoeren](https://github.com/MSnoeren)
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><title></title></html>
63 changes: 63 additions & 0 deletions install.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<?php
declare(strict_types = 1);

class mod_sdrandommoduleInstallerScript // phpcs:ignore
{
/**
* Runs after installation.
*
* @return void
*/
public function install(): void
{
echo <<<HTML
<style>
.btn-sd {
display: inline-block;
background-color: #8f5ba1;
color: #fff;
padding: .5rem 1rem;
margin-top: 1rem;
}
.btn-sd:hover {
color: #fff;
text-decoration: none;
}
.btn-outline-sd {
border: 1px solid #8f5ba1;
padding: .5rem 1rem;
margin-top: 1rem;
display: block;
}
</style>
<div class="row" style="margin-bottom: 30px;">
<div class="span1">&nbsp;</div>
<div class="span3 col-md-4">
<img
src="../media/mod_sdrandommodule/sd-random-module-logo.png"
alt="SD Random Module Logo"
style="width:100%" />
</div>
<div class="span6 col-md-7">
<h2>SD Random Module</h2>
SD Random Module shows a random module from a (custom) position of your
site. This way you can easily show a random image, random streamer,
random survey and more.<br>
<ul class="inline list-inline">
<li class="list-inline-item">
<a
href="https://docs.snoerendevelopment.com/sd-random-module"
class="btn-outline-sd"
target="_blank">
Getting started
</a>
</li>
</ul>
</div>
</div>
HTML;
}
}
5 changes: 0 additions & 5 deletions language/en-GB/en-GB.mod_randommodule.ini

This file was deleted.

2 changes: 0 additions & 2 deletions language/en-GB/en-GB.mod_randommodule.sys.ini

This file was deleted.

5 changes: 5 additions & 0 deletions language/en-GB/en-GB.mod_sdrandommodule.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
MOD_SDRANDOMMODULE="SD Random Module"
MOD_SDRANDOMMODULE_DESC="Show a random module."

MOD_SDRANDOMMODULE_OPTION_POSITION="Module Position"
MOD_SDRANDOMMODULE_OPTION_POSITION_DESC="Select the module position to retrieve the modules from. This can be a custom position too. The Random Module module will then pick a random one from the list of modules."
2 changes: 2 additions & 0 deletions language/en-GB/en-GB.mod_sdrandommodule.sys.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
MOD_SDRANDOMMODULE="SD Random Module"
MOD_SDRANDOMMODULE_DESC="Show a random module."
1 change: 1 addition & 0 deletions language/en-GB/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><title></title></html>
1 change: 1 addition & 0 deletions language/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><title></title></html>
1 change: 1 addition & 0 deletions media/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><title></title></html>
Binary file added media/sd-random-module-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions mod_randommodule.php → mod_sdrandommodule.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
declare(strict_types = 1);

/**
* @package Random Module
* @version 1.0.0
* @package SD Random Module
* @version 1.1.0
* @author Snoeren Development
* @copyright Snoeren Development (c) 2020
* @license MIT
Expand Down
29 changes: 19 additions & 10 deletions mod_randommodule.xml → mod_sdrandommodule.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,39 @@
version="3.7"
client="site"
method="upgrade">
<name>MOD_RANDOMMODULE</name>
<version>1.0.0</version>
<name>MOD_SDRANDOMMODULE</name>
<version>1.1.0</version>
<creationDate>30-04-2020</creationDate>

<author>Snoeren Development</author>
<authorUrl>https://snoerendevelopment.nl/</authorUrl>
<authorUrl>https://snoerendevelopment.com/</authorUrl>
<authorEmail>info@snoerendevelopment.nl</authorEmail>

<description>MOD_RANDOMMODULE_DESC</description>
<description>MOD_SDRANDOMMODULE_DESC</description>
<copyright>Snoeren Development (c) 2020. All rights reserved.</copyright>
<license>MIT</license>

<scriptfile>install.php</scriptfile>

<languages folder="language">
<language tag="en-GB">en-GB/en-GB.mod_randommodule.ini</language>
<language tag="en-GB">en-GB/en-GB.mod_randommodule.sys.ini</language>
<language tag="en-GB">en-GB/en-GB.mod_sdrandommodule.ini</language>
<language tag="en-GB">en-GB/en-GB.mod_sdrandommodule.sys.ini</language>
</languages>

<files>
<folder>tmpl</folder>

<filename module="mod_randommodule">mod_randommodule.php</filename>
<filename module="mod_sdrandommodule">mod_sdrandommodule.php</filename>
<filename>index.html</filename>
</files>

<media
folder="media"
destination="mod_sdrandommodule">
<file>sd-random-module-logo.png</file>
<file>index.html</file>
</media>

<config>
<fields name="params">
<fieldset
Expand All @@ -36,8 +45,8 @@
<field
name="position"
type="modulesposition"
label="MOD_RANDOMMODULE_OPTION_POSITION"
description="MOD_RANDOMMODULE_OPTION_POSITION_DESC"
label="MOD_SDRANDOMMODULE_OPTION_POSITION"
description="MOD_SDRANDOMMODULE_OPTION_POSITION_DESC"
required="true" />
</fieldset>

Expand Down Expand Up @@ -89,7 +98,7 @@
type="extension"
priority="2"
name="Random Module">
https://raw.githubusercontent.com/snoeren-development/joomla-random-module/master/updates.xml
https://snoerendevelopment.com/updates/sd-random-module.xml
</server>
</updateservers>
</extension>
7 changes: 4 additions & 3 deletions tmpl/default.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?php
declare(strict_types = 1);

/**
* @package Random Module
* @version 1.0.0
* @package SD Random Module
* @version 1.1.0
* @author Snoeren Development
* @copyright Snoeren Development (c) 2020
* @license MIT
Expand All @@ -11,7 +12,7 @@
defined('_JEXEC') or die;

echo sprintf(
'<div class="random-module%s">%s</div>',
'<div class="sd-random-module%s">%s</div>',
$moduleClassSuffix,
$renderer->render($module)
);
1 change: 1 addition & 0 deletions tmpl/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<!DOCTYPE html><html><title></title></html>
20 changes: 0 additions & 20 deletions updates.xml

This file was deleted.

0 comments on commit ceb28d7

Please sign in to comment.