<?php
// +---------------------------------------------+
// |     Copyright  2003 - 2005 weenCompany      |
// |     http://www.weentech.com                 |
// |     This file may not be redistributed.     |
// +---------------------------------------------+

if(!defined('TABLE_PREFIX'))
  define('TABLE_PREFIX', "");

if(!defined('IN_WEENCOMPANY'))
  die("File not found!");


// ############################### MODULE DETAILS ##############################

$uniqueid       = 8;
$modulename     = '最新话题';
$version        = '2.0';
$modulepath     = 'm8_latestposts/latestposts.php';
$settingspath   = 'm8_latestposts/m8_settings.php';
$authorname     = 'weencompany';
$authorlink     = 1;
$modulesettings = '17';


// ############################### INSTALL MODULE ##############################

if($installtype == 'install')
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid,  '模块设置',              '最新话题条目数',            '最新话题模块中显示的论坛最新主题条目数:', 'text', '5', 1) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid,  '模块设置',              '换行字符数',                            '设定标题换行的字符数量:', 'text', '30', 2) ");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "modulesettings VALUES (NULL, $uniqueid,  '模块设置',              '排除论坛',                       '最新话题模块不从被排除的论坛中选择话题, 比如私密论坛:<br/>注: 需输入论坛ID号, 多个排除论坛ID需用英文逗号隔开.', 'text', '', '3') ");

if($sitedefaultlang == 'en') //Insert English phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'posted_by',                'Posted by', '', '', '', '', 0, 0, 0)");

}
else  //Insert Chinese phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'posted_by',                '作者', '', '', '', '', 0, 0, 0)");

}

}


// ############################### UPGRADE MODULE ##############################

if($installtype == 'upgrade')
{
  if($currentversion == '2.0')
  {
    // example:
    // UpdateModuleVersion(8, 2.1);
    // $currentversion = 2.1;
  }
}


// ############################## UNINSTALL MODULE #############################

if($installtype == 'uninstall')
{
  // no tables to uninstall
}

?>