Giter Site home page Giter Site logo

zkillboard's Introduction

Scrutinizer Quality Score

zKillboard

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

WARNING

This is BETA, which means it is a work in progress. It lacks documentation and is currently not meant for use in production.

Since zKillboard is a beta product, it has a code base that is far from complete and enjoys numerous updates, deletions, and modifications to the code and accompanying tables. 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 of the product.

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 seperate 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.

Contact

#esc on irc.coldfront.net Mibbit link incase you're lazy: http://chat.mibbit.com/?channel=%23esc&server=irc.coldfront.net

LICENSE

see LICENSE.md file

Minimum requirements

  • PHP 5.4+ / HHVM 3.0+
  • Apache + mod_rewrite, Nginx or any other httpd you prefer that supports php via mod_php or fastcgi.
  • Linux, Mac OS X or Windows
  • MariaDB 5.5+
  • Composer
  • cURL and php5-curl

Recommended requirements

  • PHP 5.5+ / HHVM 3.0+
  • Linux
  • MariaDB 5.5+
  • Composer
  • APC / Redis / Memcached (Doesn't matter which one)
  • cURL and php5-curl

Nginx Config

upstream php-upstream {
  server unix:/tmp/php-fpm.sock;
  server 127.0.0.1:9000;
}

server {
  server_name example.com www.example.com;
  listen      80;
  root        /path/to/zkb_install;

  location    / {
    try_files $uri $uri/ /index.php$is_args$args;
  }

  location    ~ \.php$ {
    try_files $uri = 404;
    include   fastcgi_params;
    fastcgi_index index.php;
    fastcgi_pass php-upstream;
  }
}

Apache rewrite

Apache rewrite is handled by the .htaccess.

Apache Config

<VirtualHost *:80>
        ServerAlias yourdomain.tld

        DocumentRoot /path/to/zkb_install/
        <Directory /path/to/zkb_install/>
          Require all granted
          Options FollowSymLinks MultiViews
          AllowOverride All
          Order allow,deny
          Allow from all
        </Directory>
</VirtualHost>

Other webservers

Other webservers are supported, aslong as they can run PHP, they should work. But other webservers have other ways to write rewrites, so from our side of things, they are unsupported. Feel free to issue pull requests to amend this.

Cache

zKillboard has a cache system that utilizes the first available cache, in the following order: Memcached -> Memcache -> Redis -> APC -> FileCache. If none of the first 4 are available, it will fallback to fileCache, which on a slow system, could overwhelm the harddrive.

Installation

Installation is handled via command line. Other methods are currently not supported.

  1. cd to a dir where you want zKillboard to reside.
  2. Do git clone [email protected]:EVE-KILL/zKillboard.git.
  3. cd into zKillboard dir.
  4. Get composer. curl -s https://getcomposer.org/installer | php
  5. Install vendor files with composer. php composer.phar install
  6. cd into install dir.
  7. Execute the installation script. php5 install.php
  8. Follow the instructions and fill in the prompts
  9. Setup stomp (Follow guide further down)
  10. Setup the CLI system.
  11. Setup cronjobs

CLI System

  1. Symlink cli.php to /usr/bin/zkillboard ln -s /path/to/zkb/cli.php /usr/bin/zkillboard
  2. Install bash-completion. Under Debian this can be done like so apt-get install bash-completion
  3. Move bash_complete_zkillboard to /etc/bash_completion.d/zkillboard
  4. Restart your shell session
  5. Issue zkillboard list and enjoy the zkillboard cli interface, with full tab completion

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.php >/whatever/log/you/like.txt 2>&1

If you're not happy with the default timeouts, or want to disable/enable some jobs entirely, you can use the cron.overrides file. The cron.overrides file has to be placed into the zKB root dir, next to the cron.php script. It's a simple json file, with the following format:

{
    "commandName":{
        "timeoutInSeconds":"arguments"
    }
}

For example the following would disable stompReceive entirely, and increase the timeout for apiFetch and parseKills to 5 minutes:

{
    "stompReceive":{},
    "apiFetch":{
        "300":""
    },
    "parseKills":{
        "300":""
    }
}

All cronjobs can be launched manually with the cli interface.

You can also define the executable to use, be it php, hhvm or something third.

{
    "stompReceive":{},
    "apiFetch":{
        "300":"",
        "executable":"hhvm"
    },
    "parseKills":{
        "300":""
    }
}

Websocket

Websocket is used to stream kills from zKillboard.com and EVE-KILL.net to your killboard. Currently it streams all kills, without any limit.

Websocket server: ws://ws.eve-kill.net/kills/ and wss://ws.eve-kill.net/kills/

HHVM

zKillboard runs perfectly under HHVM (HipHop Virtual Machine).
To get HHVM look at https://github.com/facebook/hhvm/wiki/Prebuilt-Packages-for-HHVM

HHVM Config

hhvm.server.type = fastcgi
hhvm.server.file_socket = /run/shm/hhvm.sock

hhvm.server.apc.enable_apc = true
hhvm.server.apc.table_type = concurrent
hhvm.server.apc.expire_on_sets = true
hhvm.server.apc.purge_frequency = 4096

hhvm.eval.jit = true
hhvm.eval.jit_warmup_requests = 50

hhvm.repo.central.path = /var/log/hhvm/.hhvm.hhbc

hhvm.mysql.readOnly = false
hhvm.mysql.connect_timeout = 1000
hhvm.mysql.read_timeout = 2000
hhvm.mysql.slow_query_threshold = 4000
hhvm.mysql.kill_on_timeout = true
hhvm.mysql.wait_timeout = -1
hhvm.mysql.typed_results = true

CREST SSO

zKillboard has support for logging in with CREST.

To get it setup, you must first get a CREST clientID/Secret from CCP. Currently only sisi login is available. You can get it from https://developers.testeveonline.com/applications

The rest is self explanitory

Updating CCP tables

To update the CCP tables, run the cli script called updateCCPData like so (assuming you symlinked cli.php) zkillboard updateCCPData It will then automatically download the latest tables from Fuzzysteve, and import them.

Admin account

Every clean zKillboard installation comes with an admin account, default username and password is admin, it is highly recommended that you immediately change this password after you finish your installation.

Current special features to the admin account:

  1. Any entities (pilots, corporations, etc.) added to the Admin's tracker will automatically be fetched from https://zkillboard.com up to and including a full fetch of all kills, and maintaining a fetch of said kills on an hourly basis. This of course depends on the cronjob being setup.

zkillboard's People

Contributors

a-tal avatar beansman avatar btbn avatar cvweiss avatar dhoffend avatar eldarni avatar karbowiak avatar kubiq avatar michaelermer avatar ppetermann avatar scrutinizer-auto-fixer avatar sn0opy avatar tincer avatar xeropresence 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

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

zkillboard's Issues

Replace charts with flot

The current charts require server side generation, which is silly, just use flot.

Once we get accustomed to it, we can also to live updating crap :)

