Skip to content
This repository was archived by the owner on Dec 2, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
5b64aba
Add server views
Jan 3, 2015
0cd5e9f
Create README.md
theChaosCoder Aug 7, 2016
c264a5b
Fix Quickplay/Quickpick in Connection Method
theChaosCoder Aug 7, 2016
135c406
show only the top 10 countries + the other countries combined
theChaosCoder Aug 7, 2016
570e6c8
Add country var to config
theChaosCoder Aug 7, 2016
621b212
Update README.md
theChaosCoder Aug 7, 2016
1aa3b5f
Merge remote-tracking branch 'refs/remotes/origin/dev'
theChaosCoder Aug 7, 2016
536f5d3
mod "Hours Played" -> show also year and month
theChaosCoder Aug 8, 2016
14907a1
Merge branch 'master' of https://github.com/theChaosCoder/player_anal…
theChaosCoder Aug 8, 2016
332a450
Fix country view + update moment.js + order servers by name
theChaosCoder Aug 8, 2016
408808f
country again
theChaosCoder Aug 8, 2016
c9909e6
Update README.md
theChaosCoder Aug 8, 2016
723c536
Update README.md
theChaosCoder Aug 8, 2016
caf1bb8
Update README.md
theChaosCoder Aug 8, 2016
27a587c
better user config seperation
theChaosCoder Aug 8, 2016
31301cf
Update README.md
theChaosCoder Aug 8, 2016
523b24b
Mark server list item as active on click
theChaosCoder Aug 8, 2016
ee6ca3b
Merge branch 'master' of https://github.com/theChaosCoder/player_anal…
theChaosCoder Aug 8, 2016
2599dfc
js css update
theChaosCoder Aug 9, 2016
1215369
replace player_analytics table name with a const DB_TABLE_PA
theChaosCoder Aug 9, 2016
82e1d3d
prevent multiple ajax requests
theChaosCoder Aug 9, 2016
add40b9
Show also "null" values in the premium chart, fixes #2
theChaosCoder Aug 9, 2016
d194712
Add active class to all navbar elements
theChaosCoder Aug 9, 2016
a3403f6
Create CHANGELOG.md
theChaosCoder Aug 10, 2016
145e445
Show processing msg + link fixes + added staff page
theChaosCoder Aug 10, 2016
4b90266
hide 403 error
theChaosCoder Aug 10, 2016
9f036cc
Merge branch 'master' of https://github.com/theChaosCoder/player_anal…
theChaosCoder Aug 10, 2016
5cb255a
update changelog
theChaosCoder Aug 11, 2016
8f823fb
Add short description for staff
theChaosCoder Aug 11, 2016
f53d258
Fix server connections view
theChaosCoder Aug 11, 2016
571a4f0
Add js routing libs
theChaosCoder Aug 11, 2016
a861c57
Add routing + add table-hover. This is part1 of the global ip & date …
theChaosCoder Aug 11, 2016
f0d3121
Add standalone db config
theChaosCoder Aug 11, 2016
cb07d93
forgot to add file
theChaosCoder Aug 11, 2016
cc69f73
change icon for map
theChaosCoder Aug 11, 2016
6e6d0d9
Implement #4 and grouping from #1
theChaosCoder Aug 11, 2016
b566b10
typo
theChaosCoder Aug 11, 2016
8f7be41
Add named flags to playerinfo
theChaosCoder Aug 11, 2016
c835f01
Fix Layout
theChaosCoder Aug 12, 2016
9f6c146
fixing stuff
theChaosCoder Aug 12, 2016
68b3b95
add maps page
theChaosCoder Aug 13, 2016
59c274a
big update - see changelog
theChaosCoder Aug 18, 2016
9d56b1e
dates load hotfix
theChaosCoder Aug 18, 2016
303c819
add DB config warning, deactivated Hours Played for now
theChaosCoder Aug 18, 2016
b92dba0
add short description as title tag in table header (hint)
theChaosCoder Aug 18, 2016
879dca0
Fix server names in server list select
theChaosCoder Aug 19, 2016
b897027
Add blacklist support for staff #12
theChaosCoder Aug 19, 2016
be2e2ae
replaced Hours Played with db row count
theChaosCoder Aug 19, 2016
201a796
Bootstrap select cosmetics
theChaosCoder Aug 20, 2016
ec92880
sort Connection Method chart
theChaosCoder Aug 20, 2016
1aec4f3
SQL performance improvements
theChaosCoder Aug 20, 2016
07a1e0e
Update README.md
theChaosCoder Aug 20, 2016
976eb7e
Update README.md
theChaosCoder Aug 20, 2016
6826984
Update README.md
theChaosCoder Aug 20, 2016
92d909e
Update README.md
theChaosCoder Aug 20, 2016
795940c
Add maps & lab
theChaosCoder Aug 22, 2016
7d1d686
lab rounte
theChaosCoder Aug 22, 2016
fa35c63
Hide overlay on successful load of the page
theChaosCoder Aug 22, 2016
0997397
fix php warning if location result is empty
theChaosCoder Aug 23, 2016
9d196a4
Set navbar to fixed
theChaosCoder Aug 24, 2016
005c456
reduce map cache time
theChaosCoder Aug 24, 2016
ce86a9a
Add timeline to Lab
theChaosCoder Sep 3, 2016
f7d8de7
Add support for "Only active servers in dropdown box" #16
theChaosCoder Sep 9, 2016
c0210d3
Small timeline fix
theChaosCoder Sep 9, 2016
c2c3c68
set cookie expire dates to 30-60 min
theChaosCoder Oct 7, 2016
6dd5ec2
Update README.md
theChaosCoder Jan 28, 2018
65eca78
Update README.md
theChaosCoder Jan 28, 2018
02afaa4
Update getMap.php - set chart var to empty array
theChaosCoder Nov 29, 2018
681742f
Show the last 3 years in Calender View
theChaosCoder Apr 24, 2019
f1c3ece
fixed my fix
theChaosCoder Apr 24, 2019
5407451
Take Calendar View back to the future
theChaosCoder Apr 25, 2019
b3ad905
shift range
theChaosCoder Apr 25, 2019
6732b6c
[Feature] Logged-in only.
Aug 24, 2019
6ca2086
Refactor folders, remove dead code (Auth-only).
Aug 25, 2019
7dfdc91
update readme.
Aug 25, 2019
545928b
Oops. Add Assets folders. Forgot to do it
Aug 25, 2019
1f53b60
fix force_cache warning
Aug 25, 2019
50af714
Merge pull request #26 from Hackmastr/master
theChaosCoder Aug 25, 2019
823a37f
Update getlocationrange.php
Prefix May 6, 2020
c637ab6
Merge pull request #27 from Prefix/patch-1
theChaosCoder May 6, 2020
8002e9d
Change map to display names as set in config
llamasking Sep 3, 2020
3b402a3
Merge pull request #28 from llamasking/master
theChaosCoder Sep 4, 2020
369c752
Ugly hack to avoid ONLY_FULL_GROUP_BY sqlmode, fixes #29
theChaosCoder Jul 20, 2023
52864e0
PHP8 compatibility
theChaosCoder Jul 20, 2023
76b306d
Fixes #30
theChaosCoder Jul 21, 2023
48a70e6
Update Readme
theChaosCoder Dec 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

