[EDK4] Combined Fleet Battles Mod (Updated 2017/06/05)

Discuss/Upload mods to the EVE-Dev Killboard.
Post Reply
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

[EDK4] Combined Fleet Battles Mod (Updated 2017/06/05)

Post by Salvoxia »

\o

i've been running a modified version of battles_mod (better related kills page) on my alliance's killboard for quite some time now. This mod originally was made by Quebnaric Deile. He als wrote the fleet_battles mod (original thread: http://eve-id.net/forum/viewtopic.php?f=505&t=13518) that displays an overview of all fleet battles including some very nice stats. As i updated the last one to work with EDK4 and was asked to do the battles_mod too, i thought it was a very good opportunity to combine both mods into one mod. Both use quite a bit of the same code, so it was the next logical step. Here it is now, the initial version of the combined mods for related kills and fleet battles!

Features: Live Demo for illustrating AJAX behavior: Manual side assignment:
This mod enables killboard administrators to manually fix battle reports by assigning the sides they know it's right. The assignments are persistent and will be saved in a separate database table. To restore the original mess the side assignments can easily be deleted again. If battle stats are affected for a cached fleet battle the cache will be updated es well. In rare cases, when the time frames don't match exactly, the fleet battle cache for this battle will be deleted and will be rebuilt with the next execution of the cronjob.
This screenshot shows the new Battle Setup tab, only visible to killboard admins and if the feature is enabled in the settings:
Image

Obviously there's a lot to fix. Involved parties can be moved to the other side by clicking the "switch" link. If a party is on both sides the entries will be merged. Side switching is done via javascript and has been tested with Chrome 18, Firefox 11, Internet Explorer 10 and Opera 11.6.
When done with switching the sides the changes have to be saved by clicking the "save" button. If there are still parties on both sides when the changes are saved, the party will be treated as hostile party. The next screenshot shows the same battle report as before, now fixed:
Image

The "fixed" notification will be displayed for any battle, that has been fixed, so people know. To get back the original assignments the "clear" button in setup tab can be used.

When fixing a fresh battle where killmails are still trickling in it might be necessary haat the report has to be fixed again when all mails are posted.

Side assignments will be respected when the fleet battle cache gets updated.

Important: This feature does NOT alter/delete any of the original killmail data! You can simply deactivate it or clear the side assignments table in the mod settings if you run into serious problems!

Upcoming Features:
Although the two old mods are combined in this one, it can also be used to enhance your related kills page only. You don't have to use the Fleet Battles overview, it will not slow down your Killboard!

Installation:
  • download the zip file
  • place the content in your killboard's main directory (NOT the mods directory!)
  • check if you're running the edk4 version of fleet_battles; if you do, disable it!
  • activate the mod in the module management page in the killboard's admin menu
  • if you don't want to use the fleet_battles functionality, you're done.
  • if you want to use the fleet_battles functionality: change the settings at will
  • to create a link to the fleet battles overview page:
    • switch to "Top Navigation" in the admin menu
    • add a new link in the "navigation for external pages" section and point it to ?a=battles
    • It's highly recommended to enable caching! (creating the cache or viewing the fleet battles w/o cache can take VERY long!)

Update Instructions from v0.2.1:
  • Pre-Upgrade: Backup your database!
  • Upgrade option 1: Delete and re-add your cache table (and then re-build your cache, which might take VERY long)
  • Upgrade option 2: Execute the following SQL script on your killboard's database:

    Code: Select all

    CREATE TABLE `kb3_battles_owner_pilots` (
        `battle_id` int unsigned NOT NULL,
        `plt_id` int unsigned NOT NULL,
        PRIMARY KEY (`battle_id`, `plt_id`)
    );

Just like every piece of software this mod will have bugs and errors. If you find any, please post them here in the usual way, i will try to help and fix the problems. Updated versions will be attached to the opener post.

I will keep developing when i have the time, there still are things to improve. If you have a feature request, post here. Donations appreciated ;)

Tested with a clean EDK4 installation and PHP5/7.

Disclaimer:
I will not be held responsible for any damage the use of this mod might cause to your killboard. But i will try to help and fix the cause of the problems ;)



Download: https://github.com/Salvoxia/fleet_battles_mod/releases

History:

Code: Select all

