Giter Site home page Giter Site logo

zkillboard / zkillboard Goto Github PK

View Code? Open in Web Editor NEW
269.0 30.0 73.0 148.77 MB

Easy does it

Home Page: https://zkillboard.com

License: Other

PHP 9.65% Shell 0.01% HTML 88.69% CSS 0.25% JavaScript 1.33% DIGITAL Command Language 0.07%
eve-online php mongodb redis

zkillboard's Introduction

zKillboard

zKillboard is a killboard created for EVE-Online, for use on zkillboard.com, but can also be used for single entities.

Fun fact: zKillboard.com was originally called killwhore.com until it was discovered that the EVE Online forums censored the word whore.

Installation

This is a set of code that is beta and is constantly in flux. Which means it is a work in progress. It lacks complete documentation and is currently not meant for use by those who do not have a lot of experience in setting up PHP, TokuDB (a derivative of MongoDB), and Redis. Please feel free to attempt to install zKillboard on your own server, however, we are not responsible for any difficulties you come across during installation and continuing execution.

Contact

Via Twitter at @zkillboard, via the ticket system itself on zkillboard.com (you have to log in), send an email to [email protected], or you can talk to Squizz on TweetFleet.

Minimum requirements

  • To be updated.

Cronjobs

zKillboard comes with a script that automates the cron execution. It keeps track of when each job has been run and how frequently it needs to be executed. Just run it every minute via cron or a similar system:

* * * * * /var/killboard/zkillboard.com/cron/cron.sh

The cron.sh file handles the output as well as rotating of the logfiles in /cron/logs/

Credits

zKillboard is released under the GNU Affero General Public License, version 3. The full license is available in the AGPL.md file. zKillboard also uses data and images from EVE-Online, which is covered by a separate license from CCP. You can see the full license in the CCP.md file. It also uses various 3rd party libraries, which all carry their own licensing. Please refer to them for more info.

License and Copyright

Licensing for all files in this repository can be found in AGPL.md

History and previous versions

zKillboard.com came as the brainchild of Squizz Caphinator who wanted to improve upon Eve-Dev Killboard. Squizz decided to write a new killboard completely from scratch and began the zKillboard project. Karbowiak of eve-kill.net eventually joined into the project, contributed much code, created a repository on Github, and announced zKillboard as the new Beta killboard for eve-kill.net. zKillboard matured and gained a fanbase, and of course, haters. As time went on Squizz and Karbowiak had some differences and Squizz forked his code into this repository and made this new repository the primary code base for zkillboard.com. After about a year Squizz then began dabbling in NoSQL, as it seemed the perfect database for the type of data consumed by zKillboard. Two months of heavy coding and extreme database changes, the repository zKillboard/zKillboard was updated to make the code public to the masses with the various NoSQL changes.

zkillboard's People

Contributors

a-tal avatar andimiller avatar antihax avatar carbonalabel avatar cvweiss avatar ddavaham avatar ddouglas avatar dependabot[bot] avatar dtilchin avatar geranai-yoda avatar honzi avatar jamiew0w avatar joeeigel avatar justtsk avatar lucius-q-user avatar maullerz avatar nathensample avatar nicti avatar northowl avatar robbilie avatar rohimma avatar salartarium avatar seanpianka avatar shegox avatar taur1ne avatar thomassross avatar tktech avatar tmikoss avatar tomrichter avatar xzerod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zkillboard's Issues

API Is Broken

