Skip to content

Commit 5dc45c5

Browse files
committed
Merge pull request #1 from mambax7/master
Adding xLanguage 3.04 Final
2 parents cd7d44c + a6a0950 commit 5dc45c5

76 files changed

Lines changed: 2479 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

xlanguage/admin/about.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
/**
3+
* xLanguage module
4+
*
5+
* You may not change or alter any portion of this comment or credits
6+
* of supporting developers from this source code or any supporting source code
7+
* which is considered copyrighted (c) material of the original comment or credit authors.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
*
12+
* @copyright The XOOPS Project (http://www.xoops.org)
13+
* @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14+
* @package xlanguage
15+
* @since 2.0
16+
* @author XOOPS Development Team
17+
* @version $Id $
18+
**/
19+
20+
include_once dirname(__FILE__) . '/admin_header.php';
21+
22+
xoops_cp_header();
23+
24+
$aboutAdmin = new ModuleAdmin();
25+
26+
echo $aboutAdmin->addNavigation('about.php');
27+
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
28+
29+
include 'admin_footer.php';

xlanguage/admin/about2.php

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
<?php
2+
// $Id: about2.php 8203 2011-11-07 03:55:46Z beckmi $
3+
// ------------------------------------------------------------------------ //
4+
// Xlanguage: eXtensible Language Management For Xoops //
5+
// Copyright (c) 2004 Xoops China Community //
6+
// <http://www.xoops.org.cn/> //
7+
// ------------------------------------------------------------------------ //
8+
// This program is free software; you can redistribute it and/or modify //
9+
// it under the terms of the GNU General Public License as published by //
10+
// the Free Software Foundation; either version 2 of the License, or //
11+
// (at your option) any later version. //
12+
// //
13+
// You may not change or alter any portion of this comment or credits //
14+
// of supporting developers from this source code or any supporting //
15+
// source code which is considered copyrighted (c) material of the //
16+
// original comment or credit authors. //
17+
// //
18+
// This program is distributed in the hope that it will be useful, //
19+
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
20+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
21+
// GNU General Public License for more details. //
22+
// //
23+
// You should have received a copy of the GNU General Public License //
24+
// along with this program; if not, write to the Free Software //
25+
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
26+
// ------------------------------------------------------------------------ //
27+
// Author: D.J.(phppp) php_pp@hotmail.com //
28+
// URL: http://www.xoops.org.cn //
29+
// ------------------------------------------------------------------------- //
30+
include '../../../include/cp_header.php';
31+
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
32+
xoops_cp_header();
33+
$myts = &MyTextSanitizer::getInstance();
34+
35+
$module_handler =& xoops_gethandler('module');
36+
$versioninfo =& $module_handler->get($xoopsModule->getVar('mid'));
37+
38+
// Left headings...
39+
echo "<a href='index.php'><img src='" . XOOPS_URL . "/modules/" . $xoopsModule -> dirname() . "/" . $versioninfo -> getInfo('image') . "' alt='' hspace='10' vspace='0' align='left'></a>";
40+
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>";
41+
echo "</div>";
42+
echo "<div>" . _MI_XLANG_RELEASE . ": " . $versioninfo -> getInfo('releasedate') . "</div>";
43+
44+
// Author Information
45+
$sform = new XoopsThemeForm(_MI_XLANG_AUTHOR_INFO, "", "");
46+
if ( $versioninfo->getInfo('author_realname'))
47+
$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
48+
else
49+
$author_name = $versioninfo->getInfo('author');
50+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_NAME, $author_name));
51+
$author_sites = $versioninfo -> getInfo('author_website');
52+
$author_site_info = "";
53+
foreach($author_sites as $site){
54+
$author_site_info .= "<a href='" . $site['url'] . "' target='blank'>" . $site['name'] . "</a>; ";
55+
}
56+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_WEBSITE, $author_site_info));
57+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_EMAIL, "<a href='mailto:" . $versioninfo -> getInfo('author_email') . "'>" . $versioninfo -> getInfo('author_email') . "</a>"));
58+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_CREDITS, $versioninfo -> getInfo('credits')));
59+
$sform -> display();
60+
61+
$sform = new XoopsThemeForm(_MI_XLANG_MODULE_INFO, "", "");
62+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_MODULE_STATUS, $versioninfo -> getInfo('status')));
63+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_MODULE_XOOPSVERSION, $versioninfo -> getInfo('xoopsversion')));
64+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_MODULE_DEMO, "<a href='" . $versioninfo -> getInfo('demo_site_url') . "' target='blank'>" . $versioninfo -> getInfo('demo_site_name') . "</a>"));
65+
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_MODULE_SUPPORT, "<a href='" . $versioninfo -> getInfo('support_site_url') . "' target='blank'>" . $versioninfo -> getInfo('support_site_name') . "</a>"));
66+
$sform -> display();
67+
68+
$file = "../bugfixlist.txt";
69+
if (@file_exists($file))
70+
{
71+
$fp = @fopen($file, "r");
72+
$bugtext = @fread($fp, filesize($file));
73+
@fclose($file);
74+
$sform = new XoopsThemeForm(_MI_XLANG_AUTHOR_BUGFIXES, "", "");
75+
ob_start();
76+
echo "<div class='even' align='left'>".$myts->displayTarea($bugtext)."</div>";
77+
$sform -> addElement(new XoopsFormLabel('', ob_get_contents(), 0));
78+
ob_end_clean();
79+
$sform -> display();
80+
unset($file);
81+
}
82+
83+
xoops_cp_footer();
84+
?>

