[ Index ]
 

Code source de e107 0.7.8

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/e107_plugins/forum/ -> plugin.php (source)

   1  <?php
   2  /*
   3  + ----------------------------------------------------------------------------+
   4  |     e107 website system
   5  |
   6  |     ©Steve Dunstan 2001-2002
   7  |     http://e107.org
   8  |     jalist@e107.org
   9  |
  10  |     Released under the terms and conditions of the
  11  |     GNU General Public License (http://gnu.org).
  12  |
  13  |     $Source: /cvsroot/e107/e107_0.7/e107_plugins/forum/plugin.php,v $
  14  |     $Revision: 1.14 $
  15  |     $Date: 2006/04/29 20:34:37 $
  16  |     $Author: e107coders $
  17  +----------------------------------------------------------------------------+
  18  */
  19  
  20  if (!defined('e107_INIT')) { exit; }
  21  
  22  @include_once(e_PLUGIN.'forum/languages/'.e_LANGUAGE.'/lan_forum_conf.php');
  23  @include_once(e_PLUGIN.'forum/languages/English/lan_forum_conf.php');
  24  
  25  // Plugin info -------------------------------------------------------------------------------------------------------
  26  $eplug_name = 'Forum';
  27  $eplug_version = '1.2';
  28  $eplug_author = 'e107dev';
  29  $eplug_url = 'http://e107.org';
  30  $eplug_email = '';
  31  $eplug_description = 'This plugin is a fully featured Forum system.';
  32  $eplug_compatible = 'e107v0.7+';
  33  $eplug_readme = '';
  34  $eplug_latest = TRUE; //Show reported threads in admin (use latest.php)
  35  $eplug_status = TRUE; //Show post count in admin (use status.php)
  36  
  37  // Name of the plugin's folder -------------------------------------------------------------------------------------
  38  $eplug_folder = "forum";
  39  
  40  // Name of menu item for plugin ----------------------------------------------------------------------------------
  41  $eplug_menu_name = "forum";
  42  
  43  // Name of the admin configuration file --------------------------------------------------------------------------
  44  $eplug_conffile = "forum_admin.php";
  45  
  46  // Icon image and caption text ------------------------------------------------------------------------------------
  47  $eplug_icon = $eplug_folder."/images/forums_32.png";
  48  $eplug_icon_small = $eplug_folder."/images/forums_16.png";
  49  $eplug_caption = 'Configure Forum';
  50  
  51  // List of preferences -----------------------------------------------------------------------------------------------
  52  $eplug_prefs = array(
  53      "forum_show_topics" => "1",
  54      "forum_postfix" => "[more...]",
  55      'forum_poll' => '0',
  56      'forum_popular' => '10',
  57      'forum_track' => '0',
  58      'forum_eprefix' => '[forum]',
  59      'forum_enclose' => '1',
  60      'forum_title' => 'Forums',
  61      'forum_postspage' => '10',
  62      'forum_hilightsticky' => '1'
  63   );
  64  
  65  // List of table names -----------------------------------------------------------------------------------------------
  66  $eplug_table_names = array(
  67  "forum",
  68      "forum_t" );
  69  
  70  // List of sql requests to create tables -----------------------------------------------------------------------------
  71  $eplug_tables = array(
  72  "CREATE TABLE ".MPREFIX."forum (
  73      forum_id int(10) unsigned NOT NULL auto_increment,
  74      forum_name varchar(250) NOT NULL default '',
  75      forum_description text NOT NULL,
  76      forum_parent int(10) unsigned NOT NULL default '0',
  77      forum_sub int(10) unsigned NOT NULL default '0',
  78      forum_datestamp int(10) unsigned NOT NULL default '0',
  79      forum_moderators text NOT NULL,
  80      forum_threads int(10) unsigned NOT NULL default '0',
  81      forum_replies int(10) unsigned NOT NULL default '0',
  82      forum_lastpost_user varchar(200) NOT NULL default '',
  83      forum_lastpost_info varchar(40) NOT NULL default '',
  84      forum_class varchar(100) NOT NULL default '',
  85      forum_order int(10) unsigned NOT NULL default '0',
  86      forum_postclass tinyint(3) unsigned NOT NULL default '0',
  87      PRIMARY KEY  (forum_id)
  88      ) TYPE=MyISAM AUTO_INCREMENT=1;",
  89      "CREATE TABLE ".MPREFIX."forum_t (
  90      thread_id int(10) unsigned NOT NULL auto_increment,
  91      thread_name varchar(250) NOT NULL default '',
  92      thread_thread text NOT NULL,
  93      thread_forum_id int(10) unsigned NOT NULL default '0',
  94      thread_datestamp int(10) unsigned NOT NULL default '0',
  95      thread_parent int(10) unsigned NOT NULL default '0',
  96      thread_user varchar(250) NOT NULL default '',
  97      thread_views int(10) unsigned NOT NULL default '0',
  98      thread_active tinyint(3) unsigned NOT NULL default '0',
  99      thread_lastpost int(10) unsigned NOT NULL default '0',
 100      thread_s tinyint(1) unsigned NOT NULL default '0',
 101      thread_edit_datestamp int(10) unsigned NOT NULL default '0',
 102      thread_lastuser varchar(30) NOT NULL default '',
 103      thread_total_replies int(10) unsigned NOT NULL default '0',
 104      PRIMARY KEY  (thread_id),
 105      KEY thread_parent (thread_parent),
 106      KEY thread_datestamp (thread_datestamp),
 107      KEY thread_forum_id (thread_forum_id)
 108      ) TYPE=MyISAM AUTO_INCREMENT=1;");
 109  
 110  // Create a link in main menu (yes=TRUE, no=FALSE) -------------------------------------------------------------
 111  $eplug_link = TRUE;
 112  $eplug_link_name = "Forum";
 113  $eplug_link_url = e_PLUGIN.'forum/forum.php';
 114  
 115  // Text to display after plugin successfully installed ------------------------------------------------------------------
 116  $eplug_done = 'Your forum is now installed';
 117  
 118  $eplug_upgrade_done = 'Forum successfully upgraded, now using version: '.$eplug_version;
 119  
 120  $upgrade_alter_tables = array(
 121  "ALTER TABLE ".MPREFIX."forum ADD forum_postclass TINYINT( 3 ) UNSIGNED DEFAULT '0' NOT NULL ;"
 122  );
 123  
 124  if (!function_exists('forum_uninstall')) {
 125  	function forum_uninstall() {
 126          global $sql;
 127          $sql -> db_Update("user", "user_forums='0'");
 128      }
 129  }
 130  
 131  if (!function_exists('forum_install')) {
 132  	function forum_install() {
 133          global $sql;
 134          $sql -> db_Update("user", "user_forums='0'");
 135      }
 136  }
 137  
 138  ?>


Généré le : Sun Apr 1 01:23:32 2007 par Balluche grâce à PHPXref 0.7