update to version 2.0.6

This commit is contained in:
Llewellyn van der Merwe 2018-12-27 12:38:37 +02:00
parent 474d7d5250
commit 20d88a5f30
No known key found for this signature in database
GPG Key ID: CAD7B16D27AF28C5
162 changed files with 9460 additions and 1786 deletions

View File

@ -12,39 +12,39 @@ Watch this [tutorial](https://youtu.be/lkE0ZiSWufg) to see how.
+ *Company*: [Joomla Component Builder](https://www.joomlacomponentbuilder.com/)
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Members Manager](https://www.joomlacomponentbuilder.com/)
+ *First Build*: 6th September, 2015
+ *Last Build*: 26th September, 2018
+ *First Build*: 6th July, 2018
+ *Last Build*: 27th December, 2018
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**90 Hours** or **11 Eight Hour Days** (actual time the author saved -
**112 Hours** or **14 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **32300**
+ *File count*: **206**
+ *Folder count*: **59**
+ *Line count*: **40016**
+ *File count*: **232**
+ *Folder count*: **61**
**60 Hours** or **8 Eight Hour Days** (the actual time the author spent)
**73 Hours** or **9 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @23hours** = codingtime / 4;
> **planning @13hours** = codingtime / 7;
> **mapping @9hours** = codingtime / 10;
> **office @15hours** = codingtime / 6;)
> **debugging @28hours** = codingtime / 4;
> **planning @16hours** = codingtime / 7;
> **mapping @11hours** = codingtime / 10;
> **office @19hours** = codingtime / 6;)
**150 Hours** or **19 Eight Hour Days**
**185 Hours** or **23 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **3.8 weeks** or **0.8 months**
Project duration: **4.6 weeks** or **1 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -12,39 +12,39 @@ Watch this [tutorial](https://youtu.be/lkE0ZiSWufg) to see how.
+ *Company*: [Joomla Component Builder](https://www.joomlacomponentbuilder.com/)
+ *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)
+ *Name*: [Members Manager](https://www.joomlacomponentbuilder.com/)
+ *First Build*: 6th September, 2015
+ *Last Build*: 26th September, 2018
+ *First Build*: 6th July, 2018
+ *Last Build*: 27th December, 2018
+ *Version*: 2.0.x
+ *Copyright*: Copyright (C) 2015. All Rights Reserved
+ *License*: GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
## Build Time
**90 Hours** or **11 Eight Hour Days** (actual time the author saved -
**112 Hours** or **14 Eight Hour Days** (actual time the author saved -
due to [Automated Component Builder](http://joomlacomponentbuilder.com))
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> never making one mistake or taking any coffee break.)
+ *Line count*: **32300**
+ *File count*: **206**
+ *Folder count*: **59**
+ *Line count*: **40016**
+ *File count*: **232**
+ *Folder count*: **61**
**60 Hours** or **8 Eight Hour Days** (the actual time the author spent)
**73 Hours** or **9 Eight Hour Days** (the actual time the author spent)
> (with the following break down:
> **debugging @23hours** = codingtime / 4;
> **planning @13hours** = codingtime / 7;
> **mapping @9hours** = codingtime / 10;
> **office @15hours** = codingtime / 6;)
> **debugging @28hours** = codingtime / 4;
> **planning @16hours** = codingtime / 7;
> **mapping @11hours** = codingtime / 10;
> **office @19hours** = codingtime / 6;)
**150 Hours** or **19 Eight Hour Days**
**185 Hours** or **23 Eight Hour Days**
(a total of the realistic time frame for this project)
> (if creating a folder and file took **5 seconds** and writing one line of code took **10 seconds**,
> with the normal everyday realities at the office, that includes the component planning, mapping & debugging.)
Project duration: **3.8 weeks** or **0.8 months**
Project duration: **4.6 weeks** or **1 months**
> This **component** was build with a Joomla [Automated Component Builder](http://joomlacomponentbuilder.com).
> Developed by [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com)

View File

@ -13,6 +13,7 @@
<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.value" title="JACTION_EDITVALUE" description="JACTION_EDITVALUE_COMPONENT_DESC" />
<action name="core.edit.created_by" title="COM_MEMBERSMANAGER_EDIT_CREATED_BY" description="COM_MEMBERSMANAGER_EDIT_CREATED_BY_DESC" />
<action name="core.edit.created" title="COM_MEMBERSMANAGER_EDIT_CREATED_DATE" description="COM_MEMBERSMANAGER_EDIT_CREATED_DATE_DESC" />
<action name="site.cpanel.access" title="COM_MEMBERSMANAGER_CPANEL_ACCESS_SITE" description="COM_MEMBERSMANAGER_CPANEL_ACCESS_SITE_DESC" />
@ -22,6 +23,7 @@
<action name="member.access.password" title="COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD" description="COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_DESC" />
<action name="member.access.password_check" title="COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_CHECK" description="COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_CHECK_DESC" />
<action name="member.access.profile_image" title="COM_MEMBERSMANAGER_MEMBERS_ACCESS_PROFILE_IMAGE" description="COM_MEMBERSMANAGER_MEMBERS_ACCESS_PROFILE_IMAGE_DESC" />
<action name="site.members.access" title="COM_MEMBERSMANAGER_MEMBERS_ACCESS_SITE" description="COM_MEMBERSMANAGER_MEMBERS_ACCESS_SITE_DESC" />
<action name="member.access.useremail" title="COM_MEMBERSMANAGER_MEMBERS_ACCESS_USEREMAIL" description="COM_MEMBERSMANAGER_MEMBERS_ACCESS_USEREMAIL_DESC" />
<action name="member.access.username" title="COM_MEMBERSMANAGER_MEMBERS_ACCESS_USERNAME" description="COM_MEMBERSMANAGER_MEMBERS_ACCESS_USERNAME_DESC" />
<action name="member.batch" title="COM_MEMBERSMANAGER_MEMBERS_BATCH_USE" description="COM_MEMBERSMANAGER_MEMBERS_BATCH_USE_DESC" />
@ -48,6 +50,7 @@
<action name="member.version" title="COM_MEMBERSMANAGER_MEMBERS_EDIT_VERSION" description="COM_MEMBERSMANAGER_MEMBERS_EDIT_VERSION_DESC" />
<action name="member.export" title="COM_MEMBERSMANAGER_MEMBERS_EXPORT" description="COM_MEMBERSMANAGER_MEMBERS_EXPORT_DESC" />
<action name="member.import" title="COM_MEMBERSMANAGER_MEMBERS_IMPORT" description="COM_MEMBERSMANAGER_MEMBERS_IMPORT_DESC" />
<action name="member.submenu" title="COM_MEMBERSMANAGER_MEMBERS_SUBMENU" description="COM_MEMBERSMANAGER_MEMBERS_SUBMENU_DESC" />
<action name="member.view.account" title="COM_MEMBERSMANAGER_MEMBERS_VIEW_ACCOUNT" description="COM_MEMBERSMANAGER_MEMBERS_VIEW_ACCOUNT_DESC" />
<action name="member.view.email" title="COM_MEMBERSMANAGER_MEMBERS_VIEW_EMAIL" description="COM_MEMBERSMANAGER_MEMBERS_VIEW_EMAIL_DESC" />
<action name="member.view.main_member" title="COM_MEMBERSMANAGER_MEMBERS_VIEW_MAIN_MEMBER" description="COM_MEMBERSMANAGER_MEMBERS_VIEW_MAIN_MEMBER_DESC" />
@ -66,17 +69,24 @@
<action name="type.create" title="COM_MEMBERSMANAGER_TYPES_CREATE" description="COM_MEMBERSMANAGER_TYPES_CREATE_DESC" />
<action name="type.delete" title="COM_MEMBERSMANAGER_TYPES_DELETE" description="COM_MEMBERSMANAGER_TYPES_DELETE_DESC" />
<action name="type.edit" title="COM_MEMBERSMANAGER_TYPES_EDIT" description="COM_MEMBERSMANAGER_TYPES_EDIT_DESC" />
<action name="type.edit.add_relationship" title="COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP" description="COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP_DESC" />
<action name="type.edit.communicate" title="COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE" description="COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE_DESC" />
<action name="type.edit.created_by" title="COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_BY" description="COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_BY_DESC" />
<action name="type.edit.created" title="COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_DATE" description="COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_DATE_DESC" />
<action name="type.edit.description" title="COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION" description="COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION_DESC" />
<action name="type.edit.edit_relationship" title="COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP" description="COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP_DESC" />
<action name="type.edit.field_type" title="COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE" description="COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE_DESC" />
<action name="type.edit.groups_access" title="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS" description="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS_DESC" />
<action name="type.edit.groups_target" title="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_TARGET" description="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_TARGET_DESC" />
<action name="type.edit.name" title="COM_MEMBERSMANAGER_TYPES_EDIT_NAME" description="COM_MEMBERSMANAGER_TYPES_EDIT_NAME_DESC" />
<action name="type.edit.own" title="COM_MEMBERSMANAGER_TYPES_EDIT_OWN" description="COM_MEMBERSMANAGER_TYPES_EDIT_OWN_DESC" />
<action name="type.edit.state" title="COM_MEMBERSMANAGER_TYPES_EDIT_STATE" description="COM_MEMBERSMANAGER_TYPES_EDIT_STATE_DESC" />
<action name="type.edit.type" title="COM_MEMBERSMANAGER_TYPES_EDIT_TYPE" description="COM_MEMBERSMANAGER_TYPES_EDIT_TYPE_DESC" />
<action name="type.version" title="COM_MEMBERSMANAGER_TYPES_EDIT_VERSION" description="COM_MEMBERSMANAGER_TYPES_EDIT_VERSION_DESC" />
<action name="type.edit.view_relationship" title="COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP" description="COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP_DESC" />
<action name="type.export" title="COM_MEMBERSMANAGER_TYPES_EXPORT" description="COM_MEMBERSMANAGER_TYPES_EXPORT_DESC" />
<action name="type.import" title="COM_MEMBERSMANAGER_TYPES_IMPORT" description="COM_MEMBERSMANAGER_TYPES_IMPORT_DESC" />
<action name="type.submenu" title="COM_MEMBERSMANAGER_TYPES_SUBMENU" description="COM_MEMBERSMANAGER_TYPES_SUBMENU_DESC" />
</section>
<section name="member">
<action name="member.edit" title="COM_MEMBERSMANAGER_MEMBERS_EDIT" description="COM_MEMBERSMANAGER_MEMBERS_EDIT_DESC" />
@ -134,6 +144,26 @@
<action name="type.edit.description" title="COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION" description="COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION_DESC" />
<action name="type.edit.groups_target" title="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_TARGET" description="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_TARGET_DESC" />
<action name="type.edit.groups_access" title="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS" description="COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS_DESC" />
<action name="type.edit.add_relationship" title="COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP" description="COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP_DESC" />
<action name="type.edit.field_type" title="COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE" description="COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE_DESC" />
<action name="type.edit.communicate" title="COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE" description="COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE_DESC" />
<action name="type.edit.view_relationship" title="COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP" description="COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP_DESC" />
<action name="type.edit.edit_relationship" title="COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP" description="COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP_DESC" />
<action name="type.edit.type" title="COM_MEMBERSMANAGER_TYPES_EDIT_TYPE" description="COM_MEMBERSMANAGER_TYPES_EDIT_TYPE_DESC" />
<action name="type.version" title="COM_MEMBERSMANAGER_TYPES_EDIT_VERSION" description="COM_MEMBERSMANAGER_TYPES_EDIT_VERSION_DESC" />
</section>
<section name="fieldgroup">
<action name="core.create" title="JACTION_CREATE" description="COM_FIELDS_GROUP_PERMISSION_CREATE_DESC" />
<action name="core.delete" title="JACTION_DELETE" description="COM_FIELDS_GROUP_PERMISSION_DELETE_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="COM_FIELDS_GROUP_PERMISSION_EDIT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_FIELDS_GROUP_PERMISSION_EDITSTATE_DESC" />
<action name="core.edit.own" title="JACTION_EDITOWN" description="COM_FIELDS_GROUP_PERMISSION_EDITOWN_DESC" />
<action name="core.edit.value" title="JACTION_EDITVALUE" description="COM_FIELDS_GROUP_PERMISSION_EDITVALUE_DESC" />
</section>
<section name="field">
<action name="core.delete" title="JACTION_DELETE" description="COM_FIELDS_FIELD_PERMISSION_DELETE_DESC" />
<action name="core.edit" title="JACTION_EDIT" description="COM_FIELDS_FIELD_PERMISSION_EDIT_DESC" />
<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_FIELDS_FIELD_PERMISSION_EDITSTATE_DESC" />
<action name="core.edit.value" title="JACTION_EDITVALUE" description="COM_FIELDS_FIELD_PERMISSION_EDITVALUE_DESC" />
</section>
</access>

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -46,6 +46,24 @@
default="10"
/>
<field type="spacer" name="spacerHistory" hr="true" />
<!-- Placeholder_prefix Field. Type: Text. (joomla) -->
<field
type="text"
name="placeholder_prefix"
label="COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_LABEL"
size="50"
maxlength="150"
default="member"
description="COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_DESCRIPTION"
class="text_area"
filter="WORD"
message="COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_MESSAGE"
hint="COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_HINT"
autocomplete="on"
/>
<!-- Spacer_hr Field. Type: Spacer. A None Database Field. (joomla) -->
<field type="spacer" name="spacer_hr" hr="true" class="spacer_hr" />
<field name="autorTitle"
type="spacer"
label="COM_MEMBERSMANAGER_CONFIG_AUTHOR"
@ -160,10 +178,143 @@
hint="COM_MEMBERSMANAGER_CONFIG_DYNAMIC_SALT_HINT"
/>
</fieldset>
<fieldset
name="members_custom_config"
label="COM_MEMBERSMANAGER_CONFIG_MEMBERS">
<!-- Members_display_type Field. Type: List. (joomla) -->
<field
type="list"
name="members_display_type"
label="COM_MEMBERSMANAGER_CONFIG_MEMBERS_DISPLAY_TYPE_LABEL"
description="COM_MEMBERSMANAGER_CONFIG_MEMBERS_DISPLAY_TYPE_DESCRIPTION"
multiple="false"
required="true"
default="1">
<!-- Option Set. -->
<option value="1">
COM_MEMBERSMANAGER_CONFIG_PANELS</option>
<option value="2">
COM_MEMBERSMANAGER_CONFIG_TABLE</option>
<option value="3">
COM_MEMBERSMANAGER_CONFIG_LIST</option>
</field>
<!-- Panels_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="panels_template"
label="COM_MEMBERSMANAGER_CONFIG_PANELS_TEMPLATE_LABEL"
rows="10"
cols="5"
default=""
description="COM_MEMBERSMANAGER_CONFIG_PANELS_TEMPLATE_DESCRIPTION"
class="text_area span12"
filter="RAW"
hint="COM_MEMBERSMANAGER_CONFIG_PANELS_TEMPLATE_HINT"
showon="members_display_type:1"
/>
<!-- Panel_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="panel_template"
label="COM_MEMBERSMANAGER_CONFIG_PANEL_TEMPLATE_LABEL"
rows="10"
cols="5"
description="COM_MEMBERSMANAGER_CONFIG_PANEL_TEMPLATE_DESCRIPTION"
class="text_area span12"
filter="RAW"
hint="COM_MEMBERSMANAGER_CONFIG_PANEL_TEMPLATE_HINT"
showon="members_display_type:1"
/>
<!-- Table_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="table_template"
label="COM_MEMBERSMANAGER_CONFIG_TABLE_TEMPLATE_LABEL"
rows="10"
cols="5"
default=""
description="COM_MEMBERSMANAGER_CONFIG_TABLE_TEMPLATE_DESCRIPTION"
class="text_area span12"
filter="RAW"
hint="COM_MEMBERSMANAGER_CONFIG_TABLE_TEMPLATE_HINT"
showon="members_display_type:2"
/>
<!-- Table_row_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="table_row_template"
label="COM_MEMBERSMANAGER_CONFIG_TABLE_ROW_TEMPLATE_LABEL"
rows="10"
cols="5"
default=""
description="COM_MEMBERSMANAGER_CONFIG_TABLE_ROW_TEMPLATE_DESCRIPTION"
class="text_area span12"
filter="RAW"
hint="COM_MEMBERSMANAGER_CONFIG_TABLE_ROW_TEMPLATE_HINT"
showon="members_display_type:2"
/>
<!-- List_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="list_template"
label="COM_MEMBERSMANAGER_CONFIG_LIST_TEMPLATE_LABEL"
rows="10"
cols="5"
default=""
description="COM_MEMBERSMANAGER_CONFIG_LIST_TEMPLATE_DESCRIPTION"
class="text_area span12"
filter="RAW"
hint="COM_MEMBERSMANAGER_CONFIG_LIST_TEMPLATE_HINT"
showon="members_display_type:3"
/>
<!-- List_item_template Field. Type: Textarea. (joomla) -->
<field
type="textarea"
name="list_item_template"
label="COM_MEMBERSMANAGER_CONFIG_LIST_ITEM_TEMPLATE_LABEL"
rows="10"
cols="5"
default=""
description="COM_MEMBERSMANAGER_CONFIG_LIST_ITEM_TEMPLATE_DESCRIPTION"
class="text_area span12"
filter="RAW"
hint="COM_MEMBERSMANAGER_CONFIG_LIST_ITEM_TEMPLATE_HINT"
showon="members_display_type:3"
/>
</fieldset>
<fieldset
name="profile_custom_config"
label="COM_MEMBERSMANAGER_CONFIG_PROFILE">
<!-- Button_forms_name Field. Type: Text. (joomla) -->
<field
type="text"
name="button_forms_name"
label="COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_LABEL"
size="50"
maxlength="150"
description="COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_DESCRIPTION"
class="text_area"
filter="STRING"
message="COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_MESSAGE"
hint="COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_HINT"
autocomplete="on"
/>
<!-- Button_report_name Field. Type: Text. (joomla) -->
<field
type="text"
name="button_report_name"
label="COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_LABEL"
size="50"
maxlength="150"
description="COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_DESCRIPTION"
class="text_area"
filter="STRING"
message="COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_MESSAGE"
hint="COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_HINT"
autocomplete="on"
/>
<!-- Image_formats Field. Type: List. (joomla) -->
<field
type="list"

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -27,9 +27,11 @@ class MembersmanagerControllerAjax extends JControllerLegacy
// load the tasks
$this->registerTask('checkUnique', 'ajax');
$this->registerTask('getPlaceHolders', 'ajax');
$this->registerTask('getAnyPlaceHolders', 'ajax');
$this->registerTask('uploadfile', 'ajax');
$this->registerTask('removeFile', 'ajax');
$this->registerTask('getUserDetails', 'ajax');
$this->registerTask('getChartImageLink', 'ajax');
}
public function ajax()
@ -121,6 +123,44 @@ class MembersmanagerControllerAjax extends JControllerLegacy
}
}
break;
case 'getAnyPlaceHolders':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$getTypeValue = $jinput->get('getType', NULL, 'WORD');
if($getTypeValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getAnyPlaceHolders($getTypeValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
case 'uploadfile':
try
{
@ -239,6 +279,44 @@ class MembersmanagerControllerAjax extends JControllerLegacy
}
}
break;
case 'getChartImageLink':
try
{
$returnRaw = $jinput->get('raw', false, 'BOOLEAN');
$imageValue = $jinput->get('image', NULL, 'STRING');
if($imageValue && $user->id != 0)
{
$result = $this->getModel('ajax')->getChartImageLink($imageValue);
}
else
{
$result = false;
}
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback . "(".json_encode($result).");";
}
elseif($returnRaw)
{
echo json_encode($result);
}
else
{
echo "(".json_encode($result).");";
}
}
catch(Exception $e)
{
if($callback = $jinput->get('callback', null, 'CMD'))
{
echo $callback."(".json_encode($e).");";
}
else
{
echo "(".json_encode($e).");";
}
}
break;
}
}
else

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -316,7 +316,17 @@ class MembersmanagerControllerMember extends JControllerForm
protected function postSaveHook(JModelLegacy $model, $validData = array())
{
// safe all dynamic values (that has been posted)
if (isset($validData['id']))
{
MembersmanagerHelper::saveDynamicValues($validData, 'member');
// always sync the type with the type_map
if (isset($validData['type']))
{
MembersmanagerHelper::updateTypes($validData['id'], $validData['type']);
}
// safe all set relationships
MembersmanagerHelper::saveRelationships($validData);
}
return;
}

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