xlanguage/admin/admin_footer.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
echo "<div class='adminfooter'>\n"
4+
." <div style='text-align: center;'>\n"
5+
." <a href='http://www.xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
6+
." </div>\n"
7+
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
8+
."</div>";
9+
10+
xoops_cp_footer();

xlanguage/admin/admin_header.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
/**
3+
* XoopsPartners module
4+
*
5+
* You may not change or alter any portion of this comment or credits
6+
* of supporting developers from this source code or any supporting source code
7+
* which is considered copyrighted (c) material of the original comment or credit authors.
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11+
*
12+
* @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/
13+
* @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14+
* @package:: XoopsPartners
15+
* @subpackage:: admin
16+
* @since:: 2.5.0
17+
* @author:: XOOPS Team
18+
* @version:: $Id $
19+
**/
20+
21+
$path = dirname(dirname(dirname(dirname(__FILE__))));
22+
include_once $path . '/mainfile.php';
23+
include_once $path . '/include/cp_functions.php';
24+
require_once $path . '/include/cp_header.php';
25+
26+
global $xoopsModule;
27+
28+
$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
29+
30+
//if functions.php file exist
31+
require_once dirname(dirname(__FILE__)) . '/include/functions.php';
32+
33+
// Load language files
34+
xoops_loadLanguage('admin', $thisModuleDir);
35+
xoops_loadLanguage('modinfo', $thisModuleDir);
36+
xoops_loadLanguage('main', $thisModuleDir);
37+
38+
$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
39+
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
40+
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
41+
42+
if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
43+
include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
44+
}else{
45+
redirect_header("../../../admin.php", 5, _AM_XLANG_MODULEADMIN_MISSING, false);
46+
}

xlanguage/admin/index.php

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
// $Id: index.php 9674 2012-06-19 15:12:44Z beckmi $
3+
// ------------------------------------------------------------------------ //
4+
// XOOPS - PHP Content Management System //
5+
// Copyright (c) 2000 XOOPS.org //
6+
// <http://www.xoops.org/> //
7+
// ------------------------------------------------------------------------ //
8+
// This program is free software; you can redistribute it and/or modify //
9+
// it under the terms of the GNU General Public License as published by //
10+
// the Free Software Foundation; either version 2 of the License, or //
11+
// (at your option) any later version. //
12+
// //
13+
// You may not change or alter any portion of this comment or credits //
14+
// of supporting developers from this source code or any supporting //
15+
// source code which is considered copyrighted (c) material of the //
16+
// original comment or credit authors. //
17+
// //
18+
// This program is distributed in the hope that it will be useful, //
19+
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
20+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
21+
// GNU General Public License for more details. //
22+
// //
23+
// You should have received a copy of the GNU General Public License //
24+
// along with this program; if not, write to the Free Software //
25+
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
26+
// ------------------------------------------------------------------------ //
27+
include '../../../include/cp_header.php';
28+
29+
include 'admin_header.php';
30+
xoops_cp_header();
31+
32+
$indexAdmin = new ModuleAdmin();
33+
34+
echo $indexAdmin->addNavigation('index.php');
35+
echo $indexAdmin->renderIndex();
36+
37+
include "admin_footer.php";

