Skip to content

Commit 4af4c48

Browse files
authored
Merge pull request #1 from mambax7/master
1.00 RC-1
2 parents 6250fe8 + 3f94e31 commit 4af4c48

File tree

220 files changed

+11143
-6183
lines changed

Some content is hidden

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

220 files changed

+11143
-6183
lines changed

.codeclimate.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
engines:
2+
eslint:
3+
enabled: true
4+
csslint:
5+
enabled: true
6+
duplication:
7+
enabled: true
8+
config:
9+
languages:
10+
- javascript
11+
- php
12+
fixme:
13+
enabled: true
14+
phpmd:
15+
enabled: true
16+
config:
17+
file_extensions:
18+
- php
19+
- inc
20+
phpcodesniffer:
21+
enabled: true
22+
config:
23+
file_extensions: "php,inc,lib"
24+
standard: "PSR1,PSR2"
25+
ratings:
26+
paths:
27+
- "**.inc"
28+
- "**.js"
29+
- "**.lib"
30+
- "**.php"
31+
exclude_paths: []

.gitattributes

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto
3+
4+
# Custom for Visual Studio
5+
*.cs diff=csharp
6+
7+
# Standard to msysgit
8+
*.doc diff=astextplain
9+
*.DOC diff=astextplain
10+
*.docx diff=astextplain
11+
*.DOCX diff=astextplain
12+
*.dot diff=astextplain
13+
*.DOT diff=astextplain
14+
*.pdf diff=astextplain
15+
*.PDF diff=astextplain
16+
*.rtf diff=astextplain
17+
*.RTF diff=astextplain

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# no backup files, editor temp
2+
*~
3+
\#*
4+
*.bak
5+
*.idea/

.scrutinizer.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# language: php
2+
build:
3+
nodes:
4+
tests: true
5+
analysis:
6+
dependencies:
7+
after:
8+
# The following installs the most recent XOOPS CMS version, you might want
9+
# to install a specific release tag or branch instead.
10+
- git clone --depth=1 https://github.com/XOOPS/XoopsCore25
11+
- git clone --depth=1 https://github.com/mambax7/tag
12+
project_setup:
13+
override: true
14+
tests:
15+
override:
16+
- php-scrutinizer-run --enable-security-analysis
17+
environment:
18+
php:
19+
version: "7.2"
20+
filter:
21+
dependency_paths:
22+
- XoopsCore25/*
23+
- tag/*

CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at `:author_email`. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png)
2+
# Contributing to [XOOPS CMS](https://xoops.org)
3+
[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org)
4+
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
5+
6+
Contributions are **welcome** and will be fully **credited**.
7+
8+
We accept contributions via Pull Requests on [Github](https://github.com/XoopsModules25x/statistics).
9+
10+
## Pull Requests
11+
12+
- **[PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
13+
- **Add tests!** - We encourage providing tests for your contributions.
14+
- **Document any change in behavior** - Make sure the `/docs/changelog.txt` and any other relevant documentation are up-to-date.
15+
- **Consider our release cycle** - We try to follow [Semantic Versioning v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
16+
- **Create feature branches** - Don't ask us to pull from your master branch.
17+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
18+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please squash them before submitting.
19+
20+
Happy coding, and **_May the Source be with You_**!

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
![alt XOOPS CMS](https://xoops.org/images/logoXoops4GithubRepository.png)
2-
3-
## Archived Module for [XOOPS CMS](https://xoops.org)
2+
## Statistics module for [XOOPS CMS 2.5.10+](https://xoops.org)
43
[![XOOPS CMS Module](https://img.shields.io/badge/XOOPS%20CMS-Module-blue.svg)](https://xoops.org)
5-
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](https://www.gnu.org/licenses/gpl-2.0.html)
4+
[![Software License](https://img.shields.io/badge/license-GPL-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)
5+
6+
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/XoopsModules25x/statistics.svg?style=flat)](https://scrutinizer-ci.com/g/XoopsModules25x/statistics/?branch=master)
7+
[![Latest Pre-Release](https://img.shields.io/github/tag/XoopsModules25x/statistics.svg?style=flat)](https://github.com/XoopsModules25x/statistics/tags/)
8+
[![Latest Version](https://img.shields.io/github/release/XoopsModules25x/statistics.svg?style=flat)](https://github.com/XoopsModules25x/statistics/releases/)
69

7-
**XOOPS Module Archive:** Modules in this archive are older modules for XOOPS CMS, and therefore some of them might not work with the latest XOOPS and PHP versions.
10+
**Statistics** module for [XOOPS CMS](https://xoops.org) is for collecting visitor statistics, and to provide info about your PHP Configuration.
811

9-
However, please fork them and if you have any improvements and fixes, please share them back with us.
12+
[![Translations on Transifex](https://xoops.org/images/translations-transifex-blue.svg)](https://www.transifex.com/xoops)
1013

11-
Visit us on http://xoops.org
14+
Please visit us on https://xoops.org
1215

13-
The upcoming "next generation" XOOPS CMS version is being crafted at: https://github.com/XOOPS
16+
Current and upcoming "next generation" versions of XOOPS CMS are crafted on GitHub at: https://github.com/XOOPS

admin/about.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
/*
3+
* You may not change or alter any portion of this comment or credits
4+
* of supporting developers from this source code or any supporting source code
5+
* which is considered copyrighted (c) material of the original comment or credit authors.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
*/
11+
12+
/**
13+
* @copyright XOOPS Project (https://xoops.org)
14+
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
15+
* @package
16+
* @since
17+
* @author XOOPS Development Team
18+
*/
19+
20+
use Xmf\Module\Admin;
21+
22+
/** @var Admin $adminObject */
23+
24+
require __DIR__ . '/admin_header.php';
25+
xoops_cp_header();
26+
27+
$adminObject->displayNavigation(basename(__FILE__));
28+
$adminObject::setPaypal('[email protected]');
29+
$adminObject->displayAbout(false);
30+
31+
require_once __DIR__ . '/admin_footer.php';

