<?php
if (!defined('XOOPS_ROOT_PATH')) {
	exit();
}
$modversion['name'] = _MI_BLUESBB_NAME;
$modversion['version'] = '1.02';
$modversion['description'] = _MI_BLUESBB_DESC;
$modversion['credits'] = "<a href=\"http://www.bluish.jp/\" target=\"_blank\">BluesBB</a>";
$modversion['author'] = "Sting_Band <a href=\"http://www.bluish.jp/\">http://www.bluish.jp/</a>";
$modversion['help'] = "";
$modversion['license'] = "";
$modversion['official'] = 0;
$modversion['image'] = "images/bluesbb.png";
$modversion['dirname'] = "bluesbb";

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

// Tables created by sql file (without prefix!)
$modversion['tables'][0] = "bluesbb";
$modversion['tables'][1] = "bluesbb_topic";
$modversion['tables'][2] = "bluesbb_categories";

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

// Templates
$modversion['templates'][1]['file'] = 'bluesbb_index.html';
$modversion['templates'][1]['description'] = '';
$modversion['templates'][2]['file'] = 'bluesbb_topic.html';
$modversion['templates'][2]['description'] = '';
$modversion['templates'][3]['file'] = 'bluesbb_thread.html';
$modversion['templates'][3]['description'] = '';
$modversion['templates'][4]['file'] = 'bluesbb_threadlist.html';
$modversion['templates'][4]['description'] = '';
$modversion['templates'][5]['file'] = 'bluesbb_inc_thread.html';
$modversion['templates'][5]['description'] = '';
$modversion['templates'][6]['file'] = 'bluesbb_inc_tree.html';
$modversion['templates'][6]['description'] = '';
$modversion['templates'][7]['file'] = 'bluesbb_inc_order.html';
$modversion['templates'][7]['description'] = '';

// Blocks
$modversion['blocks'][1]['file'] = "bluesbb_blocks.php";
$modversion['blocks'][1]['name'] = _MI_BLUESBB_BNAME1;
$modversion['blocks'][1]['description'] = "Shows recent posts in the topics";
$modversion['blocks'][1]['show_func'] = "b_bluesbb_new_all";
$modversion['blocks'][1]['options'] = "10|24|0|0";
$modversion['blocks'][1]['edit_func'] = "b_bluesbb_new_all_edit";
$modversion['blocks'][1]['template'] = 'bluesbb_new_all.html';
$modversion['blocks'][1]['can_clone'] = true ;

$modversion['blocks'][2]['file'] = "bluesbb_blocks.php";
$modversion['blocks'][2]['name'] = _MI_BLUESBB_BNAME2;
$modversion['blocks'][2]['description'] = "Shows recent posts in the topics";
$modversion['blocks'][2]['show_func'] = "b_bluesbb_new_all2";
$modversion['blocks'][2]['options'] = "10|24|0|0";
$modversion['blocks'][2]['edit_func'] = "b_bluesbb_new_all_edit";
$modversion['blocks'][2]['template'] = 'bluesbb_new_all2.html';
$modversion['blocks'][2]['can_clone'] = true ;

$modversion['blocks'][3]['file'] = "bluesbb_blocks.php";
$modversion['blocks'][3]['name'] = _MI_BLUESBB_BNAME3;
$modversion['blocks'][3]['description'] = "Categories and topics menu";
$modversion['blocks'][3]['show_func'] = "b_bluesbb_menu";
$modversion['blocks'][3]['options'] = "";
$modversion['blocks'][3]['edit_func'] = "";
$modversion['blocks'][3]['template'] = 'bluesbb_menu.html';
$modversion['blocks'][3]['can_clone'] = true ;

$modversion['blocks'][4]['file'] = "bluesbb_blocks.php";
$modversion['blocks'][4]['name'] = _MI_BLUESBB_BNAME4;
$modversion['blocks'][4]['description'] = "Shows recent posts in the topics";
$modversion['blocks'][4]['show_func'] = "b_bluesbb_new_thread";
$modversion['blocks'][4]['options'] = "10|24|0|0";
$modversion['blocks'][4]['edit_func'] = "b_bluesbb_new_all_edit";
$modversion['blocks'][4]['template'] = 'bluesbb_new_thread.html';
$modversion['blocks'][4]['can_clone'] = true ;