Minor work on the ticket system

  • Invert the title, so it's not big small big small, but instead small big small big
  • Include the reply in the email from the moderator who responded
  • Reevaluate if tags should be there (Or if it should be a dropdown or whatever)
  • If tags stays, implement search stuff for the ticket page.
  • Do the query properly so it can sort by open/closed but also by when it there last was a reply (Latest reply goes to the top of the list with "New reply" added)
  • Send an email to the user once a ticket is closed

Reverting the cookie subdomain fix

Atm every time you've logged in, it forgets it for the main domain, so either a fix for it is in order or the fix is reverted.

Could just set two cookies, one for main and on for subdomains ?

Year / Month navigation

Currently a lot of pages are lacking year / month navigation, which obv. should be there.

bug in zKillboard's search functionality

I think I found a bug in zKillboard's search functionality, who do I talk to?
To reproduce: type the following in the search field: "The Plask"
and click the corporation that shows up (The Plasky's)
It sends you to https://zkillboard.com/undefined/undefined/
I guess it must be the apostrophe
Posted in IRC when every one was asleep
and confirmed by Hellclan|Oraclegol(ME)
Seems to affect all searchs (Corp , Usernames from what i tested)

google analytics's

Probably should remove this before public - or at least create config value to allow users own code.

/favourites/

Make it so people can mark killmails as favourites.

password hashing

Atm the password hashing is hardcoded into the site, thus basically telling everyone how many times we hash the PWs on zkillboard.com

Sooooooo, we have to move that to the config, and alter the hashing times before going online.

Thus forcing everyone to reset their passwords.. whoops..

Autocomplete needs to pass ID for found entities

Entities found via autocomplete currently pass the name found off to a search page, which finds the id.

Autocomplete might aswell get the ID right away, and send the person off to the right page.

Users list in admin panel lags

It seems that the administrator panel loads the entire user list, before then paginating it down, extremely lagging the page as it loads. As the user list grows, this will become an increasingly bigger issue.

EDK style theme

Finish the EDK style theme, and fix a "theme" selector, and a CSS selector. And a CSS editor for the EDK style theme.

Vendor issues

Some scripts are still hardcoded to using paths to the vendor scripts.
Instead they should be made to use the composer way.

Or in general have their paths fixed.

Add more flags to parser

Add the ability for the parser to accept specialized bays, like the PL board spits out.

Isn't hard to do, just effort

Issues with MySQL installation

The following table options are not supported by MySQL 5.5:

 TRANSACTIONAL
 PAGE_CHECKSUM

Tables affected:

ccp_invTypes
ccp_zwormhole_info
zz_api_log
zz_blog
zz_comments
zz_errors

EDK and Bootstrap theme should share 99% of the html files

If possible, make EDK and Bootstrap theme share as many files as possible.

It looks like only base.html needs to be switched out. But not sure. EDK layout IS limited to span10 in width, so might need completely seperate template files.

Stack trace view should be restricted to admin.

I am able to view stack traces for generated error hashes as an unprivileged (or unregistered) user.

I haven't bothered seeing if I can generate stack traces including sensitive information.

Sorry for not submitting a pull request, too lazy to actually set up a server for this, tested as exploitable on zkb live.

MOAR STATS

Hey man,

Thanks for the awesome API, I am going to be putting it to good use. I am wondering if > you can include a few stats in the API, for example the following few would be of
tremendous use for w-space pilots and alliances:

W-Space Kill Count (Regions R01 through R30), W-Space Loss Count
ISK Killed in W-Space, ISK Lost in W-Space

This would allow us to generate monthly stats for the major w-space groups. Thanks brother, appriciate your work on the stats api.

I think more stats/aggregate data - or at least being able to filter the data would be good, as long as we are able the keep the performance impact down.

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.