admin/admin_footer.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
/*
3+
* You may not change or alter any portion of this comment or credits
4+
* of supporting developers from this source code or any supporting source code
5+
* which is considered copyrighted (c) material of the original comment or credit authors.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
*/
11+
12+
/**
13+
* @copyright XOOPS Project (https://xoops.org)
14+
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
15+
* @package
16+
* @since
17+
* @author XOOPS Development Team
18+
*/
19+
$pathIcon32 = \Xmf\Module\Admin::iconUrl('', 32);
20+
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>';
21+
22+
xoops_cp_footer();

admin/admin_header.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
/*
3+
* You may not change or alter any portion of this comment or credits
4+
* of supporting developers from this source code or any supporting source code
5+
* which is considered copyrighted (c) material of the original comment or credit authors.
6+
*
7+
* This program is distributed in the hope that it will be useful,
8+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10+
*/
11+
12+
/**
13+
* @copyright XOOPS Project (https://xoops.org)
14+
* @license GNU GPL 2 or later (https://www.gnu.org/licenses/gpl-2.0.html)
15+
* @package
16+
* @since
17+
* @author XOOPS Development Team
18+
*/
19+
20+
21+
use Xmf\Module\Admin;
22+
use XoopsModules\Statistics\{
23+
Helper
24+
};
25+
/** @var Admin $adminObject */
26+
/** @var Helper $helper */
27+
28+
require_once dirname(dirname(dirname(__DIR__))) . '/include/cp_header.php';
29+
require dirname(__DIR__) . '/preloads/autoloader.php';
30+
//require_once $GLOBALS['xoops']->path('www/class/xoopsformloader.php');
31+
32+
// require_once dirname(__DIR__) . '/class/Utility.php';
33+
//require_once dirname(__DIR__) . '/include/common.php';
34+
35+
$moduleDirName = basename(dirname(__DIR__));
36+
$helper = Helper::getInstance();
37+
$adminObject = Admin::getInstance();
38+
39+
$pathIcon16 = Admin::iconUrl('', 16);
40+
$pathIcon32 = Admin::iconUrl('', 32);
41+
$pathModIcon32 = $helper->getModule()->getInfo('modicons32');
42+
43+
// Load language files
44+
$helper->loadLanguage('admin');
45+
$helper->loadLanguage('modinfo');
46+
$helper->loadLanguage('main');
47+
$helper->loadLanguage('common');
48+
49+
$myts = \MyTextSanitizer::getInstance();
50+
51+
if (!isset($GLOBALS['xoopsTpl']) || !($GLOBALS['xoopsTpl'] instanceof \XoopsTpl)) {
52+
require_once $GLOBALS['xoops']->path('class/template.php');
53+
$xoopsTpl = new \XoopsTpl();
54+
}

0 commit comments

Comments
 (0)