|
From: <be...@us...> - 2015-09-25 10:12:30
|
Revision: 13153
http://sourceforge.net/p/xoops/svn/13153
Author: beckmi
Date: 2015-09-25 10:12:26 +0000 (Fri, 25 Sep 2015)
Log Message:
-----------
add /assets
Modified Paths:
--------------
XoopsModules/xlanguage/trunk/xlanguage/admin/about.php
XoopsModules/xlanguage/trunk/xlanguage/admin/about2.php
XoopsModules/xlanguage/trunk/xlanguage/admin/admin_footer.php
XoopsModules/xlanguage/trunk/xlanguage/admin/admin_header.php
XoopsModules/xlanguage/trunk/xlanguage/admin/index.php
XoopsModules/xlanguage/trunk/xlanguage/admin/langform.inc.php
XoopsModules/xlanguage/trunk/xlanguage/admin/main.php
XoopsModules/xlanguage/trunk/xlanguage/admin/menu.php
XoopsModules/xlanguage/trunk/xlanguage/api.php
XoopsModules/xlanguage/trunk/xlanguage/blocks/xlanguage_blocks.php
XoopsModules/xlanguage/trunk/xlanguage/class/language.php
XoopsModules/xlanguage/trunk/xlanguage/docs/changelog.txt
XoopsModules/xlanguage/trunk/xlanguage/docs/credits.txt
XoopsModules/xlanguage/trunk/xlanguage/docs/install.txt
XoopsModules/xlanguage/trunk/xlanguage/docs/readme.txt
XoopsModules/xlanguage/trunk/xlanguage/include/functions.php
XoopsModules/xlanguage/trunk/xlanguage/include/vars.php
XoopsModules/xlanguage/trunk/xlanguage/language/english/admin.php
XoopsModules/xlanguage/trunk/xlanguage/language/english/help/help.html
XoopsModules/xlanguage/trunk/xlanguage/language/english/help/index.html
XoopsModules/xlanguage/trunk/xlanguage/language/english/index.html
XoopsModules/xlanguage/trunk/xlanguage/language/index.html
XoopsModules/xlanguage/trunk/xlanguage/preloads/core.php
XoopsModules/xlanguage/trunk/xlanguage/preloads/index.html
XoopsModules/xlanguage/trunk/xlanguage/sql/index.html
XoopsModules/xlanguage/trunk/xlanguage/sql/mysql.sql
XoopsModules/xlanguage/trunk/xlanguage/xoops_version.php
Added Paths:
-----------
XoopsModules/xlanguage/trunk/xlanguage/assets/
XoopsModules/xlanguage/trunk/xlanguage/assets/css/
XoopsModules/xlanguage/trunk/xlanguage/assets/css/index.html
XoopsModules/xlanguage/trunk/xlanguage/assets/images/
XoopsModules/xlanguage/trunk/xlanguage/assets/images/albania.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/austria.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/belgium.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/brazil.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/canada.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/china.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/cyprus.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/czech.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/danish.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/english.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/french.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/german.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/greece.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/index.html
XoopsModules/xlanguage/trunk/xlanguage/assets/images/ireland.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/italian.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/japan.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/korea.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/lebanon.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/luxemburg.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/malta.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/mexico.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/nederlands.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/noflag.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/norway.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/poland.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/russia.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/slovakia.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/spanish.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/sweden.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/swiss.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/taiwan(Chinese Taipei).gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/taiwan(Republic of China).gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/turkey.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/images/usa.gif
XoopsModules/xlanguage/trunk/xlanguage/assets/index.html
XoopsModules/xlanguage/trunk/xlanguage/assets/js/
XoopsModules/xlanguage/trunk/xlanguage/assets/js/index.html
XoopsModules/xlanguage/trunk/xlanguage/templates/blocks/index.html
XoopsModules/xlanguage/trunk/xlanguage/templates/blocks/xlanguage_block.tpl
Removed Paths:
-------------
XoopsModules/xlanguage/trunk/xlanguage/images/
XoopsModules/xlanguage/trunk/xlanguage/templates/blocks/xlanguage_block.html
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/about.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/about.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/about.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -9,7 +9,7 @@
* 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)
+ * @copyright XOOPS Project (http://xoops.org)
* @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
* @package xlanguage
* @since 2.0
@@ -17,7 +17,7 @@
* @version $Id $
**/
-include_once dirname(__FILE__) . '/admin_header.php';
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
@@ -26,4 +26,4 @@
echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
-include 'admin_footer.php';
+include_once __DIR__ . '/admin_footer.php';
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/about2.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/about2.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/about2.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,33 +1,23 @@
<?php
-// $Id: about2.php 8203 2011-11-07 03:55:46Z beckmi $
-// ------------------------------------------------------------------------ //
-// 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 '../../../include/cp_header.php';
+/**
+ * xLanguage module (eXtensible Language Management For XOOPS)
+ *
+ * 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 XOOPS Project (http://xoops.org)
+ * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @package xlanguage
+ * @since 2.0
+ * @author D.J.(phppp) ph...@ho...
+ * @version $Id $
+ **/
+
+include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
xoops_cp_header();
$myts = &MyTextSanitizer::getInstance();
@@ -37,20 +27,22 @@
// Left headings...
echo "<a href='index.php'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/" . $versioninfo -> getInfo('image') . "' alt='' hspace='10' vspace='0' align='left'></a>";
-echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " ver " . $versioninfo->getInfo('version') . "</div>";
+echo "<div style='margin-top: 10px; color: #33538e; margin-bottom: 4px; font-size: 18px; line-height: 18px; font-weight: bold; display: block;'>" . $versioninfo->getInfo('name') . " ver "
+ . $versioninfo->getInfo('version') . "</div>";
echo "</div>";
echo "<div>" . _MI_XLANG_RELEASE . ": " . $versioninfo -> getInfo('releasedate') . "</div>";
// Author Information
$sform = new XoopsThemeForm(_MI_XLANG_AUTHOR_INFO, "", "");
-if ( $versioninfo->getInfo('author_realname'))
+if ($versioninfo->getInfo('author_realname')) {
$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
-else
+} else {
$author_name = $versioninfo->getInfo('author');
+}
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_NAME, $author_name));
$author_sites = $versioninfo -> getInfo('author_website');
$author_site_info = "";
-foreach($author_sites as $site){
+foreach ($author_sites as $site) {
$author_site_info .= "<a href='" . $site['url'] . "' target='blank'>" . $site['name'] . "</a>; ";
}
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_WEBSITE, $author_site_info));
@@ -66,8 +58,7 @@
$sform -> display();
$file = "../bugfixlist.txt";
-if (@file_exists($file))
-{
+if (@file_exists($file)) {
$fp = @fopen($file, "r");
$bugtext = @fread($fp, filesize($file));
@fclose($file);
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/admin_footer.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/admin_footer.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/admin_footer.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -2,7 +2,7 @@
echo "<div class='adminfooter'>\n"
." <div style='text-align: center;'>\n"
- ." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
+ ." <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
." </div>\n"
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
."</div>";
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/admin_header.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/admin_header.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/admin_header.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,6 +1,6 @@
<?php
/**
- * XoopsPartners module
+ * xLanguage module (eXtensible Language Management For XOOPS)
*
* 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
@@ -9,38 +9,33 @@
* 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 $
-**/
+ * @copyright XOOPS Project (http://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 $
+ **/
-$path = dirname(dirname(dirname(dirname(__FILE__))));
+$path = dirname(dirname(dirname(__DIR__)));
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');
+$moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname');
//if functions.php file exist
-require_once dirname(dirname(__FILE__)) . '/include/functions.php';
+require_once dirname(__DIR__) . '/include/functions.php';
// Load language files
-xoops_loadLanguage('admin', $thisModuleDir);
-xoops_loadLanguage('modinfo', $thisModuleDir);
-xoops_loadLanguage('main', $thisModuleDir);
+xoops_loadLanguage('admin', $moduleDirName);
+xoops_loadLanguage('modinfo', $moduleDirName);
+xoops_loadLanguage('main', $moduleDirName);
$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);
- }
+include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/index.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/index.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/index.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,32 +1,25 @@
<?php
-// $Id$
-// ------------------------------------------------------------------------ //
-// XOOPS - PHP Content Management System //
-// Copyright (c) 2000 XOOPS.org //
-// <http://www.xoops.org/> //
-// ------------------------------------------------------------------------ //
-// 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 //
-// ------------------------------------------------------------------------ //
-include '../../../include/cp_header.php';
+/**
+ * xLanguage module (eXtensible Language Management For XOOPS)
+ *
+ * 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 XOOPS Project (http://xoops.org)
+ * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @package xlanguage
+ * @since 2.0
+ * @author XOOPS Team
+ * @version $Id $
+ **/
-include 'admin_header.php';
+include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
+
+include_once __DIR__ . '/admin_header.php';
xoops_cp_header();
$indexAdmin = new ModuleAdmin();
@@ -34,4 +27,4 @@
echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
-include "admin_footer.php";
+include_once __DIR__ . '/admin_footer.php';
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/langform.inc.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/langform.inc.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/langform.inc.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,41 +1,30 @@
<?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 //
-// ------------------------------------------------------------------------- //
+/**
+ * xLanguage module (eXtensible Language Management For XOOPS)
+ *
+ * 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 XOOPS Project (http://xoops.org)
+ * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @package xlanguage
+ * @since 2.0
+ * @author D.J.(phppp) ph...@ho...
+ * @version $Id $
+ **/
include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
$sform = new XoopsThemeForm(_AM_XLANG_EDITLANG, "langform", xoops_getenv('PHP_SELF'));
-if($isBase){
+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{
+} else {
$sform->addElement(new XoopsFormText(_AM_XLANG_NAME, 'lang_name', 50, 255, $lang_name), true);
}
@@ -51,13 +40,13 @@
$lang_charset->setDescription(_AM_XLANG_CHARSET_DESC);
$sform->addElement($lang_charset, true);
-if(!$isBase){
+if (!$isBase) {
$baseList =& $xlanguage_handler->getAll();
$base_list = array();
- foreach($baseList as $base => $baselang){
+ 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);
@@ -65,22 +54,24 @@
$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/");
+$image_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> dirname() . "/assets/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_select->setExtra("onchange='showImgSelected(\"image\", \"lang_image\", \"/modules/" . $xoopsModule -> dirname() . "/assets/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{
+if (!empty($lang_image)) {
+ $image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/assets/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));
+if (isset($lang_id)) {
+ $sform->addElement(new XoopsFormHidden('lang_id', $lang_id));
+}
$sform->addElement(new XoopsFormHidden('type', $type));
$button_tray = new XoopsFormElementTray('', '');
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/main.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/main.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/main.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,94 +1,89 @@
<?php
-// $Id: main.php 8586 2011-12-27 12:03:19Z beckmi $
-// ------------------------------------------------------------------------ //
-// 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 '../../../include/cp_header.php';
-include_once 'admin_header.php';
+/**
+ * xLanguage module (eXtensible Language Management For XOOPS)
+ *
+ * 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 XOOPS Project (http://xoops.org)
+ * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @package xlanguage
+ * @since 2.0
+ * @author D.J.(phppp) ph...@ho...
+ * @version $Id $
+ **/
+include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
+include_once __DIR__ . '/admin_header.php';
+
include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php');
include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php');
$op = "";
-if ( isset( $_POST ) ){
- foreach ( $_POST as $k => $v ) {
+if (isset($_POST)) {
+ foreach ($_POST as $k => $v) {
${$k} = $v;
}
}
-if ( isset( $_GET ) ){
- foreach ( $_GET as $k => $v ) {
+if (isset($_GET)) {
+ foreach ($_GET as $k => $v) {
${$k} = $v;
}
}
-define("XLANG_CONFIG_LINK","<a href='main.php' target='_self'>"._AM_XLANG_CONFIG."</a>");
+define("XLANG_CONFIG_LINK", "<a href='main.php' target='_self'>"._AM_XLANG_CONFIG."</a>");
$xlanguage_handler =& xoops_getmodulehandler('language', 'xlanguage');
$xlanguage_handler->loadConfig();
-switch ( $op )
-{
+switch ($op) {
case "del":
- if (!isset($_POST['ok']) || $_POST['ok'] != 1 ){
+ if (!isset($_POST['ok']) || $_POST['ok'] != 1) {
xoops_cp_header();
-$aboutAdmin = new ModuleAdmin();
-echo $aboutAdmin->addNavigation('main.php');
-// echo "<h4>" . XLANG_CONFIG_LINK . "</h4>";
- xoops_confirm( array( 'op' => 'del', 'type' => $_GET['type'], 'lang_id' => intval( $_GET['lang_id'] ), 'ok' => 1 ), 'main.php', _AM_XLANG_DELETE_CFM );
- }else{
- if(isset($type)&&$type=='ext') $isBase = false;
- else $isBase = true;
+ $aboutAdmin = new ModuleAdmin();
+ echo $aboutAdmin->addNavigation('main.php');
+// echo "<h4>" . XLANG_CONFIG_LINK . "</h4>";
+ xoops_confirm(array( 'op' => 'del', 'type' => $_GET['type'], 'lang_id' => (int)($_GET['lang_id']), 'ok' => 1 ), 'main.php', _AM_XLANG_DELETE_CFM);
+ } else {
+ if (isset($type) && $type == 'ext') {
+ $isBase = false;
+ } else {
+ $isBase = true;
+ }
$lang =& $xlanguage_handler->get($lang_id, $isBase);
$xlanguage_handler->delete($lang);
- redirect_header("main.php",2,_AM_XLANG_DELETED);
+ redirect_header("main.php", 2, _AM_XLANG_DELETED);
}
break;
case "save":
- if(isset($type)&&$type=='ext') $isBase = false;
- else $isBase = true;
- if(isset($lang_id)&&$lang_id>0){
+ if (isset($type) && $type == 'ext') {
+ $isBase = false;
+ } else {
+ $isBase = true;
+ }
+ if (isset($lang_id)&&$lang_id>0) {
$lang =& $xlanguage_handler->get($lang_id, $isBase);
- }else{
+ } else {
$lang =& $xlanguage_handler->create(true, $isBase);
}
$lang_name = preg_replace("/[^a-zA-Z0-9\_\-]/", "", $lang_name);
-
- $lang->setVar('lang_name',$lang_name);
- $lang->setVar('lang_desc',$lang_desc);
- $lang->setVar('lang_code',$lang_code);
- $lang->setVar('lang_charset',$lang_charset);
- $lang->setVar('lang_image',$lang_image);
- if(!$isBase){
- $lang->setVar('lang_base',$lang_base);
+
+ $lang->setVar('lang_name', $lang_name);
+ $lang->setVar('lang_desc', $lang_desc);
+ $lang->setVar('lang_code', $lang_code);
+ $lang->setVar('lang_charset', $lang_charset);
+ $lang->setVar('lang_image', $lang_image);
+ if (!$isBase) {
+ $lang->setVar('lang_base', $lang_base);
}
- $lang->setVar('weight',$weight);
+ $lang->setVar('weight', $weight);
$xlanguage_handler->insert($lang);
- redirect_header("main.php",2,_AM_XLANG_SAVED);
+ redirect_header("main.php", 2, _AM_XLANG_SAVED);
break;
case "edit":
@@ -98,13 +93,16 @@
// echo "<h4>" . XLANG_CONFIG_LINK . "</h4>";
// echo "<br />";
echo "<h4>" . _AM_XLANG_EDITLANG . "</h4>";
- if(isset($type)&&$type=='ext') $isBase = false;
- else $isBase = true;
- if(isset($lang_id)&&$lang_id>0){
+ if (isset($type) && $type == 'ext') {
+ $isBase = false;
+ } else {
+ $isBase = true;
+ }
+ if (isset($lang_id)&&$lang_id>0) {
$lang =& $xlanguage_handler->get($lang_id, $isBase);
- }elseif(isset($lang_name)){
+ } elseif (isset($lang_name)) {
$lang =& $xlanguage_handler->getByName($lang_name, $isBase);
- }else{
+ } else {
$lang =& $xlanguage_handler->create(true, $isBase);
}
$lang_name = $lang->getVar('lang_name');
@@ -113,10 +111,10 @@
$lang_charset = $lang->getVar('lang_charset');
$lang_image = $lang->getVar('lang_image');
$weight = $lang->getVar('weight');
- if(!$isBase){
+ if (!$isBase) {
$lang_base = $lang->getVar('lang_base');
}
- include "langform.inc.php";
+ include __DIR__ . '/langform.inc.php';
break;
case "add":
@@ -125,12 +123,12 @@
// echo "<h4>" . XLANG_CONFIG_LINK . "</h4>";
// echo "<br />";
// echo "<h4>" . _AM_XLANG_ADDLANG . "</h4>";
- if(isset($type)&&$type=='ext') {
- $isBase = false;
- echo $aboutAdmin->addNavigation('main.php?op=add&type=ext'); }
- else {
- $isBase = true;
- echo $aboutAdmin->addNavigation('main.php?op=add&type=base');
+ if (isset($type)&&$type=='ext') {
+ $isBase = false;
+ echo $aboutAdmin->addNavigation('main.php?op=add&type=ext');
+ } else {
+ $isBase = true;
+ echo $aboutAdmin->addNavigation('main.php?op=add&type=base');
}
$lang_name = '';
$lang_desc = '';
@@ -139,13 +137,13 @@
$lang_image = '';
$weight = 1;
$lang_base = '';
- include "langform.inc.php";
+ include 'langform.inc.php';
break;
-
+
case 'createconfig':
xlanguage_createConfig();
- redirect_header( 'main.php', 1, _AM_XLANG_CREATED );
- exit();
+ redirect_header('main.php', 1, _AM_XLANG_CREATED);
+
break;
case "default":
@@ -154,7 +152,7 @@
$mainAdmin = new ModuleAdmin();
echo $mainAdmin->addNavigation('main.php');
- // if (TDMDownloads_checkModuleAdmin()){
+ // if (TDMDownloads_checkModuleAdmin()) {
// $mainAdmin = new ModuleAdmin();
// echo $mainAdmin->addNavigation('downloads.php');
$mainAdmin->addItemButton(_MI_XLANGUAGE_ADMENU1, 'main.php?op=add&type=base', 'add');
@@ -162,14 +160,15 @@
echo $mainAdmin->renderButton();
// }
-
+
// echo "<h4>" . XLANG_CONFIG_LINK . "</h4>";
languageList();
$configfile_status = (@is_readable(XLANGUAGE_CONFIG_FILE))?_AM_XLANG_CONFIGOK:_AM_XLANG_CONFIGNOTOK;
echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\"><br />";
// echo " - <b><a href='index.php?op=add&type=base'>" . _AM_XLANG_ADDBASE . "</a></b><br /><br />\n";
// echo " - <b><a href='index.php?op=add&type=ext'>" . _AM_XLANG_ADDEXT . "</a></b><br /><br />\n";
- echo "<b>".$configfile_status."</b>: ".XLANGUAGE_CONFIG_FILE." (<a href='main.php?op=createconfig' title='"._AM_XLANG_CREATECONFIG."'>" . _AM_XLANG_CREATECONFIG . "</a>)<br /><br />\n";
+ echo "<b>" . $configfile_status . "</b>: " . XLANGUAGE_CONFIG_FILE . " (<a href='main.php?op=createconfig' title='" . _AM_XLANG_CREATECONFIG . "'>" . _AM_XLANG_CREATECONFIG
+ . "</a>)<br /><br />\n";
// echo " - <b><a href='about.php'>" . _AM_XLANG_ABOUT . "</a></b>";
echo"</td></tr></table>";
break;
@@ -180,59 +179,63 @@
{
global $xlanguage_handler, $xoopsModule;
-global $pathIcon16;
-
+ global $pathIcon16;
+
$lang_list =& $xlanguage_handler->getAllList();
- if ( is_array($lang_list)&&count( $lang_list ) > 0 ){
+ if (is_array($lang_list)&&count($lang_list) > 0) {
echo"<table width='100%' border='0' cellspacing='1' class='outer'><tr><td class=\"odd\">";
echo "<div style='text-align: center;'><b><h4>" . _AM_XLANG_LANGLIST . "</h4></b><br />";
- echo "<table class='outer' width='100%' border='0' cellpadding='0' cellspacing='0' ><tr class='bg2'><th align='center'>" . _AM_XLANG_DESC . "</th><th align='center'>" . _AM_XLANG_NAME . "</th><th align='center'>" . _AM_XLANG_CHARSET . "</th><th align='center'>" . _AM_XLANG_CODE . "</th><th align='center'>" . _AM_XLANG_IMAGE . "</th><th align='center'>" . _AM_XLANG_WEIGHT . "</th><th align='center'>" . _AM_XLANG_BASE . "</th><th align='center'>" . _AM_XLANG_ACTION . "</th></tr>\n";
+ echo "<table class='outer' width='100%' border='0' cellpadding='0' cellspacing='0' ><tr class='bg2'><th align='center'>" . _AM_XLANG_DESC . "</th><th align='center'>" . _AM_XLANG_NAME
+ . "</th><th align='center'>" . _AM_XLANG_CHARSET . "</th><th align='center'>" . _AM_XLANG_CODE . "</th><th align='center'>" . _AM_XLANG_IMAGE . "</th><th align='center'>"
+ . _AM_XLANG_WEIGHT . "</th><th align='center'>" . _AM_XLANG_BASE . "</th><th align='center'>" . _AM_XLANG_ACTION . "</th></tr>\n";
$class = 'even';
- foreach( array_keys($lang_list) as $lang_name ) {
+ foreach (array_keys($lang_list) as $lang_name) {
$lang =& $lang_list[$lang_name];
$isOrphan = true;
- if(isset($lang['base'])){
+ if (isset($lang['base'])) {
echo "<tr>\n";
- echo "<td class='$class' >" . $lang['base'] -> getVar('lang_desc') . "</td>\n";
- echo "<td class='$class' ><b>" . $lang['base'] -> getVar('lang_name') . "</b></td>\n";
- echo "<td class='$class' ><b>" . $lang['base'] -> getVar('lang_charset') . "</b></td>\n";
- echo "<td class='$class' >" . $lang['base'] -> getVar('lang_code') . "</td>\n";
- if(is_readable(XOOPS_ROOT_PATH.'/modules/xlanguage/images/'.$lang['base'] -> getVar('lang_image'))){
- $lang_image = $lang['base'] -> getVar('lang_image');
- }else{
- $lang_image = 'noflag.gif';
- }
- echo "<td class='$class' ><img src='" . XOOPS_URL.'/modules/xlanguage/images/'.$lang_image . "' alt='".$lang['base'] -> getVar('lang_desc')."' /></td>\n";
- echo "<td class='$class' >" . $lang['base'] -> getVar('weight') . "</td>\n";
- echo "<td class='$class' >Ø</td>\n";
+ echo "<td class='$class' >" . $lang['base'] -> getVar('lang_desc') . "</td>\n";
+ echo "<td class='$class' ><b>" . $lang['base'] -> getVar('lang_name') . "</b></td>\n";
+ echo "<td class='$class' ><b>" . $lang['base'] -> getVar('lang_charset') . "</b></td>\n";
+ echo "<td class='$class' >" . $lang['base'] -> getVar('lang_code') . "</td>\n";
+ if (is_readable(XOOPS_ROOT_PATH.'/modules/xlanguage/assets/images/'.$lang['base'] -> getVar('lang_image'))) {
+ $lang_image = $lang['base'] -> getVar('lang_image');
+ } else {
+ $lang_image = 'noflag.gif';
+ }
+ echo "<td class='$class' ><img src='" . XOOPS_URL.'/modules/xlanguage/assets/images/'.$lang_image . "' alt='".$lang['base'] -> getVar('lang_desc')."' /></td>\n";
+ echo "<td class='$class' >" . $lang['base'] -> getVar('weight') . "</td>\n";
+ echo "<td class='$class' >Ø</td>\n";
echo "<td class='$class' ><a href='main.php?op=edit&type=base&lang_id=" . $lang['base'] -> getVar('lang_id') . "'><img src=".$pathIcon16.'/edit.png title=' . _EDIT . "></a>\n".
"<a href='main.php?op=del&type=base&lang_id=" . $lang['base'] -> getVar('lang_id') . "'><img src=".$pathIcon16.'/delete.png title=' . _DELETE ."></td>\n";
echo "</tr>\n";
$isOrphan = false;
- $class = ($class == 'odd') ? 'even' : 'odd';
+ $class = ($class == 'odd') ? 'even' : 'odd';
}
- if(!isset($lang['ext'])||count($lang['ext'])<1) continue;
- foreach($lang['ext'] as $ext){
+ if (!isset($lang['ext']) || count($lang['ext']) < 1) {
+ continue;
+ }
+ foreach ($lang['ext'] as $ext) {
echo "<tr>\n";
- echo "<td class='$class' >" . $ext -> getVar('lang_desc') . "</td>\n";
- echo "<td class='$class' >" . $ext -> getVar('lang_name') . "</td>\n";
- echo "<td class='$class' ><b>" . $ext -> getVar('lang_charset') . "</b></td>\n";
- echo "<td class='$class' >" . $ext -> getVar('lang_code') . "</td>\n";
- if(is_readable(XOOPS_ROOT_PATH.'/modules/xlanguage/images/'.$ext -> getVar('lang_image'))){
- $lang_image = $ext -> getVar('lang_image');
- }else{
- $lang_image = 'noflag.gif';
- }
- echo "<td class='$class' ><img src='" . XOOPS_URL.'/modules/xlanguage/images/'.$lang_image . "' alt='".$ext -> getVar('lang_desc')."' /></td>\n";
- echo "<td class='$class' >" . $ext -> getVar('weight') . "</td>\n";
- $lang_base = ($isOrphan)?"<font color='red'>".$ext -> getVar('lang_base')."</font>":$ext -> getVar('lang_base');
- echo "<td class='$class' ><b>" . $lang_base . "</b></td>\n";
- echo "<td class='$class' ><a href='main.php?op=edit&type=ext&lang_id=" . $ext -> getVar('lang_id') . "'><img src=".$pathIcon16.'/edit.png title=' . _EDIT . "></a>\n".
- "<a href='main.php?op=del&type=ext&lang_id=" . $ext -> getVar('lang_id') . "'><img src=".$pathIcon16.'/delete.png title=' . _DELETE ."></td>\n";
+ echo "<td class='$class' >" . $ext -> getVar('lang_desc') . "</td>\n";
+ echo "<td class='$class' >" . $ext -> getVar('lang_name') . "</td>\n";
+ echo "<td class='$class' ><b>" . $ext -> getVar('lang_charset') . "</b></td>\n";
+ echo "<td class='$class' >" . $ext -> getVar('lang_code') . "</td>\n";
+ if (is_readable(XOOPS_ROOT_PATH.'/modules/xlanguage/assets/images/'.$ext -> getVar('lang_image'))) {
+ $lang_image = $ext -> getVar('lang_image');
+ } else {
+ $lang_image = 'noflag.gif';
+ }
+ echo "<td class='$class' ><img src='" . XOOPS_URL.'/modules/xlanguage/assets/images/'.$lang_image . "' alt='".$ext -> getVar('lang_desc')."' /></td>\n";
+ echo "<td class='$class' >" . $ext -> getVar('weight') . "</td>\n";
+ $lang_base = ($isOrphan)?"<font color='red'>".$ext -> getVar('lang_base')."</font>":$ext -> getVar('lang_base');
+ echo "<td class='$class' ><b>" . $lang_base . "</b></td>\n";
+ echo "<td class='$class' ><a href='main.php?op=edit&type=ext&lang_id=" . $ext->getVar('lang_id') . "'><img src=" . $pathIcon16 . '/edit.png title=' . _EDIT . "></a>\n"
+ . "<a href='main.php?op=del&type=ext&lang_id=" . $ext->getVar('lang_id') . "'><img src=" . $pathIcon16 . '/delete.png title=' . _DELETE . "></td>\n";
echo "</tr>\n";
}
- echo "<tr><td colspan='9' ></td></tr>\n";
- $class = ($class == 'odd') ? 'even' : 'odd';
+ echo "<tr><td colspan='9' ></td></tr>\n";
+ $class = ($class == 'odd') ? 'even' : 'odd';
}
echo "</table></div>\n";
Modified: XoopsModules/xlanguage/trunk/xlanguage/admin/menu.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/admin/menu.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/admin/menu.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,60 +1,51 @@
-<?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 //
-// ------------------------------------------------------------------------- //
-$module_handler =& xoops_gethandler('module');
-$xoopsModule =& XoopsModule::getByDirname('xlanguage');
-$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
-$pathIcon32 = $moduleInfo->getInfo('icons32');
-
-$adminmenu = array();
-
-$i = 1;
-$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU_HOME ;
-$adminmenu[$i]['link'] = 'admin/index.php' ;
-$adminmenu[$i]['icon'] = $pathIcon32.'/home.png' ;
-$i++;
-$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU0 ;
-$adminmenu[$i]['link'] = 'admin/main.php' ;
-$adminmenu[$i]['icon'] = $pathIcon32.'/manage.png' ;
-$i++;
-$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU1 ;
-$adminmenu[$i]['link'] = 'admin/main.php?op=add&type=base' ;
-$adminmenu[$i]['icon'] = $pathIcon32.'/add.png' ;
-$i++;
-$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU2 ;
-$adminmenu[$i]['link'] = 'admin/main.php?op=add&type=ext';
-$adminmenu[$i]['icon'] = $pathIcon32.'/insert_table_row.png' ;
-$i++;
-$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU3 ;
-$adminmenu[$i]['link'] = 'admin/about.php' ;
-$adminmenu[$i]['icon'] = $pathIcon32.'/about.png' ;
-// $i++;
-// $adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU3;
-// $adminmenu[$i]['link'] = "admin/about2.php";
-// $adminmenu[$i]['icon'] = $pathIcon32.'/about.png';
+<?php
+/**
+ * xLanguage module (eXtensible Language Management For XOOPS)
+ *
+ * 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 XOOPS Project (http://xoops.org)
+ * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @package xlanguage
+ * @since 2.0
+ * @author D.J.(phppp) ph...@ho...
+ * @version $Id $
+ **/
+
+$module_handler =& xoops_gethandler('module');
+$xoopsModule =& XoopsModule::getByDirname('xlanguage');
+$moduleInfo =& $module_handler->get($xoopsModule->getVar('mid'));
+$pathIcon32 = $moduleInfo->getInfo('icons32');
+
+$adminmenu = array();
+
+$i = 1;
+$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU_HOME ;
+$adminmenu[$i]['link'] = 'admin/index.php' ;
+$adminmenu[$i]['icon'] = $pathIcon32.'/home.png' ;
+++$i;
+$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU0 ;
+$adminmenu[$i]['link'] = 'admin/main.php' ;
+$adminmenu[$i]['icon'] = $pathIcon32.'/manage.png' ;
+++$i;
+$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU1 ;
+$adminmenu[$i]['link'] = 'admin/main.php?op=add&type=base' ;
+$adminmenu[$i]['icon'] = $pathIcon32.'/add.png' ;
+++$i;
+$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU2 ;
+$adminmenu[$i]['link'] = 'admin/main.php?op=add&type=ext';
+$adminmenu[$i]['icon'] = $pathIcon32.'/insert_table_row.png' ;
+++$i;
+$adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU3 ;
+$adminmenu[$i]['link'] = 'admin/about.php' ;
+$adminmenu[$i]['icon'] = $pathIcon32.'/about.png' ;
+// ++$i;
+// $adminmenu[$i]['title'] = _MI_XLANGUAGE_ADMENU3;
+// $adminmenu[$i]['link'] = "admin/about2.php";
+// $adminmenu[$i]['icon'] = $pathIcon32.'/about.png';
+
Modified: XoopsModules/xlanguage/trunk/xlanguage/api.php
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/api.php 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/api.php 2015-09-25 10:12:26 UTC (rev 13153)
@@ -1,32 +1,22 @@
<?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 //
-// ------------------------------------------------------------------------- //
+/**
+ * xLanguage module (eXtensible Language Management For XOOPS)
+ *
+ * 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 XOOPS Project (http://xoops.org)
+ * @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
+ * @package xlanguage
+ * @since 2.0
+ * @author D.J.(phppp) ph...@ho...
+ * @version $Id $
+ **/
+
global $xlanguage;
include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/vars.php');
include_once(XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php');
@@ -39,62 +29,66 @@
$cookie_path = "/";
setcookie($cookie_var, $_GET[XLANGUAGE_LANG_TAG], time()+3600*24*30, $cookie_path, '', 0);
$xlanguage["lang"] = $_GET[XLANGUAGE_LANG_TAG];
-}elseif (!empty($_COOKIE[$cookie_var])) {
+} elseif (!empty($_COOKIE[$cookie_var])) {
$xlanguage["lang"] = $_COOKIE[$cookie_var];
/* FIXME: shall we remove it? */
/*
- if(preg_match("/[&|\?]\b".XLANGUAGE_LANG_TAG."\b=/i",$_SERVER['REQUEST_URI'])){
- }elseif (strpos($_SERVER['REQUEST_URI'], "?")) {
+ if (preg_match("/[&|\?]\b".XLANGUAGE_LANG_TAG."\b=/i",$_SERVER['REQUEST_URI'])) {
+ } elseif (strpos($_SERVER['REQUEST_URI'], "?")) {
$_SERVER['REQUEST_URI'] .= "&".XLANGUAGE_LANG_TAG."=".$xlanguage["lang"];
- }else{
+ } else {
$_SERVER['REQUEST_URI'] .= "?".XLANGUAGE_LANG_TAG."=".$xlanguage["lang"];
}
*/
-}elseif($lang = xlanguage_detectLang()) {
+} elseif ($lang = xlanguage_detectLang()) {
$xlanguage["lang"] = $lang;
-}else{
+} else {
$xlanguage["lang"] = $xoopsConfig['language'];
}
$xlanguage_handler=& xoops_getmodulehandler('language', 'xlanguage');
$xlanguage_handler->loadConfig();
$lang = $xlanguage_handler->getByName($xlanguage["lang"]);
-if(is_object($lang) && strcasecmp($lang->getVar('lang_name'),$xoopsConfig['language'])){
- if($lang->isBase()){
+if (is_object($lang) && strcasecmp($lang->getVar('lang_name'), $xoopsConfig['language'])) {
+ if ($lang->isBase()) {
$xoopsConfig['language'] = $lang->getVar('lang_name');
- }else{
+ } else {
$lang_base = $xlanguage_handler->getByName($lang->getVar('lang_base'));
- if(is_object($lang_base)){
+ if (is_object($lang_base)) {
$xlanguage['charset_base'] = $lang_base->getVar('lang_charset');
$xlanguage["action"] = true;
$xoopsConfig['language'] = $lang_base->getVar('lang_name');
unset($lang_base);
}
}
- if($lang->getVar('lang_charset')) $xlanguage['charset'] = $lang->getVar('lang_charset');
- if($lang->getVar('lang_code')) $xlanguage['code'] = $lang->getVar('lang_code');
+ if ($lang->getVar('lang_charset')) {
+ $xlanguage['charset'] = $lang->getVar('lang_charset');
+ }
+ if ($lang->getVar('lang_code')) {
+ $xlanguage['code'] = $lang->getVar('lang_code');
+ }
}
unset($lang);
$GLOBALS['xlanguage_handler'] =& $xlanguage_handler;
-if($xlanguage["action"]){
- //if(CONV_REQUEST && (!empty($_GET)||!empty($_POST))){
- if(!empty($_POST)){
+if ($xlanguage["action"]) {
+ //if (CONV_REQUEST && (!empty($_GET)||!empty($_POST))) {
+ if (!empty($_POST)) {
$in_charset = $xlanguage["charset"];
$out_charset = $xlanguage["charset_base"];
//$CONV_REQUEST_array=array("_GET", "_POST");
$CONV_REQUEST_array=array("_POST");
- foreach ($CONV_REQUEST_array as $HV){
- if(!empty(${$HV})) {
+ foreach ($CONV_REQUEST_array as $HV) {
+ if (!empty(${$HV})) {
${$HV} = xlanguage_convert_encoding(${$HV}, $out_charset, $in_charset);
}
$GLOBALS["HTTP".$HV."_VARS"] = ${$HV};
}
}
ob_start("xlanguage_encoding");
-}else{
+} else {
ob_start("xlanguage_ml");
}
@@ -107,7 +101,7 @@
* 3 insert "<{$smarty.const.XLANGUAGE_SWITCH_CODE}>" into your theme html anywhere you would like to see it present
*/
$xlanguage_theme_enable = true;
-if(!empty($xlanguage_theme_enable)){
+if (!empty($xlanguage_theme_enable)) {
$options = array("dropdown", " ", 5); // display mode, delimitor, number per line
xlanguage_select_show($options);
}
Added: XoopsModules/xlanguage/trunk/xlanguage/assets/css/index.html
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/assets/css/index.html (rev 0)
+++ XoopsModules/xlanguage/trunk/xlanguage/assets/css/index.html 2015-09-25 10:12:26 UTC (rev 13153)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xlanguage/trunk/xlanguage/assets/images/albania.gif
===================================================================
(Binary files differ)
Index: XoopsModules/xlanguage/trunk/xlanguage/assets/images/albania.gif
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/assets/images/albania.gif 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/assets/images/albania.gif 2015-09-25 10:12:26 UTC (rev 13153)
Property changes on: XoopsModules/xlanguage/trunk/xlanguage/assets/images/albania.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/xlanguage/trunk/xlanguage/assets/images/austria.gif
===================================================================
(Binary files differ)
Index: XoopsModules/xlanguage/trunk/xlanguage/assets/images/austria.gif
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/assets/images/austria.gif 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/assets/images/austria.gif 2015-09-25 10:12:26 UTC (rev 13153)
Property changes on: XoopsModules/xlanguage/trunk/xlanguage/assets/images/austria.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/xlanguage/trunk/xlanguage/assets/images/belgium.gif
===================================================================
(Binary files differ)
Index: XoopsModules/xlanguage/trunk/xlanguage/assets/images/belgium.gif
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/assets/images/belgium.gif 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/assets/images/belgium.gif 2015-09-25 10:12:26 UTC (rev 13153)
Property changes on: XoopsModules/xlanguage/trunk/xlanguage/assets/images/belgium.gif
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: XoopsModules/xlanguage/trunk/xlanguage/assets/images/brazil.gif
===================================================================
(Binary files differ)
Index: XoopsModules/xlanguage/trunk/xlanguage/assets/images/brazil.gif
===================================================================
--- XoopsModules/xlanguage/trunk/xlanguage/assets/images/brazil.gif 2015-09-25 09:26:23 UTC (rev 13152)
+++ XoopsModules/xlanguage/trunk/xlanguage/assets/images/brazil.gif 2015-09-25 10:12:26 UTC (rev 13153)
Property changes on: XoopsModules/xlanguage/trunk/xlanguage/assets/images/brazil.gif
________________________________...
[truncated message content] |