<?php

if(!defined('USER_TRUST_PATH'))
{
	define('USER_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/user');
}
$modversion['name'] = _MI_USER_NAME;
$modversion['version'] = 4.00;
$modversion['description'] = _MI_USER_NAME_DESC;
$modversion['author'] = "";
$modversion['credits'] = "XOOPS Cube Project";
$modversion['help'] = "help.html";
$modversion['license'] = "GPL see LICENSE";
$modversion['image'] = "images/user.png";
$modversion['dirname'] = "user";
$modversion['trust_dirname'] = 'user';


$modversion['legacy_installer'] = array(
	'installer'   => array(
		'class' 	=> 'Installer',
		'namespace' => 'User',
		'filepath'	=> USER_TRUST_PATH . '/admin/class/installer/UserInstaller.class.php'
	),
	'uninstaller' => array(
		'class' 	=> 'Uninstaller',
		'namespace' => 'User',
		'filepath'	=> USER_TRUST_PATH . '/admin/class/installer/UserUninstaller.class.php'
	),
	'updater' => array(
		'class' 	=> 'Updater',
		'namespace' => 'User',
		'filepath'	=> USER_TRUST_PATH . '/admin/class/installer/UserUpdater.class.php'
	)
);
$modversion['disable_legacy_2nd_installer'] = false;

$modversion['cube_style'] = true;

// SQL
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "{prefix}_{dirname}_mailjob";
$modversion['tables'][1] = "{prefix}_{dirname}_mailjob_link";
// Admin things
$modversion['hasAdmin'] = 1;
$modversion['adminindex'] = "admin/index.php";
$modversion['adminmenu'] = "admin/menu.php";

// Templates
$i=1;
$modversion['templates'][$i]['file'] = 'user_activate.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_userinfo.html';
$modversion['templates'][$i]['description'] = 'Display a user information in userinfo.php';
$i++;
$modversion['templates'][$i]['file'] = 'user_edituser.html';
$modversion['templates'][$i]['description'] = 'When user edit own information, display this';
$i++;
$modversion['templates'][$i]['file'] = 'user_register_form.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_lostpass.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_default.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_avatar_edit.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_register_finish.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_misc_online.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_delete.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_header.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_footer.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_error.inc.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_print.inc.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_breadcrumbs.inc.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_search.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_list.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_su.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_groupregister.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_grouplist.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_groupinfo.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_groupedit.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_groupmember.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_username.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_username.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_avatar.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_membersince.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_lastlogin.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_emailnotice.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_posts.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_level.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_signature.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_commentmode.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_commentorder.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_rank.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_notifymethod.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_notifymode.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_viewtype_maximumindexes.html';
$modversion['templates'][$i]['description'] = '';
$i++;
$modversion['templates'][$i]['file'] = 'user_print.css';
$modversion['templates'][$i]['description'] = 'stylesheet for print';
$i++;
$modversion['templates'][$i]['file'] = 'user_style.css';
$modversion['templates'][$i]['description'] = 'stylesheet for screen';
$i++;
$modversion['templates'][$i]['file'] = 'user_user.html';
$modversion['templates'][$i]['description'] = 'view for user';
$i++;
$modversion['templates'][$i]['file'] = 'user_workflow.html';
$modversion['templates'][$i]['description'] = 'view for workflow';
$i++;
$modversion['templates'][$i]['file'] = 'user_notifications.html';
$modversion['templates'][$i]['description'] = 'user notifications';

//Preference
$modversion['config'][]=array (
		"name"=>"allow_register",
		"title"=>"_MI_USER_CONF_ALLOW_REGISTER",
		"description"=>"_MI_USER_CONF_ALW_RG_DESC",
		"formtype"=>"yesno",
		"valuetype"=>"int",
		"default"=>1
	);

$modversion['config'][]=array (
		"name"=>"minpass",
		"title"=>"_MI_USER_CONF_MINPASS",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>5
	);

$modversion['config'][]=array (
		"name"=>"minuname",
		"title"=>"_MI_USER_CONF_MINUNAME",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>3
	);

