<?xml version="1.0" encoding="utf-8"?>
<extension version="3.4" type="plugin" group="user" method="upgrade">
	<name>PLG_USER_TM_MAILCHIMPUSERAUTOADD</name>
	<description>PLG_USER_TM_MAILCHIMPUSERAUTOADD_DESC</description>
	<version>5.0.8</version>
	<creationDate>November 2015</creationDate>
	<author>Tassos Marinos</author>
	<authorEmail>info@tassos.gr</authorEmail>
	<authorUrl>http://www.tassos.gr</authorUrl>
	<copyright>Copyright © 2021 Tassos Marinos All Rights Reserved</copyright>
	<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL</license>
	<scriptfile>script.install.php</scriptfile>
	<files>
		<filename plugin="tm_mailchimpuserautoadd">tm_mailchimpuserautoadd.php</filename>
		<filename>script.install.helper.php</filename>
		<folder>language</folder>
		<folder>fields</folder>
		<folder>helpers</folder>
	</files>
    <updateservers>
        <server type="extension" priority="1" name="MailChimp Auto-Subscribe">
        	https://www.tassos.gr/updates/mailchimp-auto-subscribe-pro.xml
        </server>
    </updateservers>
	<config>
		<fields name="params">
			<fieldset name="basic" addfieldpath="plugins/system/nrframework/fields">
				<field name="include" type="nr_freetext"
					path="/plugins/user/tm_mailchimpuserautoadd/helpers"
					file="dashboard"/>
			</fieldset>
			<fieldset name="settings" label="Settings" addfieldpath="/plugins/user/tm_mailchimpuserautoadd/fields/">
				<field name="apikey" type="nrtext"
					label="MCS_API_KEY" 
					description="MCS_API_KEY_DESC"
					size="50" 
					class="input-xlarge"
					required="true"
		            urltext="JHELP"
		            url="https://www.tassos.gr/joomla-extensions/mailchimp-auto-subscribe/docs/getting-started"
				/>
				<field name="list" type="nrtext"
					label="MCS_LISTID"
					description="MCS_LISTID_DESC"
					size="50"
					class="input-xlarge"
					required="true"
					urltext="JHELP"
					url="https://www.tassos.gr/joomla-extensions/mailchimp-auto-subscribe/docs/getting-started"
				/>
				<field name="multilist" type="list"
					label="MCS_MULTI_LIST"
					description="MCS_MULTI_LIST_DESC"
					default="0"
					class="input-xlarge">
					<option value="0">JDISABLED</option>
					<option value="perlang">MCS_PER_LANGUAGE</option>
				</field>			
				<field name="fields" type="subform"
					label="MAS_FIELDS"
					description="MAS_FIELDS_DESC"
		            multiple="true"
		            buttons="add,remove"
		            layout="joomla.form.field.subform.repeatable-table"
		            formsource="/plugins/user/tm_mailchimpuserautoadd/fields/datamap.xml"
					default='
					{
		                "fields0": {
		                  "value": "{user.name}",
		                  "key": "MERGE1"
		                }
		            }'>
		        </field>
				<field name="tags" type="text"
					label="MCS_TAGS"
					description="MCS_TAGS_DESC"
                	class="input-xlarge"
					hint="tag1, tag2, tag3"
				/>
				<field name="doubleoptin" type="nrtoggle"
					label="MCS_FRONT_OPT_IN"
					description="MCS_FRONT_OPT_IN_DESC"
					checked="1"
				/>
				<field name="consent_field" type="userfields"
					label="MAS_CONSENT_FIELD"
					description="MAS_CONSENT_FIELD_DESC"
					class="input-xlarge"
				/>
				<field name="testconnection" type="testconnection"
					label="MAS_TEST_CONNECTION"
					description="MAS_TEST_CONNECTION_DESC"
				/>
			</fieldset>
			<fieldset name="advanced">
				<field name="forceadd" type="nrtoggle"
					label="MCS_FORCE_ADD"
					description="MCS_FORCE_ADD_DESC"
				/>
				<field name="logging" type="Logging"
					label="MAS_LOGGING"
					description="MAS_LOGGING_DESC"
				/>
			</fieldset>
		</fields>
	</config>
	
	<!-- Watchful -->
    <variant>pro</variant>
</extension>


