Skip to content

Commit 448676c

Browse files
authored
Merge pull request #1 from phpbb-extensions/master
up to date
2 parents ebe4d57 + 924ed01 commit 448676c

34 files changed

Lines changed: 791 additions & 456 deletions

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ travis/ export-ignore
55
.gitattributes export-ignore
66
phpunit.xml.* export-ignore
77
composer.lock export-ignore
8+
build.xml export-ignore

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/build/
2+
/vendor/

.travis.yml

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1+
# Opt into fully virtualized infrastructure
2+
sudo: required
3+
dist: precise
4+
15
language: php
26

37
matrix:
48
include:
5-
- php: 5.3.3
6-
env: DB=mysqli
7-
- php: 5.3
8-
env: DB=mysqli # MyISAM
9+
- php: 5.5
10+
env: DB=none;NOTESTS=1
911
- php: 5.4
10-
env: DB=mysqli
12+
env: DB=mysqli #myisam
1113
- php: 5.4
1214
env: DB=mysql
1315
- php: 5.4
@@ -20,9 +22,16 @@ matrix:
2022
env: DB=mysqli
2123
- php: 5.6
2224
env: DB=mysqli
25+
- php: 7.0
26+
env: DB=mysqli
27+
- php: 7.1
28+
env: DB=mysqli
29+
- php: nightly
30+
env: DB=mysqli
2331
- php: hhvm
2432
env: DB=mysqli
2533
allow_failures:
34+
- php: nightly
2635
- php: hhvm
2736
fast_finish: true
2837

@@ -32,27 +41,27 @@ env:
3241
- SNIFF="1" # Should we run code sniffer on your code?
3342
- IMAGE_ICC="1" # Should we run icc profile sniffer on your images?
3443
- EPV="1" # Should we run EPV (Extension Pre Validator) on your code?
35-
- PHPBB_BRANCH="3.1.x"
44+
- PHPBB_BRANCH="3.2.x"
3645

3746
branches:
3847
only:
3948
- master
4049
- develop
4150
- /^develop-.*$/
42-
- /^release-.*$/
51+
- /^\d+(\.\d+)?\.x$/
4352

4453
install:
45-
- travis_retry composer install --dev --no-interaction --prefer-source
4654
- travis/prepare-phpbb.sh $EXTNAME $PHPBB_BRANCH
4755
- cd ../../phpBB3
4856
- travis/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
49-
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION
57+
- travis/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
58+
- ../phpbb-extensions/googleanalytics/travis/prepare-epv.sh $EPV $NOTESTS
5059

5160
before_script:
52-
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION
61+
- travis/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
5362

5463
script:
55-
- sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME; fi"
56-
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION; fi"
57-
- phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php
58-
- sh -c "if [ '$EPV' != '0' ] && [ '$TRAVIS_PHP_VERSION' = '5.3.3' ] && [ '$DB' = 'mysqli' ]; then phpBB/ext/$EXTNAME/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
64+
- sh -c "if [ '$SNIFF' != '0' ]; then travis/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME $NOTESTS; fi"
65+
- sh -c "if [ '$IMAGE_ICC' != '0' ]; then travis/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION $NOTESTS; fi"
66+
- sh -c "if [ '$EPV' != '0' ] && [ '$NOTESTS' = '1' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'; fi"
67+
- sh -c "if [ '$NOTESTS' != '1' ]; then phpBB/vendor/bin/phpunit --configuration phpBB/ext/$EXTNAME/travis/phpunit-$DB-travis.xml --bootstrap ./tests/bootstrap.php; fi"

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## 1.0.3 - 2017-08-04
4+
5+
- Minor code improvements
6+
- Added Russian translation
7+
- Added Slovak translation
8+
9+
## 1.0.2 - 2017-01-12
10+
11+
- Supports phpBB 3.1 and 3.2
12+
- Added support for tracking users by their user ID (must be enabled in your Google Analytics account to take advantage of it)
13+
- Lots of internal code updates and improvements
14+
- Added Brazilian Portuguese translation
15+
- Added Croatian translation (casual and formal)
16+
- Added Czech translation
17+
- Added Danish translation
18+
- Added Greek translation
19+
- Added Italian translation
20+
- Added Turkish translation
21+
322
## 1.0.1 - 2014-11-28
423

