commit
805de67bba
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<access component="com_hello_world">
|
||||
<section name="component">
|
||||
<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" />
|
||||
<action name="core.options" title="JACTION_OPTIONS" description="JACTION_OPTIONS_COMPONENT_DESC" />
|
||||
<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" />
|
||||
<action name="core.export" title="COM_HELLO_WORLD_EXPORT_DATA" description="COM_HELLO_WORLD_EXPORT_DATA_DESC" />
|
||||
<action name="core.import" title="COM_HELLO_WORLD_IMPORT_DATA" description="COM_HELLO_WORLD_IMPORT_DATA_DESC" />
|
||||
<action name="core.batch" title="COM_HELLO_WORLD_USE_BATCH" description="COM_HELLO_WORLD_USE_BATCH_DESC" />
|
||||
<action name="core.version" title="COM_HELLO_WORLD_EDIT_VERSIONS" description="COM_HELLO_WORLD_EDIT_VERSIONS_DESC" />
|
||||
<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" />
|
||||
<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" />
|
||||
<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" />
|
||||
<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_ACCESS_EDITSTATE_DESC" />
|
||||
<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" />
|
||||
<action name="core.edit.created_by" title="COM_HELLO_WORLD_EDIT_CREATED_BY" description="COM_HELLO_WORLD_EDIT_CREATED_BY_DESC" />
|
||||
<action name="core.edit.created" title="COM_HELLO_WORLD_EDIT_CREATED_DATE" description="COM_HELLO_WORLD_EDIT_CREATED_DATE_DESC" />
|
||||
<action name="site.greet.access" title="COM_HELLO_WORLD_GREETING_ACCESS_SITE" description="COM_HELLO_WORLD_GREETING_ACCESS_SITE_DESC" />
|
||||
<action name="greeting.access" title="COM_HELLO_WORLD_GREETINGS_ACCESS" description="COM_HELLO_WORLD_GREETINGS_ACCESS_DESC" />
|
||||
<action name="site.greetings.access" title="COM_HELLO_WORLD_GREETINGS_ACCESS_SITE" description="COM_HELLO_WORLD_GREETINGS_ACCESS_SITE_DESC" />
|
||||
<action name="greeting.batch" title="COM_HELLO_WORLD_GREETINGS_BATCH_USE" description="COM_HELLO_WORLD_GREETINGS_BATCH_USE_DESC" />
|
||||
<action name="greeting.dashboard_add" title="COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD" description="COM_HELLO_WORLD_GREETINGS_DASHBOARD_ADD_DESC" />
|
||||
<action name="greeting.dashboard_list" title="COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST" description="COM_HELLO_WORLD_GREETINGS_DASHBOARD_LIST_DESC" />
|
||||
<action name="greeting.edit.greeting" title="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING" description="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING_DESC" />
|
||||
<action name="greeting.version" title="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION" description="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC" />
|
||||
<action name="greeting.export" title="COM_HELLO_WORLD_GREETINGS_EXPORT" description="COM_HELLO_WORLD_GREETINGS_EXPORT_DESC" />
|
||||
<action name="greeting.import" title="COM_HELLO_WORLD_GREETINGS_IMPORT" description="COM_HELLO_WORLD_GREETINGS_IMPORT_DESC" />
|
||||
<action name="greeting.submenu" title="COM_HELLO_WORLD_GREETINGS_SUBMENU" description="COM_HELLO_WORLD_GREETINGS_SUBMENU_DESC" />
|
||||
</section>
|
||||
<section name="greeting">
|
||||
<action name="greeting.edit.greeting" title="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING" description="COM_HELLO_WORLD_GREETINGS_EDIT_GREETING_DESC" />
|
||||
<action name="greeting.version" title="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION" description="COM_HELLO_WORLD_GREETINGS_EDIT_VERSION_DESC" />
|
||||
</section>
|
||||
</access>
|
@ -0,0 +1,24 @@
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage admin.css
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
.no-click {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
@ -0,0 +1,172 @@
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage dashboard.css
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
.dashboard-container {
|
||||
margin-left: 10px;
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-container [class*="span"] {
|
||||
display: block;
|
||||
float: none;
|
||||
margin-left: 0;
|
||||
width: auto;
|
||||
}
|
||||
.dashboard-container:before, .dashboard-container:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
.dashboard-container:after {
|
||||
clear: both;
|
||||
}
|
||||
.dashboard-container [class*="span"] {
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
float: left;
|
||||
min-height: 145px;
|
||||
min-width: 96px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-container [class*="span"]:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
.dashboard-wraper {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 5px;
|
||||
float: left;
|
||||
margin: 1%;
|
||||
padding: 3px;
|
||||
width: 17%;
|
||||
min-height: 194px;
|
||||
min-width: 96px;
|
||||
}
|
||||
.dashboard-content a {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
min-height: 89px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashboard-content a:hover {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 90%) 0%, hsl(0, 0%, 100%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
color: hsl(200, 100%, 30%);
|
||||
text-decoration: none;
|
||||
}
|
||||
.dashboard-title {
|
||||
display: block;
|
||||
padding-top: 5px;
|
||||
}
|
||||
.dashboard-info {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 100%) 0%, hsl(0, 0%, 96%) 47%, hsl(0, 0%, 93%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 85%);
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 0 3px hsla(0, 0%, 0%, 0.1) inset;
|
||||
color: hsl(0, 0%, 20%);
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.dashboard-info span {
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.dashboard-info img {
|
||||
margin: 0 auto;
|
||||
}
|
||||
.dashboard-table {
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
margin-top: 5px;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-info h5 {
|
||||
font-size: 11px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.dashboard-block {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.dashboard-block .dashboard-block-head {
|
||||
background: linear-gradient(to bottom, hsl(0, 0%, 95%) 0%, hsl(0, 0%, 86%) 100%) repeat scroll 0 0 hsla(0, 0%, 0%, 0);
|
||||
border-bottom: 1px solid hsl(0, 0%, 76%);
|
||||
border-radius: 3px 3px 0 0;
|
||||
box-shadow: 0 1px 0 hsl(0, 0%, 98%) inset, 0 0 3px hsl(0, 0%, 87%);
|
||||
height: 40px;
|
||||
position: relative;
|
||||
}
|
||||
.dashboard-block .dashboard-block-head h5 {
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
padding-left: 10px;
|
||||
padding-top: 11px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 93%);
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
.dashboard-block .dashboard-block-box {
|
||||
background: none repeat scroll 0 0 hsl(0, 0%, 100%);
|
||||
border-top: 1px solid hsl(0, 0%, 82%);
|
||||
box-shadow: 0 0 5px hsl(0, 0%, 87%) inset;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content .dashboard-block-box {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
.dashboard-block .dashboard-block-content .dashboard-block-box .dashboard-block-table {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.dashboard-block-table {
|
||||
background-color: hsla(0, 0%, 0%, 0);
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
margin-bottom: 20px;
|
||||
max-width: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.dashboard-block-table th, .dashboard-block-table td {
|
||||
border-top: 1px solid hsl(0, 0%, 87%);
|
||||
line-height: 20px;
|
||||
padding: 5px;
|
||||
text-align: left;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.dashboard-badge {
|
||||
background-color: hsl(0, 0%, 60%);
|
||||
border-radius: 9px;
|
||||
color: hsl(0, 0%, 100%);
|
||||
font-size: 11.844px;
|
||||
font-weight: bold;
|
||||
line-height: 14px;
|
||||
padding: 1px 9px 2px;
|
||||
text-shadow: 0 -1px 0 hsla(0, 0%, 0%, 0.25);
|
||||
vertical-align: baseline;
|
||||
white-space: nowrap;
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.css
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.css
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* CSS Document */
|
||||
|
||||
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 23 KiB |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
After Width: | Height: | Size: 64 KiB |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
After Width: | Height: | Size: 17 KiB |
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,20 @@
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage admin.js
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
/* JS Document */
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<config>
|
||||
<fieldset
|
||||
addrulepath="/administrator/components/com_hello_world/models/rules"
|
||||
addfieldpath="/administrator/components/com_hello_world/models/fields"
|
||||
name="global_config"
|
||||
label="COM_HELLO_WORLD_CONFIG_GLOBAL_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_GLOBAL_DESC">
|
||||
<field
|
||||
name="check_in"
|
||||
type="list"
|
||||
default="0"
|
||||
label="COM_HELLO_WORLD_CONFIG_CHECK_TIMER_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_CHECK_TIMER_DESC">
|
||||
<option
|
||||
value="-5 hours">COM_HELLO_WORLD_CONFIG_CHECK_TIMER_OPTION_ONE</option>
|
||||
<option
|
||||
value="-12 hours">COM_HELLO_WORLD_CONFIG_CHECK_TIMER_OPTION_TWO</option>
|
||||
<option
|
||||
value="-1 day">COM_HELLO_WORLD_CONFIG_CHECK_TIMER_OPTION_THREE</option>
|
||||
<option
|
||||
value="-2 day">COM_HELLO_WORLD_CONFIG_CHECK_TIMER_OPTION_FOUR</option>
|
||||
<option
|
||||
value="-1 week">COM_HELLO_WORLD_CONFIG_CHECK_TIMER_OPTION_FIVE</option>
|
||||
<option
|
||||
value="0">COM_HELLO_WORLD_CONFIG_CHECK_TIMER_OPTION_SIX</option>
|
||||
</field>
|
||||
<field type="spacer" name="spacerAuthor" hr="true" />
|
||||
<field
|
||||
name="save_history"
|
||||
type="radio"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="1"
|
||||
label="JGLOBAL_SAVE_HISTORY_OPTIONS_LABEL"
|
||||
description="JGLOBAL_SAVE_HISTORY_OPTIONS_DESC"
|
||||
>
|
||||
<option value="1">JYES</option>
|
||||
<option value="0">JNO</option>
|
||||
</field>
|
||||
<field
|
||||
name="history_limit"
|
||||
type="text"
|
||||
filter="integer"
|
||||
label="JGLOBAL_HISTORY_LIMIT_OPTIONS_LABEL"
|
||||
description="JGLOBAL_HISTORY_LIMIT_OPTIONS_DESC"
|
||||
default="10"
|
||||
/>
|
||||
<field type="spacer" name="spacerHistory" hr="true" />
|
||||
<field name="autorTitle"
|
||||
type="spacer"
|
||||
label="COM_HELLO_WORLD_CONFIG_AUTHOR"
|
||||
/>
|
||||
<field name="autorName"
|
||||
type="text"
|
||||
label="COM_HELLO_WORLD_CONFIG_AUTHOR_NAME_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_AUTHOR_NAME_DESC"
|
||||
size="60"
|
||||
default="Llewellyn"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
/>
|
||||
<field name="autorEmail"
|
||||
type="email"
|
||||
label="COM_HELLO_WORLD_CONFIG_AUTHOR_EMAIL_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_AUTHOR_EMAIL_DESC"
|
||||
size="60"
|
||||
default="joomla@vdm.io"
|
||||
readonly="true"
|
||||
class="readonly"
|
||||
/>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="uikit_config"
|
||||
label="COM_HELLO_WORLD_CONFIG_UIKIT_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_UIKIT_DESC">
|
||||
<field name="uikit_load"
|
||||
type="radio"
|
||||
label="COM_HELLO_WORLD_CONFIG_UIKIT_LOAD_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_UIKIT_LOAD_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_HELLO_WORLD_CONFIG_AUTO_LOAD</option>"
|
||||
<option value="1">
|
||||
COM_HELLO_WORLD_CONFIG_FORCE_LOAD</option>"
|
||||
<option value="3">
|
||||
COM_HELLO_WORLD_CONFIG_ONLY_EXTRA</option>"
|
||||
<option value="2">
|
||||
COM_HELLO_WORLD_CONFIG_DONT_LOAD</option>"
|
||||
</field>
|
||||
<field name="uikit_min"
|
||||
type="radio"
|
||||
label="COM_HELLO_WORLD_CONFIG_UIKIT_MIN_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_UIKIT_MIN_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_HELLO_WORLD_CONFIG_NO</option>"
|
||||
<option value=".min">
|
||||
COM_HELLO_WORLD_CONFIG_YES</option>"
|
||||
</field>
|
||||
<field name="uikit_style"
|
||||
type="radio"
|
||||
label="COM_HELLO_WORLD_CONFIG_UIKIT_STYLE_LABEL"
|
||||
description="COM_HELLO_WORLD_CONFIG_UIKIT_STYLE_DESC"
|
||||
class="btn-group btn-group-yesno"
|
||||
default="">
|
||||
<!-- Option Set. -->
|
||||
<option value="">
|
||||
COM_HELLO_WORLD_CONFIG_FLAT_LOAD</option>"
|
||||
<option value=".almost-flat">
|
||||
COM_HELLO_WORLD_CONFIG_ALMOST_FLAT_LOAD</option>"
|
||||
<option value=".gradient">
|
||||
COM_HELLO_WORLD_CONFIG_GRADIANT_LOAD</option>"
|
||||
</field>
|
||||
</fieldset>
|
||||
<fieldset
|
||||
name="permissions"
|
||||
label="JCONFIG_PERMISSIONS_LABEL"
|
||||
description="JCONFIG_PERMISSIONS_DESC">
|
||||
<field
|
||||
name="rules"
|
||||
type="rules"
|
||||
label="JCONFIG_PERMISSIONS_LABEL"
|
||||
class="inputbox"
|
||||
validate="rules"
|
||||
filter="rules"
|
||||
component="com_hello_world"
|
||||
section="component"
|
||||
/>
|
||||
</fieldset>
|
||||
</config>
|
@ -0,0 +1,122 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage controller.php
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controller library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
/**
|
||||
* General Controller of Hello_world component
|
||||
*/
|
||||
class Hello_worldController extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param array $config An optional associative array of configuration settings.
|
||||
* Recognized key values include 'name', 'default_task', 'model_path', and
|
||||
* 'view_path' (this list is not meant to be comprehensive).
|
||||
*
|
||||
* @since 3.0
|
||||
*/
|
||||
public function __construct($config = array())
|
||||
{
|
||||
// set the default view
|
||||
$config['default_view'] = 'hello_world';
|
||||
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* display task
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function display($cachable = false, $urlparams = false)
|
||||
{
|
||||
// set default view if not set
|
||||
$view = $this->input->getCmd('view', 'hello_world');
|
||||
$data = $this->getViewRelation($view);
|
||||
$layout = $this->input->get('layout', null, 'WORD');
|
||||
$id = $this->input->getInt('id');
|
||||
|
||||
// Check for edit form.
|
||||
if(Hello_worldHelper::checkArray($data))
|
||||
{
|
||||
if ($data['edit'] && $layout == 'edit' && !$this->checkEditId('com_hello_world.edit.'.$data['view'], $id))
|
||||
{
|
||||
// Somehow the person just went to the form - we don't allow that.
|
||||
$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
|
||||
$this->setMessage($this->getError(), 'error');
|
||||
// check if item was opend from other then its own list view
|
||||
$ref = $this->input->getCmd('ref', 0);
|
||||
$refid = $this->input->getInt('refid', 0);
|
||||
// set redirect
|
||||
if ($refid > 0 && Hello_worldHelper::checkString($ref))
|
||||
{
|
||||
// redirect to item of ref
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view='.(string)$ref.'&layout=edit&id='.(int)$refid, false));
|
||||
}
|
||||
elseif (Hello_worldHelper::checkString($ref))
|
||||
{
|
||||
|
||||
// redirect to ref
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view='.(string)$ref, false));
|
||||
}
|
||||
else
|
||||
{
|
||||
// normal redirect back to the list view
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view='.$data['views'], false));
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return parent::display($cachable, $urlparams);
|
||||
}
|
||||
|
||||
protected function getViewRelation($view)
|
||||
{
|
||||
// check the we have a value
|
||||
if (Hello_worldHelper::checkString($view))
|
||||
{
|
||||
// the view relationships
|
||||
$views = array(
|
||||
'greeting' => 'greetings'
|
||||
);
|
||||
// check if this is a list view
|
||||
if (in_array($view, $views))
|
||||
{
|
||||
// this is a list view
|
||||
return array('edit' => false, 'view' => array_search($view,$views), 'views' => $view);
|
||||
}
|
||||
// check if it is an edit view
|
||||
elseif (array_key_exists($view, $views))
|
||||
{
|
||||
// this is a edit view
|
||||
return array('edit' => true, 'view' => $view, 'views' => $views[$view]);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
@ -0,0 +1,314 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greeting.php
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controllerform library
|
||||
jimport('joomla.application.component.controllerform');
|
||||
|
||||
/**
|
||||
* Greeting Controller
|
||||
*/
|
||||
class Hello_worldControllerGreeting extends JControllerForm
|
||||
{
|
||||
/**
|
||||
* Current or most recently performed task.
|
||||
*
|
||||
* @var string
|
||||
* @since 12.2
|
||||
* @note Replaces _task.
|
||||
*/
|
||||
protected $task;
|
||||
|
||||
public function __construct($config = array())
|
||||
{
|
||||
$this->view_list = 'Greetings'; // safeguard for setting the return view listing to the main view.
|
||||
parent::__construct($config);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can add a new record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowAdd($data = array())
|
||||
{
|
||||
// Access check.
|
||||
$access = JFactory::getUser()->authorise('greeting.access', 'com_hello_world');
|
||||
if (!$access)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// In the absense of better information, revert to the component permissions.
|
||||
return parent::allowAdd($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method override to check if you can edit an existing record.
|
||||
*
|
||||
* @param array $data An array of input data.
|
||||
* @param string $key The name of the key for the primary key.
|
||||
*
|
||||
* @return boolean
|
||||
*
|
||||
* @since 1.6
|
||||
*/
|
||||
protected function allowEdit($data = array(), $key = 'id')
|
||||
{
|
||||
// get user object.
|
||||
$user = JFactory::getUser();
|
||||
// get record id.
|
||||
$recordId = (int) isset($data[$key]) ? $data[$key] : 0;
|
||||
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
// The record has been set. Check the record permissions.
|
||||
$permission = $user->authorise('core.edit', 'com_hello_world.greeting.' . (int) $recordId);
|
||||
if (!$permission)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_hello_world.greeting.' . $recordId))
|
||||
{
|
||||
// Now test the owner is the user.
|
||||
$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0;
|
||||
if (empty($ownerId))
|
||||
{
|
||||
// Need to do a lookup from the model.
|
||||
$record = $this->getModel()->getItem($recordId);
|
||||
|
||||
if (empty($record))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
$ownerId = $record->created_by;
|
||||
}
|
||||
|
||||
// If the owner matches 'me' then allow.
|
||||
if ($ownerId == $user->id)
|
||||
{
|
||||
if ($user->authorise('core.edit.own', 'com_hello_world'))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Since there is no permission, revert to the component permissions.
|
||||
return parent::allowEdit($data, $key);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the URL arguments to append to an item redirect.
|
||||
*
|
||||
* @param integer $recordId The primary key id for the item.
|
||||
* @param string $urlVar The name of the URL variable for the id.
|
||||
*
|
||||
* @return string The arguments to append to the redirect URL.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
protected function getRedirectToItemAppend($recordId = null, $urlVar = 'id')
|
||||
{
|
||||
$tmpl = $this->input->get('tmpl');
|
||||
$layout = $this->input->get('layout', 'edit', 'string');
|
||||
|
||||
$ref = $this->input->get('ref', 0, 'string');
|
||||
$refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
// Setup redirect info.
|
||||
|
||||
$append = '';
|
||||
|
||||
if ($refid)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref.'&refid='.(int)$refid;
|
||||
}
|
||||
elseif ($ref)
|
||||
{
|
||||
$append .= '&ref='.(string)$ref;
|
||||
}
|
||||
|
||||
if ($tmpl)
|
||||
{
|
||||
$append .= '&tmpl=' . $tmpl;
|
||||
}
|
||||
|
||||
if ($layout)
|
||||
{
|
||||
$append .= '&layout=' . $layout;
|
||||
}
|
||||
|
||||
if ($recordId)
|
||||
{
|
||||
$append .= '&' . $urlVar . '=' . $recordId;
|
||||
}
|
||||
|
||||
return $append;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to run batch operations.
|
||||
*
|
||||
* @param object $model The model.
|
||||
*
|
||||
* @return boolean True if successful, false otherwise and internal error is set.
|
||||
*
|
||||
* @since 2.5
|
||||
*/
|
||||
public function batch($model = null)
|
||||
{
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
// Set the model
|
||||
$model = $this->getModel('Greeting', '', array());
|
||||
|
||||
// Preset the redirect
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view=greetings' . $this->getRedirectToListAppend(), false));
|
||||
|
||||
return parent::batch($model);
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to cancel an edit.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
*
|
||||
* @return boolean True if access level checks pass, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function cancel($key = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
$cancel = parent::cancel($key);
|
||||
|
||||
if ($cancel)
|
||||
{
|
||||
if ($this->refid)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Redirect to the items screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . '&view=' . $this->view_list, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $cancel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to save a record.
|
||||
*
|
||||
* @param string $key The name of the primary key of the URL variable.
|
||||
* @param string $urlVar The name of the URL variable if different from the primary key (sometimes required to avoid router collisions).
|
||||
*
|
||||
* @return boolean True if successful, false otherwise.
|
||||
*
|
||||
* @since 12.2
|
||||
*/
|
||||
public function save($key = null, $urlVar = null)
|
||||
{
|
||||
// get the referal details
|
||||
$this->ref = $this->input->get('ref', 0, 'word');
|
||||
$this->refid = $this->input->get('refid', 0, 'int');
|
||||
|
||||
if ($this->ref || $this->refid)
|
||||
{
|
||||
// to make sure the item is checkedin on redirect
|
||||
$this->task = 'save';
|
||||
}
|
||||
|
||||
$saved = parent::save($key, $urlVar);
|
||||
|
||||
if ($this->refid && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref.'&layout=edit&id='.(int)$this->refid;
|
||||
|
||||
// Redirect to the item screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
elseif ($this->ref && $saved)
|
||||
{
|
||||
$redirect = '&view='.(string)$this->ref;
|
||||
|
||||
// Redirect to the list screen.
|
||||
$this->setRedirect(
|
||||
JRoute::_(
|
||||
'index.php?option=' . $this->option . $redirect, false
|
||||
)
|
||||
);
|
||||
}
|
||||
return $saved;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function that allows child controller access to model data
|
||||
* after the data has been saved.
|
||||
*
|
||||
* @param JModel &$model The data model object.
|
||||
* @param array $validData The validated data.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @since 11.1
|
||||
*/
|
||||
protected function postSaveHook(JModelLegacy $model, $validData = array())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage greetings.php
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Greetings Controller
|
||||
*/
|
||||
class Hello_worldControllerGreetings extends JControllerAdmin
|
||||
{
|
||||
protected $text_prefix = 'COM_HELLO_WORLD_GREETINGS';
|
||||
/**
|
||||
* Proxy for getModel.
|
||||
* @since 2.5
|
||||
*/
|
||||
public function getModel($name = 'Greeting', $prefix = 'Hello_worldModel', $config = array())
|
||||
{
|
||||
$model = parent::getModel($name, $prefix, array('ignore_request' => true));
|
||||
|
||||
return $model;
|
||||
}
|
||||
|
||||
public function exportData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if export is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('greeting.export', 'com_hello_world') && $user->authorise('core.export', 'com_hello_world'))
|
||||
{
|
||||
// Get the input
|
||||
$input = JFactory::getApplication()->input;
|
||||
$pks = $input->post->get('cid', array(), 'array');
|
||||
// Sanitize the input
|
||||
JArrayHelper::toInteger($pks);
|
||||
// Get the model
|
||||
$model = $this->getModel('Greetings');
|
||||
// get the data to export
|
||||
$data = $model->getExportData($pks);
|
||||
if (Hello_worldHelper::checkArray($data))
|
||||
{
|
||||
// now set the data to the spreadsheet
|
||||
$date = JFactory::getDate();
|
||||
Hello_worldHelper::xls($data,'Greetings_'.$date->format('jS_F_Y'),'Greetings exported ('.$date->format('jS F, Y').')','greetings');
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_HELLO_WORLD_EXPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view=greetings', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
public function importData()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or die(JText::_('JINVALID_TOKEN'));
|
||||
// check if import is allowed for this user.
|
||||
$user = JFactory::getUser();
|
||||
if ($user->authorise('greeting.import', 'com_hello_world') && $user->authorise('core.import', 'com_hello_world'))
|
||||
{
|
||||
// Get the import model
|
||||
$model = $this->getModel('Greetings');
|
||||
// get the headers to import
|
||||
$headers = $model->getExImPortHeaders();
|
||||
if (Hello_worldHelper::checkObject($headers))
|
||||
{
|
||||
// Load headers to session.
|
||||
$session = JFactory::getSession();
|
||||
$headers = json_encode($headers);
|
||||
$session->set('greeting_VDM_IMPORTHEADERS', $headers);
|
||||
$session->set('backto_VDM_IMPORT', 'greetings');
|
||||
$session->set('dataType_VDM_IMPORTINTO', 'greeting');
|
||||
// Redirect to import view.
|
||||
$message = JText::_('COM_HELLO_WORLD_IMPORT_SELECT_FILE_FOR_GREETINGS');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view=import', false), $message);
|
||||
return;
|
||||
}
|
||||
}
|
||||
// Redirect to the list screen with error.
|
||||
$message = JText::_('COM_HELLO_WORLD_IMPORT_FAILED');
|
||||
$this->setRedirect(JRoute::_('index.php?option=com_hello_world&view=greetings', false), $message, 'error');
|
||||
return;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// import Joomla controlleradmin library
|
||||
jimport('joomla.application.component.controlleradmin');
|
||||
|
||||
/**
|
||||
* Hello_world Controller
|
||||
*/
|
||||
class Hello_worldControllerHello_world extends JControllerAdmin
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage import.php
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
/**
|
||||
* Hello_world Import Controller
|
||||
*/
|
||||
class Hello_worldControllerImport extends JControllerLegacy
|
||||
{
|
||||
/**
|
||||
* Import an spreadsheet.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function import()
|
||||
{
|
||||
// Check for request forgeries
|
||||
JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
|
||||
|
||||
$model = $this->getModel('import');
|
||||
if ($model->import())
|
||||
{
|
||||
$cache = JFactory::getCache('mod_menu');
|
||||
$cache->clean();
|
||||
// TODO: Reset the users acl here as well to kill off any missing bits
|
||||
}
|
||||
|
||||
$app = JFactory::getApplication();
|
||||
$redirect_url = $app->getUserState('com_hello_world.redirect_url');
|
||||
if (empty($redirect_url))
|
||||
{
|
||||
$redirect_url = JRoute::_('index.php?option=com_hello_world&view=import', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// wipe out the user state when we're going to redirect
|
||||
$app->setUserState('com_hello_world.redirect_url', '');
|
||||
$app->setUserState('com_hello_world.message', '');
|
||||
$app->setUserState('com_hello_world.extension_message', '');
|
||||
}
|
||||
$this->setRedirect($redirect_url);
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
<html><body bgcolor="#FFFFFF"></body></html>
|
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
/*----------------------------------------------------------------------------------| www.vdm.io |----/
|
||||
VDM
|
||||
/-------------------------------------------------------------------------------------------------------/
|
||||
|
||||
@version 1.0.0
|
||||
@build 25th April, 2018
|
||||
@created 20th September, 2017
|
||||
@package Hello World
|
||||
@subpackage hello_world.php
|
||||
@author Llewellyn <https://www.vdm.io>
|
||||
@copyright Copyright (C) 2015. All Rights Reserved
|
||||
@license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
|
||||
____ _____ _____ __ __ __ __ ___ _____ __ __ ____ _____ _ _ ____ _ _ ____
|
||||
(_ _)( _ )( _ )( \/ )( ) /__\ / __)( _ )( \/ )( _ \( _ )( \( )( ___)( \( )(_ _)
|
||||
.-_)( )(_)( )(_)( ) ( )(__ /(__)\ ( (__ )(_)( ) ( )___/ )(_)( ) ( )__) ) ( )(
|
||||
\____) (_____)(_____)(_/\/\_)(____)(__)(__) \___)(_____)(_/\/\_)(__) (_____)(_)\_)(____)(_)\_) (__)
|
||||
|
||||
/------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
// No direct access to this file
|
||||
defined('_JEXEC') or die('Restricted access');
|
||||
|
||||
// Access check.
|
||||
if (!JFactory::getUser()->authorise('core.manage', 'com_hello_world'))
|
||||
{
|
||||
return JError::raiseWaring(404, JText::_('JERROR_ALERTNOAUTHOR'));
|
||||
};
|
||||
|
||||
// Load cms libraries
|
||||
JLoader::registerPrefix('J', JPATH_PLATFORM . '/cms');
|
||||
// Load joomla libraries without overwrite
|
||||
JLoader::registerPrefix('J', JPATH_PLATFORM . '/joomla',false);
|
||||
|
||||
// Add CSS file for all pages
|
||||
$document = JFactory::getDocument();
|
||||
$document->addStyleSheet('components/com_hello_world/assets/css/admin.css');
|
||||
$document->addScript('components/com_hello_world/assets/js/admin.js');
|
||||
|
||||
// require helper files
|
||||
JLoader::register('Hello_worldHelper', dirname(__FILE__) . '/helpers/hello_world.php');
|
||||
JLoader::register('JHtmlBatch_', dirname(__FILE__) . '/helpers/html/batch_.php');
|
||||
|
||||
// import joomla controller library
|
||||
jimport('joomla.application.component.controller');
|
||||
|
||||
// Get an instance of the controller prefixed by Hello_world
|
||||
$controller = JControllerLegacy::getInstance('Hello_world');
|
||||
|
||||
// Perform the Request task
|
||||
$controller->execute(JFactory::getApplication()->input->get('task'));
|
||||
|
||||
// Redirect if set by the controller
|
||||
$controller->redirect();
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,89 @@
|
||||
<?php
|
||||
/**
|
||||
* PHPExcel
|
||||
*
|
||||
* Copyright (c) 2006 - 2014 PHPExcel
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2.1 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
* @license http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
|
||||
* @version ##VERSION##, ##DATE##
|
||||
*/
|
||||
|
||||
PHPExcel_Autoloader::Register();
|
||||
// As we always try to run the autoloader before anything else, we can use it to do a few
|
||||
// simple checks and initialisations
|
||||
//PHPExcel_Shared_ZipStreamWrapper::register();
|
||||
// check mbstring.func_overload
|
||||
if (ini_get('mbstring.func_overload') & 2) {
|
||||
throw new PHPExcel_Exception('Multibyte function overloading in PHP must be disabled for string functions (2).');
|
||||
}
|
||||
PHPExcel_Shared_String::buildCharacterSets();
|
||||
|
||||
|
||||
/**
|
||||
* PHPExcel_Autoloader
|
||||
*
|
||||
* @category PHPExcel
|
||||
* @package PHPExcel
|
||||
* @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
|
||||
*/
|
||||
class PHPExcel_Autoloader
|
||||
{
|
||||
/**
|
||||
* Register the Autoloader with SPL
|
||||
*
|
||||
*/
|
||||
public static function Register() {
|
||||
if (function_exists('__autoload')) {
|
||||
// Register any existing autoloader function with SPL, so we don't get any clashes
|
||||
spl_autoload_register('__autoload');
|
||||
}
|
||||
// Register ourselves with SPL
|
||||
if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
|
||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'), true, true);
|
||||
} else {
|
||||
return spl_autoload_register(array('PHPExcel_Autoloader', 'Load'));
|
||||
}
|
||||
} // function Register()
|
||||
|
||||
|
||||
/**
|
||||
* Autoload a class identified by name
|
||||
*
|
||||