Skip to content

Commit 53d461b

Browse files
committed
First commit
0 parents  commit 53d461b

12 files changed

+344
-0
lines changed

.buildpath

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<buildpath>
3+
<buildpathentry kind="src" path=""/>
4+
<buildpathentry kind="con" path="org.eclipse.php.core.LANGUAGE"/>
5+
</buildpath>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<launchConfiguration type="org.eclipse.ui.externaltools.ProgramBuilderLaunchConfigurationType">
3+
<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/>
4+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="/usr/local/php5/bin/phing"/>
5+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,"/>
6+
<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/>
7+
<stringAttribute key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="${workspace_loc:/j4xdemos-mod-custom-bscompos}"/>
8+
</launchConfiguration>

.project

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>j4xdemos-mod-custom-bscompos</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.wst.common.project.facet.core.builder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.wst.validation.validationbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.dltk.core.scriptbuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>org.eclipse.ui.externaltools.ExternalToolBuilder</name>
25+
<triggers>full,incremental,</triggers>
26+
<arguments>
27+
<dictionary>
28+
<key>LaunchConfigHandle</key>
29+
<value>&lt;project&gt;/.externalToolBuilders/Build mod-custom-bscompos with Phing.launch</value>
30+
</dictionary>
31+
</arguments>
32+
</buildCommand>
33+
</buildSpec>
34+
<natures>
35+
<nature>org.eclipse.php.core.PHPNature</nature>
36+
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
37+
</natures>
38+
</projectDescription>

.settings/org.eclipse.php.core.prefs

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
include_path=0;/j4xdemos-mod-custom-bscompos
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<faceted-project>
3+
<fixed facet="php.core.component"/>
4+
<fixed facet="php.component"/>
5+
<installed facet="php.core.component" version="1"/>
6+
<installed facet="php.component" version="7.4"/>
7+
</faceted-project>

build.xml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="mod_custom_bscompos" basedir="." default="main">
3+
<property file=".project" />
4+
5+
<property name="package" value="${phing.project.name}" override="true" />
6+
7+
<property name="joomladir" value="/Users/ceford/public_html/j4xdemos" override="true" />
8+
9+
<property name="sitelandir" value="${joomladir}/language" override="true" />
10+
11+
<property name="srcdir" value="${project.basedir}" override="true" />
12+
13+
<!-- Fileset for site files -->
14+
<fileset dir="./mod_custom_bscompos/language" id="sitelanfiles">
15+
<include name="**" />
16+
</fileset>
17+
<fileset dir="./mod_custom_bscompos" id="modfiles">
18+
<include name="**" />
19+
<exclude name="language/**" />
20+
</fileset>
21+
22+
<!-- fileset for zip -->
23+
<fileset dir="./mod_custom_bscompos" id="allfiles">
24+
<include name="**" />
25+
</fileset>
26+
27+
<!-- ============================================ -->
28+
<!-- (DEFAULT) Target: main -->
29+
<!-- ============================================ -->
30+
<target name="main" description="main target">
31+
32+
<copy todir="${joomladir}/modules/mod_custom_bscompos">
33+
<fileset refid="modfiles" />
34+
</copy>
35+
36+
<copy todir="${sitelandir}">
37+
<fileset refid="sitelanfiles" />
38+
</copy>
39+
40+
<zip destfile="${srcdir}/mod_custom_bscompos.zip">
41+
<fileset refid="allfiles" />
42+
</zip>
43+
</target>
44+
</project>

mod_custom_bscompos.zip