$modversion['config'][]=array (
		"name"=>"maxuname",
		"title"=>"_MI_USER_CONF_MAXUNAME",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>10
	);

$modversion['config'][]=array (
		"name"=>"allow_chgmail",
		"title"=>"_MI_USER_CONF_CHGMAIL",
		"formtype"=>"yesno",
		"valuetype"=>"int",
		"default"=>0
	);

$modversion['config'][]=array (
		"name"=>"new_user_notify",
		"title"=>"_MI_USER_CONF_NEW_USER_NOTIFY",
		"formtype"=>"yesno",
		"valuetype"=>"int",
		"default"=>1
	);

$modversion['config'][]=array (
		"name"=>"new_user_notify_group",
		"title"=>"_MI_USER_CONF_NEW_NTF_GROUP",
		"formtype"=>"group",
		"valuetype"=>"int",
		"default"=>XOOPS_GROUP_ADMIN
	);

$modversion['config'][]=array (
		"name"=>"activation_type",
		"title"=>"_MI_USER_CONF_ACTV_TYPE",
		"formtype"=>"select",
		"options"=>array("_MI_USER_CONF_ACTV_USER"=>0),
		"valuetype"=>"int",
		"default"=>0
	);

$modversion['config'][]=array (
		"name"=>"certify_user",
		"title"=>"_MI_USER_CONF_CERTIFY_USER",
		"description"=>"_MI_USER_CONF_CER_USER_DESC",
		"formtype"=>"select",
		"options"=>array("_MI_USER_CONF_CERTIFY_USER_AUTO"=>"auto","_MI_USER_CONF_CERTIFY_USER_BY_MODERATOR"=>"on"),
		"valuetype"=>"string",
		"default"=>"on"
	);

$modversion['config'][]=array (
		"name"=>"user_certify_date",
		"title"=>"_MI_USER_CONF_USER_CERTIFY_DATE",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>0
	);	
	
$modversion['config'][]=array (
		"name"=>"uname_test_level",
		"title"=>"_MI_USER_CONF_UNAME_TEST_LEVEL",
		"formtype"=>"select",
		"options"=>array("_MI_USER_CONF_UNAME_TEST_LEVEL_STRONG"=>0,"_MI_USER_CONF_UNAME_TEST_LEVEL_NORMAL"=>1,"_MI_USER_CONF_UNAME_TEST_LEVEL_WEAK"=>2),
		"valuetype"=>"int",
		"default"=>1
	);

$modversion['config'][]=array (
		"name"=>"avatar_width",
		"title"=>"_MI_USER_CONF_AVATAR_WIDTH",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>80
	);

$modversion['config'][]=array (
		"name"=>"avatar_height",
		"title"=>"_MI_USER_CONF_AVATAR_HEIGHT",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>80
	);

$modversion['config'][]=array (
		"name"=>"avatar_maxsize",
		"title"=>"_MI_USER_CONF_AVATAR_MAXSIZE",
		"formtype"=>"textbox",
		"valuetype"=>"int",
		"default"=>35000
	);

$modversion['config'][]=array (
		"name"=>"self_delete",
		"title"=>"_MI_USER_CONF_SELF_DELETE",
		"formtype"=>"yesno",
		"valuetype"=>"int",
		"default"=>0
	);
	
$modversion['config'][]=array (
		"name"=>"self_delete_confirm",
		"title"=>"_MI_USER_CONF_SELF_DELETE_CONF",
		"formtype"=>"textarea",
		"valuetype"=>"string",
		"default"=>_MI_USER_CONF_SELF_DELETE_CONFIRM_DEFAULT
	);

$modversion['config'][]=array (
		"name"=>"bad_unames",
		"title"=>"_MI_USER_CONF_BAD_UNAMES",
		"description"=>"_MI_USER_CONF_BAD_UNAMES_DESC",
		"formtype"=>"textarea",
		"valuetype"=>"array",
		"default"=>array('webmaster', '^xoops', '^admin')
	);