xlanguage/admin/langform.inc.php

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<?php
2+
// $Id: langform.inc.php 9954 2012-07-31 10:13:35Z beckmi $
3+
// ------------------------------------------------------------------------ //
4+
// Xlanguage: eXtensible Language Management For Xoops //
5+
// Copyright (c) 2004 Xoops China Community //
6+
// <http://www.xoops.org.cn/> //
7+
// ------------------------------------------------------------------------ //
8+
// This program is free software; you can redistribute it and/or modify //
9+
// it under the terms of the GNU General Public License as published by //
10+
// the Free Software Foundation; either version 2 of the License, or //
11+
// (at your option) any later version. //
12+
// //
13+
// You may not change or alter any portion of this comment or credits //
14+
// of supporting developers from this source code or any supporting //
15+
// source code which is considered copyrighted (c) material of the //
16+
// original comment or credit authors. //
17+
// //
18+
// This program is distributed in the hope that it will be useful, //
19+
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
20+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
21+
// GNU General Public License for more details. //
22+
// //
23+
// You should have received a copy of the GNU General Public License //
24+
// along with this program; if not, write to the Free Software //
25+
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
26+
// ------------------------------------------------------------------------ //
27+
// Author: D.J.(phppp) php_pp@hotmail.com //
28+
// URL: http://www.xoops.org.cn //
29+
// ------------------------------------------------------------------------- //
30+
31+
include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
32+
$sform = new XoopsThemeForm(_AM_XLANG_EDITLANG, "langform", xoops_getenv('PHP_SELF'));
33+
34+
if($isBase){
35+
$lang_select = new XoopsFormSelect(_AM_XLANG_NAME, 'lang_name', $lang_name);
36+
$lang_select->addOptionArray($xlanguage_handler->getXoopsLangList());
37+
$sform->addElement($lang_select, true);
38+
}else{
39+
$sform->addElement(new XoopsFormText(_AM_XLANG_NAME, 'lang_name', 50, 255, $lang_name), true);
40+
}
41+
42+
$sform->addElement(new XoopsFormText(_AM_XLANG_DESC, 'lang_desc', 50, 255, $lang_desc));
43+
44+
//$sform->addElement(new XoopsFormText(_AM_XLANG_CODE, 'lang_code', 50, 255, $lang_code), true);
45+
$lang_code = new XoopsFormText(_AM_XLANG_CODE, 'lang_code', 50, 255, $lang_code);
46+
$lang_code->setDescription(_AM_XLANG_CODE_DESC);
47+
$sform->addElement($lang_code, true);
48+
49+
50+
//$sform->addElement(new XoopsFormText(_AM_XLANG_CHARSET, 'lang_charset', 50, 255, $lang_charset), true);
51+
$lang_charset = new XoopsFormText(_AM_XLANG_CHARSET, 'lang_charset', 50, 255, $lang_charset);
52+
$lang_charset->setDescription(_AM_XLANG_CHARSET_DESC);
53+
$sform->addElement($lang_charset, true);
54+
55+
56+
if(!$isBase){
57+
$baseList =& $xlanguage_handler->getAll();
58+
$base_list = array();
59+
foreach($baseList as $base => $baselang){
60+
$base_list[$base] = $base;
61+
}
62+
63+
$base_select = new XoopsFormSelect(_AM_XLANG_BASE, 'lang_base', $lang_base);
64+
$base_select->addOptionArray($base_list);
65+
$sform->addElement($base_select, true);
66+
}
67+
$sform->addElement(new XoopsFormText(_AM_XLANG_WEIGHT, 'weight', 10, 10, $weight));
68+
69+
$image_option_tray = new XoopsFormElementTray(_AM_XLANG_IMAGE, '');
70+
$image_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> dirname() . "/images/");
71+
$lang_image =(empty($lang_image))?'noflag.gif':$lang_image;
72+
$image_select = new XoopsFormSelect('', 'lang_image', $lang_image);
73+
$image_select->addOptionArray($image_array);
74+
$image_select->setExtra("onchange='showImgSelected(\"image\", \"lang_image\", \"/modules/" . $xoopsModule -> dirname() . "/images/\", \"\", \"" . XOOPS_URL . "\")'");
75+
$image_tray = new XoopsFormElementTray('', '&nbsp;');
76+
$image_tray->addElement($image_select);
77+
if (!empty($lang_image)){
78+
$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>"));
79+
}else{
80+
$image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/images/blank.gif' name='image' id='image' alt='' /></div>"));
81+
}
82+
$image_option_tray->addElement($image_tray);
83+
$sform->addElement($image_option_tray);
84+
85+
if(isset($lang_id)) $sform->addElement(new XoopsFormHidden('lang_id', $lang_id));
86+
$sform->addElement(new XoopsFormHidden('type', $type));
87+
88+
$button_tray = new XoopsFormElementTray('', '');
89+
$button_tray->addElement(new XoopsFormHidden('op', 'save'));
90+
$button_tray->addElement(new XoopsFormButton('', '', _SUBMIT, 'submit'));
91+
$button_tray->addElement(new XoopsFormButton('', '', _CANCEL, 'submit'));
92+
$sform->addElement($button_tray);
93+
94+
$sform->display();

0 commit comments

Comments
 (0)