<?php
// $Id: xoops_version.php 95 2006-09-16 15:23:48Z yosha_01 $
$modversion['name'] = _MI_DISCUSS_NAME;
$modversion['version'] = 0.5;
$modversion['description'] = _MI_DISCUSS_DESC;
$modversion['credits'] = '';
$modversion['author'] = 'Discuss Friends';
$modversion['help'] = 'help.html';
$modversion['license'] = 'GPL see LICENSE';
$modversion['official'] = 0;
$modversion['image'] = 'images/discuss_slogo.png';
$modversion['dirname'] = 'discuss';

// Sql file (must contain sql generated by phpMyAdmin or phpPgAdmin)
// All tables should not have any prefix!
$modversion['sqlfile']['mysql'] = "sql/mysql.sql";
//$modversion['sqlfile']['postgresql'] = "sql/pgsql.sql";

// Tables created by sql file (without prefix!)
$modversion['tables'][] = "discuss";
$modversion['tables'][] = "discuss_message";
$modversion['tables'][] = "discuss_attendee";

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

// Menu
$modversion['hasMain'] = 1;
//$modversion['sub'][1]['name'] = _MI_DISCUSS_SMNAME1;
//$modversion['sub'][1]['url'] = "log.php";

// Templates
$modversion['templates'][1]['file'] = 'discuss_log.html';
$modversion['templates'][1]['description'] = 'discuss log';
$modversion['templates'][2]['file'] = 'discuss_index.html';
$modversion['templates'][2]['description'] = 'discuss index';
$modversion['templates'][3]['file'] = 'discuss_discuss.html';
$modversion['templates'][3]['description'] = 'discuss client';
$modversion['templates'][4]['file'] = 'discuss_rss.html';
$modversion['templates'][4]['description'] = 'rss';

// Config
$modversion['hasconfig'] = 1;
$modversion['config'][] = array(
	'name'			=> 'message_limit' ,
	'title'			=> '_MI_DISCUSS_LIMIT' ,
	'description'		=> '_MI_DISCUSS_LIMITDSC' ,
	'formtype'		=> 'select' ,
	'valuetype'		=> 'int' ,
	'default'		=> 10 ,
	'options'		=> array('10' => 10, '15' => 15, '20' => 20, '25' => 25, '30' => 30)
) ;
/*
$modversion['config'][] = array(
	'name'			=> 'message_encode' ,
	'title'			=> '_MI_DISCUSS_ENCODE' ,
	'description'		=> '_MI_DISCUSS_ENCODEDSC' ,
	'formtype'		=> 'textbox' ,
	'valuetype'		=> 'text' ,
	'default'		=> 'euc-jp' ,
) ;

$modversion['config'][] = array(
	'name' => 'show_realname',
	'title' => '_MI_DISCUSS_SHOWNAME',
	'description' => '_MI_DISCUSS_SHOWNAME_DESC',
	'formtype' => 'yesno',
	'valuetype' => 'int',
	'default' => 0
);
*/

$modversion['config'][] = array(
	'name' => 'dateformat',
	'title' => '_MI_DISCUSS_DATEFORMAT',
	'description' => '_MI_DISCUSS_DATEFORMAT_DESC',
	'formtype' => 'textbox',
	'valuetype' => 'text',
	'default' => ''
);

$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.inc.php";
$modversion['search']['func'] = "discuss_search";

// Blocks
$modversion['blocks'] = array();

$modversion['blocks'][1]['file'] = 'discuss_blocks.php';
$modversion['blocks'][1]['name'] = _MI_DISCUSS_B_LIST;
$modversion['blocks'][1]['description'] = '';
$modversion['blocks'][1]['show_func'] = 'b_discuss_active_discuss';
$modversion['blocks'][1]['edit_func'] = 'b_discuss_active_discuss_edit';
$modversion['blocks'][1]['options'] = '30|60';
$modversion['blocks'][1]['template'] = 'discuss_block_active_discuss.html';
$modversion['blocks'][1]['can_clone'] = false;

// On Update
if( ! empty( $_POST['fct'] ) && ! empty( $_POST['op'] ) && $_POST['fct'] == 'modulesadmin' && $_POST['op'] == 'update_ok' && $_POST['dirname'] == $modversion['dirname'] ) {
	include dirname( __FILE__ ) . "/include/onupdate.inc.php" ;
}
?>