$modversion['config'][]=array (
		"name"=>"bad_emails",
		"title"=>"_MI_USER_CONF_BAD_EMAILS",
		"description"=>"_MI_USER_CONF_BAD_EMAILS_DESC",
		"formtype"=>"textarea",
		"valuetype"=>"array",
		"default"=>array('xoopscube.jp$', 'xoopscube.org$')
	);

$modversion['config'][]=array (
		"name"=>"group_making",
		"title"=>"_MI_USER_CONF_GROUP_CONSTRUCT_PERMIT",
		"description"=>"",
		"formtype"=>"select",
		"options"=>array("_MI_USER_CONF_NOT_PERMIT"=>"off","_MI_USER_CONF_PERMIT"=>"on"),
		"valuetype"=>"string",
		"default"=>"off"
	);

$modversion['config'][]=array (
		"name"=>"group_making_certify",
		"title"=>"_MI_USER_CONF_GROUP_CONSTRUCT_ACCEPT",
		"description"=>"",
		"formtype"=>"select",
		"options"=>array("_MI_USER_CONF_MODERATOR_ADMIT"=>"on","_MI_USER_CONF_AUTO_ADMIT"=>"off"),
		"valuetype"=>"string",
		"default"=>"on"
	);

$modversion['config'][]=array (
		"name"=>"group_publish_certify",
		"title"=>"_MI_USER_CONF_GROUP_PUBLIC_ACCEPT",
		"description"=>"",
		"formtype"=>"select",
		"options"=>array("_MI_USER_CONF_MODERATOR_PUBLIC_ADMIT"=>"on","_MI_USER_CONF_AUTO_PUBLIC_ADMIT"=>"off"),
		"valuetype"=>"string",
		"default"=>"on"
	);

$modversion['config'][]=array (
		"name"=>"reg_dispdsclmr",
		"title"=>"_MI_USER_CONF_DISPDSCLMR",
		"description"=>"_MI_USER_CONF_DISPDSCLMR_DESC",
		"formtype"=>"yesno",
		"valuetype"=>"int",
		"default"=>0
	);

$modversion['config'][]=array (
		"name"=>"reg_disclaimer",
		"title"=>"_MI_USER_CONF_DISCLAIMER",
		"description"=>"_MI_USER_CONF_DISCLAIMER_DESC",
		"formtype"=>"textarea",
		"valuetype"=>"string",
		"default"=>_MI_USER_CONF_DISCLAIMER_DESC_DEFAULT
	);

$modversion['config'][]=array (
		"name"=>"usercookie",
		"title"=>"_MI_USER_CONF_USERCOOKIE",
		"description"=>"_MI_USER_CONF_USERCOOKIE_DESC",
		"formtype"=>"textbox",
		"valuetype"=>"string",
		"default"=>"xoops_user"
	);

$modversion['config'][]=array (
		"name"=>"use_ssl",
		"title"=>"_MI_USER_CONF_USE_SSL",
		"formtype"=>"yesno",
		"valuetype"=>"int",
		"default"=>0
	);
	
$modversion['config'][]=array (
		"name"=>"sslpost_name",
		"title"=>"_MI_USER_CONF_SSLPOST_NAME",
		"formtype"=>"textbox",
		"valuetype"=>"string",
		"default"=>"xoops_ssl"
	);

$modversion['config'][]=array (
		"name"=>"sslloginlink",
		"title"=>"_MI_USER_CONF_SSLLOGINLINK",
		"formtype"=>"textbox",
		"valuetype"=>"string",
		"default"=>"https://"
	);
	
	

// Menu
$modversion['hasMain'] = 0;
$modversion['read_any'] = true;

// Block
$modversion['blocks'][1]['file'] = "user_login.php";
$modversion['blocks'][1]['name'] = _MI_USER_BLOCK_LOGIN_NAME;
$modversion['blocks'][1]['description'] = _MI_USER_BLOCK_LOGIN_DESC;
$modversion['blocks'][1]['show_func'] = "b_user_login_show";
$modversion['blocks'][1]['template'] = 'user_block_login.html';
$modversion['blocks'][1]['visible_any'] = true;
$modversion['blocks'][1]['show_all_module'] = true;