PHP Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in /home/Dramiel/src/plugins/onTick/getKillmails.php on line 144
PHP Warning: simplexml_load_string(): [{"killID":55085113,"solarSystemID":30004628,"killTime":"2016-07-13 15:44:39","m in /home/Dramiel/src/plugins/onTick/getKillmails.php on line 144**

New error as of 2 days ago.

Show insurance estimate in kills

In killmail item list at the bottom where it gives totals, total destroyed, lost, dropped etc, it would be nice to also have a line showing 'estimated insurance' based on platinum level. ingame killmails already do this, zkb should have this functionality also. Don't subtract it from the final total or anything, but just show it there for reference.

Import fit link gone

Since yesterday the import fit link is only displayed when logged out or if the kill-mail has no real fit(e.g mobile depots)

Most themes lack special colour for kills in relateds

There are a number of themes available in the Account settings, many of them subjectively better than the current default (cyborg) theme.

But none of them (except cyborg and spacelab) have a special background colour for killed ships in related kills main table, making it impossible to properly read relateds.

As a small theme-related side note, the KB logo (wreck icon) and KB name in the left upper corner appear on separate lines in every theme except cyborg.

Region names in quicklist

The current quicklist looks like this when typing in "N-H":

N-H32Y system
N-H95C system
N-HK93 system

My suggestion is to make it easier to determinate which system you are looking for if you don't remember the complete name. So this is what I'm proposing:

N-H32Y Pure Blind
N-H95C Malpais
N-HK93 Geminate

Map Broken In Chrome

Error:

THREE.WebGLRenderer 61 three.min.js:421 

Error creating WebGL context.THREE.WebGLRenderer @ three.min.js:421

Uncaught TypeError: Cannot read property 'getExtension' of null three.min.js:421

Chrome Version: Version 51.0.2704.84 (64-bit)

Structures are incorrectly listed as ships in total stats

When viewing someone's profile on ZKB, in the top right is a table showing overall stats - ships, points, isk, lost destroyed, efficiency etc.

However, under the "ships" section also fall structures.

So, if someone kills a mobile depot I anchored, this counts as a ship loss and affects ships efficiency %.
And if I kill a POS with lots of guns I get a lot of kills in the "ships" row which weren't ship kills at all.

Proposal is to split this single "ships" row into two rows: "ships" and "structures" which would both contain their respective kill/lossmail stats.

Alternatively, rename the "ships" row to something like "killmails" or "assets" so that it covers everything with a more accurate name.

403 Forbidden on API request

Have 2 discord bots on the same server, one has no issue doing api calls via simplexml_load_file(

The other gets 403 errors regardless of if I use simplexml_load_file( or curl with a useragent

Incomplete killmail from API

Hi,

i just stumbled upon a killmail from the API where a all names were empty, e.g. character name and corporation name. All the IDs were still there though. The corresponding killmail page looks good.
I checked some other recent killmails, but this was the only one I found that was incomplete. Since my apps rely on this information, I would very much appreciate if you could investigate this issue.

Here is a screenshot of the JSON output from my browser showing the missing data:
http://i.imgur.com/6IgqUHd.png

This is the incomplete killmail from the API:
https://zkillboard.com/api//killID/54366725/

Here is the corresponding kill mail webpage:
https://zkillboard.com/kill/54267173/

Cheers,
Erik

Advanced Search Capabilities

I'd like some kind of modern search interface, based on mongo or elasticsearch so I can run queries like:

  • involved: ["character one", "character two"] && shiptype: "golem" && region: "fountain"
  • region: "fountain" && group: "supercarriers" && date: {"before":1434380239, "after": 1414380239}

Either with some kind of query builder, or google-style syntax with "thing:value"

[Enhancement] Improve top ten lists

The method for calculating the top ten lists on the front page has been changed a while back. Instead of counting just kills it now takes into account additional factors which makes it harder for players to get on to the top ten lists by cheating (e.g. by killing lots of cheap shuttles). I welcome the new method and I want to suggest some small improvements that would make the top ten rankings even more meaningful and valuable for players.

The main issue is a lack of transparency for how the top ten ranks are calculated. Yes, the link to the calculation formula is provided, but I doubt many people will take the time to read and understand it. I therfore think its important to also show the actual score that determines the rank.

Currently its a bit like conducting a decathlon competition without showing the score of each contestant. If you can not see the actual score that determines the winner it becomes less interesting to watch for spectators (and frustrating for contestants).

I would therefore like to suggest three changes:

  1. Display the score that determines the ranking in the top ten list. Currently you show the number of kills, which is confusing, since they the ranking is not determined by kills alone. Showing the actual score instead would solve that.
  2. Show this score for every entity (e.g. players, corporations) as additional item under "Active PVP". Then people would have a way to compare their own PVP performance with the top ranking entities.
  3. Use the score ranking for all top ten lists. Currently only some top ten lists are ranked based on your score and some still use the old ranking by number of kills (e.g. on corporation and alliance page). To underline that the score is a better measure for PVP performance and to be consistent it would be best to use it for all rankings.

A sample config.php?

Howdy. I'm in the process of setting up the project locally to make a few minor HTML/CSS tweaks.

I noticed that the repo is missing a sample/default config.php that are supposed to set required variables.

  • $debug
  • $redisServer
  • $redisPort

Are the 3 I've run into. Are there any other that should be set? Could we commit a clean/safe/default config.php.default to the repo so people know what needs to be set to get running?

Thanks!

[Feature] Add a "limit" parameter to the auto-complete endpoint.

As a mobile client with constrained resources, I would like to be able to reduce the number of entries I receive from the /autocomplete endpoint by providing a "limit"

Currently, I do this filtering client-side and in the mobile world, that is quite a bit to process so I am forced to trigger a search after 5 characters entered or more, and filter afterward. I would like to be able to reduce this number to 4, maybe 3.

limit parameter
The endpoint should provide at most the number of records specified by the "limit" parameter. The default without the parameter is as current and shows all results.

Many thanks for your work.

Evanova

API for additional info

It's possible to make api for fetch additional information? For example ships, locations, etc.

/api/history and /api/killID endpoints returning kill hash that's not consistent with the "CREST Verified" link on the human-readable page

When pulling data from CREST based on kills retrieved from the /api/history/${DATE} endpoint, I got some 403s back from CREST that highlighted an inconsistency. For a small number of kills, what's returned from the zk API is different than the "CREST Verified" link in the kill detail page. The API seems to be returning an incorrect hash in both cases, but the CREST Verified link seems to be correct.

https://zkillboard.com/kill/49029413/ - CREST Verfied link hash starts with 99
https://zkillboard.com/api/history/20150913/ - hash starts with 24
https://zkillboard.com/api/killID/49029413/ - hash starts with 24

Other kills showing this behavior:
18208678
18208454
18207520

There are more, but hopefully that's enough to find a pattern.

Cloudflare Caching with Session Cookies

Cloudflare will only cache pages with the same url and the same (session) cookies (as they use nginx with mostly default settings), so currently it's nearly useless for the /api/, /autocomplete/, /css/ and /img/ route because they deliver a different session cookie with every request for every user.

These routes will have the same result regardless of the current session cookie. If these routes will not contain a (session) cookie cloudflare can cache them much more efficient and it will reduce the load on your server greatly.

Additional it would be great when the page will not set a session cookie until you log in. (I think a large amount of users will not login, so these pages could be cached effective too.)

Edit: After thinking some moments more about it. You disabled the login in the Reinforced Mode. But have you disabled the session cookies? If not, the reinforced mode could not help cloudflare... (I did not checked that, it's just a thought that came to my mind.)

Sun icon for on system page incorrect

I noticed that the image shown on the solar system page is not correct. It seams to always show the same sunTypeID (3802) for every system. e.g. Iralaja has sunTypeID = 8, but the page shows the sunTypeID = 3802. Same for every system I checked today.

ZKB Iralaja

Its not a big thing, but it would be nice if the sun images would be correct, since they are shown on many places. Its should also be a pretty easy thing to fix, since the sunTypeID is just another attribute of a solar system in mapSolarSystems from the SDE,

PHP7.0 support

Is there any chache for PHP7.0 support?

My OS: Ubuntu 16.04 LTS with PHP7.0 (PHP5 is not supported).

query with multiple ids always returns error

from wiky examples:
https://zkillboard.com/api/kills/characterID/268946627,1633218082/ or
https://zkillboard.com/api/kills/characterID/1633218082,268946627/ returns
{"error":"multiple IDs must be in sequential order (sorry, but some people were abusing the ordering to avoid the cache)"}

in file zKillboard/classes/Util.php
from 173 - 178

                    if (sizeof($ints) > 1) {
                        asort($ints);
                        if (implode(",", $ints) . " " . $value) {
                            throw new Exception("multiple IDs must be in sequential order (sorry, but some people were abusing the ordering to avoid the cache)");
                        }
                    }

the second if it seems pointless

[Feature] Related/Battle Reports APIs

Howdy,

I wouldn't mind seeing related kills and battle reports exposed via the normal JSON API for use in things like slackbots (shameless plug for mine) and intel tools.

These endpoints could be exposed (for example) by api/br/list, /api/related/list and attached to individual kills pulled from zKillboard/RedisQ in the zkb object as URIs.

At this time of writing, calling the list route on any of these just returns a bunch of kills, without any Battle Report/Related structuring. (I'm not sure if this is by design, WIP, or unintentional that the endpoints even function).

Calling api/br/81466/ or api/related/30000868/201608202100/ also returns a simple list of kills. I have not verified if they are actually related.

At the end of the day, I'd like to see maybe 2 top level objects in what is returned by calling an exact BR/Related endpoint: a teamA object and teamB object, each containing

  • List of pilots/ships involved
  • Losses/killmails in the form of URI's pointing to the actual killmail (but not the entire killmail itself)
  • ISK Lost/Efficiency data
    And so on.

It would be nice for the related URI to exist in all kills' zkb object, just so that a program could "check back later" since kills aren't posted live or in order. If there ends up being no related activity, long term or short term, the endpoint could simply return null or just that one kill.

If this does not sound feasable, no worries. I just figured I'd put my idea out there. I understand it may be resource intensive, given the loading times on the normal web page some times.

Cheers!

RedisCache class conflict

Hi there,

I'm setting up the codebase, and I noticed a weird error:

Non-static method RedisCache::get() should not be called statically

Coming from classes/Stats.php:15.

It was confusing because RedisCache defines the functions statically.

Turns out the problem is that's not using that class at all. It's using the RedisCache from zcache which is not static.

I was able to confirm this by printing out the source of the class via reflection:

// in Stats.php
$reflector = new ReflectionClass('RedisCache');
error_log($reflector->getFileName());

// prints out the path to `vendor/cvweiss/zcache/src/RedisCache.php`

I'm able to get around it for now by commenting out the RedisCache.php class inside vendor, but that feels wrong since that is maintained by composer. So I'm spinning up this issue in case I'm missing something obvious.

Autocomplete API does not work

Looks like requests to the Autocomplete API like this does not work currently (HTTP Response 400). I recognized that some days ago but thought its just a server downtime or something like that.

There is no wiki entry for that API but there is no commit that would indicate a discontinue of the API too, so I think that's a bug?

If I read the HTTP Code 400: "A 400 means that the request was malformed. In other words, the data stream sent by the client to the server didn't follow the rules." I did the exact same request before and it worked, so i think the 400 is wrong here too?

Add option for delayed posting.

I'd love to have my kill automatically posted. However, that's not an option for me right now, because doing so would give people a source of near-realtime intel about who, where, and what I'm killing.

I want automatic posting, but need at least a few hours delay. Right now I have to post them manually, and that's a pain.

Alliances added to tracker don't show up on dropdown

You can add alliances to the tracker but they don't show up in the tracker dropdown tab. I can see pilots, corporations, systems and regions but alliances do not display.

Another minor issue, if you click the auto-complete when adding a tracked item it takes you to that entities killboard page rather than adding it to the tracker. To add to the tracker you need to manually enter the name completely and hit enter.

Styling Issue

I found the tiniest bug ever on an individual's zkill page.

If you click the "Ranks" tab, no tabs are highlighted, if you click "Stats", both stats and ranks are highlighted.

[API Question] Multiple Corporations in Conjunction With afterKillID

Sorry in advance if you'd like questions posted elsewhere. I've written a quick script that pulls killmails / losses from a single corporation and posts it to a Slack channel. I run this for a couple corporations, but I feel like we can handle this a little better to reduce API calls to Zkillboard.

Basically how it works now is for each corp I pull all the new killmails based on the last stored afterKillID, post the kills / losses to Slack, then store the most recent killID for running the next time. Every five minutes the scrip re-runs.

I should be able to query these corporations using something similar:

GET: https://zkillboard.com/api/corporationID/,,/afterKillID/

As long as I store the highest kill ID, I should be receiving a full list of kills, right? I know that this works with a single corporation right now, but I wasn't sure how the afterKillID filter worked when combining corps.

[Feature] Add "ship group used" to statistics

I like to suggest a new feature that I believe is both very useful and could be added with relatively small effort.

On the statistics page we currently have kills and losses per ship group. I would like to suggest to add "used" to each group as third value representing the count of kills the current entity (character, corporation, etc.) used a ship of that particular ship group in kills.

This info would give a new insight on what ships a character or corporation is mostly flying which I think would be very interesting, e.g. in recruiting.

It would be great to have this new stat added both to the statistics page and the API.

Summary API

I would like an api endpoint for character/ corp/ alliance like the summary in the upper right corner.

Looks like Summary.php could do the job already internal?

Would be nice to grab your summary directly instead of generate some own stats from the current "every kill api"

Login failing

When trying to log into zkillboard only public access is requested:

https://login.eveonline.com/oauth/authorize/?response_type=code&redirect_uri=https://zkillboard.com/ccpcallback/&client_id=---&scope=publicData&state=---

It doesn't matter if the fitting options are enabled or not.
After authorizing, the return page just states

Something odd happened with the callback from CCP's SSO!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.