inc/sql_log.txt
cache/
inc/config_db.php
inc/config_db.php
Expand Down
58 changes: 58 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Change Log
All notable changes to this project will be documented in this file.

## 2016-08-18
### Added
- Staff whitelist
- Staff & Player info flag names
- crossroads.js for routing support. All pages are accessible via url now
- simple error/404 page
- It is possible to select multiple servers now
- You can add multiple DBs now and switch easy between them
- A simple cache

## Changed
- The DB configuration is now in config_db.php.
- Server selection now works globally on all pages
- Date selection now works globally on all pages


## Fixed
- Dashboard Charts are shown broken with empty values
- Some layout issues

## 2016-08-11
### Added
- Staff page: Show only players with flags
- Mark the current nav element as active
- Table name constant for easier development

## Changed
- Add a third option "unknown" in the Premium/F2P chart
- update js/css files
- Optimized SQL query in SSP class for better performance. WHERE is much faster then HAVING with GROUP BY

## Fixed
- Issue #2
- Sending muliple ajax requests in single server views


## 2016-08-08
### Added
- server list (repo merge)

### Changed
- Show also years and months in the "Hours Played" box

### Fixed
- Connect method chart

## 2015-08-07
### Added
- server list (repo merge)

### Changed
- Show the Top 10 countries (you can edit it in the config)