3.99 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
; Joomla! Project
2+
; (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
3+
; License GNU General Public License version 2 or later; see LICENSE.txt
4+
; Note : All ini files need to be saved as UTF-8
5+
6+
MOD_CUSTOM_BSCOMPOS="Custom BS Components"
7+
MOD_CUSTOM_BSCOMPOS_FIELD_BACKGROUNDIMAGE_LABEL="Select a Background Image"
8+
MOD_CUSTOM_BSCOMPOS_FIELD_PREPARE_CONTENT_DESC="Optionally prepare the content with the Joomla Content Plugins."
9+
MOD_CUSTOM_BSCOMPOS_FIELD_PREPARE_CONTENT_LABEL="Prepare Content"
10+
MOD_CUSTOM_BSCOMPOS_XML_DESCRIPTION="This module allows you to create your own Module using a WYSIWYG editor. It supports use of Bootstrap Components"
11+
MOD_CUSTOM_BSCOMPOS_DESC="Check to load Javascript support for any Component in this module."
12+
MOD_CUSTOM_BSCOMPOS_LABEL="BS Components"
13+
14+
MOD_CUSTOM_BSCOMPOS_OPTION_ALERT="Alert"
15+
MOD_CUSTOM_BSCOMPOS_OPTION_BUTTON="Button"
16+
MOD_CUSTOM_BSCOMPOS_OPTION_CAROUSEL="Carousel"
17+
MOD_CUSTOM_BSCOMPOS_OPTION_COLLAPSE="Collapse"
18+
MOD_CUSTOM_BSCOMPOS_OPTION_DROPDOWN="Dropdown"
19+
MOD_CUSTOM_BSCOMPOS_OPTION_MODAL="Modal"
20+
MOD_CUSTOM_BSCOMPOS_OPTION_OFFCANVAS="Offcanvas"
21+
MOD_CUSTOM_BSCOMPOS_OPTION_POPOVER="Popover"
22+
MOD_CUSTOM_BSCOMPOS_OPTION_SCROLLSPY="Scrollspy"
23+
MOD_CUSTOM_BSCOMPOS_OPTION_TAB="Tab"
24+
MOD_CUSTOM_BSCOMPOS_OPTION_TOOLTIP="Tooltip"
25+
MOD_CUSTOM_BSCOMPOS_OPTION_TOAST="Toast"
26+
27+
JHELP_EXTENSIONS_MODULE_MANAGER_CUSTOM_BSCOMPOS_HTML="Site_Modules:_Custom"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
; Joomla! Project
2+
; (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
3+
; License GNU General Public License version 2 or later; see LICENSE.txt
4+
; Note : All ini files need to be saved as UTF-8
5+
6+
MOD_CUSTOM_BSCOMPOS="Custom BS Components"
7+
MOD_CUSTOM_BSCOMPOS_LAYOUT_DEFAULT="Default"
8+
MOD_CUSTOM_BSCOMPOS_XML_DESCRIPTION="This module allows you to create your own Module using a WYSIWYG editor. It supports use of Bootstrap Components"
9+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/**
3+
* @package Joomla.Site
4+
* @subpackage mod_custom_bscompos
5+
*
6+
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
7+
* @license GNU General Public License version 2 or later; see LICENSE.txt
8+
*/
9+
10+
defined('_JEXEC') or die;
11+
12+
use Joomla\CMS\Helper\ModuleHelper;
13+
use Joomla\CMS\HTML\HTMLHelper;
14+
use Joomla\CMS\Plugin\PluginHelper;
15+
16+
if ($params->def('prepare_content', 1))
17+
{
18+
PluginHelper::importPlugin('content');
19+
$module->content = HTMLHelper::_('content.prepare', $module->content, '', 'mod_custom.content');
20+
}
21+
22+
require ModuleHelper::getLayoutPath('mod_custom_bscompos', $params->get('layout', 'default'));
+113
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<extension type="module" client="site" method="upgrade">
3+
<name>mod_custom_bscompos</name>
4+
<creationDate>March 2021</creationDate>
5+
<author>Clifford E Ford</author>
6+
<authorEmail>[email protected]</authorEmail>
7+
<authorUrl>http://www.fford.me.uk/</authorUrl>
8+
<copyright>Copyright (C) 2019 Clifford E Ford, All rights reserved.</copyright>
9+
<license>GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html</license>
10+
<version>0.1.0</version>
11+
<description>MOD_CUSTOM_BSCOMPOS_XML_DESCRIPTION</description>
12+
13+
<customContent />
14+
15+
<files>
16+
<filename module="mod_custom_bscompos">mod_custom_bscompos.php</filename>
17+
<folder>tmpl</folder>
18+
</files>
19+
<languages>
20+
<language tag="en-GB">language/en-GB/mod_custom_bscompos.ini</language>
21+
<language tag="en-GB">language/en-GB/mod_custom_bscompos.sys.ini</language>
22+
</languages>
23+
24+
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_CUSTOM_BSCOMPOS_HTML" />
25+
<config>
26+
<fields name="params">
27+
<fieldset name="options" label="COM_MODULES_BASIC_FIELDSET_LABEL">
28+
<field
29+
name="prepare_content"
30+
type="radio"
31+
layout="joomla.form.field.radio.switcher"
32+
label="MOD_CUSTOM_BSCOMPOS_FIELD_PREPARE_CONTENT_LABEL"
33+
description="MOD_CUSTOM_BSCOMPOS_FIELD_PREPARE_CONTENT_DESC"
34+
default="0"
35+
filter="integer"
36+
>
37+
<option value="0">JNO</option>
38+
<option value="1">JYES</option>
39+
</field>
40+
41+
<field
42+
name="backgroundimage"
43+
type="media"
44+
label="MOD_CUSTOM_BSCOMPOS_FIELD_BACKGROUNDIMAGE_LABEL"
45+
/>
46+
47+
<field
48+
name="bscompos"
49+
type="checkboxes"
50+
label="MOD_CUSTOM_BSCOMPOS_LABEL"
51+
description="MOD_CUSTOM_BSCOMPOS_DESC"
52+
>
53+
<option value="alert">MOD_CUSTOM_BSCOMPOS_OPTION_ALERT</option>
54+
<option value="button">MOD_CUSTOM_BSCOMPOS_OPTION_BUTTON</option>
55+
<option value="carousel">MOD_CUSTOM_BSCOMPOS_OPTION_CAROUSEL</option>
56+
<option value="collapse">MOD_CUSTOM_BSCOMPOS_OPTION_COLLAPSE</option>
57+
<option value="dropdown">MOD_CUSTOM_BSCOMPOS_OPTION_DROPDOWN</option>
58+
<option value="modal">MOD_CUSTOM_BSCOMPOS_OPTION_MODAL</option>
59+
<option value="offcanvas">MOD_CUSTOM_BSCOMPOS_OPTION_OFFCANVAS</option>
60+
<option value="popover">MOD_CUSTOM_BSCOMPOS_OPTION_POPOVER</option>
61+
<option value="scrollspy">MOD_CUSTOM_BSCOMPOS_OPTION_SCROLLSPY</option>
62+
<option value="tab">MOD_CUSTOM_BSCOMPOS_OPTION_TAB</option>
63+
<option value="tooltip">MOD_CUSTOM_BSCOMPOS_OPTION_TOOLTIP</option>
64+
<option value="toast">MOD_CUSTOM_BSCOMPOS_OPTION_TOAST</option>
65+
</field>
66+
</fieldset>
67+
<fieldset name="advanced">
68+
<field
69+
name="layout"
70+
type="modulelayout"
71+
label="JFIELD_ALT_LAYOUT_LABEL"
72+
class="form-select"
73+
/>
74+
75+
<field
76+
name="moduleclass_sfx"
77+
type="textarea"
78+
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
79+
rows="3"
80+
validate="CssIdentifier"
81+
/>
82+
83+
<field
84+
name="cache"
85+
type="list"
86+
label="COM_MODULES_FIELD_CACHING_LABEL"
87+
default="1"
88+
filter="integer"
89+
validate="options"
90+
>
91+
<option value="1">JGLOBAL_USE_GLOBAL</option>
92+
<option value="0">COM_MODULES_FIELD_VALUE_NOCACHING</option>
93+
</field>
94+
95+
<field
96+
name="cache_time"
97+
type="number"
98+
label="COM_MODULES_FIELD_CACHE_TIME_LABEL"
99+
default="900"
100+
filter="integer"
101+
/>
102+
103+
<field
104+
name="cachemode"
105+
type="hidden"
106+
default="static"
107+
>
108+
<option value="static"></option>
109+
</field>
110+
</fieldset>
111+
</fields>
112+
</config>
113+
</extension>

mod_custom_bscompos/tmpl/default.php

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<?php
2+
/**
3+
* @package Joomla.Site
4+
* @subpackage mod_custom_bscompos
5+
*
6+
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
7+
* @license GNU General Public License version 2 or later; see LICENSE.txt
8+
*/
9+
10+
defined('_JEXEC') or die;
11+
12+
$bscompos = $params->get('bscompos');
13+
14+
if (!empty($bscompos))
15+
{
16+
foreach ($bscompos as $bscompo)
17+
{
18+
switch ($bscompo)
19+
{
20+
case 'alert':
21+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.alert', '.alert');
22+
break;
23+
case 'button':
24+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.button', '.btn');
25+
break;
26+
case 'carousel':
27+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.carousel', '.selector', []);
28+
break;
29+
case 'collapse':
30+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.collapse', '.selector', []);
31+
break;
32+
case 'dropdown':
33+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.dropdown', '.selector', []);
34+
break;
35+
case 'modal':
36+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.modal', '.selector', []);
37+
break;
38+
case 'offcanvas':
39+
// Not Found
40+
//\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.offcanvas', '.btn', []);
41+
break;
42+
case 'popover':
43+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.popover', '.btn', []);
44+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.popover', 'a', []);
45+
break;
46+
case 'scrollspy':
47+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.scrollspy', '.selector', []);
48+
break;
49+
case 'tab':
50+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tab', '.selector', []);
51+
break;
52+
case 'tooltip':
53+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tooltip', '.btn', []);
54+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.tooltip', 'a', []);
55+
break;
56+
case 'toast':
57+
\Joomla\CMS\HTML\HTMLHelper::_('bootstrap.toast', '.selector', []);
58+
break;
59+
default:
60+
// do nothing
61+
}
62+
}
63+
}
64+
?>
65+
66+
67+
<div class="mod-custom custom" <?php if ($params->get('backgroundimage')) : ?> style="background-image:url(<?php echo $params->get('backgroundimage'); ?>)"<?php endif; ?>>
68+
<?php echo $module->content; ?>
69+
</div>

0 commit comments

Comments
 (0)