Skip to content
grangeway edited this page Jan 25, 2014 · 1 revision

Introduction EDK 2.1 has many changes from 2.0. The most significant of these are:

/themes - styles and templates are now in /themes there is an ongoing effort to move all layout into templates. events - hooks are being added to allow a mod to insert/replace content db changes - denormalising with timestamps for involved parties Details Themes There is now a subfolder of the root directory called /themes. This contains folders of themename containing a template folder, css files, includes and images.

/themes/themename/templates /themes/themename/img /themes/themename/inc /themes/themename/themename.css There may be multiple css files which are selectable in the admin panel. Any template file not included is taken from the default theme. The intent is that the core php files will work with any theme. To enable this layout is being moved from the php files into templates. When complete a new theme can be added to the themes folder and activated on the admin panel with no further work required.

Events Core pages will include hooks that can be used to modify content. The following code illustrates adding a graph after the summary table on the home page.

event::register("home_assembling", "GraphMod::add");

class GraphMod { function add($home) { $home->addBehind("summaryTable", "GraphMod::graph"); }

function graph($home)
{
    if (file_exists("charts/MSColumn3DLineDY.swf"))
    {
        require_once('mods/graph/grafico.inc.php');

        $html = VisualizzaGrafico(GeneraDatiGrafico($home->getWeek(), $home->getYear()));
    }
    return $html;
}

} Database kb3_inv_detail has an added column "ind_timestamp" duplicating the timestamp in kb3_kills kb3_inv_all is defined as ina_kll_id, ina_all_id, ina_timestamp. The kill id and alliance id are unique. The timestamp again duplicates that in kb3_kills. kb3_inv_crp is defined as inc_kll_id, inc_crp_id, inc_timestamp. It is similar to kb3_inv_all but for corps instead of alliances. kb3_inv_details performs a similar function for pilots. kb3_log has an expanded ip_address column for ip address or comments on where the killmail originated. kb3_comments has a new column 'ip' which holds an IP address for the comment poster. The tables for involved parties are indexed by all/crp/pilot then by time. A query can thus fetch the x most recent kills by a party in a single index check.

Clone this wiki locally