2017/06/05
*release of version 0.2.3
* Fix: Kill Lists show kill system security status in the proper color
* Fixed a problem with setting side assignments for cached battles (#1)

2016/02/09
* release of version 0.2.2
* fixes for compatibility with PHP 7
* added a top list showing the killboard owner's top fleet battle attendees to the Fleet Battles Overview page
* added option to manually set start- and end-time when showing related kills (no GUI support yet):
	- add GET argument starttime to specify the start time, e.g. &starttime=2016-01-01 00:05:00
	- add GET argument endtime to specify the end time, eg &endtime=2016-01-01 00:10:00

* Seconds portion of kill timestamps is now handled correctly, making the timeline view more informative
* made the Pod image for kills with related pod kills clickable on the Battle Overview page
* added Meta Tags providing metadata about a kill report


2012/09/15
* release of version 0.2.1
* improved compatibility to various javascript libraries/frameworks
* ship class listing in balance of power can now be customized per ship class via css-classes (see css/style.css)
* improved performance
* added number of involved killboard owners to battle list overview (recreation of the kb3_battles_cache table is necessary!)
* added filtering options for fleet battle overview page
* fixed loot overview (count, prices)
* fixed an error where multiple engagements at the same time in different systems might interefere with side assignment and result in an empty battle report

* files affected : css\style.css; include\class.battles.php; include\class.helpers.php; js\fleetBattles.js; template\battle_balance.tpl; template\battle_setup.tpl; 
template\battlelisttable.tpl; battles.php; init.php; kb3_battles_cache.sql.txt; kill_related.php
* files added: js\toggleFilter.js; template\battlelisttable_filter.tpl; template\battlelisttable_stats.tpl
* files removed: js\fleetBattles.js.js; .htaccess




2012/04/01
* release of version 0.2
* added possibility for admins to manually assigne sides for involved parties of a battle
* style-upgrade for Balance Of Power table
* added Damage Overview tab (credits to protoburger, thx!)
* fixed several minor bugs
* changed default sliding time from 12h to 4h
* fixed a bug in the way fleet battles are determined, please rebuild your fleet battle cache

2012/03/23
* release of version 0.1.3
* complete code refactoring on the base of kill_related.php in EDK 4.0.4
* added kill lists tab
* added enabling/disabling of timeline, loss value lists, kill lists and loot overview to the settings
* some layout optimizations
* performance optimizations
* ship filters now apply correctly
* tabs now initialize immediately instead of waiting for images to load
* changed time line algorithm so that pod kills will always appear after the ship kill in the timeline
* AJAX-driven tab loading

Removed File: js/toggle.js

2012/03/13
* release of version 0.1.2
* includes now a cronjob for automatic updating the fleet battles cache
* fixed minor bugs

2012/03/11
* release of version 0.1.1
* destroyed indicator (red background) is now defined by the class .br-destroyed (defined in css/style.css)
* added "include adjacent" functionality (not (yet) available for fleet battle displaying, only for related kills atm)
* fixed displaying of pod images in battle overview

2012/03/11
* added support for simple urls
* fixed a wrong linkage in Battle Overview

2012/03/10
* fixed bug preventing map images in battle overview from displaying

2012/03/10
* initial version
Last edited by Salvoxia on Sat Sep 15, 2012 12:20, edited 16 times in total.
Blake
Someday Author
Posts: 88
Joined: Sat Jan 24, 2009 20:53

Re: [EDK4] Combined Fleet Battles Mod

Post by Blake »

Found 2 small bugs the map images aren't showing http://www.upay-corp.co.uk/kb/?a=kill_r ... l_id=18353 and it doesn't work with simple urls
Image
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

Re: [EDK4] Combined Fleet Battles Mod

Post by Salvoxia »

thanks, i fixed it, attachment in opener is updated.
Blake
Someday Author
Posts: 88
Joined: Sat Jan 24, 2009 20:53

Re: [EDK4] Combined Fleet Battles Mod

Post by Blake »

still not working with simple urls thou :(
Image
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

Re: [EDK4] Combined Fleet Battles Mod

Post by Salvoxia »

there you got me, hadn't thought of that. Making it WORK with simple urls is easy, but changing it so it uses simple urls itself will take a bit longer, sorry for that :/
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

Re: [EDK4] Combined Fleet Battles Mod

Post by Salvoxia »

added support for simple urls, attachment in OP updated
you might have to clear your template cache to let the changes take effect
Zagdul
Greenhorn
Posts: 37
Joined: Mon Jul 12, 2010 02:55

Re: [EDK4] Combined Fleet Battles Mod

Post by Zagdul »

As soon as I log in I'll be sending you more.

Thank you my german foe :)


hey, would you mind changing the table in-line styles into classes or id's when you have time? This would make updating your changes/updates much easier. I'm currently using:

#br-destroyed (for the red background)
Zagdul
Greenhorn
Posts: 37
Joined: Mon Jul 12, 2010 02:55

Re: [EDK4] Combined Fleet Battles Mod

Post by Zagdul »

Do you think you can work in "Include Adjacent"?
User avatar
Salvoxia
Developer
Posts: 1598
Joined: Wed Feb 22, 2012 12:11

Re: [EDK4] Combined Fleet Battles Mod

Post by Salvoxia »

Zagdul wrote: hey, would you mind changing the table in-line styles into classes or id's when you have time? This would make updating your changes/updates much easier. I'm currently using:

#br-destroyed (for the red background)
red background is now defined by the class .br-destroyed (change in css/style.css)
Zagdul wrote:Do you think you can work in "Include Adjacent"?
well, there i really get to feel the old code. Perhaps i should have refactored it completely on the base of the current kill_related in edk4. Perhaps i will.
Adjacent functionality added, hf ;)

and thank you for the donation, much appreciated

attachment in opener updated
bok
Noob
Posts: 1
Joined: Mon Mar 12, 2012 11:07

Re: [EDK4] Combined Fleet Battles Mod

Post by bok »

Nice, and thanks for your time and effort.

Is there possible to move pilots/corps/aliances from friendly to hostille gang or back? When we fighting with RR, SB, capitals gang many times ballance of power shows hostiles as friendlis, and its destroy batlle look?
Post Reply