524
- Fixed issues in the README.md

README.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,16 @@
22

33
An extension for phpBB 3.1 that allows administrators to easily add their Google Analytics tracking code to their phpBB forum.
44

5-
[![Build Status](https://travis-ci.org/phpbb-extensions/googleanalytics.png)](https://travis-ci.org/phpbb-extensions/googleanalytics)
5+
[![Build Status](https://travis-ci.org/phpbb-extensions/googleanalytics.svg)](https://travis-ci.org/phpbb-extensions/googleanalytics)
6+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phpbb-extensions/googleanalytics/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phpbb-extensions/googleanalytics/?branch=master)
67

7-
## Quick Install
8-
You can install this on the latest release of phpBB 3.1 by following the steps below:
8+
## Install
99

10-
1. [Download the latest release](https://github.com/phpbb-extensions/googleanalytics/releases).
11-
2. Unzip the downloaded release, and change the name of the folder to `googleanalytics`.
12-
3. In the `ext` directory of your phpBB board, create a new directory named `phpbb` (if it does not already exist).
13-
4. Copy the `googleanalytics` directory to `phpBB/ext/phpbb/` (if done correctly, you'll have the main composer JSON file at (your forum root)/ext/phpbb/googleanalytics/composer.json).
14-
5. Navigate in the ACP to `Customise -> Manage extensions`.
15-
6. Look for `Google Analytics` under the Disabled Extensions list, and click its `Enable` link.
16-
7. Set up and configure Google Analytics by navigating in the ACP to `General` -> `Board Configuration` -> `Board Settings`.
10+
1. [Download the latest validated release](https://www.phpbb.com/customise/db/extension/googleanalytics/).
11+
2. Unzip the downloaded release and copy it to the `ext` directory of your phpBB board.
12+
3. Navigate in the ACP to `Customise -> Manage extensions`.
13+
4. Look for `Google Analytics` under the Disabled Extensions list, and click its `Enable` link.
14+
5. Set up and configure Google Analytics by navigating in the ACP to `General` -> `Board Configuration` -> `Board Settings`.
1715

1816
## Uninstall
1917

@@ -27,5 +25,9 @@ You can install this on the latest release of phpBB 3.1 by following the steps b
2725
* Report bugs and other issues to our [Issue Tracker](https://github.com/phpbb-extensions/googleanalytics/issues).
2826
* Support requests should be posted and discussed in the [Google Analytics topic at phpBB.com](https://www.phpbb.com/customise/db/extension/googleanalytics/support).
2927

28+
## Translations
29+
30+
* Translations should be posted to the [Google Analytics topic at phpBB.com](https://www.phpbb.com/customise/db/extension/googleanalytics/support/topic/130756). We accept pull requests for translation corrections, but we do not accept pull requests for new translations.
31+
3032
## License
3133
[GNU General Public License v2](http://opensource.org/licenses/GPL-2.0)

build.xml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="Google Analytics Extension Builder" description="Builds an extension.zip from a git repository" default="all">
3+
<property name="vendor-name" value="phpbb" />
4+
<property name="extension-name" value="googleanalytics" />
5+
<!--
6+
Only set this to "true" if you have dependencies in the composer.json,
7+
otherwise use "false".
8+
-->
9+
<property name="has-dependencies" value="false" />
10+
11+
<target name="clean-package">
12+
<!--
13+
Remove some unnecessary files/directories
14+
${dir}/ is the folder of your extension, e.g. ext/nickvergessen/newspage/
15+
-->
16+
<delete dir="${dir}/tests" />
17+
<delete dir="${dir}/travis" />
18+
19+
<delete file="${dir}/.gitignore" />
20+
<delete file="${dir}/.gitattributes" />
21+
<delete file="${dir}/.travis.yml" />
22+
<delete file="${dir}/build.xml" />
23+
<delete file="${dir}/composer.lock" />
24+
<delete file="${dir}/phpunit.xml.dist" />
25+
<delete file="${dir}/README.md" />
26+
</target>
27+
28+
<!--
29+
DO NOT EDIT BELOW THIS LINE!!!!
30+
-->
31+
32+
<property name="version" value="HEAD" override="true" />
33+
<property name="build-directory" value="build" override="true" />
34+
<property name="package-directory" value="${build-directory}/package/${vendor-name}/${extension-name}" />
35+
36+
<!-- These are the main targets which you will probably want to use -->
37+
<target name="all" depends="prepare-structure,package" />
38+
39+
<!--
40+
Clean up the build directory
41+
-->
42+
<target name="clean">
43+
<delete dir="${build-directory}" />
44+
</target>
45+
46+
<!--
47+
Recreate the necessary folders
48+
-->
49+
<target name="prepare-structure" depends="clean">
50+
<mkdir dir="${build-directory}" />
51+
<mkdir dir="${build-directory}/checkout" />
52+
<mkdir dir="${build-directory}/package" />
53+
<mkdir dir="${build-directory}/package/${vendor-name}" />
54+
<mkdir dir="${build-directory}/package/${vendor-name}/${extension-name}" />
55+
<mkdir dir="${build-directory}/upload" />
56+
</target>
57+
58+
<!--
59+
The real packaging
60+
-->
61+
<target name="package">
62+
<echo msg="Extracting ${version}" />
63+
64+
<phingcall target="git-checkout">
65+
<property name="archive-version" value="${version}" />
66+
</phingcall>
67+
68+
<if>
69+
<equals arg1="${has-dependencies}" arg2="1" />
70+
<then>
71+
<exec dir="${package-directory}" command="php composer.phar install --no-dev"
72+
checkreturn="true" />
73+
</then>
74+
</if>
75+
76+
<phingcall target="clean-package">
77+
<property name="dir" value="${package-directory}" />
78+
</phingcall>
79+
80+
<!-- Try setting the package version property from composer.json -->
81+
<exec dir="${package-directory}"
82+
command='php -r "\$j = json_decode(file_get_contents(\"composer.json\")); echo (isset(\$j->version) ? \$j->version : \"${version}\");"'
83+
checkreturn="true"
84+
outputProperty='package-version' />
85+
86+
<phingcall target="wrap-package">
87+
<property name="destination-filename" value="${build-directory}/upload/${vendor-name}_${extension-name}_${package-version}" />
88+
</phingcall>
89+
</target>
90+
91+
<!--
92+
Checkout a given version and install/clean the dependencies
93+
-->
94+
<target name="git-checkout">
95+
<echo msg="Getting archive for ${archive-version}" />
96+
97+
<exec command="git archive ${archive-version} --format zip --output ${build-directory}/checkout/${archive-version}.zip"
98+
checkreturn="true" />
99+
<unzip file="${build-directory}/checkout/${archive-version}.zip" todir="${package-directory}" />
100+
</target>
101+
102+
<!--
103+
Create the zip and tar ball
104+
-->
105+
<target name="wrap-package">
106+
<echo msg="Creating archives (${vendor-name}/${extension-name} ${version})" />
107+
<zip basedir="${build-directory}/package/" destfile="${destination-filename}.zip" />
108+
</target>
109+
</project>

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "phpbb-extension",
44
"description": "An extension that allows administrators to easily add their Google Analytics tracking code to their phpBB forum.",
55
"homepage": "https://www.phpbb.com",
6-
"version": "1.0.2-dev",
6+
"version": "1.0.3",
77
"keywords": ["phpbb", "extension", "google", "analytics"],
88
"license": "GPL-2.0",
99
"authors": [
@@ -39,12 +39,12 @@
3939
"composer/installers": "~1.0"
4040
},
4141
"require-dev": {
42-
"phpbb/epv": "dev-master"
42+
"phing/phing": "2.4.*"
4343
},
4444
"extra": {
4545
"display-name": "Google Analytics",
4646
"soft-require": {
47-
"phpbb/phpbb": ">=3.1.0,<3.2.*@dev"
47+
"phpbb/phpbb": ">=3.1.0"
4848
},
4949
"version-check": {
5050
"host": "www.phpbb.com",

0 commit comments

Comments
 (0)