Skip to content

Commit e7f6620

Browse files
committed
Merge pull request #4 from mambax7/master
Bring everything back up one level
2 parents 51e7433 + d05b837 commit e7f6620

97 files changed

Lines changed: 1858 additions & 1808 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1010
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1111
*
12-
* @copyright The XOOPS Project (http://www.xoops.org)
12+
* @copyright XOOPS Project (http://xoops.org)
1313
* @license {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
1414
* @package xlanguage
1515
* @since 2.0
1616
* @author XOOPS Development Team
1717
* @version $Id $
1818
**/
1919

20-
include_once dirname(__FILE__) . '/admin_header.php';
20+
include_once __DIR__ . '/admin_header.php';
2121

2222
xoops_cp_header();
2323

@@ -26,4 +26,4 @@
2626
echo $aboutAdmin->addNavigation('about.php');
2727
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
2828

29-
include 'admin_footer.php';
29+
include_once __DIR__ . '/admin_footer.php';
Lines changed: 26 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
11
<?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';
2+
/**
3+
* xLanguage module (eXtensible Language Management For XOOPS)
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 XOOPS Project (http://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 D.J.(phppp) php_pp@hotmail.com
17+
* @version $Id $
18+
**/
19+
20+
include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
3121
include_once XOOPS_ROOT_PATH . "/class/xoopsformloader.php";
3222
xoops_cp_header();
3323
$myts = &MyTextSanitizer::getInstance();
@@ -37,20 +27,22 @@
3727

3828
// Left headings...
3929
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>";
30+
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 "
31+
. $versioninfo->getInfo('version') . "</div>";
4132
echo "</div>";
4233
echo "<div>" . _MI_XLANG_RELEASE . ": " . $versioninfo -> getInfo('releasedate') . "</div>";
4334

4435
// Author Information
4536
$sform = new XoopsThemeForm(_MI_XLANG_AUTHOR_INFO, "", "");
46-
if ( $versioninfo->getInfo('author_realname'))
37+
if ($versioninfo->getInfo('author_realname')) {
4738
$author_name = $versioninfo->getInfo('author') . " (" . $versioninfo->getInfo('author_realname') . ")";
48-
else
39+
} else {
4940
$author_name = $versioninfo->getInfo('author');
41+
}
5042
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_NAME, $author_name));
5143
$author_sites = $versioninfo -> getInfo('author_website');
5244
$author_site_info = "";
53-
foreach($author_sites as $site){
45+
foreach ($author_sites as $site) {
5446
$author_site_info .= "<a href='" . $site['url'] . "' target='blank'>" . $site['name'] . "</a>; ";
5547
}
5648
$sform -> addElement(new XoopsFormLabel(_MI_XLANG_AUTHOR_WEBSITE, $author_site_info));
@@ -66,8 +58,7 @@
6658
$sform -> display();
6759

6860
$file = "../bugfixlist.txt";
69-
if (@file_exists($file))
70-
{
61+
if (@file_exists($file)) {
7162
$fp = @fopen($file, "r");
7263
$bugtext = @fread($fp, filesize($file));
7364
@fclose($file);
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
echo "<div class='adminfooter'>\n"
44
." <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"
5+
." <a href='http://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n"
66
." </div>\n"
77
." " . _AM_MODULEADMIN_ADMIN_FOOTER . "\n"
88
."</div>";

admin/admin_header.php

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* xLanguage module (eXtensible Language Management For XOOPS)
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 XOOPS Project (http://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+
$path = dirname(dirname(dirname(__DIR__)));
21+
include_once $path . '/mainfile.php';
22+
include_once $path . '/include/cp_functions.php';
23+
require_once $path . '/include/cp_header.php';
24+
25+
global $xoopsModule;
26+
27+
$moduleDirName = $GLOBALS['xoopsModule']->getVar('dirname');
28+
29+
//if functions.php file exist
30+
require_once dirname(__DIR__) . '/include/functions.php';
31+
32+
// Load language files
33+
xoops_loadLanguage('admin', $moduleDirName);
34+
xoops_loadLanguage('modinfo', $moduleDirName);
35+
xoops_loadLanguage('main', $moduleDirName);
36+
37+
$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
38+
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
39+
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
40+
41+
include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');

admin/index.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* xLanguage module (eXtensible Language Management For XOOPS)
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 XOOPS Project (http://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 Team
17+
* @version $Id $
18+
**/
19+
20+
include_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
21+
22+
include_once __DIR__ . '/admin_header.php';
23+
xoops_cp_header();
24+
25+
$indexAdmin = new ModuleAdmin();
26+
27+
echo $indexAdmin->addNavigation('index.php');
28+
echo $indexAdmin->renderIndex();
29+
30+
include_once __DIR__ . '/admin_footer.php';
Lines changed: 30 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,30 @@
11
<?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-
// ------------------------------------------------------------------------- //
2+
/**
3+
* xLanguage module (eXtensible Language Management For XOOPS)
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 XOOPS Project (http://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 D.J.(phppp) php_pp@hotmail.com
17+
* @version $Id $
18+
**/
3019

3120
include XOOPS_ROOT_PATH."/class/xoopsformloader.php";
3221
$sform = new XoopsThemeForm(_AM_XLANG_EDITLANG, "langform", xoops_getenv('PHP_SELF'));
3322

34-
if($isBase){
23+
if ($isBase) {
3524
$lang_select = new XoopsFormSelect(_AM_XLANG_NAME, 'lang_name', $lang_name);
3625
$lang_select->addOptionArray($xlanguage_handler->getXoopsLangList());
3726
$sform->addElement($lang_select, true);
38-
}else{
27+
} else {
3928
$sform->addElement(new XoopsFormText(_AM_XLANG_NAME, 'lang_name', 50, 255, $lang_name), true);
4029
}
4130

@@ -51,36 +40,38 @@
5140
$lang_charset->setDescription(_AM_XLANG_CHARSET_DESC);
5241
$sform->addElement($lang_charset, true);
5342

54-
if(!$isBase){
43+
if (!$isBase) {
5544
$baseList =& $xlanguage_handler->getAll();
5645
$base_list = array();
57-
foreach($baseList as $base => $baselang){
46+
foreach ($baseList as $base => $baselang) {
5847
$base_list[$base] = $base;
5948
}
60-
49+
6150
$base_select = new XoopsFormSelect(_AM_XLANG_BASE, 'lang_base', $lang_base);
6251
$base_select->addOptionArray($base_list);
6352
$sform->addElement($base_select, true);
6453
}
6554
$sform->addElement(new XoopsFormText(_AM_XLANG_WEIGHT, 'weight', 10, 10, $weight));
6655

6756
$image_option_tray = new XoopsFormElementTray(_AM_XLANG_IMAGE, '');
68-
$image_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> dirname() . "/images/");
57+
$image_array =& XoopsLists::getImgListAsArray(XOOPS_ROOT_PATH . "/modules/" . $xoopsModule -> dirname() . "/assets/images/");
6958
$lang_image =(empty($lang_image))?'noflag.gif':$lang_image;
7059
$image_select = new XoopsFormSelect('', 'lang_image', $lang_image);
7160
$image_select->addOptionArray($image_array);
72-
$image_select->setExtra("onchange='showImgSelected(\"image\", \"lang_image\", \"/modules/" . $xoopsModule -> dirname() . "/images/\", \"\", \"" . XOOPS_URL . "\")'");
61+
$image_select->setExtra("onchange='showImgSelected(\"image\", \"lang_image\", \"/modules/" . $xoopsModule -> dirname() . "/assets/images/\", \"\", \"" . XOOPS_URL . "\")'");
7362
$image_tray = new XoopsFormElementTray('', '&nbsp;');
7463
$image_tray->addElement($image_select);
75-
if (!empty($lang_image)){
76-
$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>"));
77-
}else{
64+
if (!empty($lang_image)) {
65+
$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>"));
66+
} else {
7867
$image_tray->addElement(new XoopsFormLabel('', "<div style='padding: 8px;'><img src='" . XOOPS_URL . "/images/blank.gif' name='image' id='image' alt='' /></div>"));
7968
}
8069
$image_option_tray->addElement($image_tray);
8170
$sform->addElement($image_option_tray);
8271

83-
if(isset($lang_id)) $sform->addElement(new XoopsFormHidden('lang_id', $lang_id));
72+
if (isset($lang_id)) {
73+
$sform->addElement(new XoopsFormHidden('lang_id', $lang_id));
74+
}
8475
$sform->addElement(new XoopsFormHidden('type', $type));
8576

8677
$button_tray = new XoopsFormElementTray('', '');

0 commit comments

Comments
 (0)