<?php

	/*
	*	Gekko - Open Source Web Development Framework
	*	------------------------------------------------------------------------
	*	Copyright (C) 2004-2005, J. Carlos Nieto <xiam@users.sourceforge.net>
	*	This program is Free Software.
	*
	*	@package	Gekko CMS
	*	@license	http://www.gnu.org/copyleft/gpl.html GNU/GPL License 2.0
	*	@author		J. Carlos Nieto <xiam@users.sf.net>
	*	@version	CVS: $Id:$
	*	@link		http://www.gekkoware.org
	*/

	if (!defined("IN-GEKKO")) die("Get a life!");

	Class GekkoModule_Conf {
		function create_menu() {
			return false;
		}
		function configure() {
			Conf::setKey("core", "site.gekko_version", GEKKO_VERSION, "s");

			Conf::getKey("core", "site.title", "Site title", "s");
			Conf::getKey("core", "site.name", "Site name", "s");
			Conf::getKey("core", "site.slogan", "Site slogan", "s");
			Conf::getKey("core", "site.slogan", "Site description", "s");
			Conf::getKey("core", "site.show_text_title", 1, "b");
			Conf::getKey("core", "site.icontheme", "default", "s");
			Conf::getKey("core", "site.smileystheme", "default", "s");
			Conf::getKey("core", "site.gzip_output", 1, "b");
			Conf::getKey("core", "site.copyright", "&amp;copy; ".date("Y")." example.org", "default", "s");
			Conf::getKey("core", "site.footer", "Powered by <a href=\"http://www.gekkoware.org\">Gekko</a>", "s");
			Conf::getKey("core", "site.lang", "es", "s");
			Conf::getKey("core", "site.primary_lang", "es", "s");
			Conf::getKey("core", "site.primary_country", "MX", "s");
			Conf::getKey("core", "site.contact_mail", "webmaster@example.org", "s");
			Conf::getKey("core", "site.cookie.prefix", "gekkocms_", "s");
			Conf::getKey("core", "site.cookie.path", "/", "s");
			Conf::getKey("core", "site.cookie.life", 60*60*24, "i");
			Conf::getKey("core", "ftp.user", "", "s");
			Conf::getKey("core", "ftp.pass", "", "s");
			Conf::getKey("core", "ftp.port", "21", "s");
			Conf::getKey("core", "ftp.save_pass", 0, "b");
			Conf::getKey("core", "ftp.host", "localhost", "s");
			Conf::getKey("core", "ftp.path", "", "s");
			Conf::getKey("core", "smtp.host", "localhost", "s");
			Conf::getKey("core", "smtp.port", "25", "s");
			Conf::getKey("core", "smtp.user", "", "s");
			Conf::getKey("core", "smtp.pass", "", "s");
			Conf::getKey("core", "smtp.enable", 1, "b");
			Conf::getKey("core", "html_filter", 1, "b");
			Conf::getKey("core", "rtbeditor", 1, "b");
			Conf::getKey("core", "rtbeditor.default", 1, "b");
			Conf::getKey("core", "gbbcode", 1, "b");
			Conf::getKey("core", "gbbcode.smileys", 1, "b");
			Conf::getKey("core", "magic_blacklist", 1, "b");

			Conf::getKey("modules", "default", "blog", "s");
		}
		function install() {

			$GLOBALS["db"]->query("
			CREATE TABLE ".db_table("conf")." (
				ID SMALLINT (8) UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (ID),
				Module VARCHAR (64) NOT NULL,
				KeyName VARCHAR (128) NOT NULL,
				KeyValue VARCHAR (255),
				KeyType TINYINT (1),
				Modified INT (11) UNSIGNED NOT NULL
			)
			", __FILE__, __LINE__, true);

			if (!defined("IN-INSTALL")) {
				modCore::registerModule($GLOBALS["cgdb"]["conf"], "conf", "#", $GLOBALS["cgdb"]["conf"]);
			}
		}
		function uninstall() {
			$GLOBALS["db"]->query("DROP TABLE IF EXISTS ".db_table("conf"), __FILE__, __LINE__, true);
		}
		function upgrade($provided_v) {

		}
		function ext_uninstall($module) {

		}
	}

?>