Skip to content

Commit

Permalink
Merge pull request #4 from mambax7/master
Browse files Browse the repository at this point in the history
2.5.0 RC 1
  • Loading branch information
mambax7 committed Mar 27, 2016
2 parents baf7064 + 66479db commit 0f9e57d
Show file tree
Hide file tree
Showing 84 changed files with 2,424 additions and 2,204 deletions.
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

19 changes: 17 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
#Marquee
![alt XOOPS CMS](http://xoops.org/images/logoXoops4GithubRepository.png)
## Marquee module for [XOOPS CMS 2.5.8+](https://xoops.org)
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](LICENSE)
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/mambax7/marquee.svg?style=flat)](https://scrutinizer-ci.com/g/mambax7/marquee/?branch=master)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/2d27c0023ee54f0b9ba2b5d17a68b2a5)](https://www.codacy.com/app/mambax7/marquee)
[![Code Climate](https://img.shields.io/codeclimate/github/mambax7/marquee.svg?style=flat)](https://codeclimate.com/github/mambax7/marquee)
[![Latest Pre-Resease](https://img.shields.io/github/tag/XoopsModules25x/marquee.svg?style=flat)](https://github.com/XoopsModules25x/marquee/tags/)
[![Latest Version](https://img.shields.io/github/release/XoopsModules25x/marquee.svg?style=flat)](https://github.com/XoopsModules25x/marquee/releases/)

Marquee is a XOOPS module to create scrolling texts (marquees). You can create an unlimited number of marquees and use them in 4 blocks.
Marquee for [XOOPS CMS](http://xoops.org) is a module to create scrolling texts (marquees). You can create an unlimited number of marquees and use them in 4 blocks.

[![Tutorial Available](http://xoops.org/images/tutorial-available-blue.svg)](https://www.gitbook.com/book/xoops/xoops-marquee/) Tutorial: see [here](https://www.gitbook.com/book/xoops/xoops-marquee/).
To contribute to the Tutorial, [fork it on GitHub](https://github.com/XoopsDocs/marquee-tutorial)

[![Translations on Transifex](http://xoops.org/images/translations-transifex-blue.svg)](https://www.transifex.com/xoops)

Please visit us on http://xoops.org

The upcoming "next generation" version of XOOPS CMS is being crafted on GitHub at: https://github.com/XOOPS
16 changes: 8 additions & 8 deletions admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright The XOOPS Project (http://www.xoops.org)
* @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html/)
* @package Marquee
* @copyright XOOPS Project (http://xoops.org)
* @license GNU GPL (http://www.gnu.org/licenses/gpl-2.0.html)
* @package Marquee
* @since 2.5.0
* @author Mage, Mamba
* @version $Id $
* @author Mage, Mamba
* @version $Id $
**/

include_once dirname(__FILE__) . '/admin_header.php';
include_once __DIR__ . '/admin_header.php';

xoops_cp_header();

$aboutAdmin = new ModuleAdmin();

echo $aboutAdmin->addNavigation('about.php');
echo $aboutAdmin->addNavigation(basename(__FILE__));
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);

include 'admin_footer.php';
include_once __DIR__ . '/admin_footer.php';
19 changes: 7 additions & 12 deletions admin/admin_footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,14 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @copyright XOOPS Project (http://xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package Marquee
* @since 2.5.0
* @author Mamba (www.xoops.org)
* @version $Id $
**/
* @package Marquee
* @since 2.5.0
* @author Mamba (www.xoops.org)
* @version $Id $
**/

echo "<div class='adminfooter'>\n"
." <div style='text-align: center;'>\n"
." <a href='http://www.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='http://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();
38 changes: 19 additions & 19 deletions admin/admin_header.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
* @copyright XOOPS Project (http://xoops.org)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package Marquee
* @since 2.5.0
* @author XOOPS Module Team
* @version $Id $
**/
* @package Marquee
* @since 2.5.0
* @author XOOPS Module Team
* @version $Id $
**/

$path = dirname(dirname(dirname(dirname(__FILE__))));
include_once $path . '/mainfile.php';
include_once $path . '/include/cp_functions.php';
require_once $path . '/include/cp_header.php';
$rootPath = dirname(dirname(dirname(__DIR__)));
include_once $rootPath . '/mainfile.php';
include_once $rootPath . '/include/cp_functions.php';
require_once $rootPath . '/include/cp_header.php';

global $xoopsModule;

$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
$moduleFolder = dirname(__DIR__);

//if functions.php file exist
require_once dirname(dirname(__FILE__)) . '/include/functions.php';
require_once $moduleFolder . '/include/functions.php';

// Load language files
xoops_loadLanguage('admin', $thisModuleDir);
xoops_loadLanguage('modinfo', $thisModuleDir);
xoops_loadLanguage('main', $thisModuleDir);
xoops_loadLanguage('admin', $moduleFolder);
xoops_loadLanguage('modinfo', $moduleFolder);
xoops_loadLanguage('main', $moduleFolder);

$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
$pathIcon16 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons16');
$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32');
$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xoopsModule->getInfo('dirmoduleadmin');

include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
132 changes: 67 additions & 65 deletions admin/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ****************************************************************************
* marquee - MODULE FOR XOOPS
* Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
* Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
*
* 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
Expand All @@ -11,99 +11,101 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Hervé Thouzard (http://www.herve-thouzard.com)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package marquee
* @author Hervé Thouzard (http://www.herve-thouzard.com)
* @copyright Hervé Thouzard (http://www.herve-thouzard.com)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package marquee
* @author Hervé Thouzard (http://www.herve-thouzard.com)
*
* Version : $Id:
* ****************************************************************************
*
* @param int $currentoption
* @param string $breadcrumb
*/

if (!defined('XOOPS_ROOT_PATH')) {
die('XOOPS root path not defined');
}
// defined('XOOPS_ROOT_PATH') || exit('XOOPS root path not defined');

function marquee_adminmenu($currentoption = 0, $breadcrumb = '')
{
///* include_once XOOPS_ROOT_PATH.'/modules/marquee/include/functions.php';
//
// /* Nice buttons styles */
// echo "
// <style type='text/css'>
// #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
// #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/marquee/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
// #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
// #buttonbar li { display:inline; margin:0; padding:0; }
// #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/marquee/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
// #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/marquee/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
// /* Commented Backslash Hack hides rule from IE5-Mac \*/
// #buttonbar a span {float:none;}
// /* End IE5-Mac hack */
// #buttonbar a:hover span { color:#333; }
// #buttonbar #current a { background-position:0 -150px; border-width:0; }
// #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
// #buttonbar a:hover { background-position:0% -150px; }
// #buttonbar a:hover span { background-position:100% -150px; }
// </style>
// ";
// global $xoopsModule, $xoopsConfig;
//
// $tblColors = array('','','','','');
// if($currentoption >= 0) {
// $tblColors[$currentoption] = 'current';
// }
//
// if (file_exists(XOOPS_ROOT_PATH . '/modules/marquee/language/' . $xoopsConfig['language'] . '/modinfo.php')) {
// include_once XOOPS_ROOT_PATH. '/modules/marquee/language/' . $xoopsConfig['language'] . '/modinfo.php';
// } else {
// include_once XOOPS_ROOT_PATH . '/modules/marquee/language/english/modinfo.php';
// }
//
// echo "<div id='buttontop'>";
// echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>";
// echo "<td style=\"width: 60%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=".$xoopsModule->getVar('mid')."\">" . _AM_MARQUEE_GENERALSET . "</a></td>";
// echo "<td style=\"width: 40%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>" . $xoopsModule->name() . " " . _AM_MARQUEE_MODULEADMIN . "</b> " . $breadcrumb . "</td>";
// echo "</tr></table>";
// echo "</div>";
//
// echo "<div id='buttonbar'>";
// echo "<ul>";
// echo "<li id='" . $tblColors[0] . "'><a href=\"index.php\"\"><span>"._MI_MARQUEE_MENU_01 ."</span></a></li>\n";
// echo "</ul></div>";
// echo "<br /><br /><pre>&nbsp;</pre><pre>&nbsp;</pre><br />";*/
///* include_once XOOPS_ROOT_PATH.'/modules/marquee/include/functions.php';
//
// /* Nice buttons styles */
// echo "
// <style type='text/css'>
// #buttontop { float:left; width:100%; background: #e7e7e7; font-size:93%; line-height:normal; border-top: 1px solid black; border-left: 1px solid black; border-right: 1px solid black; margin: 0; }
// #buttonbar { float:left; width:100%; background: #e7e7e7 url('" . XOOPS_URL . "/modules/marquee/assets/images/bg.png') repeat-x left bottom; font-size:93%; line-height:normal; border-left: 1px solid black; border-right: 1px solid black; margin-bottom: 12px; }
// #buttonbar ul { margin:0; margin-top: 15px; padding:10px 10px 0; list-style:none; }
// #buttonbar li { display:inline; margin:0; padding:0; }
// #buttonbar a { float:left; background:url('" . XOOPS_URL . "/modules/marquee/assets/images/left_both.png') no-repeat left top; margin:0; padding:0 0 0 9px; border-bottom:1px solid #000; text-decoration:none; }
// #buttonbar a span { float:left; display:block; background:url('" . XOOPS_URL . "/modules/marquee/assets/images/right_both.png') no-repeat right top; padding:5px 15px 4px 6px; font-weight:bold; color:#765; }
// /* Commented Backslash Hack hides rule from IE5-Mac \*/
// #buttonbar a span {float:none;}
// /* End IE5-Mac hack */
// #buttonbar a:hover span { color:#333; }
// #buttonbar #current a { background-position:0 -150px; border-width:0; }
// #buttonbar #current a span { background-position:100% -150px; padding-bottom:5px; color:#333; }
// #buttonbar a:hover { background-position:0% -150px; }
// #buttonbar a:hover span { background-position:100% -150px; }
// </style>
// ";
// global $xoopsModule, $xoopsConfig;
//
// $tblColors = array('','','','','');
// if ($currentoption >= 0) {
// $tblColors[$currentoption] = 'current';
// }
//
// if (file_exists(XOOPS_ROOT_PATH . '/modules/marquee/language/' . $xoopsConfig['language'] . '/modinfo.php')) {
// include_once XOOPS_ROOT_PATH. '/modules/marquee/language/' . $xoopsConfig['language'] . '/modinfo.php';
// } else {
// include_once XOOPS_ROOT_PATH . '/modules/marquee/language/english/modinfo.php';
// }
//
// echo "<div id='buttontop'>";
// echo "<table style=\"width: 100%; padding: 0; \" cellspacing=\"0\"><tr>";
// echo "<td style=\"width: 60%; font-size: 10px; text-align: left; color: #2F5376; padding: 0 6px; line-height: 18px;\"><a class=\"nobutton\" href=\"../../system/admin.php?fct=preferences&amp;op=showmod&amp;mod=".$xoopsModule->getVar('mid')."\">" . _AM_MARQUEE_GENERALSET . "</a></td>";
// echo "<td style=\"width: 40%; font-size: 10px; text-align: right; color: #2F5376; padding: 0 6px; line-height: 18px;\"><b>" . $xoopsModule->name() . " " . _AM_MARQUEE_MODULEADMIN . "</b> " . $breadcrumb . "</td>";
// echo "</tr></table>";
// echo "</div>";
//
// echo "<div id='buttonbar'>";
// echo "<ul>";
// echo "<li id='" . $tblColors[0] . "'><a href=\"index.php\"\"><span>"._MI_MARQUEE_MENU_01 ."</span></a></li>\n";
// echo "</ul></div>";
// echo "<br /><br /><pre>&nbsp;</pre><pre>&nbsp;</pre><br />";*/
}

/**
* Returns the files in a folder according to a pattern
*
* Some hosts have disabled the Php glob() function, that's why this function exists
*
* @package Marquee
* @author Hervé Thouzard (http://www.herve-thouzard.com)
* @copyright (c) Hervé Thouzard
* @package Marquee
* @author Hervé Thouzard (http://www.herve-thouzard.com)
* @copyright (c) Hervé Thouzard
*
* @param string $folder Folder where you want to grab files from (terminated with a slash)
* @param string $pattern Pattern used to filter files
*
* @param string $folder Folder where you want to grab files from (terminated with a slash)
* @param string $pattern Pattern used to filter files
* @return array Files that match the pattern in the selected folder
*/
function myglob($folder = '', $pattern = 'php')
{
$result = array();
if ($dir = @opendir($folder)) {
while (($file = readdir($dir)) !== false) {
if(!is_dir($file)) {
$ext = basename($file);
$ext = explode('.', $ext);
$extension = strtolower($ext[count($ext)-1]);
if($extension == $pattern) {
if (!is_dir($file)) {
$ext = basename($file);
$ext = explode('.', $ext);
$extension = strtolower($ext[count($ext) - 1]);
if ($extension == $pattern) {
$result[] = $file;
}
}
}
closedir($dir);
} else {
echo "Error, impossible to open the folder ".$folder;
echo 'Error, impossible to open the folder ' . $folder;
}

return $result;
Expand Down
2 changes: 1 addition & 1 deletion admin/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<script>history.go(-1);</script>
<script>history.go(-1);</script>
22 changes: 11 additions & 11 deletions admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* ****************************************************************************
* marquee - MODULE FOR XOOPS
* Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
* Copyright (c) Hervé Thouzard (http://www.herve-thouzard.com)
*
* 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
Expand All @@ -11,23 +11,23 @@
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* @copyright Hervé Thouzard (http://www.herve-thouzard.com)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package marquee
* @author Hervé Thouzard (http://www.herve-thouzard.com)
* @copyright Hervé Thouzard (http://www.herve-thouzard.com)
* @license http://www.fsf.org/copyleft/gpl.html GNU public license
* @package marquee
* @author Hervé Thouzard (http://www.herve-thouzard.com)
*
* Version : $Id:
* ****************************************************************************
*/

require_once dirname(dirname(dirname(dirname(__FILE__)))) . '/include/cp_header.php';
include_once dirname(__FILE__) . '/admin_header.php';
require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
include_once __DIR__ . '/admin_header.php';

xoops_cp_header();

$indexAdmin = new ModuleAdmin();
$indexAdmin = new ModuleAdmin();

echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
echo $indexAdmin->addNavigation(basename(__FILE__));
echo $indexAdmin->renderIndex();

include "admin_footer.php";
include_once __DIR__ . '/admin_footer.php';
Loading

0 comments on commit 0f9e57d

Please sign in to comment.