Skip to content

Commit

Permalink
Merge pull request #139 from mambax7/master
Browse files Browse the repository at this point in the history
1.08 Alpha 2
  • Loading branch information
mambax7 authored Jul 9, 2020
2 parents 17794f5 + dc2b3bd commit b8dd09c
Show file tree
Hide file tree
Showing 182 changed files with 3,429 additions and 3,017 deletions.
10 changes: 5 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*.cs diff=csharp

# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
*.DOT diff=astextplain
*.pdf diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
*.PDF diff=astextplain
*.rtf diff=astextplain
*.RTF diff=astextplain
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ We accept contributions via Pull Requests on [Github](https://github.com/XoopsMo

- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
- **Add tests!** - We encourage providing tests for your contributions.
- **Document any change in behavior** - Make sure the `/docs/changelog.txt` and any other relevant documentation are kept up-to-date.
- **Document any change in behavior** - Make sure the `/docs/changelog.txt` and any other relevant documentation are up-to-date.
- **Consider our release cycle** - We try to follow [Semantic Versioning v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
- **Create feature branches** - Don't ask us to pull from your master branch.
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/

Please visit us on https://xoops.org

Current and upcoming "next generation" versions of XOOPS CMS are being crafted on GitHub at: https://github.com/XOOPS
Current and upcoming "next generation" versions of XOOPS CMS are crafted on GitHub at: https://github.com/XOOPS
1 change: 0 additions & 1 deletion admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
*
* @copyright The XOOPS Project (https://xoops.org)
* @license GNU GPL (https://www.gnu.org/licenses/gpl-2.0.html/)
* @package Publisher
* @since 1.0
* @author Mage, Mamba
*/
Expand Down
2 changes: 0 additions & 2 deletions admin/admin_footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
/**
* @copyright XOOPS Project (https://xoops.org)
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
* @package
* @since
* @author XOOPS Development Team
*/

$pathIcon32 = \Xmf\Module\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
15 changes: 7 additions & 8 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,29 @@
/**
* @copyright The XUUPS Project http://sourceforge.net/projects/xuups/
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package Publisher
* @since 1.0
* @author trabis <lusopoemas@gmail.com>
* @author The SmartFactory <www.smartfactory.ca>
*/

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

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

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

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

$moduleDirName = basename(dirname(__DIR__));

/** @var \XoopsModules\Publisher\Helper $helper */
$helper = \XoopsModules\Publisher\Helper::getInstance();
$helper = Helper::getInstance();
/** @var Xmf\Module\Admin $adminObject */
$adminObject = \Xmf\Module\Admin::getInstance();
$adminObject = Admin::getInstance();

$pathIcon16 = \Xmf\Module\Admin::iconUrl('', 16);
$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
$pathIcon16 = Admin::iconUrl('', 16);
$pathIcon32 = Admin::iconUrl('', 32);
if (is_object($helper->getModule())) {
$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
}
Expand Down
42 changes: 21 additions & 21 deletions admin/blockform.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
if (isset($block['name'])) {
$form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_NAME, $block['name']));
}
$side_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'bside', $block['side']);
$side_select->addOptionArray(
$sideSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_TYPE, 'bside', $block['side']);
$sideSelect->addOptionArray(
[
0 => _AM_SYSTEM_BLOCKS_SBLEFT,
1 => _AM_SYSTEM_BLOCKS_SBRIGHT,
Expand All @@ -37,35 +37,35 @@
9 => _AM_SYSTEM_BLOCKS_CBBOTTOM,
]
);
$form->addElement($side_select);
$form->addElement($sideSelect);
$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . 'WEIGHT'), 'bweight', 2, 5, $block['weight']));
$form->addElement(new \XoopsFormRadioYN(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLE'), 'bvisible', $block['visible']));
$mod_select = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN'), 'bmodule', $block['modules'], 5, true);
$moduleSelect = new \XoopsFormSelect(constant('CO_' . $moduleDirNameUpper . '_' . 'VISIBLEIN'), 'bmodule', $block['modules'], 5, true);
/** @var \XoopsModuleHandler $moduleHandler */
$moduleHandler = xoops_getHandler('module');
$criteria = new \CriteriaCompo(new \Criteria('hasmain', 1));
$criteria->add(new \Criteria('isactive', 1));
$module_list = $moduleHandler->getList($criteria);
$module_list[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
$module_list[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
ksort($module_list);
$mod_select->addOptionArray($module_list);
$form->addElement($mod_select);
$moduleList = $moduleHandler->getList($criteria);
$moduleList[-1] = _AM_SYSTEM_BLOCKS_TOPPAGE;
$moduleList[0] = _AM_SYSTEM_BLOCKS_ALLPAGES;
ksort($moduleList);
$moduleSelect->addOptionArray($moduleList);
$form->addElement($moduleSelect);
$form->addElement(new \XoopsFormText(constant('CO_' . $moduleDirNameUpper . '_' . '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>');
$form->addElement($textarea, true);
$ctype_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'bctype', $block['ctype']);
$ctype_select->addOptionArray(
$ctypeSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_CTYPE, 'bctype', $block['ctype']);
$ctypeSelect->addOptionArray(
[
'H' => _AM_SYSTEM_BLOCKS_HTML,
'P' => _AM_SYSTEM_BLOCKS_PHP,
'S' => _AM_SYSTEM_BLOCKS_AFWSMILE,
'T' => _AM_SYSTEM_BLOCKS_AFNOSMILE,
]
);
$form->addElement($ctype_select);
$form->addElement($ctypeSelect);
} else {
if ('' !== $block['template']) {
/** @var \XoopsTplfileHandler $tplfileHandler */
Expand All @@ -84,8 +84,8 @@
$form->addElement(new \XoopsFormLabel(_AM_SYSTEM_BLOCKS_OPTIONS, $block['edit_form']));
}
}
$cache_select = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
$cache_select->addOptionArray(
$cacheSelect = new \XoopsFormSelect(_AM_SYSTEM_BLOCKS_BCACHETIME, 'bcachetime', $block['bcachetime']);
$cacheSelect->addOptionArray(
[
'0' => _NOCACHE,
'30' => sprintf(_SECONDS, 30),
Expand All @@ -100,7 +100,7 @@
'2592000' => _MONTH,
]
);
$form->addElement($cache_select);
$form->addElement($cacheSelect);

/** @var \XoopsGroupPermHandler $grouppermHandler */
$grouppermHandler = xoops_getHandler('groupperm');
Expand All @@ -120,11 +120,11 @@

//Submit buttons
$buttonTray = new \XoopsFormElementTray('', '');
$submit_button = new \XoopsFormButton('', 'submitblock', _SUBMIT, 'submit');
$buttonTray->addElement($submit_button);
$submitButton = new \XoopsFormButton('', 'submitblock', _SUBMIT, 'submit');
$buttonTray->addElement($submitButton);

$cancel_button = new \XoopsFormButton('', '', _CANCEL, 'button');
$cancel_button->setExtra('onclick="history.go(-1)"');
$buttonTray->addElement($cancel_button);
$cancelButton = new \XoopsFormButton('', '', _CANCEL, 'button');
$cancelButton->setExtra('onclick="history.go(-1)"');
$buttonTray->addElement($cancelButton);

$form->addElement($buttonTray);
Loading

0 comments on commit b8dd09c

Please sign in to comment.