### Fixed
- Connect method chart
56 changes: 56 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/!\ Don't expect updates except fixes for critical bugs. I don't host TF2 servers anymore, so...

And don't forget "GeoIPCity" for proper Location support!
If you have permission errors try to create the /cache/SQL folder manually.

Oh and you can safely delete cache files at any time. There is no auto clean for old cache files!

# player_analytics
This is a webpanel for the sourcemod plugin **[ANY] Player Analytics** by Dr. McKay
https://forums.alliedmods.net/showthread.php?t=230832

forked from Sinclair47/player_analytics https://github.com/Sinclair47/player_analytics

If you have suggestions or you found a bug -> **contact me: thechaoscoder+player-analytics[at]gmail.com**
(replace [at] with @, bot protection) or open an issue here

## Performance
For better SQL performance run this 2 queries:
`ALTER TABLE player_analytics ADD INDEX (server_ip, connect_date);`
`ALTER TABLE player_analytics ADD INDEX (connect_date);`

## How to install?
Download as zip (or clone) and copy all files to your webserver.
Rename the file config_db_RENAME_ME.php to config_db.php in /inc and add your DB credentials.

That's it!

### Login
To activate login-only mode, edit `inc/config.php` line `16`:

Change the value of `MUST_LOG_IN` to `true` and to disable it change it to `false`.
Add each person (SteamID) to `inc/admins.php` who is allowed to log in.

## Connect method
> ### What is the difference between Quickplay and Quickpick?
> **Quickplay** = You click a button and get placed into a random server that has QP enabled
> **Quickpick** = You get presented a list of servers that have QP enabled, where you have to click "connect" yourself.
>
> Both are mostly non-existant in TF2 anymore (apart from MvM, which only has Quickplay).

> _Quote from pcmaster - https://forums.alliedmods.net/showthread.php?t=230832&page=31_

-
> ### Why do I have some strange values for connect_method in my DB like - 20312 or asd?
> People can supply their own connection methods using the connect command. For example:
> **connect 127.0.0.1 myownreason**
> will list your connection method as "myownreason".
>
> _Quote from Dr. McKay - https://forums.alliedmods.net/showpost.php?p=2350131&postcount=256_

## Todo
* Add area charts to see changes over time
* Maybe add a Chart as in HLStatsX

