Skip to content

Commit

Permalink
Merge pull request #166 from mambax7/master
Browse files Browse the repository at this point in the history
updates
  • Loading branch information
mambax7 authored Aug 29, 2021
2 parents 899d26d + d0f50fa commit 4308d52
Show file tree
Hide file tree
Showing 182 changed files with 1,427 additions and 990 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png)
![alt XOOPS CMS](https://xoops.org/images/logoXoopsPhp8.png)
# Contributing to [XOOPS CMS](https://xoops.org)
[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org)
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
Expand Down
2 changes: 1 addition & 1 deletion admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

/** @var Admin $adminObject */

require __DIR__ . '/admin_header.php';
require_once __DIR__ . '/admin_header.php';
xoops_cp_header();

$adminObject->displayNavigation(basename(__FILE__));
Expand Down
2 changes: 1 addition & 1 deletion admin/admin_footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use Xmf\Module\Admin;

$pathIcon32 = Admin::iconUrl('', 32);
$pathIcon32 = Admin::iconUrl('', '32');

echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='https://xoops.org' rel='external'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MODULEADMIN_ADMIN_FOOTER . "\n" . '</div>';

Expand Down
17 changes: 9 additions & 8 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,24 @@
use XoopsModules\Publisher\Helper;
use XoopsModules\Publisher\Common\Configurator;

require dirname(__DIR__) . '/preloads/autoloader.php';
require \dirname(__DIR__) . '/preloads/autoloader.php';

require_once dirname(__DIR__, 3) . '/include/cp_header.php';
require \dirname(__DIR__, 3) . '/include/cp_header.php';
//require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');

require_once dirname(__DIR__) . '/include/common.php';
require_once \dirname(__DIR__) . '/include/common.php';

$moduleDirName = basename(dirname(__DIR__));
$moduleDirName = \basename(\dirname(__DIR__));

$helper = Helper::getInstance();
/** @var Admin $adminObject */
$adminObject = Admin::getInstance();

$pathIcon16 = Admin::iconUrl('', 16);
$pathIcon32 = Admin::iconUrl('', 32);
if (is_object($helper->getModule())) {
$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
$pathIcon16 = Admin::iconUrl('', '16');
$pathIcon32 = Admin::iconUrl('', '32');
$pathModIcon32 = XOOPS_URL . '/modules/' . $moduleDirName . '/assets/images/icons/32/';
if (is_object($helper->getModule()) && false !== $helper->getModule()->getInfo('modicons32')) {
$pathModIcon32 = $helper->url($helper->getModule()->getInfo('modicons32'));
}

// Load language files
Expand Down
40 changes: 25 additions & 15 deletions admin/blockform.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,28 @@
* 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.
*
* PHP version 5
*
* @category Module
* @author XOOPS Development Team
* @copyright XOOPS Project
* @link https://xoops.org
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
*/

use Xmf\Module\Admin;
use XoopsModules\Publisher\{
Helper
};

/** @var Admin $adminObject */
/** @var Helper $helper */

require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';

$moduleDirName = basename(dirname(__DIR__));
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName
$moduleDirName = \basename(\dirname(__DIR__));
$moduleDirNameUpper = \mb_strtoupper($moduleDirName);

$helper->loadLanguage('blocksadmin');

$form = new \XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', 'post', true);
if (isset($block['name'])) {
Expand Down Expand Up @@ -51,7 +61,7 @@
ksort($moduleList);
$moduleSelect->addOptionArray($moduleList);
$form->addElement($moduleSelect);
$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'TITLE'), 'btitle', 50, 255, $block['title']), false);
$form->addElement(new \XoopsFormText(_AM_SYSTEM_BLOCKS_TITLE, 'btitle', 50, 255, $block['title']), false);
if ($block['is_custom']) {
$textarea = new \XoopsFormDhtmlTextArea(_AM_SYSTEM_BLOCKS_CONTENT, 'bcontent', $block['content'], 15, 70);
$textarea->setDescription('<span style="font-size:x-small;font-weight:bold;">' . _AM_SYSTEM_BLOCKS_USEFULTAGS . '</span><br><span style="font-size:x-small;font-weight:normal;">' . sprintf(_AM_BLOCKTAG1, '{X_SITEURL}', XOOPS_URL . '/') . '</span>');
Expand Down Expand Up @@ -87,17 +97,17 @@
$cacheSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
$cacheSelect->addOptionArray(
[
'0' => _NOCACHE,
'30' => sprintf(_SECONDS, 30),
'60' => _MINUTE,
'300' => sprintf(_MINUTES, 5),
'1800' => sprintf(_MINUTES, 30),
'3600' => _HOUR,
'18000' => sprintf(_HOURS, 5),
'86400' => _DAY,
'259200' => sprintf(_DAYS, 3),
'604800' => _WEEK,
'2592000' => _MONTH,
0 => _NOCACHE,
30 => sprintf(_SECONDS, 30),
60 => _MINUTE,
300 => sprintf(_MINUTES, 5),
1800 => sprintf(_MINUTES, 30),
3600 => _HOUR,
18000 => sprintf(_HOURS, 5),
86400 => _DAY,
259200 => sprintf(_DAYS, 3),
604800 => _WEEK,
2592000 => _MONTH,
]
);
$form->addElement($cacheSelect);
Expand Down
Loading

0 comments on commit 4308d52

Please sign in to comment.