File diff suppressed because it is too large Load Diff

View File

@ -15,6 +15,14 @@ COM_MEMBERSMANAGER_CONFIG_AUTHOR_EMAIL_LABEL="Author Email"
COM_MEMBERSMANAGER_CONFIG_AUTHOR_NAME_DESC="The name of the author of this component."
COM_MEMBERSMANAGER_CONFIG_AUTHOR_NAME_LABEL="Author Name"
COM_MEMBERSMANAGER_CONFIG_AUTO_LOAD="Auto"
COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_DESCRIPTION="What would like to name the forms button."
COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_HINT="Forms"
COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_LABEL="Forms Button Name"
COM_MEMBERSMANAGER_CONFIG_BUTTON_FORMS_NAME_MESSAGE="Error! Please add some forms button name here."
COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_DESCRIPTION="What would like to name the report button."
COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_HINT="Report"
COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_LABEL="Report Button Name"
COM_MEMBERSMANAGER_CONFIG_BUTTON_REPORT_NAME_MESSAGE="Error! Please add some report button name here."
COM_MEMBERSMANAGER_CONFIG_CHECK_TIMER_DESC="Set the intervals for the auto checkin fuction of tables that checks out the items to an user."
COM_MEMBERSMANAGER_CONFIG_CHECK_TIMER_LABEL="Check in timer"
COM_MEMBERSMANAGER_CONFIG_CHECK_TIMER_OPTION_FIVE="Once a week"
@ -34,6 +42,11 @@ COM_MEMBERSMANAGER_CONFIG_COMPANYNAME_HINT="Company Name Here"
COM_MEMBERSMANAGER_CONFIG_COMPANYNAME_LABEL="Company Name"
COM_MEMBERSMANAGER_CONFIG_COMPANYNAME_MESSAGE="Error! Please add company name here."
COM_MEMBERSMANAGER_CONFIG_COMPANY_DETAILS="Company Details"
COM_MEMBERSMANAGER_CONFIG_COMPONENT="Component"
COM_MEMBERSMANAGER_CONFIG_COMPONENTS_DESCRIPTION="Select the related components"
COM_MEMBERSMANAGER_CONFIG_COMPONENTS_LABEL="Components (one to one)"
COM_MEMBERSMANAGER_CONFIG_COMPONENT_DESCRIPTION="Select the related component"
COM_MEMBERSMANAGER_CONFIG_COMPONENT_LABEL="Component"
COM_MEMBERSMANAGER_CONFIG_COUNTRY_DESCRIPTION="Country Name"
COM_MEMBERSMANAGER_CONFIG_COUNTRY_HINT="Namibia"
COM_MEMBERSMANAGER_CONFIG_COUNTRY_LABEL="Country"
@ -71,18 +84,147 @@ COM_MEMBERSMANAGER_CONFIG_GLOBAL_LABEL="Global"
COM_MEMBERSMANAGER_CONFIG_GRADIANT_LOAD="Gradient"
COM_MEMBERSMANAGER_CONFIG_IMAGE_FORMATS_DESCRIPTION="Select all the image formats allowed"
COM_MEMBERSMANAGER_CONFIG_IMAGE_FORMATS_LABEL="Allowed Images Formats"
COM_MEMBERSMANAGER_CONFIG_ITEM_TEMPLATE_DESCRIPTION="Set the HTML for each item"
COM_MEMBERSMANAGER_CONFIG_ITEM_TEMPLATE_HINT="html for an item"
COM_MEMBERSMANAGER_CONFIG_ITEM_TEMPLATE_LABEL="Item Template"
COM_MEMBERSMANAGER_CONFIG_JPEG=".jpeg"
COM_MEMBERSMANAGER_CONFIG_JPG=".jpg"
COM_MEMBERSMANAGER_CONFIG_LIST="List"
COM_MEMBERSMANAGER_CONFIG_LIST_ITEM_TEMPLATE_DESCRIPTION="Set the HTML for a single list item"
COM_MEMBERSMANAGER_CONFIG_LIST_ITEM_TEMPLATE_HINT="// html for single list item
<li> [member_name] </li>"
COM_MEMBERSMANAGER_CONFIG_LIST_ITEM_TEMPLATE_LABEL="List Item Template"
COM_MEMBERSMANAGER_CONFIG_LIST_TEMPLATE_DESCRIPTION="Set the HTML for the list surrounding the list items - to add items (all list items) use [load_items] placeholder"
COM_MEMBERSMANAGER_CONFIG_LIST_TEMPLATE_HINT="// html for the body surrounding the items
<ul>
[load_items]
</ul>"
COM_MEMBERSMANAGER_CONFIG_LIST_TEMPLATE_LABEL="List Template"
COM_MEMBERSMANAGER_CONFIG_MAIN="Main"
COM_MEMBERSMANAGER_CONFIG_MAIN_LOGIN="Main & Login"
COM_MEMBERSMANAGER_CONFIG_MAIN_TEMPLATE_DESCRIPTION="Set the HTML for the main template"
COM_MEMBERSMANAGER_CONFIG_MAIN_TEMPLATE_HINT="html for the main template - items placeholder is [load_items]"
COM_MEMBERSMANAGER_CONFIG_MAIN_TEMPLATE_LABEL="Main Template"
COM_MEMBERSMANAGER_CONFIG_MANY_COMPONENTS_DESCRIPTION="Select the components that has a one to many relationship with these members."
COM_MEMBERSMANAGER_CONFIG_MANY_COMPONENTS_LABEL="Components (one to many)"
COM_MEMBERSMANAGER_CONFIG_MEDIUM_KEY_DESC="Set the full path to where the key file must be stored. Make sure it is behind the root folder of your website, so that it is not public accessible."
COM_MEMBERSMANAGER_CONFIG_MEDIUM_KEY_LABEL="Medium Key (Path)"
COM_MEMBERSMANAGER_CONFIG_MEDIUM_KEY_NOTE_DESC="When using the medium encryption option, the system generates its own key and stores it in a file at the folder/path you set here.<br />Never change this key once it is set, or remove the key file! <b>DATA WILL GET CORRUPTED IF YOU DO!</b> Also make sure the full path to where the the key file should be stored, is behind the root folder of your website/system, so that it is not public accessible. Making a backup of this key file over a <b>secure connection</b> is recommended!"
COM_MEMBERSMANAGER_CONFIG_MEDIUM_KEY_NOTE_LABEL="Medium Encryption"
COM_MEMBERSMANAGER_CONFIG_MEDIUM_KEY_PATH_ERROR="Medium key path (for encryption of various fields) does not exist, or is not writable. Please check the path and update it in the global option of this component."
COM_MEMBERSMANAGER_CONFIG_MEMBERS="Members"
COM_MEMBERSMANAGER_CONFIG_MEMBERS_DISPLAY_TYPE_DESCRIPTION="Set the display type for the members"
COM_MEMBERSMANAGER_CONFIG_MEMBERS_DISPLAY_TYPE_LABEL="Members Display Type"
COM_MEMBERSMANAGER_CONFIG_MOBILE_PHONE_DESCRIPTION="Enter Mobile Phone Number"
COM_MEMBERSMANAGER_CONFIG_MOBILE_PHONE_HINT="Mobile Phone Here"
COM_MEMBERSMANAGER_CONFIG_MOBILE_PHONE_LABEL="Mobile Phone"
COM_MEMBERSMANAGER_CONFIG_MOBILE_PHONE_MESSAGE="Error! Please add mobile phone number here."
COM_MEMBERSMANAGER_CONFIG_NO="No"
COM_MEMBERSMANAGER_CONFIG_NOTE_CORE_MEMBER_PLACEHOLDERS_DESCRIPTION="
<div id='core_member_placeholders'>Loading placeholders.<span class='loading-dots' ></span></div>
<script type='text/javascript'>
var token;
jQuery(document).ready(function($) {
// get token from the form
$('form :input').each(function(index, elm){
if (elm.name.length == 32 && elm.type == 'hidden')
{
value = $(elm).val();
if (1 == value)
{
token = elm.name;
}
}
});
// nice little dot trick :)
var x=0;
setInterval(function() {
var dots = '';
x++;
for (var y=0; y < x%11; y++) {
dots+='.';
}
jQuery('.loading-dots').text(dots);
} , 500);
// now get the place holders
getOnlySelectedComponents();
// all actions if a row is added
jQuery(document).on('subform-row-add', function(event, row){
getOnlySelectedComponents();
});
// all actions if a row is removed (TODO)
jQuery(document).on('subform-row-remove', function(event, row){
getOnlySelectedComponents();
});
});
// component fields
var comfield_ = ['jform_params_', 'jform_'];
var comfield__ = ['jform_', 'jform_params__'];
var fieldnr = [...Array(10).keys()];
// check selected components
function getOnlySelectedComponents() {
// start array (always load member managers own placeholders)
var values = ['com_membersmanager'];
// all the selected (1 to 1)
jQuery.each(comfield_, function( index, value ) {
if (jQuery('#' + value + 'components').length){
jQuery.each(jQuery('#' + value + 'components').val(), function( index, comp ) {
values.push(comp);
});
}
});
// all the selected (1 to many)
jQuery.each(comfield__, function( index, value ) {
jQuery.each(fieldnr, function( i ) {
if (jQuery('#' + value + 'many_components__many_components' + i + '__component').length){
values.push(jQuery('#' + value + 'many_components__many_components' + i + '__component').val());
}
});
});
// remove previous values
jQuery('#core_member_placeholders').html('');
// now get the place holders
getOnlySelectedComponentPlaceHolders(values);
}
function getOnlySelectedComponentPlaceHolders_server(comp){
var getUrl = 'index.php?option=com_membersmanager&task=ajax.getAnyPlaceHolders&format=json';
if(token.length > 0){
var request = 'token='+token+'&getType=' + comp;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getOnlySelectedComponentPlaceHolders(values){
// get per component
jQuery.each(uniq(values), function( key, component ) {
if (component.length > 0){
getOnlySelectedComponentPlaceHolders_server(component).done(function(result) {
if(result){
jQuery('#core_member_placeholders').append(result);
} else {
jQuery('#core_member_placeholders').append('<div class=\'alert alert-error\'><h4 class=\'alert-heading\'>Placeholders not found!</h4><div class=\'alert-message\'>There was an error, please try again later. If this error continues, contact your system administrator.</div></div>');
}
});
}
});
}
function uniq(a) {
var prims = {'boolean':{}, 'number':{}, 'string':{}}, objs = [];
return a.filter(function(item) {
var type = typeof item;
if(type in prims)
return prims[type].hasOwnProperty(item) ? false : (prims[type][item] = true);
else
return objs.indexOf(item) >= 0 ? false : objs.push(item);
});
}
</script>"
COM_MEMBERSMANAGER_CONFIG_NOTE_CORE_MEMBER_PLACEHOLDERS_LABEL="Core Member Placeholders"
COM_MEMBERSMANAGER_CONFIG_NOTE_DOCUMENT_PLACEHOLDERS_DESCRIPTION="<div id='document_placeholders'>Loading placeholders.<span class='loading-dots' ></span></div>
<script type='text/javascript'>
jQuery(document).ready(function($) {
@ -135,10 +277,28 @@ function getPlaceHolders(getType, token){
</script>"
COM_MEMBERSMANAGER_CONFIG_NOTE_DOCUMENT_PLACEHOLDERS_LABEL="Document Placeholders"
COM_MEMBERSMANAGER_CONFIG_ONLY_EXTRA="Only Extra"
COM_MEMBERSMANAGER_CONFIG_PANELS="Panels"
COM_MEMBERSMANAGER_CONFIG_PANELS_TEMPLATE_DESCRIPTION="Set the HTML for the body (surrounding the panels) - to add items (all panels) use [load_items] placeholder"
COM_MEMBERSMANAGER_CONFIG_PANELS_TEMPLATE_HINT="// html for the body surrounding the panels (items)
<div>
[load_items]
</div>"
COM_MEMBERSMANAGER_CONFIG_PANELS_TEMPLATE_LABEL="Panels Template"
COM_MEMBERSMANAGER_CONFIG_PANEL_TEMPLATE_DESCRIPTION="Set the HTML for a single panel"
COM_MEMBERSMANAGER_CONFIG_PANEL_TEMPLATE_HINT="// html for a single panel
<div> [member_name] </div>"
COM_MEMBERSMANAGER_CONFIG_PANEL_TEMPLATE_LABEL="Panel Template"
COM_MEMBERSMANAGER_CONFIG_PHONE_DESCRIPTION="The phone number of the contact person."
COM_MEMBERSMANAGER_CONFIG_PHONE_HINT="Phone Number Here!"
COM_MEMBERSMANAGER_CONFIG_PHONE_LABEL="Phone Number"
COM_MEMBERSMANAGER_CONFIG_PHONE_MESSAGE="Error! Please add phone number here."
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_DESCRIPTION="to use in main template "
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_HINT="component_name_1"
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_LABEL="Unique Placeholder"
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_DESCRIPTION="What would like to use as the prefix of the values when used in templates."
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_HINT="member"
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_LABEL="Placeholder Prefix"
COM_MEMBERSMANAGER_CONFIG_PLACEHOLDER_PREFIX_MESSAGE="Error! Please add some placeholder prefix here."
COM_MEMBERSMANAGER_CONFIG_PNG=".png"
COM_MEMBERSMANAGER_CONFIG_POSTALCODE_DESCRIPTION="Please add your postal code here"
COM_MEMBERSMANAGER_CONFIG_POSTALCODE_HINT="9000"
@ -154,6 +314,9 @@ COM_MEMBERSMANAGER_CONFIG_PROFILE_HEIGHT_LABEL="Profile Height (in pixels)"
COM_MEMBERSMANAGER_CONFIG_PROFILE_WIDTH_HINT="Only Numbers"
COM_MEMBERSMANAGER_CONFIG_PROFILE_WIDTH_LABEL="Profile Width (in pixels)"
COM_MEMBERSMANAGER_CONFIG_PUBLIC_DETAILS_NOTE_DESCRIPTION="Your Public Contact Details"
COM_MEMBERSMANAGER_CONFIG_QTY_DESCRIPTION="0 is all"
COM_MEMBERSMANAGER_CONFIG_QTY_HINT="qty"
COM_MEMBERSMANAGER_CONFIG_QTY_LABEL="Qty"
COM_MEMBERSMANAGER_CONFIG_REGION_DESCRIPTION="Please add your region or state name here"
COM_MEMBERSMANAGER_CONFIG_REGION_HINT="Region Name"
COM_MEMBERSMANAGER_CONFIG_REGION_LABEL="Region/State"
@ -162,6 +325,29 @@ COM_MEMBERSMANAGER_CONFIG_STREET_DESCRIPTION="Please add your street address her
COM_MEMBERSMANAGER_CONFIG_STREET_HINT="16 Street Name"
COM_MEMBERSMANAGER_CONFIG_STREET_LABEL="Street Address"
COM_MEMBERSMANAGER_CONFIG_STREET_MESSAGE="Error! Please add street here."
COM_MEMBERSMANAGER_CONFIG_SUB="Sub"
COM_MEMBERSMANAGER_CONFIG_SUB_LOGIN="Sub & Login"
COM_MEMBERSMANAGER_CONFIG_TABLE="Table"
COM_MEMBERSMANAGER_CONFIG_TABLE_ROW_TEMPLATE_DESCRIPTION="Set the HTML for a single row"
COM_MEMBERSMANAGER_CONFIG_TABLE_ROW_TEMPLATE_HINT="// html for a single row
<tr>
<td>[member_name]</td>
<td>[member_email]</td>
</tr>
"
COM_MEMBERSMANAGER_CONFIG_TABLE_ROW_TEMPLATE_LABEL="Table Row Template"
COM_MEMBERSMANAGER_CONFIG_TABLE_TEMPLATE_DESCRIPTION="Set the HTML for the table surrounding the rows - to add items (all rows) use [load_items] placeholder"
COM_MEMBERSMANAGER_CONFIG_TABLE_TEMPLATE_HINT="// html for the table surrounding the rows (items)
<table>
<tbody>
[load_items]
</tbody>
</table>"
COM_MEMBERSMANAGER_CONFIG_TABLE_TEMPLATE_LABEL="Table Template"
COM_MEMBERSMANAGER_CONFIG_TARGET_ACCOUNT_DESCRIPTION="What type of Accounts should we get."
COM_MEMBERSMANAGER_CONFIG_TARGET_ACCOUNT_LABEL="Targeted Accounts"
COM_MEMBERSMANAGER_CONFIG_TARGET_TYPE_DESCRIPTION="Select the types of members you would like to load."
COM_MEMBERSMANAGER_CONFIG_TARGET_TYPE_LABEL="Target Member Types"
COM_MEMBERSMANAGER_CONFIG_UIKIT_DESC="<b>The Parameters for the uikit are set here.</b><br />Uikit is a lightweight and modular front-end framework
for developing fast and powerful web interfaces. For more info visit <a href="https://getuikit.com/v2/" target="_blank">version 2</a> or <a href="https://getuikit.com/" target="_blank">version 3</a>"
COM_MEMBERSMANAGER_CONFIG_UIKIT_LABEL="Uikit2 and Uikit3 Settings"
@ -185,7 +371,6 @@ COM_MEMBERSMANAGER_CONTRIBUTORS="Contributors"
COM_MEMBERSMANAGER_COULD_NOT_UPLOAD_THE_FILE="Could not upload the file!"
COM_MEMBERSMANAGER_CPANEL_ACCESS_SITE="cPanel (Site) Access"
COM_MEMBERSMANAGER_CPANEL_ACCESS_SITE_DESC=" Allows the users in this group to access site cpanel."
COM_MEMBERSMANAGER_CREATE_A_REGION="create a region"
COM_MEMBERSMANAGER_CREATE_NEW_S="Create New %s"
COM_MEMBERSMANAGER_DASH="Dashboard"
COM_MEMBERSMANAGER_DASHBOARD="Members Manager Dashboard"
@ -205,6 +390,8 @@ COM_MEMBERSMANAGER_EXPORT_DATA_DESC=" Allows users in this group to export data.
COM_MEMBERSMANAGER_EXPORT_FAILED="Export Failed"
COM_MEMBERSMANAGER_GREAT_SS_IS_AVAILABLE="Great, %s(%s) is available!"
COM_MEMBERSMANAGER_HELP_MANAGER="Help"
COM_MEMBERSMANAGER_HTWOCURL_NOT_FOUNDHTWOPPLEASE_SETUP_CURL_ON_YOUR_SYSTEM_OR_BMEMBERSMANAGERB_WILL_NOT_FUNCTION_CORRECTLYP="<h2>Curl Not Found!</h2><p>Please setup curl on your system, or <b>membersmanager</b> will not function correctly!</p>"
COM_MEMBERSMANAGER_IMAGE="Image"
COM_MEMBERSMANAGER_IMPORT_CONTINUE="Continue"
COM_MEMBERSMANAGER_IMPORT_DATA="Import Data"
COM_MEMBERSMANAGER_IMPORT_DATA_DESC=" Allows users in this group to import data."
@ -243,11 +430,13 @@ COM_MEMBERSMANAGER_IMPORT_UNABLE_TO_FIND_IMPORT_PACKAGE="Package to import not f
COM_MEMBERSMANAGER_IMPORT_UPDATE_DATA="Import Data"
COM_MEMBERSMANAGER_IMPORT_UPLOAD_BOTTON="Upload File"
COM_MEMBERSMANAGER_INACTIVE="Inactive"
COM_MEMBERSMANAGER_INFO="Info"
COM_MEMBERSMANAGER_KEEP_ORIGINAL_ACCESS="- Keep Original Access -"
COM_MEMBERSMANAGER_KEEP_ORIGINAL_CATEGORY="- Keep Original Category -"
COM_MEMBERSMANAGER_KEEP_ORIGINAL_STATE="- Keep Original State -"
COM_MEMBERSMANAGER_LICENSE="License"
COM_MEMBERSMANAGER_MAIN_MEMBER="Main Member"
COM_MEMBERSMANAGER_MAKE_A_SELECTION_TO_CREATE_A_RELATIONSHIP="Make a selection to create a relationship."
COM_MEMBERSMANAGER_MEMBER="Member"
COM_MEMBERSMANAGER_MEMBERS="Members"
COM_MEMBERSMANAGER_MEMBERS_ACCESS="Members Access"
@ -260,6 +449,8 @@ COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_CHECK_DESC="Allows the users in this
COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_DESC="Allows the users in this group to access password of member"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_PROFILE_IMAGE="Members Access Profile Image"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_PROFILE_IMAGE_DESC="Allows the users in this group to access profile image of member"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_SITE="Members (Site) Access"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_SITE_DESC=" Allows the users in this group to access site members."
COM_MEMBERSMANAGER_MEMBERS_ACCESS_USEREMAIL="Members Access Useremail"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_USEREMAIL_DESC="Allows the users in this group to access useremail of member"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_USERNAME="Members Access Username"
@ -332,6 +523,8 @@ COM_MEMBERSMANAGER_MEMBERS_N_ITEMS_UNFEATURED="%s Members unfeatured."
COM_MEMBERSMANAGER_MEMBERS_N_ITEMS_UNFEATURED_1="%s Member unfeatured."
COM_MEMBERSMANAGER_MEMBERS_N_ITEMS_UNPUBLISHED="%s Members unpublished."
COM_MEMBERSMANAGER_MEMBERS_N_ITEMS_UNPUBLISHED_1="%s Member unpublished."
COM_MEMBERSMANAGER_MEMBERS_SUBMENU="Members Submenu"
COM_MEMBERSMANAGER_MEMBERS_SUBMENU_DESC="Allows the users in this group to submenu of member"
COM_MEMBERSMANAGER_MEMBERS_VIEW_ACCOUNT="Members View Account"
COM_MEMBERSMANAGER_MEMBERS_VIEW_ACCOUNT_DESC="Allows the users in this group to view account of member"
COM_MEMBERSMANAGER_MEMBERS_VIEW_EMAIL="Members View Email"
@ -465,20 +658,25 @@ COM_MEMBERSMANAGER_NEW="New"
COM_MEMBERSMANAGER_NOT_FOUND_OR_ACCESS_DENIED="Not found or access denied!"
COM_MEMBERSMANAGER_NO_ACCESS_GRANTED="No Access Granted!"
COM_MEMBERSMANAGER_NO_IMPORT_FILE_SELECTED="No import file selected."
COM_MEMBERSMANAGER_NO_NAME="No Name"
COM_MEMBERSMANAGER_NO_PLACEHOLDERS_WERE_FOUND_PLEASE_TRY_AGAIN_LATER="No placeholders were found, please try again later."
COM_MEMBERSMANAGER_NO_TEMPLATE_FOR_BSB_WERE_FOUND="No template for <b>%s</b> were found"
COM_MEMBERSMANAGER_OR="or"
COM_MEMBERSMANAGER_PLACEHOLDERS_NOT_FOUND="Placeholders not found"
COM_MEMBERSMANAGER_PRINT="Print"
COM_MEMBERSMANAGER_PROPORTIONALLY="proportionally"
COM_MEMBERSMANAGER_PUBLISHED="Published"
COM_MEMBERSMANAGER_RELATIONSHIPS="Relationships"
COM_MEMBERSMANAGER_REMOVE="Remove"
COM_MEMBERSMANAGER_SAVE_SUCCESS="Great! Item successfully saved."
COM_MEMBERSMANAGER_SAVE_WARNING="The value already existed so please select another."
COM_MEMBERSMANAGER_SELECT_A_REGION="select a region"
COM_MEMBERSMANAGER_SELECT_AN_OPTION="Select an option"
COM_MEMBERSMANAGER_SUBMENU_MEMBERS="Members"
COM_MEMBERSMANAGER_SUBMENU_MEMBERS_FIELDS="Members Fields"
COM_MEMBERSMANAGER_SUBMENU_MEMBERS_FIELDS_GROUPS="Members Field Groups"
COM_MEMBERSMANAGER_SUBMENU_TYPES="Types"
COM_MEMBERSMANAGER_S_COULD_NOT_BE_SAVED_PLEASE_TRY_AGAIN_THIS_COULD_BE_DUE_TO_THE_FACT_THIS_THE_MEMBER_ID_WAS_NOT_READY="%s could not be saved, please try again. This could be due to the fact this the member ID was not ready."
COM_MEMBERSMANAGER_S_DATA_COULD_NOT_BE_SAVED="%s data could not be saved"
COM_MEMBERSMANAGER_THERE_HAS_BEEN_AN_ERROR="There has been an error."
COM_MEMBERSMANAGER_THERE_WAS_AN_ERROR_PLEASE_TRY_AGAIN_LATER_IF_THIS_ERROR_CONTINUES_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="There was an error, please try again later. If this error continues, contact your system administrator."
COM_MEMBERSMANAGER_THE_PROFILE_WILL_BE_CROPPED_TO_THIS_SIZE="The profile will be cropped to this size"
COM_MEMBERSMANAGER_TRASHED="Trashed"
COM_MEMBERSMANAGER_TYPE="Type"
@ -494,6 +692,10 @@ COM_MEMBERSMANAGER_TYPES_CREATE_DESC="Allows the users in this group to create c
COM_MEMBERSMANAGER_TYPES_DELETE="Types Delete"
COM_MEMBERSMANAGER_TYPES_DELETE_DESC="Allows the users in this group to delete delete types"
COM_MEMBERSMANAGER_TYPES_EDIT="Types Edit"
COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP="Types Edit Add Relationship"
COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP_DESC="Allows the users in this group to edit add relationship of type"
COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE="Types Edit Communicate"
COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE_DESC="Allows the users in this group to edit communicate of type"
COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_BY="Types Edit Created By"
COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by types"
COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_DATE="Types Edit Created Date"
@ -501,6 +703,10 @@ COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_DATE_DESC="Allows the users in this group
COM_MEMBERSMANAGER_TYPES_EDIT_DESC="Allows the users in this group to edit the type"
COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION="Types Edit Description"
COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of type"
COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP="Types Edit Edit Relationship"
COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP_DESC="Allows the users in this group to edit edit relationship of type"
COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE="Types Edit Field Type"
COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE_DESC="Allows the users in this group to edit field type of type"
COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS="Types Edit Groups Access"
COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS_DESC="Allows the users in this group to edit groups access of type"
COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_TARGET="Types Edit Groups Target"
@ -511,8 +717,12 @@ COM_MEMBERSMANAGER_TYPES_EDIT_OWN="Types Edit Own"
COM_MEMBERSMANAGER_TYPES_EDIT_OWN_DESC="Allows the users in this group to edit edit own types created by them"
COM_MEMBERSMANAGER_TYPES_EDIT_STATE="Types Edit State"
COM_MEMBERSMANAGER_TYPES_EDIT_STATE_DESC="Allows the users in this group to update the state of the type"
COM_MEMBERSMANAGER_TYPES_EDIT_TYPE="Types Edit Type"
COM_MEMBERSMANAGER_TYPES_EDIT_TYPE_DESC="Allows the users in this group to edit type of type"
COM_MEMBERSMANAGER_TYPES_EDIT_VERSION="Types Edit Version"
COM_MEMBERSMANAGER_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version types"
COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP="Types Edit View Relationship"
COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP_DESC="Allows the users in this group to edit view relationship of type"
COM_MEMBERSMANAGER_TYPES_EXPORT="Types Export"
COM_MEMBERSMANAGER_TYPES_EXPORT_DESC="Allows the users in this group to export export types"
COM_MEMBERSMANAGER_TYPES_IMPORT="Types Import"
@ -534,9 +744,20 @@ COM_MEMBERSMANAGER_TYPES_N_ITEMS_UNFEATURED="%s Types unfeatured."
COM_MEMBERSMANAGER_TYPES_N_ITEMS_UNFEATURED_1="%s Type unfeatured."
COM_MEMBERSMANAGER_TYPES_N_ITEMS_UNPUBLISHED="%s Types unpublished."
COM_MEMBERSMANAGER_TYPES_N_ITEMS_UNPUBLISHED_1="%s Type unpublished."
COM_MEMBERSMANAGER_TYPES_SUBMENU="Types Submenu"
COM_MEMBERSMANAGER_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of type"
COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP="Add Relationship"
COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_DESCRIPTION="Allow relationships to be created across members."
COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_LABEL="Allow Relationships"
COM_MEMBERSMANAGER_TYPE_ADVANCE="Advance"
COM_MEMBERSMANAGER_TYPE_ALIAS="Alias"
COM_MEMBERSMANAGER_TYPE_ALIAS_HINT="Auto-generated from name"
COM_MEMBERSMANAGER_TYPE_ALIAS_LABEL="Alias"
COM_MEMBERSMANAGER_TYPE_ALL="All"
COM_MEMBERSMANAGER_TYPE_CHECKBOXES="Checkboxes"
COM_MEMBERSMANAGER_TYPE_COMMUNICATE="Communicate"
COM_MEMBERSMANAGER_TYPE_COMMUNICATE_DESCRIPTION="Set the type of behavior this member type has towards the communication component if available. None - do not show in communication, Only Selected - show only the selected by the member in profile, All - show all to all members."
COM_MEMBERSMANAGER_TYPE_COMMUNICATE_LABEL="Communication"
COM_MEMBERSMANAGER_TYPE_CREATED_BY_DESC="The user that created this Type."
COM_MEMBERSMANAGER_TYPE_CREATED_BY_LABEL="Created By"
COM_MEMBERSMANAGER_TYPE_CREATED_DATE_DESC="The date this Type was created."
@ -547,7 +768,13 @@ COM_MEMBERSMANAGER_TYPE_DESCRIPTION_HINT="Add Description Here"
COM_MEMBERSMANAGER_TYPE_DESCRIPTION_LABEL="Description"
COM_MEMBERSMANAGER_TYPE_DETAILS="Details"
COM_MEMBERSMANAGER_TYPE_EDIT="Editing the Type"
COM_MEMBERSMANAGER_TYPE_EDIT_RELATIONSHIP="Edit Relationship"
COM_MEMBERSMANAGER_TYPE_EDIT_RELATIONSHIP_DESCRIPTION="Select the type/s that can edit the relationships."
COM_MEMBERSMANAGER_TYPE_EDIT_RELATIONSHIP_LABEL="can Edit"
COM_MEMBERSMANAGER_TYPE_ERROR_UNIQUE_ALIAS="Another Type has the same alias."
COM_MEMBERSMANAGER_TYPE_FIELD_TYPE="Field Type"
COM_MEMBERSMANAGER_TYPE_FIELD_TYPE_DESCRIPTION="Select the type of field to use when a member selects the relationship. Checkboxes are ideal when there are not many of these particular type of members, otherwise use the list type."
COM_MEMBERSMANAGER_TYPE_FIELD_TYPE_LABEL="Selection Field Type"
COM_MEMBERSMANAGER_TYPE_GROUPS_ACCESS="Groups Access"
COM_MEMBERSMANAGER_TYPE_GROUPS_ACCESS_DESCRIPTION="Select access group/s"
COM_MEMBERSMANAGER_TYPE_GROUPS_ACCESS_LABEL="Access Group/s"
@ -555,6 +782,7 @@ COM_MEMBERSMANAGER_TYPE_GROUPS_TARGET="Groups Target"
COM_MEMBERSMANAGER_TYPE_GROUPS_TARGET_DESCRIPTION="Select target group/s"
COM_MEMBERSMANAGER_TYPE_GROUPS_TARGET_LABEL="Target Group/s"
COM_MEMBERSMANAGER_TYPE_ID="Id"
COM_MEMBERSMANAGER_TYPE_LIST="List"
COM_MEMBERSMANAGER_TYPE_MODIFIED_BY_DESC="The last user that modified this Type."
COM_MEMBERSMANAGER_TYPE_MODIFIED_BY_LABEL="Modified By"
COM_MEMBERSMANAGER_TYPE_MODIFIED_DATE_DESC="The date this Type was modified."
@ -565,13 +793,23 @@ COM_MEMBERSMANAGER_TYPE_NAME_HINT="Name Here"
COM_MEMBERSMANAGER_TYPE_NAME_LABEL="Name"
COM_MEMBERSMANAGER_TYPE_NAME_MESSAGE="Error! Please add name here."
COM_MEMBERSMANAGER_TYPE_NEW="A New Type"
COM_MEMBERSMANAGER_TYPE_NO="No"
COM_MEMBERSMANAGER_TYPE_NONE="None"
COM_MEMBERSMANAGER_TYPE_ONLY_SELECTED="Only Selected"
COM_MEMBERSMANAGER_TYPE_ORDERING_LABEL="Ordering"
COM_MEMBERSMANAGER_TYPE_PERMISSION="Permissions"
COM_MEMBERSMANAGER_TYPE_PUBLISHING="Publishing"
COM_MEMBERSMANAGER_TYPE_SAVE_WARNING="Alias already existed so a number was added at the end. You can re-edit the Type to customise the alias."
COM_MEMBERSMANAGER_TYPE_STATUS="Status"
COM_MEMBERSMANAGER_TYPE_TYPE="Type"
COM_MEMBERSMANAGER_TYPE_TYPE_DESCRIPTION="Select the type/s"
COM_MEMBERSMANAGER_TYPE_TYPE_LABEL="can Link"
COM_MEMBERSMANAGER_TYPE_VERSION_DESC="A count of the number of times this Type has been revised."
COM_MEMBERSMANAGER_TYPE_VERSION_LABEL="Revision"
COM_MEMBERSMANAGER_TYPE_VIEW_RELATIONSHIP="View Relationship"
COM_MEMBERSMANAGER_TYPE_VIEW_RELATIONSHIP_DESCRIPTION="Select the type/s that can view the relationships."
COM_MEMBERSMANAGER_TYPE_VIEW_RELATIONSHIP_LABEL="can View"
COM_MEMBERSMANAGER_TYPE_YES="Yes"
COM_MEMBERSMANAGER_USE_BATCH="Use Batch"
COM_MEMBERSMANAGER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."
COM_MEMBERSMANAGER_VALUE_ALREADY_TAKEN_PLEASE_TRY_AGAIN="Value already taken, please try again."
@ -579,8 +817,11 @@ COM_MEMBERSMANAGER_VERSION="Version"
COM_MEMBERSMANAGER_WARNING_IMPORT_FILE_ERROR="Warning, import file error."
COM_MEMBERSMANAGER_WARNING_IMPORT_UPLOAD_ERROR="Warning, import upload error."
COM_MEMBERSMANAGER_WEBSITE="Website"
COM_MEMBERSMANAGER_YOU_CAN_NOT_DELETE_BSB_FIRST_MOVE_ALL_SUB_ACCOUNTS_TO_NEW_MAIN_MEMBER="You can not delete <b>%s</b>, first move all sub account/s to new main member."
COM_MEMBERSMANAGER_YOU_DO_NOT_HAVE_PERMISSION_TO_ADD_DATA_TO_S_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="You do not have permission to add data to %s, please contact your system administrator."
COM_MEMBERSMANAGER_YOU_DO_NOT_HAVE_PERMISSION_TO_EDIT_S_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="You do not have permission to edit %s, please contact your system administrator."
COM_MEMBERSMANAGER_YOU_DO_NOT_HAVE_PERMISSION_TO_EDIT_THIS_MEMBER_RELATIONSHIPS_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="You do not have permission to edit this member relationships, please contact your system administrator."
COM_MEMBERSMANAGER_YOU_DO_NOT_HAVE_PERMISSION_TO_EDIT_THIS_MEMBER_TYPE_PLEASE_CONTACT_YOUR_SYSTEM_ADMINISTRATOR="You do not have permission to edit this member type, please contact your system administrator."
COM_MEMBERSMANAGER_YOU_DO_NOT_HAVE_PERMISSION_TO_REMOVE_THIS_FILE="You do not have permission to remove this file."
COM_MEMBERSMANAGER_YOU_DO_NOT_HAVE_PERMISSION_TO_UPLOAD_AN="You do not have permission to upload an"
COM_MEMBERSMANAGER__HAS_BEEN_CHECKED_OUT_BY_S="% has been checked out by %s"

View File

@ -22,6 +22,8 @@ COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_CHECK_DESC="Allows the users in this
COM_MEMBERSMANAGER_MEMBERS_ACCESS_PASSWORD_DESC="Allows the users in this group to access password of member"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_PROFILE_IMAGE="Members Access Profile Image"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_PROFILE_IMAGE_DESC="Allows the users in this group to access profile image of member"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_SITE="Members (Site) Access"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_SITE_DESC=" Allows the users in this group to access site members."
COM_MEMBERSMANAGER_MEMBERS_ACCESS_USEREMAIL="Members Access Useremail"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_USEREMAIL_DESC="Allows the users in this group to access useremail of member"
COM_MEMBERSMANAGER_MEMBERS_ACCESS_USERNAME="Members Access Username"
@ -74,6 +76,8 @@ COM_MEMBERSMANAGER_MEMBERS_EXPORT="Members Export"
COM_MEMBERSMANAGER_MEMBERS_EXPORT_DESC="Allows the users in this group to export export members"
COM_MEMBERSMANAGER_MEMBERS_IMPORT="Members Import"
COM_MEMBERSMANAGER_MEMBERS_IMPORT_DESC="Allows the users in this group to import import members"
COM_MEMBERSMANAGER_MEMBERS_SUBMENU="Members Submenu"
COM_MEMBERSMANAGER_MEMBERS_SUBMENU_DESC="Allows the users in this group to submenu of member"
COM_MEMBERSMANAGER_MEMBERS_VIEW_ACCOUNT="Members View Account"
COM_MEMBERSMANAGER_MEMBERS_VIEW_ACCOUNT_DESC="Allows the users in this group to view account of member"
COM_MEMBERSMANAGER_MEMBERS_VIEW_EMAIL="Members View Email"
@ -106,6 +110,9 @@ COM_MEMBERSMANAGER_MENU="&#9733; Members Manager"
COM_MEMBERSMANAGER_MENU_CPANEL_DESC="Control Panel for Members"
COM_MEMBERSMANAGER_MENU_CPANEL_OPTION="cPanel"
COM_MEMBERSMANAGER_MENU_CPANEL_TITLE="cPanel"
COM_MEMBERSMANAGER_MENU_MEMBERS_DESC="Any List of Member Details"
COM_MEMBERSMANAGER_MENU_MEMBERS_OPTION="Members"
COM_MEMBERSMANAGER_MENU_MEMBERS_TITLE="Members"
COM_MEMBERSMANAGER_TYPES_ACCESS="Types Access"
COM_MEMBERSMANAGER_TYPES_ACCESS_DESC="Allows the users in this group to access access types"
COM_MEMBERSMANAGER_TYPES_BATCH_USE="Types Batch Use"
@ -115,6 +122,10 @@ COM_MEMBERSMANAGER_TYPES_CREATE_DESC="Allows the users in this group to create c
COM_MEMBERSMANAGER_TYPES_DELETE="Types Delete"
COM_MEMBERSMANAGER_TYPES_DELETE_DESC="Allows the users in this group to delete delete types"
COM_MEMBERSMANAGER_TYPES_EDIT="Types Edit"
COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP="Types Edit Add Relationship"
COM_MEMBERSMANAGER_TYPES_EDIT_ADD_RELATIONSHIP_DESC="Allows the users in this group to edit add relationship of type"
COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE="Types Edit Communicate"
COM_MEMBERSMANAGER_TYPES_EDIT_COMMUNICATE_DESC="Allows the users in this group to edit communicate of type"
COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_BY="Types Edit Created By"
COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_BY_DESC="Allows the users in this group to update the created by of the edit created by types"
COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_DATE="Types Edit Created Date"
@ -122,6 +133,10 @@ COM_MEMBERSMANAGER_TYPES_EDIT_CREATED_DATE_DESC="Allows the users in this group
COM_MEMBERSMANAGER_TYPES_EDIT_DESC="Allows the users in this group to edit the type"
COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION="Types Edit Description"
COM_MEMBERSMANAGER_TYPES_EDIT_DESCRIPTION_DESC="Allows the users in this group to edit description of type"
COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP="Types Edit Edit Relationship"
COM_MEMBERSMANAGER_TYPES_EDIT_EDIT_RELATIONSHIP_DESC="Allows the users in this group to edit edit relationship of type"
COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE="Types Edit Field Type"
COM_MEMBERSMANAGER_TYPES_EDIT_FIELD_TYPE_DESC="Allows the users in this group to edit field type of type"
COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS="Types Edit Groups Access"
COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_ACCESS_DESC="Allows the users in this group to edit groups access of type"
COM_MEMBERSMANAGER_TYPES_EDIT_GROUPS_TARGET="Types Edit Groups Target"
@ -132,11 +147,17 @@ COM_MEMBERSMANAGER_TYPES_EDIT_OWN="Types Edit Own"
COM_MEMBERSMANAGER_TYPES_EDIT_OWN_DESC="Allows the users in this group to edit edit own types created by them"
COM_MEMBERSMANAGER_TYPES_EDIT_STATE="Types Edit State"
COM_MEMBERSMANAGER_TYPES_EDIT_STATE_DESC="Allows the users in this group to update the state of the type"
COM_MEMBERSMANAGER_TYPES_EDIT_TYPE="Types Edit Type"
COM_MEMBERSMANAGER_TYPES_EDIT_TYPE_DESC="Allows the users in this group to edit type of type"
COM_MEMBERSMANAGER_TYPES_EDIT_VERSION="Types Edit Version"
COM_MEMBERSMANAGER_TYPES_EDIT_VERSION_DESC="Allows users in this group to edit versions of version types"
COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP="Types Edit View Relationship"
COM_MEMBERSMANAGER_TYPES_EDIT_VIEW_RELATIONSHIP_DESC="Allows the users in this group to edit view relationship of type"
COM_MEMBERSMANAGER_TYPES_EXPORT="Types Export"
COM_MEMBERSMANAGER_TYPES_EXPORT_DESC="Allows the users in this group to export export types"
COM_MEMBERSMANAGER_TYPES_IMPORT="Types Import"
COM_MEMBERSMANAGER_TYPES_IMPORT_DESC="Allows the users in this group to import import types"
COM_MEMBERSMANAGER_TYPES_SUBMENU="Types Submenu"
COM_MEMBERSMANAGER_TYPES_SUBMENU_DESC="Allows the users in this group to submenu of type"
COM_MEMBERSMANAGER_USE_BATCH="Use Batch"
COM_MEMBERSMANAGER_USE_BATCH_DESC=" Allows users in this group to use batch copy/update method."

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -0,0 +1,42 @@
<?php
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'add_relationship',
'type',
'edit_relationship',
'view_relationship'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -0,0 +1,40 @@
<?php
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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');
$form = $displayData->getForm();
$fields = $displayData->get('fields') ?: array(
'communicate',
'field_type'
);
$hiddenFields = $displayData->get('hidden_fields') ?: array();
foreach ($fields as $field)
{
$field = is_array($field) ? $field : array($field);
foreach ($field as $f)
{
if ($form->getField($f))
{
if (in_array($f, $hiddenFields))
{
$form->setFieldAttribute($f, 'type', 'hidden');
}
echo $form->renderField($f);
break;
}
}
}

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -59,6 +59,48 @@ class MembersmanagerModelAjax extends JModelList
return false;
}
// get placeholder header if available
public function getPlaceHolderHeaders($component)
{
if ('com_membersmanager' === $component)
{
return JText::_('COM_MEMBERSMANAGER');
}
return MembersmanagerHelper::getComponentName($component);
}
// get chart image link
public function getChartImageLink($image)
{
$view = $this->getViewID();
// make sure we are in the (allowed) view
if (isset($view['a_view']) && ($view['a_view'] === 'message' || $view['a_view'] === 'profile'))
{
// build image name
$imageName = md5($image . 'jnst_f0r_dumm!es');
// build image data
$image = explode('base64,', $image); unset($image[0]); $image = str_replace(' ', '+', implode('', $image));
// validate Base64
if (($image = MembersmanagerHelper::openValidBase64($image, null, false)) !== false)
{
// validate just png (for now)
$png_binary_check = "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a";
if (substr($image, 0, strlen($png_binary_check)) === $png_binary_check)
{
// build image path
$imagepath = MembersmanagerHelper::getFolderPath('path', 'chartpath') . $imageName . '.png';
// now write the file if not exists
if (file_exists($imagepath) || MembersmanagerHelper::writeFile($imagepath, $image))
{
// build and return image link
return array('link' => MembersmanagerHelper::getFolderPath('url', 'chartpath') . $imageName . '.png');
}
}
}
}
return false;
}
// set some buckets
protected $target;
protected $targetType;
@ -605,13 +647,77 @@ class MembersmanagerModelAjax extends JModelList
}
/**
* get any placeholder
*
* @param string $getType Name get type
*
* @return string The html string of placeholders
*
*/
public function getAnyPlaceHolders($getType)
{
// check if we should add a header
if (method_exists(__CLASS__, 'getPlaceHolderHeaders') && ($string = $this->getPlaceHolderHeaders($getType)) !== false)
{
$string = JText::_($string) . ' ';
$header = '<h4>' . $string . '</h4>';
}
else
{
$string = '';
$header = '';
}
// get placeholders
if ($placeholders = MembersmanagerHelper::getAnyPlaceHolders($getType))
{
return '<div>' . $header . '<code style="display: inline-block; padding: 2px; margin: 3px;">' .
implode('</code> <code style="display: inline-block; padding: 2px; margin: 3px;">', $placeholders) .
'</code></div>';
}
// not found
return '<div class="alert alert-error"><h4 class="alert-heading">' .
$string . JText::_('COM_MEMBERSMANAGER_PLACEHOLDERS_NOT_FOUND') .
'!</h4><div class="alert-message">' .
JText::_('COM_MEMBERSMANAGER_THERE_WAS_AN_ERROR_PLEASE_TRY_AGAIN_LATER_IF_THIS_ERROR_CONTINUES_CONTACT_YOUR_SYSTEM_ADMINISTRATOR') .
'</div></div>';
}
/**
* get the placeholder
*
* @param string $getType Name get type
*
* @return string The html string of placeholders
*
*/
public function getPlaceHolders($getType)
{
// check if we should add a header
if (method_exists(__CLASS__, 'getPlaceHolderHeaders') && ($string = $this->getPlaceHolderHeaders($getType)) !== false)
{
$string = JText::_($string) . ' ';
$header = '<h4>' . $string . '</h4>';
}
else
{
$string = '';
$header = '';
}
// get placeholders
if ($placeholders = MembersmanagerHelper::getPlaceHolders($getType))
{
return '<code style="display: inline-block; padding: 2px; margin: 3px;">'. implode('</code> <code style="display: inline-block; padding: 2px; margin: 3px;">', $placeholders).'</code>';
return '<div>' . $header . '<code style="display: inline-block; padding: 2px; margin: 3px;">' .
implode('</code> <code style="display: inline-block; padding: 2px; margin: 3px;">', $placeholders) .
'</code></div>';
}
return JText::_('COM_MEMBERSMANAGER_NO_PLACEHOLDERS_WERE_FOUND_PLEASE_TRY_AGAIN_LATER');
// not found
return '<div class="alert alert-error"><h4 class="alert-heading">' .
$string . JText::_('COM_MEMBERSMANAGER_PLACEHOLDERS_NOT_FOUND') .
'!</h4><div class="alert-message">' .
JText::_('COM_MEMBERSMANAGER_THERE_WAS_AN_ERROR_PLEASE_TRY_AGAIN_LATER_IF_THIS_ERROR_CONTINUES_CONTACT_YOUR_SYSTEM_ADMINISTRATOR') .
'</div></div>';
}
}

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -142,8 +142,36 @@ class JFormFieldMainmembers extends JFormFieldList
*/
protected function getOptions()
{
// get the user
$my = JFactory::getUser();
// load the db opbject
$db = JFactory::getDBO();
// start the query
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.user','a.account','a.name','a.email','a.token'),array('id','main_member_user','account','name','email','token')));
$query->from($db->quoteName('#__membersmanager_member', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->where($db->quoteName('a.account') . ' = 1 OR ' . $db->quoteName('a.account') . ' = 2');
// check if current user is an admin
if (!$my->authorise('core.options', 'com_membersmanager'))
{
// get user access groups
if (($user_access_types = MembersmanagerHelper::getAccess($my)) === false || !MembersmanagerHelper::checkArray($user_access_types))
{
return false;
}
//filter by type
$query->join('LEFT', $db->quoteName('#__membersmanager_type_map', 't') . ' ON (' . $db->quoteName('a.id') . ' = ' . $db->quoteName('t.member') . ')');
$user_access_types = implode(',', $user_access_types);
$query->where('t.type IN (' . $user_access_types . ')');
// also filter by access (will keep an eye on this)
$groups = implode(',', $my->getAuthorisedViewLevels());
$query->where('a.access IN (' . $groups . ')');
}
$query->order('a.user ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the id
@ -152,50 +180,8 @@ class JFormFieldMainmembers extends JFormFieldList
{
$main_member = MembersmanagerHelper::getVar('member', $id, 'id', 'main_member');
}
// get the user
$my = JFactory::getUser();
// start the query
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.user','a.account','a.name','a.email','a.token'),array('id','main_member_user','account','name','email','token')));
$query->from($db->quoteName('#__membersmanager_member', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->where($db->quoteName('a.account') . ' = 1 OR ' . $db->quoteName('a.account') . ' = 2');
// check if current user is a supper admin
if (!$my->authorise('core.admin'))
{
// get user access groups
$user_access_types = MembersmanagerHelper::getAccess($my);
// user must have access
if (isset($user_access_types) && MembersmanagerHelper::checkArray($user_access_types))
{
// only get members of the type this user has access to
$query->where('a.type IN (' . implode(',', $user_access_types) . ')');
// get current member type
if (($type= MembersmanagerHelper::getVar('member', $id, 'id', 'type')) !== false)
{
// check if this member is in the user access types
if (in_array($type, $user_access_types))
{
// no need to load this member
$main_member = 0;
}
}
}
elseif (isset($main_member) && $main_member > 0)
{
// load this main member only
$query->where($db->quoteName('a.id') . ' = ' . (int) $main_member);
}
else
{
return false;
}
}
$query->order('a.user ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
if (MembersmanagerHelper::checkArray($items))
{
// only add if more then one value found
if (count( (array) $items) > 1)

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -0,0 +1,95 @@
<?php
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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 the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Onetomanycomponents Form Field class for the Membersmanager component
*/
class JFormFieldOnetomanycomponents extends JFormFieldList
{
/**
* The onetomanycomponents field type.
*
* @var string
*/
public $type = 'onetomanycomponents';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$options = array();
// get the component name
$component = 'membersmanager';
// set the element name
$_component = 'com_membersmanager';
// check if it is already set
if (!class_exists('MembersmanagerHelper'))
{
// set the correct path focus
$focus = JPATH_ADMINISTRATOR;
// check if we are in the site area
if (JFactory::getApplication()->isSite())
{
// set admin path
$adminPath = $focus . '/components/' . $_component . '/helpers/' . $component . '.php';
// change the focus
$focus = JPATH_ROOT;
}
// set path based on focus
$path = $focus . '/components/' . $_component . '/helpers/' . $component . '.php';
// check if file exist, if not try admin again.
if (file_exists($path))
{
// make sure to load the helper
JLoader::register('MembersmanagerHelper', $path);
}
// fallback option
elseif (isset($adminPath) && file_exists($adminPath))
{
// make sure to load the helper
JLoader::register('MembersmanagerHelper', $adminPath);
}
else
{
// could not find this
return false;
}
}
// Get the components
if (($components = MembersmanagerHelper::getAllComponents(2)) !== false)
{
// since used in multiple fields we need to test if this is a multi select or not
$multiple = $this->getAttribute('multiple', false);
if (!$multiple || $multiple === 'false')
{
$options[] = JHtml::_('select.option', '', JText::_('COM_MEMBERSMANAGER_SELECT_AN_OPTION'));
}
// now load the items
foreach($components as $item)
{
$type = (isset($item->params->activate_membersmanager_assessment)) ? $item->params->assessment_type_name : JText::_('COM_MEMBERSMANAGER_INFO');
$options[] = JHtml::_('select.option', $item->element, $item->name . ' (' . $type . ')');
}
}
return $options;
}
}

View File

@ -0,0 +1,95 @@
<?php
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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 the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Onetoonecomponents Form Field class for the Membersmanager component
*/
class JFormFieldOnetoonecomponents extends JFormFieldList
{
/**
* The onetoonecomponents field type.
*
* @var string
*/
public $type = 'onetoonecomponents';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
$options = array();
// get the component name
$component = 'membersmanager';
// set the element name
$_component = 'com_membersmanager';
// check if it is already set
if (!class_exists('MembersmanagerHelper'))
{
// set the correct path focus
$focus = JPATH_ADMINISTRATOR;
// check if we are in the site area
if (JFactory::getApplication()->isSite())
{
// set admin path
$adminPath = $focus . '/components/' . $_component . '/helpers/' . $component . '.php';
// change the focus
$focus = JPATH_ROOT;
}
// set path based on focus
$path = $focus . '/components/' . $_component . '/helpers/' . $component . '.php';
// check if file exist, if not try admin again.
if (file_exists($path))
{
// make sure to load the helper
JLoader::register('MembersmanagerHelper', $path);
}
// fallback option
elseif (isset($adminPath) && file_exists($adminPath))
{
// make sure to load the helper
JLoader::register('MembersmanagerHelper', $adminPath);
}
else
{
// could not find this
return false;
}
}
// Get the components
if (($components = MembersmanagerHelper::getAllComponents(1)) !== false)
{
// since used in multiple fields we need to test if this is a multi select or not
$multiple = $this->getAttribute('multiple', false);
if (!$multiple || $multiple === 'false')
{
$options[] = JHtml::_('select.option', '', JText::_('COM_MEMBERSMANAGER_SELECT_AN_OPTION'));
}
// now load the items
foreach($components as $item)
{
$type = (isset($item->params->activate_membersmanager_assessment)) ? $item->params->assessment_type_name : JText::_('COM_MEMBERSMANAGER_INFO');
$options[] = JHtml::_('select.option', $item->element, $item->name . ' (' . $type . ')');
}
}
return $options;
}
}

View File

@ -0,0 +1,58 @@
<?php
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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 the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Targettypes Form Field class for the Membersmanager component
*/
class JFormFieldTargettypes extends JFormFieldList
{
/**
* The targettypes field type.
*
* @var string
*/
public $type = 'targettypes';
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
// load the db opbject
$db = JFactory::getDBO();
// start query
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','target_type_name')));
$query->from($db->quoteName('#__membersmanager_type', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->target_type_name);
}
}
return $options;
}
}

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -142,43 +142,14 @@ class JFormFieldTypes extends JFormFieldList
*/
protected function getOptions()
{
// load the db opbject
$db = JFactory::getDBO();
// get the user
// Get the user object.
$user = JFactory::getUser();
// access types
$accessTypes = MembersmanagerHelper::getAccess($user);
// start query
// Get the databse object.
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','type_name')));
$query->from($db->quoteName('#__membersmanager_type', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
// check if current user is a supper admin
if (!$user->authorise('core.admin'))
{
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the id
$id = $jinput->getInt('id', 0);
if ($id > 0)
{
$type = MembersmanagerHelper::getVar('type', $id, 'id', 'type');
// check if part of user access
if (!MembersmanagerHelper::checkArray($accessTypes) || !in_array($type, $accessTypes))
{
$accessTypes[] = $type;
}
}
// filter by access type
if (MembersmanagerHelper::checkArray($accessTypes))
{
$query->where($db->quoteName('a.id') . ' in (' . implode(',', $accessTypes) . ')');
}
else
{
return false;
}
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();

View File

@ -0,0 +1,212 @@
<?php
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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 the list field type
jimport('joomla.form.helper');
JFormHelper::loadFieldClass('list');
/**
* Typesonmember Form Field class for the Membersmanager component
*/
class JFormFieldTypesonmember extends JFormFieldList
{
/**
* The typesonmember field type.
*
* @var string
*/
public $type = 'typesonmember';
/**
* Override to add new button
*
* @return string The field input markup.
*
* @since 3.2
*/
protected function getInput()
{
// see if we should add buttons
$setButton = $this->getAttribute('button');
// get html
$html = parent::getInput();
// if true set button
if ($setButton === 'true')
{
$button = array();
$script = array();
$buttonName = $this->getAttribute('name');
// get the input from url
$app = JFactory::getApplication();
$jinput = $app->input;
// get the view name & id
$values = $jinput->getArray(array(
'id' => 'int',
'view' => 'word'
));
// check if new item
$ref = '';
$refJ = '';
if (!is_null($values['id']) && strlen($values['view']))
{
// only load referral if not new item.
$ref = '&amp;ref=' . $values['view'] . '&amp;refid=' . $values['id'];
$refJ = '&ref=' . $values['view'] . '&refid=' . $values['id'];
// get the return value.
$_uri = (string) JUri::getInstance();
$_return = urlencode(base64_encode($_uri));
// load return value.
$ref .= '&amp;return=' . $_return;
$refJ .= '&return=' . $_return;
}
$user = JFactory::getUser();
// only add if user allowed to create type
if ($user->authorise('type.create', 'com_membersmanager') && $app->isAdmin()) // TODO for now only in admin area.
{
// build Create button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Create" class="btn btn-small btn-success hasTooltip" title="'.JText::sprintf('COM_MEMBERSMANAGER_CREATE_NEW_S', $buttonNamee).'" style="border-radius: 0px 4px 4px 0px; padding: 4px 4px 4px 7px;"
href="index.php?option=com_membersmanager&amp;view=type&amp;layout=edit'.$ref.'" >
<span class="icon-new icon-white"></span></a>';
}
// only add if user allowed to edit type
if (($buttonName === 'type' || $buttonName === 'types') && $user->authorise('type.edit', 'com_membersmanager') && $app->isAdmin()) // TODO for now only in admin area.
{
// build edit button
$buttonNamee = trim($buttonName);
$buttonNamee = preg_replace('/_+/', ' ', $buttonNamee);
$buttonNamee = preg_replace('/\s+/', ' ', $buttonNamee);
$buttonNamee = preg_replace("/[^A-Za-z ]/", '', $buttonNamee);
$buttonNamee = ucfirst(strtolower($buttonNamee));
$button[] = '<a id="'.$buttonName.'Edit" class="btn btn-small hasTooltip" title="'.JText::sprintf('COM_MEMBERSMANAGER_EDIT_S', $buttonNamee).'" style="display: none; padding: 4px 4px 4px 7px;" href="#" >
<span class="icon-edit"></span></a>';
// build script
$script[] = "
jQuery(document).ready(function() {
jQuery('#adminForm').on('change', '#jform_".$buttonName."',function (e) {
e.preventDefault();
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
var ".$buttonName."Value = jQuery('#jform_".$buttonName."').val();
".$buttonName."Button(".$buttonName."Value);
});
function ".$buttonName."Button(value) {
if (value > 0) {
// hide the create button
jQuery('#".$buttonName."Create').hide();
// show edit button
jQuery('#".$buttonName."Edit').show();
var url = 'index.php?option=com_membersmanager&view=types&task=type.edit&id='+value+'".$refJ."';
jQuery('#".$buttonName."Edit').attr('href', url);
} else {
// show the create button
jQuery('#".$buttonName."Create').show();
// hide edit button
jQuery('#".$buttonName."Edit').hide();
}
}";
}
// check if button was created for type field.
if (is_array($button) && count($button) > 0)
{
// Load the needed script.
$document = JFactory::getDocument();
$document->addScriptDeclaration(implode(' ',$script));
// return the button attached to input field.
return '<div class="input-append">' .$html . implode('',$button).'</div>';
}
}
return $html;
}
/**
* Method to get a list of options for a list input.
*
* @return array An array of JHtml options.
*/
protected function getOptions()
{
// load the db opbject
$db = JFactory::getDBO();
// get the user
$user = JFactory::getUser();
// start query
$query = $db->getQuery(true);
$query->select($db->quoteName(array('a.id','a.name'),array('id','type_name')));
$query->from($db->quoteName('#__membersmanager_type', 'a'));
$query->where($db->quoteName('a.published') . ' >= 1');
// check if current user is an admin
if (!$user->authorise('core.options', 'com_membersmanager'))
{
// access types
$accessTypes = MembersmanagerHelper::getAccess($user);
// get the input from url
$jinput = JFactory::getApplication()->input;
// get the id
$id = $jinput->getInt('id', 0);
if ($id > 0)
{
$types = MembersmanagerHelper::getVar('member', $id, 'id', 'type');
// convert type json to array
if (MembersmanagerHelper::checkJson($types))
{
$types = json_decode($types, true);
}
// convert type int to array
if (is_numeric($types) && $types > 0)
{
$types = array($types);
}
// make sure we have an array
if (MembersmanagerHelper::checkArray($types))
{
foreach ($types as $type)
{
// check if part of user access
if (!MembersmanagerHelper::checkArray($accessTypes) || !in_array($type, $accessTypes))
{
$accessTypes[] = $type;
}
}
}
}
// filter by access type
if (MembersmanagerHelper::checkArray($accessTypes))
{
$query->where($db->quoteName('a.id') . ' in (' . implode(',', $accessTypes) . ')');
}
else
{
return false;
}
}
$query->order('a.name ASC');
$db->setQuery((string)$query);
$items = $db->loadObjectList();
$options = array();
if ($items)
{
foreach($items as $item)
{
$options[] = JHtml::_('select.option', $item->id, $item->type_name);
}
}
return $options;
}
}

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -278,16 +278,16 @@ function getUserDetails(user){
});
}
function getUserDetails_server(user){
var getUrl = JRouter("index.php?option=com_membersmanager&task=ajax.getUserDetails&format=json&vdm="+vastDevMod);
var getUrl = JRouter("index.php?option=com_membersmanager&task=ajax.getUserDetails&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && user > 0){
var request = 'token='+token+'&user='+user;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}
function setUserDetails(result){
@ -399,16 +399,16 @@ function removeFile(clearServer, target, flush, type){
}
function removeFile_server(currentFileName, target, flush, type){
var getUrl = JRouter("index.php?option=com_membersmanager&task=ajax.removeFile&format=json&vdm="+vastDevMod);
var getUrl = JRouter("index.php?option=com_membersmanager&task=ajax.removeFile&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && target.length > 0 && type.length > 0){
var request = 'token='+token+'&filename='+currentFileName+'&target='+target+'&flush='+flush+'&type='+type;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}
function isJsonString(str) {
@ -437,16 +437,16 @@ function isEmpty(obj) {
function checkUnique_server(value, field){
var getUrl = JRouter("index.php?option=com_membersmanager&task=ajax.checkUnique&format=json&vdm="+vastDevMod);
var getUrl = JRouter("index.php?option=com_membersmanager&task=ajax.checkUnique&format=json&raw=true&vdm="+vastDevMod);
if(token.length > 0 && value.length > 0 && field.length > 0){
var request = 'token='+token+'&value='+value+'&field='+field;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
dataType: 'json',
data: request,
jsonp: 'callback'
jsonp: false
});
}
function checkUnique(value, field, show){
@ -475,65 +475,3 @@ function checkUnique(value, field, show){
});
}
}
// set regions that are on the page
regions = {};
var region = 0;
jQuery(document).ready(function($)
{
jQuery("#jform_region option").each(function()
{
var key = jQuery(this).val();
var text = jQuery(this).text();
regions[key] = text;
});
region = jQuery('#jform_region').val();
getRegion();
});
function getRegion_server(country){
var getUrl = "index.php?option=com_membersmanager&task=ajax.getRegion&format=json";
if(token.length > 0 && country > 0){
var request = 'token='+token+'&country='+country;
}
return jQuery.ajax({
type: 'GET',
url: getUrl,
dataType: 'jsonp',
data: request,
jsonp: 'callback'
});
}
function getRegion(){
jQuery("#loading").show();
// clear the selection
jQuery('#jform_region').find('option').remove().end();
jQuery('#jform_region').trigger('liszt:updated');
// get country value if set
var country = jQuery('#jform_country').val();
getRegion_server(country).done(function(result) {
setRegion(result);
jQuery("#loading").hide();
if (typeof regionButton !== 'undefined') {
// ensure button is correct
var region = jQuery('#jform_region').val();
regionButton(region);
}
});
}
function setRegion(array){
if (array) {
jQuery('#jform_region').append('<option value="">'+select_a_region+'</option>');
jQuery.each( array, function( i, id ) {
if (id in regions) {
jQuery('#jform_region').append('<option value="'+id+'">'+regions[id]+'</option>');
}
if (id == region) {
jQuery('#jform_region').val(id);
}
});
} else {
jQuery('#jform_region').append('<option value="">'+create_a_region+'</option>');
}
jQuery('#jform_region').trigger('liszt:updated');
}

View File

@ -263,14 +263,14 @@
message="COM_MEMBERSMANAGER_MEMBER_SURNAME_MESSAGE"
hint="COM_MEMBERSMANAGER_MEMBER_SURNAME_HINT"
/>
<!-- Type Field. Type: Types. (custom) -->
<!-- Type Field. Type: Typesonmember. (custom) -->
<field
type="types"
type="typesonmember"
name="type"
label="COM_MEMBERSMANAGER_MEMBER_TYPE_LABEL"
description="COM_MEMBERSMANAGER_MEMBER_TYPE_DESCRIPTION"
class="list_class"
multiple="false"
multiple="true"
required="false"
button="true"
/>

View File

@ -1,11 +1,152 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
* @license GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html
*/
// Some Global Values
jform_vvvvvvyvvz_required = false;
jform_vvvvvvyvwa_required = false;
jform_vvvvvvyvwb_required = false;
jform_vvvvvvyvwc_required = false;
// Initial Script
jQuery(document).ready(function()
{
var add_relationship_vvvvvvy = jQuery("#jform_add_relationship input[type='radio']:checked").val();
vvvvvvy(add_relationship_vvvvvvy);
});
// the vvvvvvy function
function vvvvvvy(add_relationship_vvvvvvy)
{
// set the function logic
if (add_relationship_vvvvvvy == 1)
{
jQuery('#jform_communicate').closest('.control-group').show();
jQuery('#jform_field_type').closest('.control-group').show();
// add required attribute to field_type field
if (jform_vvvvvvyvvz_required)
{
updateFieldRequired('field_type',0);
jQuery('#jform_field_type').prop('required','required');
jQuery('#jform_field_type').attr('aria-required',true);
jQuery('#jform_field_type').addClass('required');
jform_vvvvvvyvvz_required = false;
}
jQuery('#jform_edit_relationship').closest('.control-group').show();
// add required attribute to edit_relationship field
if (jform_vvvvvvyvwa_required)
{
updateFieldRequired('edit_relationship',0);
jQuery('#jform_edit_relationship').prop('required','required');
jQuery('#jform_edit_relationship').attr('aria-required',true);
jQuery('#jform_edit_relationship').addClass('required');
jform_vvvvvvyvwa_required = false;
}
jQuery('#jform_type').closest('.control-group').show();
// add required attribute to type field
if (jform_vvvvvvyvwb_required)
{
updateFieldRequired('type',0);
jQuery('#jform_type').prop('required','required');
jQuery('#jform_type').attr('aria-required',true);
jQuery('#jform_type').addClass('required');
jform_vvvvvvyvwb_required = false;
}
jQuery('#jform_view_relationship').closest('.control-group').show();
// add required attribute to view_relationship field
if (jform_vvvvvvyvwc_required)
{
updateFieldRequired('view_relationship',0);
jQuery('#jform_view_relationship').prop('required','required');
jQuery('#jform_view_relationship').attr('aria-required',true);
jQuery('#jform_view_relationship').addClass('required');
jform_vvvvvvyvwc_required = false;
}
}
else
{
jQuery('#jform_communicate').closest('.control-group').hide();
jQuery('#jform_field_type').closest('.control-group').hide();
// remove required attribute from field_type field
if (!jform_vvvvvvyvvz_required)
{
updateFieldRequired('field_type',1);
jQuery('#jform_field_type').removeAttr('required');
jQuery('#jform_field_type').removeAttr('aria-required');
jQuery('#jform_field_type').removeClass('required');
jform_vvvvvvyvvz_required = true;
}
jQuery('#jform_edit_relationship').closest('.control-group').hide();
// remove required attribute from edit_relationship field
if (!jform_vvvvvvyvwa_required)
{
updateFieldRequired('edit_relationship',1);
jQuery('#jform_edit_relationship').removeAttr('required');
jQuery('#jform_edit_relationship').removeAttr('aria-required');
jQuery('#jform_edit_relationship').removeClass('required');
jform_vvvvvvyvwa_required = true;
}
jQuery('#jform_type').closest('.control-group').hide();
// remove required attribute from type field
if (!jform_vvvvvvyvwb_required)
{
updateFieldRequired('type',1);
jQuery('#jform_type').removeAttr('required');
jQuery('#jform_type').removeAttr('aria-required');
jQuery('#jform_type').removeClass('required');
jform_vvvvvvyvwb_required = true;
}
jQuery('#jform_view_relationship').closest('.control-group').hide();
// remove required attribute from view_relationship field
if (!jform_vvvvvvyvwc_required)
{
updateFieldRequired('view_relationship',1);
jQuery('#jform_view_relationship').removeAttr('required');
jQuery('#jform_view_relationship').removeAttr('aria-required');
jQuery('#jform_view_relationship').removeClass('required');
jform_vvvvvvyvwc_required = true;
}
}
}
// update required fields
function updateFieldRequired(name,status)
{
var not_required = jQuery('#jform_not_required').val();
if(status == 1)
{
if (isSet(not_required) && not_required != 0)
{
not_required = not_required+','+name;
}
else
{
not_required = ','+name;
}
}
else
{
if (isSet(not_required) && not_required != 0)
{
not_required = not_required.replace(','+name,'');
}
}
jQuery('#jform_not_required').val(not_required);
}
// the isSet function
function isSet(val)
{
if ((val != undefined) && (val != null) && 0 !== val.length){
return true;
}
return false;
}

View File

@ -131,6 +131,86 @@
required="true"
multiple="true"
/>
<!-- Add_relationship Field. Type: Radio. (joomla) -->
<field
type="radio"
name="add_relationship"
label="COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_LABEL"
description="COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0"
required="true">
<!-- Option Set. -->
<option value="1">
COM_MEMBERSMANAGER_TYPE_YES</option>
<option value="0">
COM_MEMBERSMANAGER_TYPE_NO</option>
</field>
<!-- Field_type Field. Type: List. (joomla) -->
<field
type="list"
name="field_type"
label="COM_MEMBERSMANAGER_TYPE_FIELD_TYPE_LABEL"
description="COM_MEMBERSMANAGER_TYPE_FIELD_TYPE_DESCRIPTION"
class="list_class"
multiple="false"
required="true"
default="1">
<!-- Option Set. -->
<option value="1">
COM_MEMBERSMANAGER_TYPE_CHECKBOXES</option>
<option value="2">
COM_MEMBERSMANAGER_TYPE_LIST</option>
</field>
<!-- Communicate Field. Type: Radio. (joomla) -->
<field
type="radio"
name="communicate"
label="COM_MEMBERSMANAGER_TYPE_COMMUNICATE_LABEL"
description="COM_MEMBERSMANAGER_TYPE_COMMUNICATE_DESCRIPTION"
class="btn-group btn-group-yesno"
default="0">
<!-- Option Set. -->
<option value="0">
COM_MEMBERSMANAGER_TYPE_NONE</option>
<option value="1">
COM_MEMBERSMANAGER_TYPE_ONLY_SELECTED</option>
<option value="2">
COM_MEMBERSMANAGER_TYPE_ALL</option>
</field>
<!-- View_relationship Field. Type: Types. (custom) -->
<field
type="types"
name="view_relationship"
label="COM_MEMBERSMANAGER_TYPE_VIEW_RELATIONSHIP_LABEL"
description="COM_MEMBERSMANAGER_TYPE_VIEW_RELATIONSHIP_DESCRIPTION"
class="list_class"
multiple="true"
required="false"
button="true"
/>
<!-- Edit_relationship Field. Type: Types. (custom) -->
<field
type="types"
name="edit_relationship"
label="COM_MEMBERSMANAGER_TYPE_EDIT_RELATIONSHIP_LABEL"
description="COM_MEMBERSMANAGER_TYPE_EDIT_RELATIONSHIP_DESCRIPTION"
class="list_class"
multiple="true"
required="false"
button="true"
/>
<!-- Type Field. Type: Types. (custom) -->
<field
type="types"
name="type"
label="COM_MEMBERSMANAGER_TYPE_TYPE_LABEL"
description="COM_MEMBERSMANAGER_TYPE_TYPE_DESCRIPTION"
class="list_class"
multiple="true"
required="false"
button="true"
/>
<!-- Alias Field. Type: Text. (joomla) -->
<field
type="text"

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -97,6 +97,14 @@ class MembersmanagerModelMember extends JModelAdmin
$item->profile_image = rtrim($medium->decryptString($item->profile_image), "\0");
}
if (!empty($item->type))
{
// Convert the type field to an array.
$type = new Registry;
$type->loadString($item->type);
$item->type = $type->toArray();
}
if (empty($item->id))
{
@ -245,12 +253,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('name', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('name'))
if (!($val = $form->getValue('name')))
{
// Disable fields while saving.
$form->setFieldAttribute('name', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('name', 'required', 'false');
// Make sure
$form->setValue('name', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('name');
}
}
// Modify the form based on Edit Email access controls.
@ -284,12 +301,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('email', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('email'))
if (!($val = $form->getValue('email')))
{
// Disable fields while saving.
$form->setFieldAttribute('email', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('email', 'required', 'false');
// Make sure
$form->setValue('email', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('email');
}
}
// Modify the form based on Edit Account access controls.
@ -316,12 +342,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('account', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('account'))
if (!($val = $form->getValue('account')))
{
// Disable fields while saving.
$form->setFieldAttribute('account', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('account', 'required', 'false');
// Make sure
$form->setValue('account', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('account');
}
}
// Modify the form based on Edit User access controls.
@ -348,12 +383,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('user', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('user'))
if (!($val = $form->getValue('user')))
{
// Disable fields while saving.
$form->setFieldAttribute('user', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('user', 'required', 'false');
// Make sure
$form->setValue('user', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('user');
}
}
// Modify the form based on Edit Token access controls.
@ -380,12 +424,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('token', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('token'))
if (!($val = $form->getValue('token')))
{
// Disable fields while saving.
$form->setFieldAttribute('token', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('token', 'required', 'false');
// Make sure
$form->setValue('token', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('token');
}
}
// Modify the form based on Edit Profile Image access controls.
@ -419,12 +472,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('profile_image', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('profile_image'))
if (!($val = $form->getValue('profile_image')))
{
// Disable fields while saving.
$form->setFieldAttribute('profile_image', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('profile_image', 'required', 'false');
// Make sure
$form->setValue('profile_image', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('profile_image');
}
}
// Modify the form based on Edit Main Member access controls.
@ -451,12 +513,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('main_member', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('main_member'))
if (!($val = $form->getValue('main_member')))
{
// Disable fields while saving.
$form->setFieldAttribute('main_member', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('main_member', 'required', 'false');
// Make sure
$form->setValue('main_member', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('main_member');
}
}
// Modify the form based on Edit Password Check access controls.
@ -490,12 +561,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('password_check', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('password_check'))
if (!($val = $form->getValue('password_check')))
{
// Disable fields while saving.
$form->setFieldAttribute('password_check', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('password_check', 'required', 'false');
// Make sure
$form->setValue('password_check', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('password_check');
}
}
// Modify the form based on Edit Password access controls.
@ -529,12 +609,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('password', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('password'))
if (!($val = $form->getValue('password')))
{
// Disable fields while saving.
$form->setFieldAttribute('password', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('password', 'required', 'false');
// Make sure
$form->setValue('password', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('password');
}
}
// Modify the form based on Edit Useremail access controls.
@ -568,12 +657,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('useremail', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('useremail'))
if (!($val = $form->getValue('useremail')))
{
// Disable fields while saving.
$form->setFieldAttribute('useremail', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('useremail', 'required', 'false');
// Make sure
$form->setValue('useremail', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('useremail');
}
}
// Modify the form based on Edit Username access controls.
@ -607,12 +705,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('username', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('username'))
if (!($val = $form->getValue('username')))
{
// Disable fields while saving.
$form->setFieldAttribute('username', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('username', 'required', 'false');
// Make sure
$form->setValue('username', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('username');
}
}
// Modify the form based on Edit Surname access controls.
@ -639,12 +746,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('surname', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('surname'))
if (!($val = $form->getValue('surname')))
{
// Disable fields while saving.
$form->setFieldAttribute('surname', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('surname', 'required', 'false');
// Make sure
$form->setValue('surname', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('surname');
}
}
// Modify the form based on Edit Type access controls.
@ -671,12 +787,21 @@ class MembersmanagerModelMember extends JModelAdmin
// Make the field hidded.
$form->setFieldAttribute('type', 'type', 'hidden');
// If there is no value continue.
if (!$form->getValue('type'))
if (!($val = $form->getValue('type')))
{
// Disable fields while saving.
$form->setFieldAttribute('type', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('type', 'required', 'false');
// Make sure
$form->setValue('type', null, '');
}
elseif (MembersmanagerHelper::checkArray($val))
{
// We have to unset then (TODO)
// Hiddend field can not handel array value
// Even if we conver to json we get an error
$form->removeField('type');
}
}
// Only load these values if no id is found
@ -926,11 +1051,67 @@ class MembersmanagerModelMember extends JModelAdmin
*/
public function delete(&$pks)
{
// check if member is still linked to other sub members as a main member
if (MembersmanagerHelper::checkArray($pks))
{
// get the application object
$app = JFactory::getApplication();
// now loop the ids
foreach ($pks as $key => $pk)
{
// check if member still have sub accounts linked to it
if (($found = MembersmanagerHelper::getVar('member', $pk, 'main_member', 'id')) !== false)
{
// set the name
$name = MembersmanagerHelper::getMemberName($pk);
// set a message
$app->enqueueMessage(JText::sprintf('COM_MEMBERSMANAGER_YOU_CAN_NOT_DELETE_BSB_FIRST_MOVE_ALL_SUB_ACCOUNTS_TO_NEW_MAIN_MEMBER', $name), 'Error');
// remove for the list
unset($pks[$key]);
}
}
}
if (!parent::delete($pks))
{
return false;
}
// we must also update all linked tables
if (MembersmanagerHelper::checkArray($pks))
{
$seek = array('Info', 'Assessment');
foreach ($seek as $area)
{
if (($components = MembersmanagerHelper::{'get' . $area . 'Components'}()) !== false)
{
foreach($components as $_component)
{
$component = str_replace('com_', '', $_component->element);
$Component = MembersmanagerHelper::safeString($component, 'F');
// get the linked IDs
if (($ids = MembersmanagerHelper::getVars('form', $pks, 'member', 'id', 'IN', $component)) !== false && MembersmanagerHelper::checkArray($ids))
{
// get the model
$_Model = MembersmanagerHelper::getModel('form', JPATH_ADMINISTRATOR . '/components/' . $_component->element, $Component);
// do we have the model
if ($_Model)
{
// change publish state
$_Model->delete($ids);
}
}
}
}
}
// now loop the ids
foreach ($pks as $key => $pk)
{
// make sure to remove the type_map
MembersmanagerHelper::updateTypes($pk);
// must still do the relationship clearing (TODO)
}
}
return true;
}
@ -951,6 +1132,35 @@ class MembersmanagerModelMember extends JModelAdmin
return false;
}
// we must also update all linked tables
if (MembersmanagerHelper::checkArray($pks))
{
$seek = array('Info', 'Assessment');
foreach ($seek as $area)
{
if (($components = MembersmanagerHelper::{'get' . $area . 'Components'}()) !== false)
{
foreach($components as $_component)
{
$component = str_replace('com_', '', $_component->element);
$Component = MembersmanagerHelper::safeString($component, 'F');
// get the linked IDs
if (($ids = MembersmanagerHelper::getVars('form', $pks, 'member', 'id', 'IN', $component)) !== false && MembersmanagerHelper::checkArray($ids))
{
// get the model
$_Model = MembersmanagerHelper::getModel('form', JPATH_ADMINISTRATOR . '/components/' . $_component->element, $Component);
// do we have the model
if ($_Model)
{
// change publish state
$_Model->publish($ids, $value);
}
}
}
}
}
}
return true;
}
@ -1325,16 +1535,39 @@ class MembersmanagerModelMember extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// get user object
$user = JFactory::getUser();
// set ID
$id = (isset($data['id']) && $data['id'] > 0) ? $data['id'] : false;
// little function to check user access
$checkUserAccess = function ($permission) use($user, $id) {
return (($id && $user->authorise('member.' . $permission, 'com_membersmanager.member.' . (int) $id)) || (!$id && $user->authorise('member.' . $permission, 'com_membersmanager')));
};
// make sure these type is set
if ($id && !$checkUserAccess('edit.type'))
{
$data['type'] = MembersmanagerHelper::getVar('member', $id, 'id', 'type');
}
// make sure these account is set
if ($id && !$checkUserAccess('edit.account'))
{
$data['account'] = MembersmanagerHelper::getVar('member', $id, 'id', 'account');
}
// get user value if not set (due to permissions)
if ($id && isset($data['account']) && (1 == $data['account'] || 4 == $data['account']) && (!isset($data['user']) || $data['user'] == 0))
{
$data['user'] = MembersmanagerHelper::getVar('member', $id, 'id', 'user');
}
// check if this is a linked user (MUST STILL DO PERMISSIONS)
if (isset($data['account']) && (1 == $data['account'] || 4 == $data['account']))
if (isset($data['account']) && (1 == $data['account'] || 4 == $data['account']) && $checkUserAccess('edit.user'))
{
// get the application object
$app = JFactory::getApplication();
// check if member already exist
if (isset($data['id']) && $data['id'] > 0 && isset($data['user']) && $data['user'] > 0)
if ($id && isset($data['user']) && $data['user'] > 0)
{
// do not allow user link to be changed (should have done this in the controller)
if (($alreadyUser = MembersmanagerHelper::getVar('member', $data['id'], 'id', 'user')) !== false && is_numeric($alreadyUser) && $alreadyUser > 0 && $alreadyUser != $data['user'])
if (($alreadyUser = MembersmanagerHelper::getVar('member', $id, 'id', 'user')) !== false && is_numeric($alreadyUser) && $alreadyUser > 0 && $alreadyUser != $data['user'])
{
$app->enqueueMessage(JText::_('COM_MEMBERSMANAGER_MEMBER_IS_ALREADY_LINKED_TO_AN_USER_THIS_CAN_NOT_BE_CHANGED_CONTACT_YOUR_SYSTEM_ADMINISTRATOR_IF_YOU_NEED_MORE_HELP'), 'Error');
return false;
@ -1355,27 +1588,17 @@ class MembersmanagerModelMember extends JModelAdmin
{
// set user ID
$bucket['id'] = $data['user'];
// get user exciting groups
// get member user
$memberUser = JFactory::getUser($bucket['id']);
$excitingGroups = $memberUser->get('groups');
$typeGroups = array();
// set the groups
if (isset($data['type']) && $data['type'] > 0)
{
// get the target groups
$typeGroups = MembersmanagerHelper::getVar('type', $data['type'], 'id', 'groups_target');
// convert to array
if (MembersmanagerHelper::checkJson($typeGroups))
{
$typeGroups = (array) json_decode($typeGroups, true);
}
elseif (is_numeric($typeGroups))
{
$typeGroups = array((int) $typeGroups);
}
}
// get user exciting groups
$bucket['groups'] = $memberUser->get('groups');
// remove all groups part of members manager
MembersmanagerHelper::removeMemberGroups($bucket['groups']);
// load the user groups (TODO)
$bucket['groups'] = MembersmanagerHelper::mergeArrays(array($excitingGroups, $typeGroups));
if (($typeGroups = MembersmanagerHelper::getMemberGroupsByType($data['type'])) !== false)
{
$bucket['groups'] = MembersmanagerHelper::mergeArrays(array($bucket['groups'], $typeGroups));
}
// set password
if (empty($data['password']) || empty($data['password_check']))
{
@ -1413,25 +1636,11 @@ class MembersmanagerModelMember extends JModelAdmin
{
// make sure to set the user value
$data['user'] = $done;
if (isset($data['type']) && $data['type'] > 0)
{
// get the target groups
$_groups = MembersmanagerHelper::getVar('type', $data['type'], 'id', 'groups_target');
// convert to array
if (MembersmanagerHelper::checkJson($_groups))
{
$groups = (array) json_decode($_groups, true);
}
elseif (is_numeric($_groups))
{
$groups = array((int) $_groups);
}
}
// check if we have groups
if (isset($groups) && $groups)
if (($typeGroups = MembersmanagerHelper::getMemberGroupsByType($data['type'])) !== false)
{
// update the user groups
JUserHelper::setUserGroups((int) $done ,(array) $groups);
JUserHelper::setUserGroups((int) $done, (array) $typeGroups);
}
else
{
@ -1450,12 +1659,25 @@ class MembersmanagerModelMember extends JModelAdmin
$data['user'] = $didCreate;
}
}
// check if the user was set
if (isset($data['user']) && $data['user'] > 0)
{
// the login member must always own it self for edit permissions
$data['created_by'] = $data['user'];
}
}
// if a sub account and not login access
if (isset($data['account']) && 3 == $data['account'] && isset($data['main_member']) && $data['main_member'] > 0
&& ($mainMemberUser = MembersmanagerHelper::getVar('member', $data['main_member'], 'id', 'user')) !== false && $mainMemberUser > 0)
{
// the main user must always own it self for edit permissions
$data['created_by'] = $mainMemberUser;
}
// always clear out password!!
unset($data['password']);
unset($data['password_check']);
// clear out user if error found
if (empty($data['user']) || $data['user'] == 0 || empty($data['account']) || (1 != $data['account'] && 4 != $data['account']))
if ((empty($data['user']) || $data['user'] == 0 || empty($data['account']) || (1 != $data['account'] && 4 != $data['account'])) && $checkUserAccess('edit.user') && $checkUserAccess('edit.account'))
{
// if not a linked account, then no user can be set
$data['user'] = '';
@ -1468,7 +1690,7 @@ class MembersmanagerModelMember extends JModelAdmin
// get a token
$token = call_user_func(function($data) {
// get the name of this member
if ((1 == $data['account'] || 4 == $data['account']) && isset($data['user']) && $data['user'] > 0)
if (isset($data['account']) && (1 == $data['account'] || 4 == $data['account']) && isset($data['user']) && $data['user'] > 0)
{
return JFactory::getUser($data['user'])->name;
}
@ -1483,12 +1705,29 @@ class MembersmanagerModelMember extends JModelAdmin
// make string safe
$data['token'] = MembersmanagerHelper::safeString(trim(implode(' ', $tokenArray), '-'), 'L', '-', false, false);
// get unique token
while (!MembersmanagerHelper::checkUnique($data['id'], 'token', $data['token'], 'member'))
while (!MembersmanagerHelper::checkUnique($id, 'token', $data['token'], 'member'))
{
$data['token'] = JString::increment($data['token'], 'dash');
}
}
// Set the type items to data.
if (isset($data['type']) && is_array($data['type']))
{
$type = new JRegistry;
$type->loadArray($data['type']);
$data['type'] = (string) $type;
}
// Also check permission since the value may be removed due to permissions
// Then we do not want to clear it out, but simple ignore the empty type
elseif (!isset($data['type'])
&& JFactory::getUser()->authorise('member.edit.type', 'com_membersmanager')
&& JFactory::getUser()->authorise('member.view.type', 'com_membersmanager'))
{
// Set the empty type to data
$data['type'] = '';
}
// Get the medium encryption key.
$mediumkey = MembersmanagerHelper::getCryptKey('medium');
// Get the encryption object

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -28,8 +28,7 @@ class MembersmanagerModelMembers extends JModelList
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.account','account',
'a.main_member','main_member',
'a.type','type'
'a.main_member','main_member'
);
}
@ -56,9 +55,6 @@ class MembersmanagerModelMembers extends JModelList
$main_member = $this->getUserStateFromRequest($this->context . '.filter.main_member', 'filter_main_member');
$this->setState('filter.main_member', $main_member);
$type = $this->getUserStateFromRequest($this->context . '.filter.type', 'filter_type');
$this->setState('filter.type', $type);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -118,6 +114,8 @@ class MembersmanagerModelMembers extends JModelList
{
$item->email = JFactory::getUser($item->user)->email;
}
// convert type
$item->type = MembersmanagerHelper::jsonToString($item->type, ', ', 'type', 'id', 'name');
}
}
@ -238,7 +236,7 @@ class MembersmanagerModelMembers extends JModelList
else
{
$search = $db->quote('%' . $db->escape($search) . '%');
$query->where('(a.name LIKE '.$search.' OR a.email LIKE '.$search.' OR a.account LIKE '.$search.' OR a.user LIKE '.$search.' OR a.token LIKE '.$search.' OR a.main_member LIKE '.$search.' OR a.useremail LIKE '.$search.' OR a.username LIKE '.$search.' OR a.surname LIKE '.$search.' OR a.type LIKE '.$search.')');
$query->where('(a.name LIKE '.$search.' OR a.email LIKE '.$search.' OR a.account LIKE '.$search.' OR a.user LIKE '.$search.' OR a.token LIKE '.$search.' OR a.main_member LIKE '.$search.' OR a.useremail LIKE '.$search.' OR a.username LIKE '.$search.' OR a.surname LIKE '.$search.')');
}
}
@ -252,11 +250,6 @@ class MembersmanagerModelMembers extends JModelList
{
$query->where('a.main_member = ' . $db->quote($db->escape($main_member)));
}
// Filter by type.
if ($type = $this->getState('filter.type'))
{
$query->where('a.type = ' . $db->quote($db->escape($type)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -416,7 +409,6 @@ class MembersmanagerModelMembers extends JModelList
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.account');
$id .= ':' . $this->getState('filter.main_member');
$id .= ':' . $this->getState('filter.type');
return parent::getStoreId($id);
}

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -81,6 +81,30 @@ class MembersmanagerModelType extends JModelAdmin
$item->metadata = $registry->toArray();
}
if (!empty($item->view_relationship))
{
// Convert the view_relationship field to an array.
$view_relationship = new Registry;
$view_relationship->loadString($item->view_relationship);
$item->view_relationship = $view_relationship->toArray();
}
if (!empty($item->edit_relationship))
{
// Convert the edit_relationship field to an array.
$edit_relationship = new Registry;
$edit_relationship->loadString($item->edit_relationship);
$item->edit_relationship = $edit_relationship->toArray();
}
if (!empty($item->type))
{
// Convert the type field to an array.
$type = new Registry;
$type->loadString($item->type);
$item->type = $type->toArray();
}
if (!empty($item->groups_target))
{
// JSON Decode groups_target.
@ -247,6 +271,114 @@ class MembersmanagerModelType extends JModelAdmin
$form->setFieldAttribute('groups_access', 'required', 'false');
}
}
// Modify the form based on Edit Add Relationship access controls.
if ($id != 0 && (!$user->authorise('type.edit.add_relationship', 'com_membersmanager.type.' . (int) $id))
|| ($id == 0 && !$user->authorise('type.edit.add_relationship', 'com_membersmanager')))
{
// Disable fields for display.
$form->setFieldAttribute('add_relationship', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('add_relationship', 'readonly', 'true');
// Disable radio button for display.
$class = $form->getFieldAttribute('add_relationship', 'class', '');
$form->setFieldAttribute('add_relationship', 'class', $class.' disabled no-click');
// If there is no value continue.
if (!$form->getValue('add_relationship'))
{
// Disable fields while saving.
$form->setFieldAttribute('add_relationship', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('add_relationship', 'required', 'false');
}
}
// Modify the form based on Edit Field Type access controls.
if ($id != 0 && (!$user->authorise('type.edit.field_type', 'com_membersmanager.type.' . (int) $id))
|| ($id == 0 && !$user->authorise('type.edit.field_type', 'com_membersmanager')))
{
// Disable fields for display.
$form->setFieldAttribute('field_type', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('field_type', 'readonly', 'true');
// If there is no value continue.
if (!$form->getValue('field_type'))
{
// Disable fields while saving.
$form->setFieldAttribute('field_type', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('field_type', 'required', 'false');
}
}
// Modify the form based on Edit Communicate access controls.
if ($id != 0 && (!$user->authorise('type.edit.communicate', 'com_membersmanager.type.' . (int) $id))
|| ($id == 0 && !$user->authorise('type.edit.communicate', 'com_membersmanager')))
{
// Disable fields for display.
$form->setFieldAttribute('communicate', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('communicate', 'readonly', 'true');
// Disable radio button for display.
$class = $form->getFieldAttribute('communicate', 'class', '');
$form->setFieldAttribute('communicate', 'class', $class.' disabled no-click');
// If there is no value continue.
if (!$form->getValue('communicate'))
{
// Disable fields while saving.
$form->setFieldAttribute('communicate', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('communicate', 'required', 'false');
}
}
// Modify the form based on Edit View Relationship access controls.
if ($id != 0 && (!$user->authorise('type.edit.view_relationship', 'com_membersmanager.type.' . (int) $id))
|| ($id == 0 && !$user->authorise('type.edit.view_relationship', 'com_membersmanager')))
{
// Disable fields for display.
$form->setFieldAttribute('view_relationship', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('view_relationship', 'readonly', 'true');
// If there is no value continue.
if (!$form->getValue('view_relationship'))
{
// Disable fields while saving.
$form->setFieldAttribute('view_relationship', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('view_relationship', 'required', 'false');
}
}
// Modify the form based on Edit Edit Relationship access controls.
if ($id != 0 && (!$user->authorise('type.edit.edit_relationship', 'com_membersmanager.type.' . (int) $id))
|| ($id == 0 && !$user->authorise('type.edit.edit_relationship', 'com_membersmanager')))
{
// Disable fields for display.
$form->setFieldAttribute('edit_relationship', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('edit_relationship', 'readonly', 'true');
// If there is no value continue.
if (!$form->getValue('edit_relationship'))
{
// Disable fields while saving.
$form->setFieldAttribute('edit_relationship', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('edit_relationship', 'required', 'false');
}
}
// Modify the form based on Edit Type access controls.
if ($id != 0 && (!$user->authorise('type.edit.type', 'com_membersmanager.type.' . (int) $id))
|| ($id == 0 && !$user->authorise('type.edit.type', 'com_membersmanager')))
{
// Disable fields for display.
$form->setFieldAttribute('type', 'disabled', 'true');
// Disable fields for display.
$form->setFieldAttribute('type', 'readonly', 'true');
// If there is no value continue.
if (!$form->getValue('type'))
{
// Disable fields while saving.
$form->setFieldAttribute('type', 'filter', 'unset');
// Disable fields while saving.
$form->setFieldAttribute('type', 'required', 'false');
}
}
// Only load these values if no id is found
if (0 == $id)
{
@ -424,6 +556,42 @@ class MembersmanagerModelType extends JModelAdmin
return $data;
}
/**
* Method to validate the form data.
*
* @param JForm $form The form to validate against.
* @param array $data The data to validate.
* @param string $group The name of the field group to validate.
*
* @return mixed Array of filtered data if valid, false otherwise.
*
* @see JFormRule
* @see JFilterInput
* @since 12.2
*/
public function validate($form, $data, $group = null)
{
// check if the not_required field is set
if (MembersmanagerHelper::checkString($data['not_required']))
{
$requiredFields = (array) explode(',',(string) $data['not_required']);
$requiredFields = array_unique($requiredFields);
// now change the required field attributes value
foreach ($requiredFields as $requiredField)
{
// make sure there is a string value
if (MembersmanagerHelper::checkString($requiredField))
{
// change to false
$form->setFieldAttribute($requiredField, 'required', 'false');
// also clear the data set
$data[$requiredField] = '';
}
}
}
return parent::validate($form, $data, $group);
}
/**
* Method to get the unique fields of this table.
*
@ -841,6 +1009,54 @@ class MembersmanagerModelType extends JModelAdmin
$data['metadata'] = (string) $metadata;
}
// Set the view_relationship items to data.
if (isset($data['view_relationship']) && is_array($data['view_relationship']))
{
$view_relationship = new JRegistry;
$view_relationship->loadArray($data['view_relationship']);
$data['view_relationship'] = (string) $view_relationship;
}
// Also check permission since the value may be removed due to permissions
// Then we do not want to clear it out, but simple ignore the empty view_relationship
elseif (!isset($data['view_relationship'])
&& JFactory::getUser()->authorise('type.edit.view_relationship', 'com_membersmanager'))
{
// Set the empty view_relationship to data
$data['view_relationship'] = '';
}
// Set the edit_relationship items to data.
if (isset($data['edit_relationship']) && is_array($data['edit_relationship']))
{
$edit_relationship = new JRegistry;
$edit_relationship->loadArray($data['edit_relationship']);
$data['edit_relationship'] = (string) $edit_relationship;
}
// Also check permission since the value may be removed due to permissions
// Then we do not want to clear it out, but simple ignore the empty edit_relationship
elseif (!isset($data['edit_relationship'])
&& JFactory::getUser()->authorise('type.edit.edit_relationship', 'com_membersmanager'))
{
// Set the empty edit_relationship to data
$data['edit_relationship'] = '';
}
// Set the type items to data.
if (isset($data['type']) && is_array($data['type']))
{
$type = new JRegistry;
$type->loadArray($data['type']);
$data['type'] = (string) $type;
}
// Also check permission since the value may be removed due to permissions
// Then we do not want to clear it out, but simple ignore the empty type
elseif (!isset($data['type'])
&& JFactory::getUser()->authorise('type.edit.type', 'com_membersmanager'))
{
// Set the empty type to data
$data['type'] = '';
}
// Set the groups_target string to JSON string.
if (isset($data['groups_target']))
{

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -27,7 +27,8 @@ class MembersmanagerModelTypes extends JModelList
'a.ordering','ordering',
'a.created_by','created_by',
'a.modified_by','modified_by',
'a.name','name'
'a.name','name',
'a.add_relationship','add_relationship'
);
}
@ -51,6 +52,9 @@ class MembersmanagerModelTypes extends JModelList
$name = $this->getUserStateFromRequest($this->context . '.filter.name', 'filter_name');
$this->setState('filter.name', $name);
$add_relationship = $this->getUserStateFromRequest($this->context . '.filter.add_relationship', 'filter_add_relationship');
$this->setState('filter.add_relationship', $add_relationship);
$sorting = $this->getUserStateFromRequest($this->context . '.filter.sorting', 'filter_sorting', 0, 'int');
$this->setState('filter.sorting', $sorting);
@ -141,10 +145,44 @@ class MembersmanagerModelTypes extends JModelList
}
}
// set selection value to a translatable value
if (MembersmanagerHelper::checkArray($items))
{
foreach ($items as $nr => &$item)
{
// convert add_relationship
$item->add_relationship = $this->selectionTranslation($item->add_relationship, 'add_relationship');
}
}
// return items
return $items;
}
/**
* Method to convert selection values to translatable string.
*
* @return translatable string
*/
public function selectionTranslation($value,$name)
{
// Array of add_relationship language strings
if ($name === 'add_relationship')
{
$add_relationshipArray = array(
1 => 'COM_MEMBERSMANAGER_TYPE_YES',
0 => 'COM_MEMBERSMANAGER_TYPE_NO'
);
// Now check if value is found in this array
if (isset($add_relationshipArray[$value]) && MembersmanagerHelper::checkString($add_relationshipArray[$value]))
{
return $add_relationshipArray[$value];
}
}
return $value;
}
/**
* Method to build an SQL query to load the list data.
*
@ -204,6 +242,11 @@ class MembersmanagerModelTypes extends JModelList
}
}
// Filter by Add_relationship.
if ($add_relationship = $this->getState('filter.add_relationship'))
{
$query->where('a.add_relationship = ' . $db->quote($db->escape($add_relationship)));
}
// Add the list ordering clause.
$orderCol = $this->state->get('list.ordering', 'a.id');
@ -330,6 +373,7 @@ class MembersmanagerModelTypes extends JModelList
$id .= ':' . $this->getState('filter.created_by');
$id .= ':' . $this->getState('filter.modified_by');
$id .= ':' . $this->getState('filter.name');
$id .= ':' . $this->getState('filter.add_relationship');
return parent::getStoreId($id);
}

View File

@ -10,7 +10,7 @@ CREATE TABLE IF NOT EXISTS `#__membersmanager_member` (
`profile_image` TEXT NOT NULL,
`surname` CHAR(255) NOT NULL DEFAULT '',
`token` VARCHAR(255) NOT NULL DEFAULT '',
`type` INT(11) NOT NULL DEFAULT 0,
`type` TEXT NOT NULL,
`user` INT(11) NOT NULL DEFAULT 0,
`useremail` VARCHAR(255) NOT NULL DEFAULT '',
`username` VARCHAR(255) NOT NULL DEFAULT '',
@ -41,11 +41,17 @@ CREATE TABLE IF NOT EXISTS `#__membersmanager_member` (
CREATE TABLE IF NOT EXISTS `#__membersmanager_type` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`asset_id` INT(10) unsigned NOT NULL DEFAULT 0 COMMENT 'FK to the #__assets table.',
`add_relationship` TINYINT(1) NOT NULL DEFAULT 0,
`alias` CHAR(64) NOT NULL DEFAULT '',
`communicate` TINYINT(1) NOT NULL DEFAULT 0,
`description` TEXT NOT NULL,
`edit_relationship` TEXT NOT NULL,
`field_type` TINYINT(1) NOT NULL DEFAULT 1,
`groups_access` TEXT NOT NULL,
`groups_target` TEXT NOT NULL,
`name` VARCHAR(255) NOT NULL DEFAULT '',
`type` TEXT NOT NULL,
`view_relationship` TEXT NOT NULL,
`params` text NOT NULL DEFAULT '',
`published` TINYINT(3) NOT NULL DEFAULT 1,
`created_by` INT(10) unsigned NOT NULL DEFAULT 0,
@ -65,9 +71,23 @@ CREATE TABLE IF NOT EXISTS `#__membersmanager_type` (
KEY `idx_modifiedby` (`modified_by`),
KEY `idx_state` (`published`),
KEY `idx_name` (`name`),
KEY `idx_add_relationship` (`add_relationship`),
KEY `idx_field_type` (`field_type`),
KEY `idx_communicate` (`communicate`),
KEY `idx_alias` (`alias`)
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__membersmanager_type_map` (
`member` INT(11) NOT NULL DEFAULT 0,
`type` INT(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__membersmanager_relation_map` (
`relation` INT(11) NOT NULL DEFAULT 0,
`member` INT(11) NOT NULL DEFAULT 0,
`type` INT(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
--

View File

@ -1,2 +1,4 @@
DROP TABLE IF EXISTS `#__membersmanager_member`;
DROP TABLE IF EXISTS `#__membersmanager_type`;
DROP TABLE IF EXISTS `#__membersmanager_type_map`;
DROP TABLE IF EXISTS `#__membersmanager_relation_map`;

View File

@ -0,0 +1 @@
ALTER TABLE `#__membersmanager_member` CHANGE `type` `type` VARCHAR(255) NOT NULL DEFAULT '';

View File

@ -0,0 +1 @@
ALTER TABLE `#__membersmanager_member` CHANGE `type` `type` TEXT NOT NULL;

View File

@ -0,0 +1,3 @@
ALTER TABLE `#__membersmanager_type` ADD `add_relationship` TINYINT(1) NOT NULL DEFAULT 0 AFTER `asset_id`;
ALTER TABLE `#__membersmanager_type` ADD `type` TEXT NOT NULL AFTER `name`;

View File

@ -0,0 +1,14 @@
ALTER TABLE `#__membersmanager_type` ADD `communicate` TINYINT(1) NOT NULL DEFAULT 0 AFTER `alias`;
ALTER TABLE `#__membersmanager_type` ADD `field_type` TINYINT(1) NOT NULL DEFAULT 1 AFTER `description`;
CREATE TABLE IF NOT EXISTS `#__membersmanager_type_map` (
`member` INT(11) NOT NULL DEFAULT 0,
`type` INT(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
CREATE TABLE IF NOT EXISTS `#__membersmanager_relation_map` (
`relation` INT(11) NOT NULL DEFAULT 0,
`member` INT(11) NOT NULL DEFAULT 0,
`type` INT(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

View File

@ -0,0 +1,3 @@
ALTER TABLE `#__membersmanager_type` ADD `edit_relationship` TEXT NOT NULL AFTER `description`;
ALTER TABLE `#__membersmanager_type` ADD `view_relationship` TEXT NOT NULL AFTER `type`;

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -220,7 +220,7 @@ class MembersmanagerTableMember extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -220,7 +220,7 @@ class MembersmanagerTableType extends JTable
{
// asset alread set so use saved rules
$assetId = (int) $db->loadResult();
return JAccess::getAssetRules($assetId);
return JAccess::getAssetRules($assetId); // (TODO) instead of keeping inherited Allowed it becomes Allowed.
}
// try again
elseif ($try)

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -306,11 +306,6 @@ jQuery('#adminForm').on('change', '#jform_account',function (e)
<?php else: ?>
jQuery('#error-profile-image-uploader').html('<b><?php echo JText::_('COM_MEMBERSMANAGER_ALLOWED_IMAGE_FORMATS_ARE_NOT_SET_IN_THE_GLOBAL_SETTINGS_PLEASE_NOTIFY_YOUR_SYSTEM_ADMINISTRATOR'); ?></b>');
<?php endif; ?>
jQuery(document).ready(function(){
jQuery(window).load(function () {
jQuery("body").css('background', 'transparent');
});
});
jQuery('#adminForm').on('change', '#jform_token',function (e) {
e.preventDefault();
var tokenValue = jQuery('#jform_token').val();
@ -323,12 +318,6 @@ jQuery('#adminForm').on('change', '#jform_user',function (e) {
// check if this token value is used
getUserDetails(userValue);
});
jQuery('#adminForm').on('change', '#contact_country',function (e) {
e.preventDefault();
getRegion();
});
var select_a_region = '<?php echo JText::_('COM_MEMBERSMANAGER_SELECT_A_REGION'); ?>';
var create_a_region = '<?php echo JText::_('COM_MEMBERSMANAGER_CREATE_A_REGION'); ?>';
<?php
$app = JFactory::getApplication();

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -223,14 +223,14 @@ class MembersmanagerViewMember extends JViewLegacy
if ($isAdmin || $uikit != 3)
{
// add JavaScripts
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/uikit' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/uikit' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
}
// add JavaScripts
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/accordion' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/tooltip' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/lightbox' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/notify' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/upload' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/css');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/accordion' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/tooltip' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/lightbox' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/notify' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
$this->document->addScript( JURI::root(true) .'/media/com_membersmanager/uikit-v2/js/components/upload' . $size . '.js', (MembersmanagerHelper::jVersion()->isCompatible('3.8.0')) ? array('version' => 'auto') : 'text/javascript');
}
// Use Uikit Version 3
elseif (3 == $this->uikitVersion && ($isAdmin || $uikit != 2))

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -88,11 +88,7 @@ $edit = "index.php?option=com_membersmanager&view=members&task=member.edit";
</td>
<td class="hidden-phone">
<div>
<?php if ($this->user->authorise('type.edit', 'com_membersmanager.type.' . (int)$item->type)): ?>
<a href="index.php?option=com_membersmanager&view=types&task=type.edit&id=<?php echo $item->type; ?>&ref=members"><?php echo $this->escape($item->type_name); ?></a>
<?php else: ?>
<?php echo $this->escape($item->type_name); ?>
<?php endif; ?>: <b>
<?php echo $this->escape($item->type); ?>: <b>
<?php echo JText::_($item->account); ?></b><br />
<em>
<?php echo $this->escape($item->token); ?></em>

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -37,6 +37,8 @@ class MembersmanagerViewMembers extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = MembersmanagerHelper::getActions('member');
$this->canEdit = $this->canDo->get('member.edit');
@ -227,28 +229,6 @@ class MembersmanagerViewMembers extends JViewLegacy
);
}
}
// Set Type Name Selection
$this->typeNameOptions = JFormHelper::loadFieldType('Types')->options;
if ($this->typeNameOptions)
{
// Type Name Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_MEMBERSMANAGER_MEMBER_TYPE_LABEL').' -',
'filter_type',
JHtml::_('select.options', $this->typeNameOptions, 'value', 'text', $this->state->get('filter.type'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// Type Name Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_MEMBERSMANAGER_MEMBER_TYPE_LABEL').' -',
'batch[type]',
JHtml::_('select.options', $this->typeNameOptions, 'value', 'text')
);
}
}
}
/**

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -65,6 +65,17 @@ $componentParams = $this->params; // will be removed just use $this->params inst
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php echo JHtml::_('bootstrap.addTab', 'typeTab', 'advance', JText::_('COM_MEMBERSMANAGER_TYPE_ADVANCE', true)); ?>
<div class="row-fluid form-horizontal-desktop">
<div class="span6">
<?php echo JLayoutHelper::render('type.advance_left', $this); ?>
</div>
<div class="span6">
<?php echo JLayoutHelper::render('type.advance_right', $this); ?>
</div>
</div>
<?php echo JHtml::_('bootstrap.endTab'); ?>
<?php $this->ignore_fieldsets = array('details','metadata','vdmmetadata','accesscontrol'); ?>
<?php $this->tab_name = 'typeTab'; ?>
<?php echo JLayoutHelper::render('joomla.edit.params', $this); ?>
@ -111,3 +122,22 @@ $componentParams = $this->params; // will be removed just use $this->params inst
</div>
</form>
</div>
<script type="text/javascript">
// #jform_add_relationship listeners for add_relationship_vvvvvvy function
jQuery('#jform_add_relationship').on('keyup',function()
{
var add_relationship_vvvvvvy = jQuery("#jform_add_relationship input[type='radio']:checked").val();
vvvvvvy(add_relationship_vvvvvvy);
});
jQuery('#adminForm').on('change', '#jform_add_relationship',function (e)
{
e.preventDefault();
var add_relationship_vvvvvvy = jQuery("#jform_add_relationship input[type='radio']:checked").val();
vvvvvvy(add_relationship_vvvvvvy);
});
</script>

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -81,6 +81,9 @@ $edit = "index.php?option=com_membersmanager&view=types&task=type.edit";
<td class="hidden-phone">
<?php echo $this->escape($item->groups_access); ?>
</td>
<td class="hidden-phone">
<?php echo JText::_($item->add_relationship); ?>
</td>
<td class="center">
<?php if ($canDo->get('type.edit.state')) : ?>
<?php if ($item->checked_out) : ?>

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -14,5 +14,5 @@ defined('_JEXEC') or die('Restricted access');
?>
<tr>
<td colspan="8"><?php echo $this->pagination->getListFooter(); ?></td>
<td colspan="9"><?php echo $this->pagination->getListFooter(); ?></td>
</tr>

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -41,6 +41,9 @@ defined('_JEXEC') or die('Restricted access');
<th class="nowrap hidden-phone" >
<?php echo JText::_('COM_MEMBERSMANAGER_TYPE_GROUPS_ACCESS_LABEL'); ?>
</th>
<th class="nowrap hidden-phone" >
<?php echo JText::_('COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_LABEL'); ?>
</th>
<?php if ($this->canState): ?>
<th width="10" class="nowrap center" >
<?php echo JHtml::_('grid.sort', 'COM_MEMBERSMANAGER_TYPE_STATUS', 'published', $this->listDirn, $this->listOrder); ?>

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -37,6 +37,8 @@ class MembersmanagerViewTypes extends JViewLegacy
$this->listOrder = $this->escape($this->state->get('list.ordering'));
$this->listDirn = $this->escape($this->state->get('list.direction'));
$this->saveOrder = $this->listOrder == 'ordering';
// set the return here value
$this->return_here = urlencode(base64_encode((string) JUri::getInstance()));
// get global action permissions
$this->canDo = MembersmanagerHelper::getActions('type');
$this->canEdit = $this->canDo->get('type.edit');
@ -183,6 +185,28 @@ class MembersmanagerViewTypes extends JViewLegacy
JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text')
);
}
// Set Add Relationship Selection
$this->add_relationshipOptions = $this->getTheAdd_relationshipSelections();
if ($this->add_relationshipOptions)
{
// Add Relationship Filter
JHtmlSidebar::addFilter(
'- Select '.JText::_('COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_LABEL').' -',
'filter_add_relationship',
JHtml::_('select.options', $this->add_relationshipOptions, 'value', 'text', $this->state->get('filter.add_relationship'))
);
if ($this->canBatch && $this->canCreate && $this->canEdit)
{
// Add Relationship Batch Selection
JHtmlBatch_::addListSelection(
'- Keep Original '.JText::_('COM_MEMBERSMANAGER_TYPE_ADD_RELATIONSHIP_LABEL').' -',
'batch[add_relationship]',
JHtml::_('select.options', $this->add_relationshipOptions, 'value', 'text')
);
}
}
}
/**
@ -232,4 +256,40 @@ class MembersmanagerViewTypes extends JViewLegacy
'a.id' => JText::_('JGRID_HEADING_ID')
);
}
protected function getTheAdd_relationshipSelections()
{
// Get a db connection.
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select the text.
$query->select($db->quoteName('add_relationship'));
$query->from($db->quoteName('#__membersmanager_type'));
$query->order($db->quoteName('add_relationship') . ' ASC');
// Reset the query using our newly populated query object.
$db->setQuery($query);
$results = $db->loadColumn();
if ($results)
{
// get model
$model = $this->getModel();
$results = array_unique($results);
$_filter = array();
foreach ($results as $add_relationship)
{
// Translate the add_relationship selection
$text = $model->selectionTranslation($add_relationship,'add_relationship');
// Now add the add_relationship and its text to the options array
$_filter[] = JHtml::_('select.option', $add_relationship, JText::_($text));
}
return $_filter;
}
return false;
}
}

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,20 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.2" method="upgrade">
<name>COM_MEMBERSMANAGER</name>
<creationDate>26th September, 2018</creationDate>
<creationDate>27th December, 2018</creationDate>
<author>Llewellyn van der Merwe</author>
<authorEmail>llewellyn@joomlacomponentbuilder.com</authorEmail>
<authorUrl>https://www.joomlacomponentbuilder.com/</authorUrl>
<copyright>Copyright (C) 2015. All Rights Reserved</copyright>
<license>GNU/GPL Version 2 or later - http://www.gnu.org/licenses/gpl-2.0.html</license>
<version>2.0.1</version>
<version>2.0.6</version>
<description><![CDATA[
<h1>Members Manager (v.2.0.1)</h1>
<h1>Members Manager (v.2.0.6)</h1>
<div style="clear: both;"></div>
<p>A [Members manager](https://github.com/vdm-io/Joomla-Members-Manager) to use as a base for any kind of project that needs user integration. You can with much ease adapt it using the [JCB package](https://github.com/vdm-io/JCB-Community-Packages/raw/master/JCB_membersManager.zip).
Watch this [tutorial](https://youtu.be/lkE0ZiSWufg) to see how.</p>
<p>Created by <a href="https://www.joomlacomponentbuilder.com/" target="_blank">Llewellyn van der Merwe</a><br /><small>Development started 6th September, 2015</small></p>
<p>Created by <a href="https://www.joomlacomponentbuilder.com/" target="_blank">Llewellyn van der Merwe</a><br /><small>Development started 6th July, 2018</small></p>
]]></description>
<!-- Runs on install; New in Joomla 1.5 -->

View File

@ -152,4 +152,89 @@
<maintainerurl>https://www.joomlacomponentbuilder.com/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Members Manager</name>
<description>Members Manager</description>
<element>com_membersmanager</element>
<type>component</type>
<version>2.0.2</version>
<infourl title="Members Manager!">https://www.joomlacomponentbuilder.com/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Members-Manager/releases/download/v2.0.6/JMM_v2.0.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://www.joomlacomponentbuilder.com/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Members Manager</name>
<description>Members Manager</description>
<element>com_membersmanager</element>
<type>component</type>
<version>2.0.3</version>
<infourl title="Members Manager!">https://www.joomlacomponentbuilder.com/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Members-Manager/releases/download/v2.0.6/JMM_v2.0.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://www.joomlacomponentbuilder.com/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Members Manager</name>
<description>Members Manager</description>
<element>com_membersmanager</element>
<type>component</type>
<version>2.0.4</version>
<infourl title="Members Manager!">https://www.joomlacomponentbuilder.com/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Members-Manager/releases/download/v2.0.6/JMM_v2.0.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://www.joomlacomponentbuilder.com/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Members Manager</name>
<description>Members Manager</description>
<element>com_membersmanager</element>
<type>component</type>
<version>2.0.5</version>
<infourl title="Members Manager!">https://www.joomlacomponentbuilder.com/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Members-Manager/releases/download/v2.0.6/JMM_v2.0.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://www.joomlacomponentbuilder.com/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
<update>
<name>Members Manager</name>
<description>Members Manager</description>
<element>com_membersmanager</element>
<type>component</type>
<version>2.0.6</version>
<infourl title="Members Manager!">https://www.joomlacomponentbuilder.com/</infourl>
<downloads>
<downloadurl type="full" format="zip">https://github.com/vdm-io/Joomla-Members-Manager/releases/download/v2.0.6/JMM_v2.0.6.zip</downloadurl>
</downloads>
<tags>
<tag>stable</tag>
</tags>
<maintainer>Llewellyn van der Merwe</maintainer>
<maintainerurl>https://www.joomlacomponentbuilder.com/</maintainerurl>
<targetplatform name="joomla" version="3.*"/>
</update>
</updates>

View File

@ -2,7 +2,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved
@ -42,6 +42,168 @@ class com_membersmanagerInstallerScript
// Get The Database object
$db = JFactory::getDbo();
// Create a new query object.
$query = $db->getQuery(true);
// Select ids from fields
$query->select($db->quoteName('id'));
$query->from($db->quoteName('#__fields'));
// Where member context is found
$query->where( $db->quoteName('context') . ' = '. $db->quote('com_membersmanager.member') );
$db->setQuery($query);
// Execute query to see if context is found
$db->execute();
$member_found = $db->getNumRows();
// Now check if there were any rows
if ($member_found)
{
// Since there are load the needed member field ids
$member_field_ids = $db->loadColumn();
// Remove member from the field table
$member_condition = array( $db->quoteName('context') . ' = '. $db->quote('com_membersmanager.member') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__fields'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$member_done = $db->execute();
if ($member_done)
{
// If succesfully remove member add queued success message.
$app->enqueueMessage(JText::_('The fields with type (com_membersmanager.member) context was removed from the <b>#__fields</b> table'));
}
// Also Remove member field values
$member_condition = array( $db->quoteName('field_id') . ' IN ('. implode(',', $member_field_ids) .')');
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__fields_values'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member field values
$member_done = $db->execute();
if ($member_done)
{
// If succesfully remove member add queued success message.
$app->enqueueMessage(JText::_('The fields values for member was removed from the <b>#__fields_values</b> table'));
}
}
// Create a new query object.
$query = $db->getQuery(true);
// Select ids from field groups
$query->select($db->quoteName('id'));
$query->from($db->quoteName('#__fields_groups'));
// Where member context is found
$query->where( $db->quoteName('context') . ' = '. $db->quote('com_membersmanager.member') );
$db->setQuery($query);
// Execute query to see if context is found
$db->execute();
$member_found = $db->getNumRows();
// Now check if there were any rows
if ($member_found)
{
// Remove member from the field groups table
$member_condition = array( $db->quoteName('context') . ' = '. $db->quote('com_membersmanager.member') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__fields_groups'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$member_done = $db->execute();
if ($member_done)
{
// If succesfully remove member add queued success message.
$app->enqueueMessage(JText::_('The field groups with type (com_membersmanager.member) context was removed from the <b>#__fields_groups</b> table'));
}
}
// Create a new query object.
$query = $db->getQuery(true);
// Select id from content type table
$query->select($db->quoteName('type_id'));
$query->from($db->quoteName('#__content_types'));
// Where member alias is found
$query->where( $db->quoteName('type_alias') . ' = '. $db->quote('com_membersmanager.member') );
$db->setQuery($query);
// Execute query to see if alias is found
$db->execute();
$member_found = $db->getNumRows();
// Now check if there were any rows
if ($member_found)
{
// Since there are load the needed member type ids
$member_ids = $db->loadColumn();
// Remove member from the content type table
$member_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_membersmanager.member') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__content_types'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$member_done = $db->execute();
if ($member_done)
{
// If succesfully remove member add queued success message.
$app->enqueueMessage(JText::_('The (com_membersmanager.member) type alias was removed from the <b>#__content_type</b> table'));
}
// Remove member items from the contentitem tag map table
$member_condition = array( $db->quoteName('type_alias') . ' = '. $db->quote('com_membersmanager.member') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__contentitem_tag_map'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$member_done = $db->execute();
if ($member_done)
{
// If succesfully remove member add queued success message.
$app->enqueueMessage(JText::_('The (com_membersmanager.member) type alias was removed from the <b>#__contentitem_tag_map</b> table'));
}
// Remove member items from the ucm content table
$member_condition = array( $db->quoteName('core_type_alias') . ' = ' . $db->quote('com_membersmanager.member') );
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_content'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$member_done = $db->execute();
if ($member_done)
{
// If succesfully remove member add queued success message.
$app->enqueueMessage(JText::_('The (com_membersmanager.member) type alias was removed from the <b>#__ucm_content</b> table'));
}
// Make sure that all the member items are cleared from DB
foreach ($member_ids as $member_id)
{
// Remove member items from the ucm base table
$member_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $member_id);
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_base'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$db->execute();
// Remove member items from the ucm history table
$member_condition = array( $db->quoteName('ucm_type_id') . ' = ' . $member_id);
// Create a new query object.
$query = $db->getQuery(true);
$query->delete($db->quoteName('#__ucm_history'));
$query->where($member_condition);
$db->setQuery($query);
// Execute the query to remove member items
$db->execute();
}
}
// Create a new query object.
$query = $db->getQuery(true);
// Select id from content type table
@ -305,7 +467,7 @@ class com_membersmanagerInstallerScript
$member->table = '{"special": {"dbtable": "#__membersmanager_member","key": "id","type": "Member","prefix": "membersmanagerTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$member->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","email":"email","account":"account","user":"user","token":"token","profile_image":"profile_image","not_required":"not_required","main_member":"main_member","password_check":"password_check","password":"password","useremail":"useremail","username":"username","surname":"surname","type":"type"}}';
$member->router = 'MembersmanagerHelperRoute::getMemberRoute';
$member->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/member.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","profile_image","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","account","user","main_member","type"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_member","targetTable": "#__membersmanager_member","targetColumn": "id","displayColumn": "user"},{"sourceColumn": "type","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"}]}';
$member->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/member.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","profile_image","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","account","user","main_member"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_member","targetTable": "#__membersmanager_member","targetColumn": "id","displayColumn": "user"},{"sourceColumn": "type","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$member_Inserted = $db->insertObject('#__content_types', $member);
@ -315,9 +477,9 @@ class com_membersmanagerInstallerScript
$type->type_title = 'Membersmanager Type';
$type->type_alias = 'com_membersmanager.type';
$type->table = '{"special": {"dbtable": "#__membersmanager_type","key": "id","type": "Type","prefix": "membersmanagerTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$type->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","groups_target":"groups_target","groups_access":"groups_access","alias":"alias"}}';
$type->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","groups_target":"groups_target","groups_access":"groups_access","add_relationship":"add_relationship","field_type":"field_type","communicate":"communicate","view_relationship":"view_relationship","edit_relationship":"edit_relationship","type":"type","alias":"alias"}}';
$type->router = 'MembersmanagerHelperRoute::getTypeRoute';
$type->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/type.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
$type->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/type.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_relationship","field_type","communicate"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "view_relationship","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "edit_relationship","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "type","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"}]}';
// Set the object into the content types table.
$type_Inserted = $db->insertObject('#__content_types', $type);
@ -327,7 +489,7 @@ class com_membersmanagerInstallerScript
$query = $db->getQuery(true);
// Field to update.
$fields = array(
$db->quoteName('rules') . ' = ' . $db->quote('{"site.cpanel.access":{"1":1}}'),
$db->quoteName('rules') . ' = ' . $db->quote('{"site.members.access":{"1":1}}'),
);
// Condition.
$conditions = array(
@ -341,7 +503,7 @@ class com_membersmanagerInstallerScript
$query = $db->getQuery(true);
// Field to update.
$fields = array(
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","crop_profile":"1","profile_height":"300","profile_width":"200","dynamic_salt":"1->!,3->E,4->A,6->b,9->d","country":"Namibia","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_version":"2","uikit_load":"1","uikit_min":"","uikit_style":""}'),
$db->quoteName('params') . ' = ' . $db->quote('{"autorName":"Llewellyn van der Merwe","autorEmail":"llewellyn@joomlacomponentbuilder.com","placeholder_prefix":"member","members_display_type":"1","many_components":"0","crop_profile":"1","profile_height":"300","profile_width":"200","dynamic_salt":"1->!,3->E,4->A,6->b,9->d","country":"Namibia","check_in":"-1 day","save_history":"1","history_limit":"10","uikit_version":"2","uikit_load":"1","uikit_min":"","uikit_style":""}'),
);
// Condition.
$conditions = array(
@ -369,7 +531,7 @@ class com_membersmanagerInstallerScript
$member->table = '{"special": {"dbtable": "#__membersmanager_member","key": "id","type": "Member","prefix": "membersmanagerTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$member->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "null","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","email":"email","account":"account","user":"user","token":"token","profile_image":"profile_image","not_required":"not_required","main_member":"main_member","password_check":"password_check","password":"password","useremail":"useremail","username":"username","surname":"surname","type":"type"}}';
$member->router = 'MembersmanagerHelperRoute::getMemberRoute';
$member->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/member.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","profile_image","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","account","user","main_member","type"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_member","targetTable": "#__membersmanager_member","targetColumn": "id","displayColumn": "user"},{"sourceColumn": "type","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"}]}';
$member->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/member.xml","hideFields": ["asset_id","checked_out","checked_out_time","version","profile_image","not_required"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","account","user","main_member"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "user","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "main_member","targetTable": "#__membersmanager_member","targetColumn": "id","displayColumn": "user"},{"sourceColumn": "type","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"}]}';
// Check if member type is already in content_type DB.
$member_id = null;
@ -396,9 +558,9 @@ class com_membersmanagerInstallerScript
$type->type_title = 'Membersmanager Type';
$type->type_alias = 'com_membersmanager.type';
$type->table = '{"special": {"dbtable": "#__membersmanager_type","key": "id","type": "Type","prefix": "membersmanagerTable","config": "array()"},"common": {"dbtable": "#__ucm_content","key": "ucm_id","type": "Corecontent","prefix": "JTable","config": "array()"}}';
$type->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","groups_target":"groups_target","groups_access":"groups_access","alias":"alias"}}';
$type->field_mappings = '{"common": {"core_content_item_id": "id","core_title": "name","core_state": "published","core_alias": "alias","core_created_time": "created","core_modified_time": "modified","core_body": "null","core_hits": "hits","core_publish_up": "null","core_publish_down": "null","core_access": "access","core_params": "params","core_featured": "null","core_metadata": "null","core_language": "null","core_images": "null","core_urls": "null","core_version": "version","core_ordering": "ordering","core_metakey": "null","core_metadesc": "null","core_catid": "null","core_xreference": "null","asset_id": "asset_id"},"special": {"name":"name","description":"description","groups_target":"groups_target","groups_access":"groups_access","add_relationship":"add_relationship","field_type":"field_type","communicate":"communicate","view_relationship":"view_relationship","edit_relationship":"edit_relationship","type":"type","alias":"alias"}}';
$type->router = 'MembersmanagerHelperRoute::getTypeRoute';
$type->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/type.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"}]}';
$type->content_history_options = '{"formFile": "administrator/components/com_membersmanager/models/forms/type.xml","hideFields": ["asset_id","checked_out","checked_out_time","version"],"ignoreChanges": ["modified_by","modified","checked_out","checked_out_time","version","hits"],"convertToInt": ["published","ordering","add_relationship","field_type","communicate"],"displayLookup": [{"sourceColumn": "created_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "access","targetTable": "#__viewlevels","targetColumn": "id","displayColumn": "title"},{"sourceColumn": "modified_by","targetTable": "#__users","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "view_relationship","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "edit_relationship","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"},{"sourceColumn": "type","targetTable": "#__membersmanager_type","targetColumn": "id","displayColumn": "name"}]}';
// Check if type type is already in content_type DB.
$type_id = null;
@ -424,7 +586,7 @@ class com_membersmanagerInstallerScript
echo '<a target="_blank" href="https://www.joomlacomponentbuilder.com/" title="Members Manager">
<img src="components/com_membersmanager/assets/images/vdm-component.jpg"/>
</a>
<h3>Upgrade to Version 2.0.1 Was Successful! Let us know if anything is not working as expected.</h3>';
<h3>Upgrade to Version 2.0.6 Was Successful! Let us know if anything is not working as expected.</h3>';
}
}
}

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -0,0 +1,13 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @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 */

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

View File

@ -1,7 +1,7 @@
/**
* @package Joomla.Members.Manager
*
* @created 6th September, 2015
* @created 6th July, 2018
* @author Llewellyn van der Merwe <https://www.joomlacomponentbuilder.com/>
* @github Joomla Members Manager <https://github.com/vdm-io/Joomla-Members-Manager>
* @copyright Copyright (C) 2015. All Rights Reserved

Some files were not shown because too many files have changed in this diff Show More