$modversion['blocks'][2]['file'] = "user_online.php";
$modversion['blocks'][2]['name'] = _MI_USER_BLOCK_ONLINE_NAME;
$modversion['blocks'][2]['description'] = _MI_USER_BLOCK_ONLINE_DESC;
$modversion['blocks'][2]['show_func'] = "b_user_online_show";
$modversion['blocks'][2]['template'] = 'user_block_online.html';
$modversion['blocks'][2]['show_all_module'] = true;

$modversion['blocks'][3]['file'] = "user_newusers.php";
$modversion['blocks'][3]['name'] = _MI_USER_BLOCK_NEWUSERS_NAME;
$modversion['blocks'][3]['description'] = _MI_USER_BLOCK_NEWUSERS_DESC;
$modversion['blocks'][3]['show_func'] = "b_user_newusers_show";
$modversion['blocks'][3]['template'] = 'user_block_newusers.html';
$modversion['blocks'][3]['edit_func'] = "b_user_newusers_edit";
$modversion['blocks'][3]['options'] = "10|1";
$modversion['blocks'][3]['show_all_module'] = true;

$modversion['blocks'][4]['file'] = "user_topusers.php";
$modversion['blocks'][4]['name'] = _MI_USER_BLOCK_TOPUSERS_NAME;
$modversion['blocks'][4]['description'] = _MI_USER_BLOCK_TOPUSERS_DESC;
$modversion['blocks'][4]['show_func'] = "b_user_topusers_show";
$modversion['blocks'][4]['template'] = 'user_block_topusers.html';
$modversion['blocks'][4]['edit_func'] = "b_user_topusers_edit";
$modversion['blocks'][4]['options'] = "10|1";
$modversion['blocks'][4]['show_all_module'] = true;

$modversion['hasNotification'] = 1;
$modversion['notification']['lookup_file'] = 'include/notification.inc.php';
$modversion['notification']['lookup_func'] = 'user_notify_iteminfo';

$modversion['notification']['category'][1]['name'] = 'administrator';
$modversion['notification']['category'][1]['title'] = _MI_USER_ADMINISTRATOR_NOTIFY;
$modversion['notification']['category'][1]['description'] = _MI_USER_ADMINISTRATOR_NOTIFYDSC;
$modversion['notification']['category'][1]['subscribe_from'] = array( 'notifications.php' );
$modversion['notification']['category'][1]['allow_bookmark'] = 0;

$modversion['notification']['category'][2]['name'] = 'common';
$modversion['notification']['category'][2]['title'] = _MI_USER_COMMON_NOTIFY;
$modversion['notification']['category'][2]['description'] = _MI_USER_COMMON_NOTIFYDSC;
$modversion['notification']['category'][2]['subscribe_from'] = array( 'notifications.php');

$modversion['notification']['event'][1]['name'] = 'account_certify';
$modversion['notification']['event'][1]['category'] = 'administrator';
$modversion['notification']['event'][1]['title'] = _MI_USER_ACCOUNT_CERTIFY_NOTIFY;
$modversion['notification']['event'][1]['caption'] = _MI_USER_ACCOUNT_CERTIFY_NOTIFYCAP;
$modversion['notification']['event'][1]['description'] = _MI_USER_ACCOUNT_CERTIFY_NOTIFYDSC;
$modversion['notification']['event'][1]['mail_template'] = '';
$modversion['notification']['event'][1]['mail_subject'] = '';

$modversion['notification']['event'][2]['name'] = 'group';
$modversion['notification']['event'][2]['category'] = 'common';
$modversion['notification']['event'][2]['title'] = _MI_USER_COMMON_GROUP_NOTIFY;
$modversion['notification']['event'][2]['caption'] = _MI_USER_COMMON_GROUP_NOTIFYCAP;
$modversion['notification']['event'][2]['description'] = _MI_USER_COMMON_GROUP_NOTIFYDSC;
$modversion['notification']['event'][2]['mail_template'] = '';
$modversion['notification']['event'][2]['mail_subject'] = '';

