From: <be...@us...> - 2012-06-19 14:53:26
|
Revision: 9673 http://xoops.svn.sourceforge.net/xoops/?rev=9673&view=rev Author: beckmi Date: 2012-06-19 14:53:13 +0000 (Tue, 19 Jun 2012) Log Message: ----------- Updating to 3.03 Final Modified Paths: -------------- XoopsModules/xlanguage/branches/mamba/xlanguage/admin/about.php XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_footer.php XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_header.php XoopsModules/xlanguage/branches/mamba/xlanguage/admin/langform.inc.php XoopsModules/xlanguage/branches/mamba/xlanguage/class/language.php XoopsModules/xlanguage/branches/mamba/xlanguage/language/english/admin.php XoopsModules/xlanguage/branches/mamba/xlanguage/xoops_version.php Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/admin/about.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/admin/about.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/admin/about.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,29 +1,29 @@ -<?php -/** - * XOOPS Poll module - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project (http://www.xoops.org) - * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} - * @package xoopspoll - * @since 2.5.0 - * @author XOOPS Development Team - * @version $Id $ - **/ - -include_once dirname(__FILE__) . '/admin_header.php'; - -xoops_cp_header(); - -$aboutAdmin = new ModuleAdmin(); - -echo $aboutAdmin->addNavigation('about.php'); -echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); - +<?php +/** + * xLanguage module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright The XOOPS Project (http://www.xoops.org) + * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} + * @package xlanguage + * @since 2.0 + * @author XOOPS Development Team + * @version $Id $ + **/ + +include_once dirname(__FILE__) . '/admin_header.php'; + +xoops_cp_header(); + +$aboutAdmin = new ModuleAdmin(); + +echo $aboutAdmin->addNavigation('about.php'); +echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false); + include 'admin_footer.php'; \ No newline at end of file Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_footer.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_footer.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_footer.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,26 +1,10 @@ <?php -/** - * XoopsPoll module - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license http://www.gnu.org/licenses/gpl-2.0.html GNU Public License - * @package XoopsPoll - * @since 2.5.0 - * @author Mamba (www.xoops.org) - * @version $Id $ -**/ + echo "<div class='adminfooter'>\n" ." <div style='text-align: center;'>\n" ." <a href='http://www.xoops.org' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" ." </div>\n" - ." " . _AM_XLANG_FOOTER . "\n" + ." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" ."</div>"; xoops_cp_footer(); \ No newline at end of file Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_header.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_header.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/admin/admin_header.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,46 +1,46 @@ -<?php -/** - * XoopsPartners module - * - * You may not change or alter any portion of this comment or credits - * of supporting developers from this source code or any supporting source code - * which is considered copyrighted (c) material of the original comment or credit authors. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ - * @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} - * @package:: XoopsPartners - * @subpackage:: admin - * @since:: 2.5.0 - * @author:: XOOPS Team - * @version:: $Id $ -**/ - -$path = dirname(dirname(dirname(dirname(__FILE__)))); -include_once $path . '/mainfile.php'; -include_once $path . '/include/cp_functions.php'; -require_once $path . '/include/cp_header.php'; - -global $xoopsModule; - -$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); - -//if functions.php file exist -require_once dirname(dirname(__FILE__)) . '/include/functions.php'; - -// Load language files -xoops_loadLanguage('admin', $thisModuleDir); -xoops_loadLanguage('modinfo', $thisModuleDir); -xoops_loadLanguage('main', $thisModuleDir); - -$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); -$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); -$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); - -if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ - include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); - }else{ - redirect_header("../../../admin.php", 5, _AM_MODULEADMIN_MISSING, false); +<?php +/** + * XoopsPartners module + * + * You may not change or alter any portion of this comment or credits + * of supporting developers from this source code or any supporting source code + * which is considered copyrighted (c) material of the original comment or credit authors. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License} + * @package:: XoopsPartners + * @subpackage:: admin + * @since:: 2.5.0 + * @author:: XOOPS Team + * @version:: $Id $ +**/ + +$path = dirname(dirname(dirname(dirname(__FILE__)))); +include_once $path . '/mainfile.php'; +include_once $path . '/include/cp_functions.php'; +require_once $path . '/include/cp_header.php'; + +global $xoopsModule; + +$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname'); + +//if functions.php file exist +require_once dirname(dirname(__FILE__)) . '/include/functions.php'; + +// Load language files +xoops_loadLanguage('admin', $thisModuleDir); +xoops_loadLanguage('modinfo', $thisModuleDir); +xoops_loadLanguage('main', $thisModuleDir); + +$pathIcon16 = '../'.$xoopsModule->getInfo('icons16'); +$pathIcon32 = '../'.$xoopsModule->getInfo('icons32'); +$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin'); + +if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){ + include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'); + }else{ + redirect_header("../../../admin.php", 5, _AM_XLANG_MODULEADMIN_MISSING, false); } \ No newline at end of file Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/admin/langform.inc.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/admin/langform.inc.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/admin/langform.inc.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,84 +1,95 @@ -<?php -// $Id$ -// ------------------------------------------------------------------------ // -// Xlanguage: eXtensible Language Management For Xoops // -// Copyright (c) 2004 Xoops China Community // -// <http://www.xoops.org.cn/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: D.J.(phppp) ph...@ho... // -// URL: http://www.xoops.org.cn // -// ------------------------------------------------------------------------- // - -include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; -$sform = new XoopsThemeForm(_AM_XLANG_EDITLANG, "langform", xoops_getenv('PHP_SELF')); - -if($isBase){ - $lang_select = new XoopsFormSelect(_AM_XLANG_NAME, 'lang_name', $lang_name); - $lang_select->addOptionArray($xlanguage_handler->getXoopsLangList()); - $sform->addElement($lang_select, true); -}else{ - $sform->addElement(new XoopsFormText(_AM_XLANG_NAME, 'lang_name', 50, 255, $lang_name), true); -} - -$sform->addElement(new XoopsFormText(_AM_XLANG_DESC, 'lang_desc', 50, 255, $lang_desc)); -$sform->addElement(new XoopsFormText(_AM_XLANG_CHARSET, 'lang_charset', 50, 255, $lang_charset), true); -$sform->addElement(new XoopsFormText(_AM_XLANG_CODE, 'lang_code', 50, 255, $lang_code), true); -if(!$isBase){ - $baseList =& $xlanguage_handler->getAll(); - $base_list = array(); - foreach($baseList as $base => $baselang){ - $base_list[$base] = $base; - } - - $base_select = new XoopsFormSelect(_AM_XLANG_BASE, 'lang_base', $lang_base); - $base_select->addOptionArray($base_list); - $sform->addElement($base_select, true); -} -$sform->addElement(new XoopsFormText(_AM_XLANG_WEIGHT, 'weight', 10, 10, $weight)); - -$image_option_tray = new XoopsFormElementTray(_AM_XLANG_IMAGE, ''); -$image_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> dirname() . "/images/"); -$lang_image =(empty($lang_image))?'noflag.gif':$lang_image; -$image_select = new XoopsFormSelect('', 'lang_image', $lang_image); -$image_select->addOptionArray($image_array); -$image_select->setExtra("onchange='showImgSelected(\"image\", \"lang_image\", \"/modules/" . $xoopsModule -> dirname() . "/images/\", \"\", \"" . XOOPS_URL . "\")'"); -$image_tray = new XoopsFormElementTray('', ' '); -$image_tray->addElement($image_select); -if (!empty($lang_image)){ - $image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/images/" . $lang_image . "' name='image' id='image' alt='' /></div>")); -}else{ - $image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/images/blank.gif' name='image' id='image' alt='' /></div>")); -} -$image_option_tray->addElement($image_tray); -$sform->addElement($image_option_tray); - -if(isset($lang_id)) $sform->addElement(new XoopsFormHidden('lang_id', $lang_id)); -$sform->addElement(new XoopsFormHidden('type', $type)); - -$button_tray = new XoopsFormElementTray('', ''); -$button_tray->addElement(new XoopsFormHidden('op', 'save')); -$button_tray->addElement(new XoopsFormButton('', '', _GO, 'submit')); -$button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); -$sform->addElement($button_tray); - -$sform->display(); +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// Xlanguage: eXtensible Language Management For Xoops // +// Copyright (c) 2004 Xoops China Community // +// <http://www.xoops.org.cn/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: D.J.(phppp) ph...@ho... // +// URL: http://www.xoops.org.cn // +// ------------------------------------------------------------------------- // + +include XOOPS_ROOT_PATH."/class/xoopsformloader.php"; +$sform = new XoopsThemeForm(_AM_XLANG_EDITLANG, "langform", xoops_getenv('PHP_SELF')); + +if($isBase){ + $lang_select = new XoopsFormSelect(_AM_XLANG_NAME, 'lang_name', $lang_name); + $lang_select->addOptionArray($xlanguage_handler->getXoopsLangList()); + $sform->addElement($lang_select, true); +}else{ + $sform->addElement(new XoopsFormText(_AM_XLANG_NAME, 'lang_name', 50, 255, $lang_name), true); +} + +$sform->addElement(new XoopsFormText(_AM_XLANG_DESC, 'lang_desc', 50, 255, $lang_desc)); + + +//$sform->addElement(new XoopsFormText(_AM_XLANG_CHARSET, 'lang_charset', 50, 255, $lang_charset), true); +$lang_charset = new XoopsFormText(_AM_XLANG_CHARSET, 'lang_charset', 50, 255, $lang_charset); +$lang_charset->setDescription(_AM_XLANG_CHARSET_DESC); +$sform->addElement($lang_charset, true); + +//$sform->addElement(new XoopsFormText(_AM_XLANG_CODE, 'lang_code', 50, 255, $lang_code), true); +$lang_code = new XoopsFormText(_AM_XLANG_CODE, 'lang_charset', 50, 255, $lang_code); +$lang_code->setDescription(_AM_XLANG_CODE_DESC); +$sform->addElement($lang_code, true); + + +if(!$isBase){ + $baseList =& $xlanguage_handler->getAll(); + $base_list = array(); + foreach($baseList as $base => $baselang){ + $base_list[$base] = $base; + } + + $base_select = new XoopsFormSelect(_AM_XLANG_BASE, 'lang_base', $lang_base); + $base_select->addOptionArray($base_list); + $sform->addElement($base_select, true); +} +$sform->addElement(new XoopsFormText(_AM_XLANG_WEIGHT, 'weight', 10, 10, $weight)); + +$image_option_tray = new XoopsFormElementTray(_AM_XLANG_IMAGE, ''); +$image_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> dirname() . "/images/"); +$lang_image =(empty($lang_image))?'noflag.gif':$lang_image; +$image_select = new XoopsFormSelect('', 'lang_image', $lang_image); +$image_select->addOptionArray($image_array); +$image_select->setExtra("onchange='showImgSelected(\"image\", \"lang_image\", \"/modules/" . $xoopsModule -> dirname() . "/images/\", \"\", \"" . XOOPS_URL . "\")'"); +$image_tray = new XoopsFormElementTray('', ' '); +$image_tray->addElement($image_select); +if (!empty($lang_image)){ + $image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/images/" . $lang_image . "' name='image' id='image' alt='' /></div>")); +}else{ + $image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/images/blank.gif' name='image' id='image' alt='' /></div>")); +} +$image_option_tray->addElement($image_tray); +$sform->addElement($image_option_tray); + +if(isset($lang_id)) $sform->addElement(new XoopsFormHidden('lang_id', $lang_id)); +$sform->addElement(new XoopsFormHidden('type', $type)); + +$button_tray = new XoopsFormElementTray('', ''); +$button_tray->addElement(new XoopsFormHidden('op', 'save')); +$button_tray->addElement(new XoopsFormButton('', '', _GO, 'submit')); +$button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit')); +$sform->addElement($button_tray); + +$sform->display(); ?> \ No newline at end of file Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/class/language.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/class/language.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/class/language.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,363 +1,363 @@ -<?php -// $Id$ -// ------------------------------------------------------------------------ // -// Xlanguage: eXtensible Language Management For Xoops // -// Copyright (c) 2004 Xoops China Community // -// <http://www.xoops.org.cn/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: D.J.(phppp) ph...@ho... // -// URL: http://www.xoops.org.cn // -// ------------------------------------------------------------------------- // -//include_once(XOOPS_ROOT_PATH."/class/xoopslists.php"); -//include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php'); -//include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php'); - -class Blanguage extends XoopsObject -{ - var $isBase; - - function Blanguage() { - $this -> db = & Database :: getInstance(); - $this -> table = $this -> db -> prefix( "xlanguage_base" ); - $this->initVar('lang_id', XOBJ_DTYPE_INT); - $this->initVar('lang_desc', XOBJ_DTYPE_TXTBOX); - $this->initVar('lang_name', XOBJ_DTYPE_TXTBOX); - $this->initVar('lang_code', XOBJ_DTYPE_TXTBOX); - $this->initVar('lang_charset', XOBJ_DTYPE_TXTBOX); - $this->initVar('lang_image', XOBJ_DTYPE_TXTBOX); - $this->initVar('weight', XOBJ_DTYPE_INT); - } - - function prepareVars() - { - foreach ($this->vars as $k => $v) { - $cleanv = $this->cleanVars[$k]; - switch ($v['data_type']) { - case XOBJ_DTYPE_TXTBOX: - case XOBJ_DTYPE_TXTAREA: - case XOBJ_DTYPE_SOURCE: - case XOBJ_DTYPE_EMAIL: - $cleanv = ($v['changed'])?$cleanv:''; - if (!isset($v['not_gpc']) || !$v['not_gpc']) { - $cleanv =$this->db->quoteString($cleanv); - } - break; - case XOBJ_DTYPE_INT: - $cleanv = ($v['changed'])?intval($cleanv):0; - break; - case XOBJ_DTYPE_ARRAY: - $cleanv = ($v['changed'])?$cleanv:serialize(array()); - break; - case XOBJ_DTYPE_STIME: - case XOBJ_DTYPE_MTIME: - case XOBJ_DTYPE_LTIME: - $cleanv = ($v['changed'])?$cleanv:0; - break; - - default: - break; - } - $this->cleanVars[$k] =& $cleanv; - unset($cleanv); - } - return true; - } - - function setBase() - { - $this->isBase = true; - } - - function isBase() - { - return $this->isBase; - } -} - - -class Xlanguage extends Blanguage -{ - function Xlanguage() { - $this->Blanguage(); - $this->table = $this -> db -> prefix( "xlanguage_ext" ); - $this->initVar('lang_base', XOBJ_DTYPE_TXTBOX); - $this->isBase = false; - } -} - -class XlanguageLanguageHandler extends XoopsObjectHandler -{ - var $cached_config; - - function loadConfig() - { - $this->cached_config =& $this->loadFileConfig(); - } - - function &get($id, $isBase =true) - { - $lang = null; - $id = intval($id); - if(!$id) { - return $lang; - } - $prefix = ($isBase) ? "xlanguage_base" : "xlanguage_ext"; - if(isset($this->cached_config[$prefix][$id])) { - $array = $this->cached_config[$prefix][$id]; - }else{ - $sql = 'SELECT * FROM '.$this->db->prefix($prefix).' WHERE lang_id='.$id; - $array = $this->db->fetchArray($this->db->query($sql)); - } - if(!is_array($array) || count($array)==0){ - return $lang; - } - $lang =& $this->create(false, $isBase); - $lang->assignVars($array); - if($isBase) $lang->isBase = true; - return $lang; - } - - function &getByName($name) - { - $lang = null; - if(empty($name) || preg_match("/[^a-zA-Z0-9\_\-]/", $name)) { - return $lang; - } - $isBase = false; - if(isset($this->cached_config['xlanguage_base'][$name])) { - $array = $this->cached_config['xlanguage_base'][$name]; - $isBase = true; - }elseif(isset($this->cached_config['xlanguage_ext'][$name])) { - $array = $this->cached_config['xlanguage_ext'][$name]; - }elseif(!isset($this->cached_config)){ - $sql = 'SELECT * FROM '.$this->db->prefix('xlanguage_base').' WHERE lang_name=\''.$name.'\''; - $result=$this->db->query($sql); - $array = $this->db->fetchArray($result); - if(!is_array($array) || count($array)==0){ - $sql = 'SELECT * FROM '.$this->db->prefix('xlanguage_ext').' WHERE lang_name=\''.$name.'\''; - $result=$this->db->query($sql); - $array = $this->db->fetchArray($result); - if(!is_array($array) || count($array)==0){ - return $lang; - } - }else{ - $isBase = true; - } - } - if(empty($array)) { - return $lang; - } - $lang =& $this->create(false, $isBase); - $lang->assignVars($array); - if(!isset($array['lang_base'])) $lang->isBase = true; - return $lang; - } - - function &getAll($isBase = true) - { - $prefix = ($isBase) ? "xlanguage_base" : "xlanguage_ext"; - $ret = array(); - if(isset($this->cached_config[$prefix])) { - $array = $this->cached_config[$prefix]; - foreach($array as $lang_name=>$myrow){ - $lang =& $this->create(false,$isBase); - $lang->assignVars($myrow); - $ret[$myrow['lang_name']] = $lang; - unset($lang); - } - }elseif(!isset($this->cached_config)){ - $sql = 'SELECT * FROM '.$this->db->prefix($prefix); - $result = $this->db->query($sql); - while ($myrow = $this->db->fetchArray($result)) { - $lang =& $this->create(false,$isBase); - $lang->assignVars($myrow); - $ret[$myrow['lang_name']] = $lang; - unset($lang); - } - } - return $ret; - } - - function &getAllList() - { - $baseArray = $this->getAll(); - - $extArray = $this->getAll(false); - $ret = array(); - if ( is_array($baseArray) && count( $baseArray ) > 0 ){ - foreach( $baseArray as $base ) { - $ret[$base->getVar('lang_name')]['base'] = $base; - unset($base); - } - } - if ( is_array($extArray) && count( $extArray ) > 0 ){ - foreach( $extArray as $ext ) { - $ret[$ext->getVar('lang_base')]['ext'][] = $ext; - unset($ext); - } - } - return $ret; - } - - function &create($isNew = true, $isBase = true) - { - if($isBase) { - $lang = new Blanguage(); - $lang->isBase = true; - } - else $lang = new Xlanguage(); - if ($isNew) $lang->setNew(); - return $lang; - } - - function insert(&$lang) - { - if (!$lang->isDirty()) return true; - if (!$lang->cleanVars()) return false; - $lang->prepareVars(); - foreach ($lang->cleanVars as $k => $v) { - ${$k} = $v; - } - - if ( $lang->isNew() ) { - if($lang->isBase){ - $var_array = array("lang_id", "lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset"); - }else{ - $var_array = array("lang_id", "lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset", "lang_base"); - } - $lang_id = $this->db->genId($lang->table."_lang_id_seq"); - foreach($var_array as $var){ - $val_array[] = ${$var}; - } - $sql = "INSERT INTO ".$lang->table." (".implode(",",$var_array).") VALUES (".implode(",", $val_array).")"; - if ( !$result = $this->db->queryF($sql) ) { - xoops_error( "Insert language error:".$sql ); - return false; - } - if ( $lang_id == 0 ) $lang_id = $this->db->getInsertId(); - $lang->setVar('lang_id', $lang_id); - }else{ - if($lang->isBase){ - $var_array = array("lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset"); - }else{ - $var_array = array("lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset", "lang_base"); - } - $set_array = array(); - foreach($var_array as $var){ - $set_array[] = "$var = ".${$var}; - } - $set_string = implode(',', $set_array); - $sql = "UPDATE ".$lang->table." SET ".$set_string." WHERE lang_id = ".$lang->getVar('lang_id'); - if ( !$result = $this->db->queryF($sql) ) { - xoops_error( "update language error:".$sql ); - return false; - } - } - $this->createConfig(); - return $lang->getVar('lang_id'); - } - - function delete(&$lang) - { - if(!is_object($lang) || !$lang->getVar('lang_id')) return true; - $sql = "DELETE FROM ".$lang->table." WHERE lang_id= ". $lang->getVar('lang_id'); - if (!$result = $this->db->query($sql)) { - return false; - } - $this->createConfig(); - return true; - } - - - function getXoopsLangList() - { - return XoopsLists::getLangList(); - } - - - function createConfig() - { - $file_config = XLANGUAGE_CONFIG_FILE; - @unlink($file_config); - if(!$fp = fopen($file_config, 'w')) { - echo "<br> the config file can not be created: ".$file_config; - return false; - } - - $file_content = "<?php"; - unset($this->cached_config); - $baseArray = $this->getAll(); - if ( is_array($baseArray) && count( $baseArray ) > 0 ){ - $file_content .= "\n \$".XLANGUAGE_CONFIG_VAR."['xlanguage_base'] = array("; - foreach( $baseArray as $lang ) { - $file_content .= "\n \"".$lang->getVar('lang_name')."\"=>array("; - $file_content .= "\n \"lang_name\"=>\"".$lang->getVar('lang_name')."\","; - $file_content .= "\n \"lang_desc\"=>\"".$lang->getVar('lang_desc')."\","; - $file_content .= "\n \"lang_charset\"=>\"".$lang->getVar('lang_charset')."\","; - $file_content .= "\n \"lang_code\"=>\"".$lang->getVar('lang_code')."\","; - $file_content .= "\n \"lang_image\"=>\"".$lang->getVar('lang_image')."\","; - $file_content .= "\n \"lang_id\"=>".$lang->getVar('lang_id').","; - $file_content .= "\n \"weight\"=>".$lang->getVar('weight').""; - $file_content .= "\n ),"; - } - $file_content .= "\n );"; - } - - $extArray = $this->getAll(false); - if ( is_array($extArray) && count( $extArray ) > 0 ){ - $file_content .= "\n \$".XLANGUAGE_CONFIG_VAR."['xlanguage_ext'] = array("; - foreach( $extArray as $lang ) { - $file_content .= "\n \"".$lang->getVar('lang_name')."\"=>array("; - $file_content .= "\n \"lang_name\"=>\"".$lang->getVar('lang_name')."\","; - $file_content .= "\n \"lang_desc\"=>\"".$lang->getVar('lang_desc')."\","; - $file_content .= "\n \"lang_charset\"=>\"".$lang->getVar('lang_charset')."\","; - $file_content .= "\n \"lang_code\"=>\"".$lang->getVar('lang_code')."\","; - $file_content .= "\n \"lang_image\"=>\"".$lang->getVar('lang_image')."\","; - $file_content .= "\n \"lang_base\"=>\"".$lang->getVar('lang_base')."\","; - $file_content .= "\n \"lang_id\"=>".$lang->getVar('lang_id').","; - $file_content .= "\n \"weight\"=>".$lang->getVar('weight').""; - $file_content .= "\n ),"; - } - $file_content .= "\n );"; - } - - $file_content .= "\n?>"; - fputs($fp,$file_content); - fclose($fp); - return true; - } - - function &loadFileConfig() - { - $file_config = XLANGUAGE_CONFIG_FILE; - if(!file_exists($file_config)) $this->createConfig(); - if(!is_readable($file_config)) { - $config = null; - return $config; - }else{ - include $file_config; - return ${XLANGUAGE_CONFIG_VAR}; - } - } - -} +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// Xlanguage: eXtensible Language Management For Xoops // +// Copyright (c) 2004 Xoops China Community // +// <http://www.xoops.org.cn/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: D.J.(phppp) ph...@ho... // +// URL: http://www.xoops.org.cn // +// ------------------------------------------------------------------------- // +//include_once(XOOPS_ROOT_PATH."/class/xoopslists.php"); +//include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php'); +//include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php'); + +class Blanguage extends XoopsObject +{ + var $isBase; + + function Blanguage() { + $this -> db = & XoopsDatabaseFactory::getDatabaseConnection(); + $this -> table = $this -> db -> prefix( "xlanguage_base" ); + $this->initVar('lang_id', XOBJ_DTYPE_INT); + $this->initVar('lang_desc', XOBJ_DTYPE_TXTBOX); + $this->initVar('lang_name', XOBJ_DTYPE_TXTBOX); + $this->initVar('lang_code', XOBJ_DTYPE_TXTBOX); + $this->initVar('lang_charset', XOBJ_DTYPE_TXTBOX); + $this->initVar('lang_image', XOBJ_DTYPE_TXTBOX); + $this->initVar('weight', XOBJ_DTYPE_INT); + } + + function prepareVars() + { + foreach ($this->vars as $k => $v) { + $cleanv = $this->cleanVars[$k]; + switch ($v['data_type']) { + case XOBJ_DTYPE_TXTBOX: + case XOBJ_DTYPE_TXTAREA: + case XOBJ_DTYPE_SOURCE: + case XOBJ_DTYPE_EMAIL: + $cleanv = ($v['changed'])?$cleanv:''; + if (!isset($v['not_gpc']) || !$v['not_gpc']) { + $cleanv =$this->db->quoteString($cleanv); + } + break; + case XOBJ_DTYPE_INT: + $cleanv = ($v['changed'])?intval($cleanv):0; + break; + case XOBJ_DTYPE_ARRAY: + $cleanv = ($v['changed'])?$cleanv:serialize(array()); + break; + case XOBJ_DTYPE_STIME: + case XOBJ_DTYPE_MTIME: + case XOBJ_DTYPE_LTIME: + $cleanv = ($v['changed'])?$cleanv:0; + break; + + default: + break; + } + $this->cleanVars[$k] =& $cleanv; + unset($cleanv); + } + return true; + } + + function setBase() + { + $this->isBase = true; + } + + function isBase() + { + return $this->isBase; + } +} + + +class Xlanguage extends Blanguage +{ + function Xlanguage() { + $this->Blanguage(); + $this->table = $this -> db -> prefix( "xlanguage_ext" ); + $this->initVar('lang_base', XOBJ_DTYPE_TXTBOX); + $this->isBase = false; + } +} + +class XlanguageLanguageHandler extends XoopsObjectHandler +{ + var $cached_config; + + function loadConfig() + { + $this->cached_config =& $this->loadFileConfig(); + } + + function &get($id, $isBase =true) + { + $lang = null; + $id = intval($id); + if(!$id) { + return $lang; + } + $prefix = ($isBase) ? "xlanguage_base" : "xlanguage_ext"; + if(isset($this->cached_config[$prefix][$id])) { + $array = $this->cached_config[$prefix][$id]; + }else{ + $sql = 'SELECT * FROM '.$this->db->prefix($prefix).' WHERE lang_id='.$id; + $array = $this->db->fetchArray($this->db->query($sql)); + } + if(!is_array($array) || count($array)==0){ + return $lang; + } + $lang =& $this->create(false, $isBase); + $lang->assignVars($array); + if($isBase) $lang->isBase = true; + return $lang; + } + + function &getByName($name) + { + $lang = null; + if(empty($name) || preg_match("/[^a-zA-Z0-9\_\-]/", $name)) { + return $lang; + } + $isBase = false; + if(isset($this->cached_config['xlanguage_base'][$name])) { + $array = $this->cached_config['xlanguage_base'][$name]; + $isBase = true; + }elseif(isset($this->cached_config['xlanguage_ext'][$name])) { + $array = $this->cached_config['xlanguage_ext'][$name]; + }elseif(!isset($this->cached_config)){ + $sql = 'SELECT * FROM '.$this->db->prefix('xlanguage_base').' WHERE lang_name=\''.$name.'\''; + $result=$this->db->query($sql); + $array = $this->db->fetchArray($result); + if(!is_array($array) || count($array)==0){ + $sql = 'SELECT * FROM '.$this->db->prefix('xlanguage_ext').' WHERE lang_name=\''.$name.'\''; + $result=$this->db->query($sql); + $array = $this->db->fetchArray($result); + if(!is_array($array) || count($array)==0){ + return $lang; + } + }else{ + $isBase = true; + } + } + if(empty($array)) { + return $lang; + } + $lang =& $this->create(false, $isBase); + $lang->assignVars($array); + if(!isset($array['lang_base'])) $lang->isBase = true; + return $lang; + } + + function &getAll($isBase = true) + { + $prefix = ($isBase) ? "xlanguage_base" : "xlanguage_ext"; + $ret = array(); + if(isset($this->cached_config[$prefix])) { + $array = $this->cached_config[$prefix]; + foreach($array as $lang_name=>$myrow){ + $lang =& $this->create(false,$isBase); + $lang->assignVars($myrow); + $ret[$myrow['lang_name']] = $lang; + unset($lang); + } + }elseif(!isset($this->cached_config)){ + $sql = 'SELECT * FROM '.$this->db->prefix($prefix); + $result = $this->db->query($sql); + while ($myrow = $this->db->fetchArray($result)) { + $lang =& $this->create(false,$isBase); + $lang->assignVars($myrow); + $ret[$myrow['lang_name']] = $lang; + unset($lang); + } + } + return $ret; + } + + function &getAllList() + { + $baseArray = $this->getAll(); + + $extArray = $this->getAll(false); + $ret = array(); + if ( is_array($baseArray) && count( $baseArray ) > 0 ){ + foreach( $baseArray as $base ) { + $ret[$base->getVar('lang_name')]['base'] = $base; + unset($base); + } + } + if ( is_array($extArray) && count( $extArray ) > 0 ){ + foreach( $extArray as $ext ) { + $ret[$ext->getVar('lang_base')]['ext'][] = $ext; + unset($ext); + } + } + return $ret; + } + + function &create($isNew = true, $isBase = true) + { + if($isBase) { + $lang = new Blanguage(); + $lang->isBase = true; + } + else $lang = new Xlanguage(); + if ($isNew) $lang->setNew(); + return $lang; + } + + function insert(&$lang) + { + if (!$lang->isDirty()) return true; + if (!$lang->cleanVars()) return false; + $lang->prepareVars(); + foreach ($lang->cleanVars as $k => $v) { + ${$k} = $v; + } + + if ( $lang->isNew() ) { + if($lang->isBase){ + $var_array = array("lang_id", "lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset"); + }else{ + $var_array = array("lang_id", "lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset", "lang_base"); + } + $lang_id = $this->db->genId($lang->table."_lang_id_seq"); + foreach($var_array as $var){ + $val_array[] = ${$var}; + } + $sql = "INSERT INTO ".$lang->table." (".implode(",",$var_array).") VALUES (".implode(",", $val_array).")"; + if ( !$result = $this->db->queryF($sql) ) { + xoops_error( "Insert language error:".$sql ); + return false; + } + if ( $lang_id == 0 ) $lang_id = $this->db->getInsertId(); + $lang->setVar('lang_id', $lang_id); + }else{ + if($lang->isBase){ + $var_array = array("lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset"); + }else{ + $var_array = array("lang_name", "lang_desc", "lang_image", "weight", "lang_code", "lang_charset", "lang_base"); + } + $set_array = array(); + foreach($var_array as $var){ + $set_array[] = "$var = ".${$var}; + } + $set_string = implode(',', $set_array); + $sql = "UPDATE ".$lang->table." SET ".$set_string." WHERE lang_id = ".$lang->getVar('lang_id'); + if ( !$result = $this->db->queryF($sql) ) { + xoops_error( "update language error:".$sql ); + return false; + } + } + $this->createConfig(); + return $lang->getVar('lang_id'); + } + + function delete(&$lang) + { + if(!is_object($lang) || !$lang->getVar('lang_id')) return true; + $sql = "DELETE FROM ".$lang->table." WHERE lang_id= ". $lang->getVar('lang_id'); + if (!$result = $this->db->query($sql)) { + return false; + } + $this->createConfig(); + return true; + } + + + function getXoopsLangList() + { + return XoopsLists::getLangList(); + } + + + function createConfig() + { + $file_config = XLANGUAGE_CONFIG_FILE; + @unlink($file_config); + if(!$fp = fopen($file_config, 'w')) { + echo "<br> the config file can not be created: ".$file_config; + return false; + } + + $file_content = "<?php"; + unset($this->cached_config); + $baseArray = $this->getAll(); + if ( is_array($baseArray) && count( $baseArray ) > 0 ){ + $file_content .= "\n \$".XLANGUAGE_CONFIG_VAR."['xlanguage_base'] = array("; + foreach( $baseArray as $lang ) { + $file_content .= "\n \"".$lang->getVar('lang_name')."\"=>array("; + $file_content .= "\n \"lang_name\"=>\"".$lang->getVar('lang_name')."\","; + $file_content .= "\n \"lang_desc\"=>\"".$lang->getVar('lang_desc')."\","; + $file_content .= "\n \"lang_charset\"=>\"".$lang->getVar('lang_charset')."\","; + $file_content .= "\n \"lang_code\"=>\"".$lang->getVar('lang_code')."\","; + $file_content .= "\n \"lang_image\"=>\"".$lang->getVar('lang_image')."\","; + $file_content .= "\n \"lang_id\"=>".$lang->getVar('lang_id').","; + $file_content .= "\n \"weight\"=>".$lang->getVar('weight').""; + $file_content .= "\n ),"; + } + $file_content .= "\n );"; + } + + $extArray = $this->getAll(false); + if ( is_array($extArray) && count( $extArray ) > 0 ){ + $file_content .= "\n \$".XLANGUAGE_CONFIG_VAR."['xlanguage_ext'] = array("; + foreach( $extArray as $lang ) { + $file_content .= "\n \"".$lang->getVar('lang_name')."\"=>array("; + $file_content .= "\n \"lang_name\"=>\"".$lang->getVar('lang_name')."\","; + $file_content .= "\n \"lang_desc\"=>\"".$lang->getVar('lang_desc')."\","; + $file_content .= "\n \"lang_charset\"=>\"".$lang->getVar('lang_charset')."\","; + $file_content .= "\n \"lang_code\"=>\"".$lang->getVar('lang_code')."\","; + $file_content .= "\n \"lang_image\"=>\"".$lang->getVar('lang_image')."\","; + $file_content .= "\n \"lang_base\"=>\"".$lang->getVar('lang_base')."\","; + $file_content .= "\n \"lang_id\"=>".$lang->getVar('lang_id').","; + $file_content .= "\n \"weight\"=>".$lang->getVar('weight').""; + $file_content .= "\n ),"; + } + $file_content .= "\n );"; + } + + $file_content .= "\n?>"; + fputs($fp,$file_content); + fclose($fp); + return true; + } + + function &loadFileConfig() + { + $file_config = XLANGUAGE_CONFIG_FILE; + if(!file_exists($file_config)) $this->createConfig(); + if(!is_readable($file_config)) { + $config = null; + return $config; + }else{ + include $file_config; + return ${XLANGUAGE_CONFIG_VAR}; + } + } + +} ?> \ No newline at end of file Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/language/english/admin.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/language/english/admin.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/language/english/admin.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,59 +1,60 @@ -<?php -// $Id$ -// ------------------------------------------------------------------------ // -// Xlanguage: eXtensible Language Management For Xoops // -// Copyright (c) 2004 Xoops China Community // -// <http://www.xoops.org.cn/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: D.J.(phppp) ph...@ho... // -// URL: http://www.xoops.org.cn // -// ------------------------------------------------------------------------- // - -define('_AM_XLANG_CONFIG', 'XLanguage Configuration'); -define('_AM_XLANG_DELETE_CFM', 'Are you sure to delete the language?'); -define('_AM_XLANG_DELETED', 'The language has been deleted'); -define('_AM_XLANG_SAVED', 'The language has been saved'); -define('_AM_XLANG_EDITLANG', 'Edit language'); -define('_AM_XLANG_ADDLANG', 'Add language'); -define('_AM_XLANG_CREATED', 'The config file has been created'); -define('_AM_XLANG_CONFIGOK', 'Config file is availabe'); -define('_AM_XLANG_CONFIGNOTOK', 'Config file is not availabe'); -define('_AM_XLANG_ADDBASE', 'Add base language'); -define('_AM_XLANG_ADDEXT', 'Add extended language'); -define('_AM_XLANG_CREATECONFIG', 'Create config file'); -define('_AM_XLANG_ABOUT', 'About this module'); -define('_AM_XLANG_LANGLIST', 'language list'); -define('_AM_XLANG_DESC', 'Desc'); -define('_AM_XLANG_NAME', 'Name'); -define('_AM_XLANG_CHARSET', 'charset'); -define('_AM_XLANG_CODE', 'code'); -define('_AM_XLANG_IMAGE', 'Image'); -define('_AM_XLANG_WEIGHT', 'Weight'); -define('_AM_XLANG_BASE', 'Base language'); -// 3.03 -define('_AM_XLANG_ACTION', 'Action'); - -//ModuleAdmin -define('_AM_MODULEADMIN_MISSING','Error: The ModuleAdmin class is missing. Please install the ModuleAdmin Class into /Frameworks (see /docs/readme.txt)'); - -// Text for Admin footer -define("_AM_XLANG_FOOTER", "<div class='center smallsmall italic pad5'>xLanguage is maintained by the <a class='tooltip' rel='external' href='http://xoops.org/' title='Visit XOOPS Community'>XOOPS Community</a></div>"); \ No newline at end of file +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// Xlanguage: eXtensible Language Management For Xoops // +// Copyright (c) 2004 Xoops China Community // +// <http://www.xoops.org.cn/> // +// ------------------------------------------------------------------------ // +// This program is free software; you can redistribute it and/or modify // +// it under the terms of the GNU General Public License as published by // +// the Free Software Foundation; either version 2 of the License, or // +// (at your option) any later version. // +// // +// You may not change or alter any portion of this comment or credits // +// of supporting developers from this source code or any supporting // +// source code which is considered copyrighted (c) material of the // +// original comment or credit authors. // +// // +// This program is distributed in the hope that it will be useful, // +// but WITHOUT ANY WARRANTY; without even the implied warranty of // +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // +// GNU General Public License for more details. // +// // +// You should have received a copy of the GNU General Public License // +// along with this program; if not, write to the Free Software // +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // +// ------------------------------------------------------------------------ // +// Author: D.J.(phppp) ph...@ho... // +// URL: http://www.xoops.org.cn // +// ------------------------------------------------------------------------- // + +define('_AM_XLANG_CONFIG', 'XLanguage Configuration'); +define('_AM_XLANG_DELETE_CFM', 'Are you sure to delete the language?'); +define('_AM_XLANG_DELETED', 'The language has been deleted'); +define('_AM_XLANG_SAVED', 'The language has been saved'); +define('_AM_XLANG_EDITLANG', 'Edit language'); +define('_AM_XLANG_ADDLANG', 'Add language'); +define('_AM_XLANG_CREATED', 'The config file has been created'); +define('_AM_XLANG_CONFIGOK', 'Config file is availabe'); +define('_AM_XLANG_CONFIGNOTOK', 'Config file is not availabe'); +define('_AM_XLANG_ADDBASE', 'Add base language'); +define('_AM_XLANG_ADDEXT', 'Add extended language'); +define('_AM_XLANG_CREATECONFIG', 'Create config file'); +define('_AM_XLANG_ABOUT', 'About this module'); +define('_AM_XLANG_LANGLIST', 'language list'); +define('_AM_XLANG_DESC', 'Desc'); +define('_AM_XLANG_NAME', 'Name'); +define('_AM_XLANG_CHARSET', 'charset'); +define('_AM_XLANG_CODE', 'code'); +define('_AM_XLANG_IMAGE', 'Image'); +define('_AM_XLANG_WEIGHT', 'Weight'); +define('_AM_XLANG_BASE', 'Base language'); + +// 3.03 +define('_AM_XLANG_ACTION', 'Action'); + +//ModuleAdmin +define('_AM_XLANG_MODULEADMIN_MISSING','Error: The ModuleAdmin class is missing. Please install the ModuleAdmin Class into /Frameworks (see /docs/readme.txt)'); + +define('_AM_XLANG_CHARSET_DESC', "'For example 'iso-8859-1' or ' gb2312' or 'UTF-8'"); +define('_AM_XLANG_CODE_DESC', "e.g. 'en' or 'xen', not a true language code, just a tag to indicate English content"); \ No newline at end of file Modified: XoopsModules/xlanguage/branches/mamba/xlanguage/xoops_version.php =================================================================== --- XoopsModules/xlanguage/branches/mamba/xlanguage/xoops_version.php 2012-06-19 13:33:41 UTC (rev 9672) +++ XoopsModules/xlanguage/branches/mamba/xlanguage/xoops_version.php 2012-06-19 14:53:13 UTC (rev 9673) @@ -1,92 +1,92 @@ -<?php -// $Id$ -// ------------------------------------------------------------------------ // -// Xlanguage: eXtensible Language Management For Xoops // -// Copyright (c) 2004 Xoops China Community // -// <http://www.xoops.org.cn/> // -// ------------------------------------------------------------------------ // -// This program is free software; you can redistribute it and/or modify // -// it under the terms of the GNU General Public License as published by // -// the Free Software Foundation; either version 2 of the License, or // -// (at your option) any later version. // -// // -// You may not change or alter any portion of this comment or credits // -// of supporting developers from this source code or any supporting // -// source code which is considered copyrighted (c) material of the // -// original comment or credit authors. // -// // -// This program is distributed in the hope that it will be useful, // -// but WITHOUT ANY WARRANTY; without even the implied warranty of // -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // -// GNU General Public License for more details. // -// // -// You should have received a copy of the GNU General Public License // -// along with this program; if not, write to the Free Software // -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// ------------------------------------------------------------------------ // -// Author: D.J.(phppp) ph...@ho... // -// URL: http://xoops.org.cn // -// ------------------------------------------------------------------------- // -$modversion['name'] = _MI_XLANGUAGE_NAME; -$modversion['version'] = 3.03; -$modversion['description'] = _MI_XLANGUAGE_DESC; -$modversion['credits'] = "Adi Chiributa - web...@ar...; wjue - http://www.wjue.org; GIJOE - http://www.peak.ne.jp"; -$modversion['author'] = "phppp(D.J.) - http://xoops.org.cn, http://xoopsforge.com"; -$modversion['help'] = "page=help"; -$modversion['license'] = "GNU GPL"; -$modversion['license_url'] = "www.gnu.org/licenses/gpl-2.0.html/"; -$modversion['official'] = 0; -$modversion['image'] = "xlanguage_logo.png"; -$modversion['dirname'] = "xlanguage"; -$modversion['dirmoduleadmin'] = '/Frameworks/moduleclasses/moduleadmin'; -$modversion['icons16'] = '../../Frameworks/moduleclasses/icons/16'; -$modversion['icons32'] = '../../Frameworks/moduleclasses/icons/32'; - -//about -$modversion['release_date'] = '2011/12/12'; -$modversion["module_website_url"] = "http://www.xoops.org/"; -$modversion["module_website_name"] = "XOOPS"; -$modversion["module_status"] = "RC"; -$modversion['min_php']='5.2'; -$modversion['min_xoops']="2.5"; -$modversion['min_admin']='1.1'; -$modversion['min_db']= array('mysql'=>'5.0.7', 'mysqli'=>'5.0.7'); - -$modversion['system_menu'] = 1; - -$modversion['sqlfile']['mysql'] = "sql/mysql.sql"; -$modversion['tables'][0] = "xlanguage_base"; -$modversion['tables'][1] = "xlanguage_ext"; - -// Admin things -$modversion['hasAdmin'] = 1; -$modversion['adminindex'] = "admin/index.php"; -$modversion['adminmenu'] = "admin/menu.php"; - -// Use smarty -$modversion["use_smarty"] = 1; - -//language selection block -$modversion['blocks'][1]['file'] = "xlanguage_blocks.php"; -$modversion['blocks'][1]['name'] = _MI_XLANGUAGE_BNAME; -$modversion['blocks'][1]['description'] = ''; -$modversion['blocks'][1]['show_func'] = "b_xlanguage_select_show"; -$modversion['blocks'][1]['edit_func'] = "b_xlanguage_select_edit"; -$modversion['blocks'][1]['options'] = "images| |5"; -$modversion["blocks"][1]["template"] = "xlanguage_block.html"; - -$modversion['releasedate'] = "July 9th, 2006"; -$modversion['status'] = "stable"; -$modversion['xoopsversion'] = "2.0+"; - -$modversion['author_website'][1]['url'] = "http://xoops.org.cn"; -$modversion['author_website'][1]['name'] = "The Xoops China Community"; -$modversion['author_website'][2]['url'] = "http://xoopsforge.com"; -$modversion['author_website'][2]['name'] = "XForge"; - -$modversion['author_email'] = "ph...@ho..."; -$modversion['demo_site_url'] = "http://xoops.org.cn"; -$modversion['demo_site_name'] = "Xoops China"; -$modversion['support_site_url'] = "http://xoopsforge.com"; -$modversion['support_site_name'] = "XForge"; +<?php +// $Id$ +// ------------------------------------------------------------------------ // +// Xlanguage: eXtensible Language Management For Xoops // +// Copyright (c) 2004 Xoops China Community // +// <http://www.xoops.org.cn/> // +// -------------------------------------------------------------... [truncated message content] |