<?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('非法进入!');


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

$uniqueid       = 9;
$modulename     = '发帖排行';
$version        = '2.0';
$modulepath     = 'm9_topposters/topposters.php';
$settingspath   = 'm9_topposters/m9_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) ");

if($sitedefaultlang == 'en') //Insert English phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'user',                     'User:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'posts',                    'Posts:', '', '', '', '', 0, 0, 0)");

}
else  //Insert Chinese phrase.
{
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'user',                     '用户名:', '', '', '', '', 0, 0, 0)");
  $DB->query("INSERT INTO " . TABLE_PREFIX . "phrases VALUES (NULL, $uniqueid, 'posts',                    '发帖数:', '', '', '', '', 0, 0, 0)");

}

}


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

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


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

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

?>