Skip to content

Commit 786b6e6

Browse files
authored
Merge pull request #8 from mambax7/master
updates
2 parents b236d1b + 3273a48 commit 786b6e6

File tree

109 files changed

+5475
-4808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+5475
-4808
lines changed

LICENSE

-339
This file was deleted.

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
## MyLinks module for [XOOPS CMS 2.5.8+](https://xoops.org)
33
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](LICENSE)
44
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/XoopsModules25x/mylinks.svg?style=flat)](https://scrutinizer-ci.com/g/XoopsModules25x/mylinks/?branch=master)
5-
[![Codacy Badge](https://api.codacy.com/project/badge/grade/2d27c0023ee54f0b9ba2b5d17a68b2a5)](https://www.codacy.com/app/XoopsModules25x/mylinks)
5+
[![Codacy Badge](https://api.codacy.com/project/badge/grade/6ed3bd6222f84d2d8271019b78d2a6c9)](https://www.codacy.com/app/mambax7/mylinks_2/)
66
[![Code Climate](https://img.shields.io/codeclimate/github/XoopsModules25x/mylinks.svg?style=flat)](https://codeclimate.com/github/XoopsModules25x/mylinks)
77
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/aacda134-0f78-4d73-997a-b37194cfd7c4/mini.png)](https://insight.sensiolabs.com/projects/aacda134-0f78-4d73-997a-b37194cfd7c4)
88
[![Latest Pre-Resease](https://img.shields.io/github/tag/XoopsModules25x/mylinks.svg?style=flat)](https://github.com/XoopsModules25x/mylinks/tags/)
99
[![Latest Version](https://img.shields.io/github/release/XoopsModules25x/mylinks.svg?style=flat)](https://github.com/XoopsModules25x/mylinks/releases/)
1010

1111
MyLinks module for [XOOPS CMS](http://xoops.org) is a XOOPS module that allows an administrator to create a series of website links. The module provides the ability for other users to submit sites for inclusion in the list which can be monitored by the administrator and then approved if desired.
1212

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

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

admin/about.php

+8-10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
2-
/*
2+
/**
33
* You may not change or alter any portion of this comment or credits
44
* of supporting developers from this source code or any supporting source code
55
* which is considered copyrighted (c) material of the original comment or credit authors.
@@ -8,14 +8,12 @@
88
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
99
*/
1010
/**
11-
* MyLinks module
12-
*
13-
* @copyright:: {@link http://sourceforge.net/projects/xoops/ The XOOPS Project}
14-
* @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
15-
* @package:: mylinks
11+
* @copyright :: {@link http://xoops.org/ XOOPS Project}
12+
* @license :: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
13+
* @package :: mylinks
1614
* @subpackage:: admin
17-
* @author:: XOOPS Module Dev Team
18-
**/
15+
* @author :: XOOPS Devolopment Team
16+
*/
1917
/**
2018
* Display module information in Admin
2119
*/
@@ -25,7 +23,7 @@
2523

2624
$aboutAdmin = new ModuleAdmin();
2725

28-
echo $aboutAdmin->addNavigation('about.php');
29-
echo $aboutAdmin->renderAbout('6KJ7RW5DR3VTJ', false);
26+
echo $aboutAdmin->addNavigation(basename(__FILE__));
27+
echo $aboutAdmin->renderAbout('[email protected]', false);
3028

3129
include __DIR__ . '/admin_footer.php';

admin/admin_footer.php

+9-16
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,14 @@
99
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1010
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
1111
*
12-
* @copyright:: {@link http://sourceforge.net/projects/xoops/ The XOOPS Project}
13-
* @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14-
* @package:: mylinks
12+
* @copyright :: {@link http://xoops.org/ XOOPS Project}
13+
* @license :: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14+
* @package :: mylinks
1515
* @subpackage:: admin
16-
* @since: 2.5.0
17-
* @author:: XOOPS Module Dev Team
18-
**/
19-
echo "<div class='adminfooter'>\n"
20-
. " <div class='txtcenter'>\n"
21-
. " <a href='" . $GLOBALS['xoopsModule']->getInfo('author_website_url') . "' target='_blank'><img src='{$pathIcon32}/xoopsmicrobutton.gif' alt='" . $GLOBALS['xoopsModule']->getInfo('author_website_name') . "' title='" . $GLOBALS['xoopsModule']->getInfo('author_website_name') . "'></a>\n"
22-
. " </div>\n"
23-
. " <div class='center smallsmall italic pad5'>\n"
24-
. ' ' . _AM_MYLINKS_MAINTAINED_BY
25-
. " <a class='tooltip' rel='external' href='http://" . $GLOBALS['xoopsModule']->getInfo('module_website_url') . "' "
26-
. "title='" . _AM_MYLINKS_MAINTAINED_TITLE . "'>" . _AM_MYLINKS_MAINTAINED_TEXT . "</a>\n"
27-
. " </div>\n"
28-
. "</div>\n";
16+
* @author :: XOOPS Development Team
17+
**/
18+
global $pathIcon32;
19+
20+
echo "<div class='adminfooter'>\n" . " <div style='text-align: center;'>\n" . " <a href='http://www.xoops.org' target='_blank'><img src=" . $pathIcon32 . "/xoopsmicrobutton.gif alt='XOOPS' title='XOOPS'></a>\n" . " </div>\n" . ' ' . _AM_MYLINKS_ADMIN_FOOTER . "\n" . '</div>';
21+
2922
xoops_cp_footer();

admin/admin_header.php

+12-14
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@
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://sourceforge.net/projects/xoops/
13-
* @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14-
* @package:: mylinks
12+
* @copyright :: {@link http://xoops.org/ XOOPS Project}
13+
* @license :: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
14+
* @package :: mylinks
1515
* @subpackage:: admin
16-
* @since:: 2.5.0
17-
* @author:: Magic.Shao <[email protected]> - Susheng Yang <[email protected]>
18-
**/
16+
*/
1917

2018
$path = dirname(dirname(dirname(__DIR__)));
2119
include_once $path . '/mainfile.php';
@@ -24,20 +22,20 @@
2422

2523
global $xoopsModule;
2624

27-
$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
25+
$thisModuleDir = $GLOBALS['xoopsModule']->getVar('dirname');
2826
$thisModulePath = dirname(__DIR__);
2927

3028
// Load language files
3129
xoops_loadLanguage('admin', $thisModuleDir);
3230
xoops_loadLanguage('modinfo', $thisModuleDir);
3331
xoops_loadLanguage('main', $thisModuleDir);
3432

35-
$pathIcon16 = '../'.$xoopsModule->getInfo('icons16');
36-
$pathIcon32 = '../'.$xoopsModule->getInfo('icons32');
33+
$pathIcon16 = '../' . $xoopsModule->getInfo('icons16');
34+
$pathIcon32 = '../' . $xoopsModule->getInfo('icons32');
3735
$pathModuleAdmin = $xoopsModule->getInfo('dirmoduleadmin');
3836

39-
if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php'))){
40-
include_once $GLOBALS['xoops']->path($pathModuleAdmin.'/moduleadmin.php');
41-
}else{
42-
redirect_header('../../../admin.php', 5, _AM_MODULEADMIN_MISSING, false);
43-
}
37+
if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php'))) {
38+
include_once $GLOBALS['xoops']->path($pathModuleAdmin . '/moduleadmin.php');
39+
} else {
40+
redirect_header('../../../admin.php', 5, _AM_MODULEADMIN_MISSING, false);
41+
}

admin/index.php

+15-16
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
*
55
* Xoops mylinks - a multicategory links module
66
*
7-
* @copyright:: The XOOPS Project http://sourceforge.net/projects/xoops/
8-
* @license:: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
9-
* @package:: mylinks
7+
* @copyright :: {@link http://xoops.org/ XOOPS Project}
8+
* @license :: {@link http://www.gnu.org/licenses/gpl-2.0.html GNU Public License}
9+
* @package :: mylinks
1010
* @subpackage:: class
11-
* @since:: unknown
12-
* @author:: Thatware - http://thatware.org/
11+
* @author :: Thatware - http://thatware.org/
1312
*/
1413
// ------------------------------------------------------------------------- //
1514
// XOOPS - PHP Content Management System //
@@ -35,46 +34,46 @@
3534
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
3635
// ------------------------------------------------------------------------- //
3736

38-
include 'admin_header.php';
37+
include __DIR__ . '/admin_header.php';
3938
xoops_cp_header();
4039

4140
$indexAdmin = new ModuleAdmin();
4241

4342
// Temporarily 'homeless' links (to be revised in admin.php breakup)
4443
$result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_broken') . '');
4544
list($totalBrokenLinks) = $xoopsDB->fetchRow($result);
46-
if ( $totalBrokenLinks > 0 ) {
45+
if ($totalBrokenLinks > 0) {
4746
$totalBrokenLinks = "<span style='color: #ff0000; font-weight: bold'>{$totalBrokenLinks}</span>";
4847
}
4948
$result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_mod') . '');
5049
list($totalModRequests) = $xoopsDB->fetchRow($result);
51-
if ( $totalModRequests > 0 ) {
50+
if ($totalModRequests > 0) {
5251
$totalModRequests = "<span style='color: #ff0000; font-weight: bold'>{$totalModRequests}</span>";
5352
}
5453
$result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_links') . " WHERE status='0'");
5554
list($totalNewLinks) = $xoopsDB->fetchRow($result);
56-
if ( $totalNewLinks > 0 ) {
55+
if ($totalNewLinks > 0) {
5756
$totalNewLinks = "<span style='color: #ff0000; font-weight: bold'>{$totalNewLinks}</span>";
5857
}
59-
$result=$xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_links') . ' WHERE status>0');
58+
$result = $xoopsDB->query('SELECT COUNT(*) FROM ' . $xoopsDB->prefix('mylinks_links') . ' WHERE status>0');
6059
list($activeLinks) = $xoopsDB->fetchRow($result);
6160

6261
$indexAdmin->addInfoBox(_MD_MYLINKS_WEBLINKSCONF);
6362

64-
if ( 0 == $totalNewLinks ) {
63+
if (0 == $totalNewLinks) {
6564
//$indexAdmin->addLineLabel(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_LINKSWAITING, $totalNewLinks, 'Green');
66-
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_LINKSWAITING, $totalNewLinks, 'Green');
65+
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_LINKSWAITING, $totalNewLinks, 'Green');
6766
} else {
6867
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_LINKSWAITING, $totalNewLinks, 'Red');
6968
}
7069

71-
if ( 0 == $totalBrokenLinks ) {
70+
if (0 == $totalBrokenLinks) {
7271
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_BROKENREPORTS, $totalBrokenLinks, 'Green');
7372
} else {
7473
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_BROKENREPORTS, $totalBrokenLinks, 'Red');
7574
}
7675

77-
if ( 0 == $totalModRequests ) {
76+
if (0 == $totalModRequests) {
7877
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_MODREQUESTS, $totalModRequests, 'Green');
7978
} else {
8079
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_MODREQUESTS, $totalModRequests, 'Red');
@@ -83,7 +82,7 @@
8382
$indexAdmin->addInfoBoxLine(_MD_MYLINKS_WEBLINKSCONF, _MD_MYLINKS_THEREARE, $activeLinks);
8483
//------------------------------
8584

86-
echo $indexAdmin->addNavigation('index.php');
85+
echo $indexAdmin->addNavigation(basename(__FILE__));
8786
echo $indexAdmin->renderIndex();
8887

89-
include 'admin_footer.php';
88+
include __DIR__ . '/admin_footer.php';

0 commit comments

Comments
 (0)