##Webpanel
![Player Analytics Webpanel](https://raw.githubusercontent.com/theChaosCoder/player_analytics/master/player_analytics.png)
File renamed without changes.
File renamed without changes.
196 changes: 196 additions & 0 deletions assets/css/dataTables.bootstrap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
table.dataTable {
clear: both;
margin-top: 6px !important;
margin-bottom: 6px !important;
max-width: none !important;
border-collapse: separate !important;
}
table.dataTable td,
table.dataTable th {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
table.dataTable td.dataTables_empty,
table.dataTable th.dataTables_empty {
text-align: center;
}
table.dataTable.nowrap th,
table.dataTable.nowrap td {
white-space: nowrap;
}

div.dataTables_wrapper div.dataTables_length label {
font-weight: normal;
text-align: left;
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_length select {
width: 75px;
display: inline-block;
}
div.dataTables_wrapper div.dataTables_filter {
text-align: right;
}
div.dataTables_wrapper div.dataTables_filter label {
font-weight: normal;
white-space: nowrap;
text-align: left;
}
div.dataTables_wrapper div.dataTables_filter input {
margin-left: 0.5em;
display: inline-block;
width: auto;
}
div.dataTables_wrapper div.dataTables_info {
padding-top: 8px;
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_paginate {
margin: 0;
white-space: nowrap;
text-align: right;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
margin: 2px 0;
white-space: nowrap;
}
div.dataTables_wrapper div.dataTables_processing {
position: absolute;
bottom: calc(50% - 70px);
left: 10%;
width: 80%;
/* margin-left: -200px; */
/* margin-top: -26px; */
text-align: center;
padding: 1em 0;
height: 70px;
padding-top: 22px;
text-align: center;
font-size: 1.2em;
background-color: #f5f5f5;
border: 1px solid #ddd;
border-radius: 10px;
z-index: 99;
opacity: 0.92;
}



table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting,
table.dataTable thead > tr > td.sorting_asc,
table.dataTable thead > tr > td.sorting_desc,
table.dataTable thead > tr > td.sorting {
padding-right: 30px;
}
table.dataTable thead > tr > th:active,
table.dataTable thead > tr > td:active {
outline: none;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
cursor: pointer;
position: relative;
}
table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after,
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
position: absolute;
bottom: 8px;
right: 8px;
display: block;
font-family: 'Glyphicons Halflings';
opacity: 0.5;
}
table.dataTable thead .sorting:after {
opacity: 0.2;
content: "\e150";
/* sort */
}
table.dataTable thead .sorting_asc:after {
content: "\e155";
/* sort-by-attributes */
}
table.dataTable thead .sorting_desc:after {
content: "\e156";
/* sort-by-attributes-alt */
}
table.dataTable thead .sorting_asc_disabled:after,
table.dataTable thead .sorting_desc_disabled:after {
color: #eee;
}

div.dataTables_scrollHead table.dataTable {
margin-bottom: 0 !important;
}

div.dataTables_scrollBody table {
border-top: none;
margin-top: 0 !important;
margin-bottom: 0 !important;
}
div.dataTables_scrollBody table thead .sorting:after,
div.dataTables_scrollBody table thead .sorting_asc:after,
div.dataTables_scrollBody table thead .sorting_desc:after {
display: none;
}
div.dataTables_scrollBody table tbody tr:first-child th,
div.dataTables_scrollBody table tbody tr:first-child td {
border-top: none;
}

div.dataTables_scrollFoot table {
margin-top: 0 !important;
border-top: none;
}

@media screen and (max-width: 767px) {
div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter,
div.dataTables_wrapper div.dataTables_info,
div.dataTables_wrapper div.dataTables_paginate {
text-align: center;
}
}
table.dataTable.table-condensed > thead > tr > th {
padding-right: 20px;
}
table.dataTable.table-condensed .sorting:after,
table.dataTable.table-condensed .sorting_asc:after,
table.dataTable.table-condensed .sorting_desc:after {
top: 6px;
right: 6px;
}

table.table-bordered.dataTable th,
table.table-bordered.dataTable td {
border-left-width: 0;
}
table.table-bordered.dataTable th:last-child, table.table-bordered.dataTable th:last-child,
table.table-bordered.dataTable td:last-child,
table.table-bordered.dataTable td:last-child {
border-right-width: 0;
}
table.table-bordered.dataTable tbody th,
table.table-bordered.dataTable tbody td {
border-bottom-width: 0;
}

div.dataTables_scrollHead table.table-bordered {
border-bottom-width: 0;
}

div.table-responsive > div.dataTables_wrapper > div.row {
margin: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:first-child {
padding-left: 0;
}
div.table-responsive > div.dataTables_wrapper > div.row > div[class^="col-"]:last-child {
padding-right: 0;
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Empty file.
Empty file.
Binary file added assets/img/steam.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading