<?php
/*
 You may not change or alter any portion of this comment or credits
 of supporting developers from this source code or any supporting source code
 which is considered copyrighted (c) material of the original comment or credit authors.

 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*/

/**
 * Contact module
 *
 * @copyright   The XOOPS Project http://sourceforge.net/projects/xoops/
 * @license     http://www.fsf.org/copyleft/gpl.html GNU public license
 * @author      Kazumi Ono (aka Onokazu)
 * @author      Trabis <lusopoemas@gmail.com>
 * @author      Hossein Azizabadi (AKA Voltan)
 * @author      Mirza (AKA Bleekk)
 */

if (!defined('XOOPS_ROOT_PATH')) {
    die('XOOPS root path not defined');
}

$moduleDirName = basename(__DIR__);

$modversion['name']           = _MI_CONTACT_NAME;
$modversion['version']        = 2.25;
$modversion['description']    = _MI_CONTACT_DESC;
$modversion['credits']        = 'The XOOPS Project, Mohtava Project';
$modversion['author']         = 'Kazumi Ono (Onokazu), Trabis, Voltan, Bleekk, Goffy, Mamba';
$modversion['nickname']       = '';
$modversion['help']           = 'page=help';
$modversion['license']        = 'GNU GPL 2.0';
$modversion['license_url']    = 'www.gnu.org/licenses/gpl-2.0.html';
$modversion['official']       = 2;
$modversion['image']          = 'assets/images/logoModule.png';
$modversion['dirname']        = basename(__DIR__);
$modversion['onUpdate']       = 'include/functions_update.php';
$modversion['dirmoduleadmin'] = 'Frameworks/moduleclasses';
$modversion['icons16']        = 'Frameworks/moduleclasses/icons/16';
$modversion['icons32']        = 'Frameworks/moduleclasses/icons/32';

// DB
$modversion['sqlfile']['mysql'] = 'sql/mysql.sql';
$modversion['tables'][0]        = 'contact';

//about
$modversion['module_website_url']  = 'http://www.xoops.org/';
$modversion['module_website_name'] = 'XOOPS';
$modversion['release_date']        = '2018/04/30';
$modversion['module_status']       = 'Final';
$modversion['author_website_url']  = 'http://www.xoops.org/';
$modversion['author_website_name'] = 'XOOPS';
$modversion['min_php']             = '5.5';
$modversion['min_xoops']           = '2.5.8';
$modversion['min_admin']           = '1.2';

//Admin things
$modversion['hasAdmin'] = 1;

// Menu
$modversion['hasMain']    = 1;
$modversion['adminindex'] = 'admin/index.php';
$modversion['adminmenu']  = 'admin/menu.php';

// Set to 1 if you want to display menu generated by system module
$modversion['system_menu'] = 1;

// Templates
$i                                          = 1;
$modversion['templates'][$i]['file']        = 'contact_index.tpl';
$modversion['templates'][$i]['description'] = '_MI_CONTACT_TEMPLATES';

// Blocks
$b                                          = 1;
$modversion['blocks'][$b]['file']        = 'block_contact_form_map.php';
$modversion['blocks'][$b]['name']        = _MI_B_CONTACT_FORM;
$modversion['blocks'][$b]['description'] = _MI_B_CONTACT_FORM_DESC;
$modversion['blocks'][$b]['show_func']   = 'block_contact_form_show';
$modversion['blocks'][$b]['options']     = '';
$modversion['blocks'][$b]['template']    = 'block_contact_form.tpl';
$b++;
$modversion['blocks'][$b]['file']        = 'block_contact_form_map.php';
$modversion['blocks'][$b]['name']        = _MI_B_CONTACT_MAP;
$modversion['blocks'][$b]['description'] = _MI_B_CONTACT_MAP_DESC;
$modversion['blocks'][$b]['show_func']   = 'block_contact_map_show';
$modversion['blocks'][$b]['options']     = '';
$modversion['blocks'][$b]['template']    = 'block_contact_map.tpl';
$b++;
$modversion['blocks'][$b]['file']        = 'block_contact_form_map.php';
$modversion['blocks'][$b]['name']        = _MI_B_CONTACT_FORM_MAP;
$modversion['blocks'][$b]['description'] = _MI_B_CONTACT_FORM_MAP_DESC;
$modversion['blocks'][$b]['show_func']   = 'block_contact_form_map_show';
$modversion['blocks'][$b]['options']     = '';
$modversion['blocks'][$b]['template']    = 'block_contact_form_map.tpl';

// Settings
$modversion['config'][] = array(
    'name'        => 'break',
    'title'       => '_MI_CONTACT_HEAD_CAPTCHA',
    'description' => '',
    'formtype'    => 'line_break',
    'valuetype'   => 'textbox',
    'default'     => 'head'
);

$modversion['config'][] = array(
    'name'        => 'recaptchause',
    'title'       => '_MI_CONTACT_FORM_RECAPTCHA_USE',
    'description' => '_MI_CONTACT_FORM_RECAPTCHA_USE_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'recaptchakey',
    'title'       => '_MI_CONTACT_FORM_RECAPTCHA_KEY',
    'description' => '_MI_CONTACT_FORM_RECAPTCHA_KEY_DESC',
    'formtype'    => 'textbox',
    'valuetype'   => 'text',
    'default'     => ''
);

