-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from mambax7/master
1.08 RC-1
- Loading branch information
Showing
72 changed files
with
1,293 additions
and
1,553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* Module: XoopsTube | ||
* | ||
/* | ||
* 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. | ||
* | ||
* PHP version 5 | ||
* | ||
* @category Module | ||
* @package Xoopstube | ||
* @author XOOPS Development Team | ||
* @copyright 2001-2016 XOOPS Project (https://xoops.org) | ||
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html) | ||
* @link https://xoops.org/ | ||
* @since 1.0.6 | ||
* 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. | ||
*/ | ||
|
||
use Xmf\Module\Admin; | ||
/** | ||
* @copyright XOOPS Project https://xoops.org/ | ||
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html) | ||
* @author XOOPS Development Team | ||
*/ | ||
|
||
use Xmf\Module\Admin; | ||
/** @var Admin $adminObject */ | ||
|
||
require_once __DIR__ . '/admin_header.php'; | ||
require __DIR__ . '/admin_header.php'; | ||
xoops_cp_header(); | ||
|
||
$adminObject->displayNavigation(basename(__FILE__)); | ||
$adminObject::setPaypal('[email protected]'); | ||
$adminObject->displayAbout(false); | ||
|
||
require_once __DIR__ . '/admin_footer.php'; | ||
require __DIR__ . '/admin_footer.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
<?php | ||
|
||
/** | ||
* Module: XoopsTube | ||
* | ||
/* | ||
* 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. | ||
* | ||
* PHP version 5 | ||
* | ||
* @category Module | ||
* @package Xoopstube | ||
* @author XOOPS Development Team | ||
* @copyright 2001-2016 XOOPS Project (https://xoops.org) | ||
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html) | ||
* @link https://xoops.org/ | ||
* @since 1.0.6 | ||
* 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 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>'; | ||
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>'; | ||
|
||
xoops_cp_footer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,42 @@ | ||
<?php | ||
/** | ||
* Module: XoopsTube | ||
* | ||
* 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. | ||
* | ||
* PHP version 5 | ||
* | ||
* @category Module | ||
* @package Xoopstube | ||
* @author Fernando Santos (topet05), [email protected] | ||
* @copyright Mastop InfoDigital (c) 2003-2007 | ||
* @link http://www.mastop.com.br | ||
* @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) | ||
* @since 1.0.6 | ||
*/ | ||
|
||
use XoopsModules\Xoopstube; | ||
use Xmf\Module\Admin; | ||
use XoopsModules\Xoopstube\{ | ||
Helper | ||
}; | ||
|
||
/** @var Admin $adminObject */ | ||
/** @var Helper $helper */ | ||
|
||
require __DIR__ . '/admin_header.php'; | ||
|
||
require_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php'; | ||
|
||
$moduleDirName = basename(dirname(__DIR__)); | ||
$moduleDirNameUpper = mb_strtoupper($moduleDirName); //$capsDirName | ||
|
||
$helper->loadLanguage('blocksadmin'); | ||
|
||
$form = new \XoopsThemeForm($block['form_title'], 'blockform', 'blocksadmin.php', 'post', true); | ||
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, | ||
|
@@ -37,35 +48,35 @@ | |
9 => _AM_SYSTEM_BLOCKS_CBBOTTOM, | ||
] | ||
); | ||
$form->addElement($side_select); | ||
$form->addElement(new \XoopsFormText(_AM_XOOPSTUBE_WEIGHT, 'bweight', 2, 5, $block['weight'])); | ||
$form->addElement(new \XoopsFormRadioYN(_AM_XOOPSTUBE_VISIBLE, 'bvisible', $block['visible'])); | ||
$mod_select = new \XoopsFormSelect(_AM_XOOPSTUBE_VISIBLEIN, 'bmodule', $block['modules'], 5, true); | ||
$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'])); | ||
$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); | ||
$form->addElement(new \XoopsFormText(_AM_TITLE, 'btitle', 50, 255, $block['title']), false); | ||
$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 */ | ||
|
@@ -84,8 +95,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), | ||
|
@@ -100,7 +111,7 @@ | |
'2592000' => _MONTH, | ||
] | ||
); | ||
$form->addElement($cache_select); | ||
$form->addElement($cacheSelect); | ||
|
||
/** @var \XoopsGroupPermHandler $grouppermHandler */ | ||
$grouppermHandler = xoops_getHandler('groupperm'); | ||
|
@@ -120,11 +131,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); |
Oops, something went wrong.