$modversion['blocks'][5]['file'] = "bluesbb_blocks.php";
$modversion['blocks'][5]['name'] = _MI_BLUESBB_BNAME5;
$modversion['blocks'][5]['description'] = "Shows recent posts in the topics";
$modversion['blocks'][5]['show_func'] = "b_bluesbb_new_thread2";
$modversion['blocks'][5]['options'] = "10|24|0|0";
$modversion['blocks'][5]['edit_func'] = "b_bluesbb_new_all_edit";
$modversion['blocks'][5]['template'] = 'bluesbb_new_thread2.html';
$modversion['blocks'][5]['can_clone'] = true ;

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

// Smarty
$modversion['use_smarty'] = 1;

// Config Settings
$modversion['config'][1]['name'] = 'indexred';
$modversion['config'][1]['title'] = '_MI_BLUESBB_INDEXREDIRECT';
$modversion['config'][1]['description'] = '_MI_BLUESBB_INDEXREDIRECTDSC';
$modversion['config'][1]['formtype'] = 'yesno';
$modversion['config'][1]['valuetype'] = 'int';
$modversion['config'][1]['default'] = 0;

$modversion['config'][2]['name'] = 'indexperth';
$modversion['config'][2]['title'] = '_MI_BLUESBB_PERTH';
$modversion['config'][2]['description'] = '_MI_BLUESBB_PERTHDSC';
$modversion['config'][2]['formtype'] = 'textbox';
$modversion['config'][2]['valuetype'] = 'int';
$modversion['config'][2]['default'] = 10;

$modversion['config'][3]['name'] = 'topicperth';
$modversion['config'][3]['title'] = '_MI_BLUESBB_TOPICPERTH';
$modversion['config'][3]['description'] = '_MI_BLUESBB_TOPICPERTHDSC';
$modversion['config'][3]['formtype'] = 'textbox';
$modversion['config'][3]['valuetype'] = 'int';
$modversion['config'][3]['default'] = 30;

$modversion['config'][4]['name'] = 'sendmail';
$modversion['config'][4]['title'] = '_MI_BLUESBB_SENDMAIL';
$modversion['config'][4]['description'] = '_MI_BLUESBB_SENDMAILDSC';
$modversion['config'][4]['formtype'] = 'yesno';
$modversion['config'][4]['valuetype'] = 'int';
$modversion['config'][4]['default'] = 1;

$modversion['config'][5]['name'] = 'messmax';
$modversion['config'][5]['title'] = '_MI_BLUESBB_MESSAGEMAX';
$modversion['config'][5]['description'] = '_MI_BLUESBB_MESSAGEMAXDSC';
$modversion['config'][5]['formtype'] = 'textbox';
$modversion['config'][5]['valuetype'] = 'int';
$modversion['config'][5]['default'] = 10000;

$modversion['config'][6]['name'] = 'pword';
$modversion['config'][6]['title'] = '_MI_BLUESBB_PWORD';
$modversion['config'][6]['description'] = '_MI_BLUESBB_PWORDDSC';
$modversion['config'][6]['formtype'] = 'textarea';
$modversion['config'][6]['valuetype'] = 'text';
$modversion['config'][6]['default'] = _MI_BLUESBB_PWORDDEF;

$modversion['config'][7]['name'] = 'newtime';
$modversion['config'][7]['title'] = '_MI_BLUESBB_NEWTIME';
$modversion['config'][7]['description'] = '_MI_BLUESBB_NEWTIMEDSC';
$modversion['config'][7]['formtype'] = 'textbox';
$modversion['config'][7]['valuetype'] = 'int';
$modversion['config'][7]['default'] = 24;

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

$modversion['notification']['category'][1]['name'] = 'thread';
$modversion['notification']['category'][1]['title'] = _MI_BLUESBB_THREAD_NOTIFY;
$modversion['notification']['category'][1]['description'] = _MI_BLUESBB_THREAD_NOTIFYDSC;
$modversion['notification']['category'][1]['subscribe_from'] = 'thread.php';
$modversion['notification']['category'][1]['item_name'] = 'thr';
$modversion['notification']['category'][1]['allow_bookmark'] = 1;

$modversion['notification']['category'][2]['name'] = 'topic';
$modversion['notification']['category'][2]['title'] = _MI_BLUESBB_TOPIC_NOTIFY;
$modversion['notification']['category'][2]['description'] = _MI_BLUESBB_TOPIC_NOTIFYDSC;
$modversion['notification']['category'][2]['subscribe_from'] = array('thread.php', 'topic.php');
$modversion['notification']['category'][2]['item_name'] = 'top';
$modversion['notification']['category'][2]['allow_bookmark'] = 1;