$modversion['config'][] = array(
    'name'        => 'break',
    'title'       => '_MI_CONTACT_HEAD_OPTIONS',
    'description' => '',
    'formtype'    => 'line_break',
    'valuetype'   => 'textbox',
    'default'     => 'head'
);

$modversion['config'][] = array(
    'name'        => 'form_url',
    'title'       => '_MI_CONTACT_FORM_URL',
    'description' => '_MI_CONTACT_FORM_URL_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'form_icq',
    'title'       => '_MI_CONTACT_FORM_ICQ',
    'description' => '_MI_CONTACT_FORM_ICQ_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'form_skype',
    'title'       => '_MI_CONTACT_FORM_SKYPE',
    'description' => '_MI_CONTACT_FORM_SKYPE_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'form_company',
    'title'       => '_MI_CONTACT_FORM_COMPANY',
    'description' => '_MI_CONTACT_FORM_COMPANY_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'form_location',
    'title'       => '_MI_CONTACT_FORM_LOCATION',
    'description' => '_MI_CONTACT_FORM_LOCATION_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'form_phone',
    'title'       => '_MI_CONTACT_FORM_PHONE',
    'description' => '_MI_CONTACT_FORM_PHONE_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'form_address',
    'title'       => '_MI_CONTACT_FORM_ADDRESS',
    'description' => '_MI_CONTACT_FORM_ADDRESS_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'break',
    'title'       => '_MI_CONTACT_HEAD_DEPT',
    'description' => '',
    'formtype'    => 'line_break',
    'valuetype'   => 'textbox',
    'default'     => 'head'
);

$modversion['config'][] = array(
    'name'        => 'form_dept',
    'title'       => '_MI_CONTACT_FORM_DEPT',
    'description' => '_MI_CONTACT_FORM_DEPT_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'contact_dept',
    'title'       => '_MI_CONTACT_DEPT',
    'description' => '_MI_CONTACT_DEPT_DESC',
    'formtype'    => 'textarea',
    'valuetype'   => 'array',
    'default'     => ''
);

$modversion['config'][] = array(
    'name'        => 'subject_prefix',
    'title'       => '_MI_CONTACT_SUBJECT_PREFIX',
    'description' => '_MI_CONTACT_SUBJECT_PREFIX_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'prefix_text',
    'title'       => '_MI_CONTACT_PREFIX_TEXT',
    'description' => '_MI_CONTACT_PREFIX_TEXT_DESC',
    'formtype'    => 'textbox',
    'valuetype'   => 'text',
    'default'     => _MI_CONTACT_PREFIX_TEXT_DEFAULT
);

$modversion['config'][] = array(
    'name'        => 'break',
    'title'       => '_MI_CONTACT_HEAD_INFO',
    'description' => '',
    'formtype'    => 'line_break',
    'valuetype'   => 'textbox',
    'default'     => 'head'
);

$modversion['config'][] = array(
    'name'        => 'contact_info',
    'title'       => '_MI_CONTACT_TOPINFO',
    'description' => '_MI_CONTACT_TOPINFO_DESC',
    'formtype'    => 'textarea',
    'valuetype'   => 'text',
    'default'     => ''
);

$modversion['config'][] = array(
    'name'        => 'contact_default',
    'title'       => '_MI_CONTACT_DEFAULT',
    'description' => '_MI_CONTACT_DEFAULT_DESC',
    'formtype'    => 'textarea',
    'valuetype'   => 'text',
    'default'     => ''
);

$modversion['config'][] = array(
    'name'        => 'embed_maps',
    'title'       => '_MI_CONTACT_MAP',
    'description' => '_MI_CONTACT_MAP_DESC',
    'formtype'    => 'textarea',
    'valuetype'   => 'text',
    'default'     => ''
);

$modversion['config'][] = array(
    'name'        => 'break',
    'title'       => '_MI_CONTACT_HEAD_MISC',
    'description' => '',
    'formtype'    => 'line_break',
    'valuetype'   => 'textbox',
    'default'     => 'head'
);

$modversion['config'][] = array(
    'name'        => 'contact_recipient_std',
    'title'       => '_MI_CONTACT_RECIPIENT_STD',
    'description' => '_MI_CONTACT_RECIPIENT_STD_DESC',
    'formtype'    => 'text',
    'valuetype'   => 'text',
    'default'     => $xoopsConfig['adminmail']
);

$modversion['config'][] = array(
    'name'        => 'mailconfirm',
    'title'       => '_MI_CONTACT_MAIL_CONFIRM',
    'description' => '_MI_CONTACT_MAIL_CONFIRM_DESC',
    'formtype'    => 'yesno',
    'valuetype'   => 'int',
    'default'     => 0
);

$modversion['config'][] = array(
    'name'        => 'break',
    'title'       => '_MI_CONTACT_HEAD_ADMIN',
    'description' => '',
    'formtype'    => 'line_break',
    'valuetype'   => 'textbox',
    'default'     => 'head'
);

$modversion['config'][] = array(
    'name'        => 'admin_perpage',
    'title'       => '_MI_CONTACT_PERPAGE',
    'description' => '_MI_CONTACT_PERPAGE_DESC',
    'formtype'    => 'textbox',
    'valuetype'   => 'int',
    'default'     => 10
);