$modversion['notification']['category'][3]['name'] = 'global';
$modversion['notification']['category'][3]['title'] = _MI_BLUESBB_GLOBAL_NOTIFY;
$modversion['notification']['category'][3]['description'] = _MI_BLUESBB_GLOBAL_NOTIFYDSC;
$modversion['notification']['category'][3]['subscribe_from'] = array('index.php', 'thread.php', 'topic.php');

$modversion['notification']['event'][1]['name'] = 'new_post';
$modversion['notification']['event'][1]['category'] = 'thread';
$modversion['notification']['event'][1]['title'] = _MI_BLUESBB_THREAD_NEWPOST_NOTIFY;
$modversion['notification']['event'][1]['caption'] = _MI_BLUESBB_THREAD_NEWPOST_NOTIFYCAP;
$modversion['notification']['event'][1]['description'] = _MI_BLUESBB_THREAD_NEWPOST_NOTIFYDSC;
$modversion['notification']['event'][1]['mail_template'] = 'thread_newpost_notify';
$modversion['notification']['event'][1]['mail_subject'] = _MI_BLUESBB_THREAD_NEWPOST_NOTIFYSBJ;

$modversion['notification']['event'][2]['name'] = 'new_thread';
$modversion['notification']['event'][2]['category'] = 'topic';
$modversion['notification']['event'][2]['title'] = _MI_BLUESBB_TOPIC_NEWTHREAD_NOTIFY;
$modversion['notification']['event'][2]['caption'] = _MI_BLUESBB_TOPIC_NEWTHREAD_NOTIFYCAP;
$modversion['notification']['event'][2]['description'] = _MI_BLUESBB_TOPIC_NEWTHREAD_NOTIFYDSC;
$modversion['notification']['event'][2]['mail_template'] = 'topic_newthread_notify';
$modversion['notification']['event'][2]['mail_subject'] = _MI_BLUESBB_TOPIC_NEWTHREAD_NOTIFYSBJ;

$modversion['notification']['event'][3]['name'] = 'new_post';
$modversion['notification']['event'][3]['category'] = 'global';
$modversion['notification']['event'][3]['title'] = _MI_BLUESBB_GLOBAL_NEWPOST_NOTIFY;
$modversion['notification']['event'][3]['caption'] = _MI_BLUESBB_GLOBAL_NEWPOST_NOTIFYCAP;
$modversion['notification']['event'][3]['description'] = _MI_BLUESBB_GLOBAL_NEWPOST_NOTIFYDSC;
$modversion['notification']['event'][3]['mail_template'] = 'global_newpost_notify';
$modversion['notification']['event'][3]['mail_subject'] = _MI_BLUESBB_GLOBAL_NEWPOST_NOTIFYSBJ;

$modversion['notification']['event'][4]['name'] = 'new_post';
$modversion['notification']['event'][4]['category'] = 'topic';
$modversion['notification']['event'][4]['title'] = _MI_BLUESBB_TOPIC_NEWPOST_NOTIFY;
$modversion['notification']['event'][4]['caption'] = _MI_BLUESBB_TOPIC_NEWPOST_NOTIFYCAP;
$modversion['notification']['event'][4]['description'] = _MI_BLUESBB_TOPIC_NEWPOST_NOTIFYDSC;
$modversion['notification']['event'][4]['mail_template'] = 'topic_newpost_notify';
$modversion['notification']['event'][4]['mail_subject'] = _MI_BLUESBB_TOPIC_NEWPOST_NOTIFYSBJ;

$modversion['notification']['event'][5]['name'] = 'new_fullpost';
$modversion['notification']['event'][5]['category'] = 'global';
$modversion['notification']['event'][5]['admin_only'] = 1;
$modversion['notification']['event'][5]['title'] = _MI_BLUESBB_GLOBAL_NEWFULLPOST_NOTIFY;
$modversion['notification']['event'][5]['caption'] = _MI_BLUESBB_GLOBAL_NEWFULLPOST_NOTIFYCAP;
$modversion['notification']['event'][5]['description'] = _MI_BLUESBB_GLOBAL_NEWFULLPOST_NOTIFYDSC;
$modversion['notification']['event'][5]['mail_template'] = 'global_newfullpost_notify';
$modversion['notification']['event'][5]['mail_subject'] = _MI_BLUESBB_GLOBAL_NEWFULLPOST_NOTIFYSBJ;

// 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" ;
}
?>