Changeset 376 for dev/mods

Show
Ignore:
Timestamp:
06/18/09 09:52:00 (11 years ago)
Author:
kovell
Message:

MyISAM can be selected again on install
duplicate item descriptions removed from install
alliance/corp/pilot optional installs now have external id and correct structure
alliance/corp/pilot/kill details can be selected by external id
corp/alliance/kill now have get and set methods for external ids
killlist has method to select only kills with an external id set
monthly views mod now shows clock and combined kills if selected
optimisations and fixes to killlists and toplists

Location:
dev/mods
Files:
1 removed
4 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/api_alliance/alliance_detail.php

    r370 r376  
    88require_once("common/includes/class.eveapi.php"); 
    99 
    10 if (!$all_id = intval($_GET['all_id'])) 
     10$all_id = intval($_GET['all_id']); 
     11$all_external_id = intval($_GET['all_external_id']); 
     12if (!$all_id && !$all_external_id) 
    1113{ 
    1214    if (ALLIANCE_ID) 
     
    1921        return; 
    2022    } 
     23} 
     24 
     25if(!$all_id && $all_external_id) 
     26{ 
     27        $qry = new DBQuery(); 
     28        $qry->execute("SELECT all_id FROM kb3_alliances WHERE all_external_id = ".$all_external_id); 
     29        if($qry->recordCount()) 
     30        { 
     31                $row = $qry->getRow(); 
     32                $all_id = $row['all_id']; 
     33        } 
    2134} 
    2235 
  • dev/mods/apoc_fitting/kill_detail.php

    r375 r376  
    6868    } 
    6969 
    70 if (!$kll_id=intval($_GET['kll_id'])) 
    71     { 
    72     $html="No kill id specified."; 
     70$kll_id = intval($_GET['kll_id']); 
     71$kll_external_id = intval($_GET['kll_external_id']); 
     72if (!$kll_id && !$kll_external_id) 
     73{ 
     74    $html = "No kill id specified."; 
    7375    $page->setContent($html); 
    7476    $page->generate($html); 
    7577    exit; 
    76     } 
    77  
    78 $kill=new Kill($kll_id); 
     78} 
     79 
     80if($kll_id) $kill = new Kill($kll_id); 
     81else 
     82{ 
     83        $kill = new Kill($kll_external_id, true); 
     84        $kll_id = $kill->getID(); 
     85} 
    7986 
    8087if (!$kill->exists()) 
     
    825832} 
    826833 
    827 if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1) 
    828     { 
    829     $menubox->addOption("link", "Related kills (" . $kill->relatedKillCount() . "/" . $kill->relatedLossCount() . ")", 
    830                         "?a=kill_related&kll_id=" . $kill->getID()); 
    831     } 
     834if ($kill->relatedKillCount() > 1 || $kill->relatedLossCount() > 1 || 
     835        ((ALLIANCE_ID || CORP_ID || PILOT_ID) && $kill->relatedKillCount() + $kill->relatedLossCount() > 1)) 
     836{ 
     837        $menubox->addOption("link", "Related kills (" . $kill->relatedKillCount() . "/" . $kill->relatedLossCount() . ")", 
     838                                        "?a=kill_related&kll_id=" . $kill->getID()); 
     839} 
    832840 
    833841if ($page->isAdmin()) 
  • dev/mods/apoc_fitting/settings.php

    r370 r376  
    7979 
    8080// Apoc Fitting Options 
     81/* 
    8182if (!$apocfitting_db) { 
    8283    include_once './mods/apoc_fitting/sql.php'; 
     
    9798    config::set('apocfitting_db', '1'); 
    9899} 
    99  
     100*/ 
    100101$html .= "<div>For further display options, configure the <a href='./?a=admin&amp;field=Appearance&amp;sub=Kill Details'>Kill Details</a> page.</div>"; 
    101102$html .= "<div class=block-header2>Apoc Fitting Options</div>"; 
  • dev/mods/monthly_views/home.php

    r343 r376  
    77require_once('common/includes/class.contract.php'); 
    88require_once('common/includes/class.toplist.php'); 
     9if(config::get('show_clock')) require_once('common/includes/class.clock.php'); 
    910 
    1011$week = kbdate('W'); 
     
    3738{ 
    3839    $pyear = kbdate("Y") - 1; 
    39     $pweek = 52; 
     40    $pweek = 53; 
    4041} 
    4142else 
     
    6869if (strpos(config::get('mods_active'), 'rss_feed') !== false) 
    6970{ 
    70     $html .= "<div class=kb-kills-header style=\"margin-top: 30px\"><a href=\"?a=rss\"><img src=\"mods/rss_feed/rss_icon.png\" alt=\"RSS-Feed\" border=\"0\"></a>&nbsp;20 most recent kills</div>"; 
     71    $html .= "<div class=kb-kills-header style=\"margin-top: 30px\"><a href=\"?a=rss\"><img src=\"mods/rss_feed/rss_icon.png\" alt=\"RSS-Feed\" border=\"0\"></a>&nbsp;".config::get('killcount')." most recent kills</div>"; 
    7172} 
    7273else 
     
    7879$klist = new KillList(); 
    7980$klist->setOrdered(true); 
    80 involved::load($klist,'kill'); 
     81    if(config::get('show_comb_home')) 
     82    { 
     83        if(ALLIANCE_ID >0) $klist->addCombinedAlliance(ALLIANCE_ID); 
     84        if(CORP_ID >0) $klist->addCombinedCorp(CORP_ID); 
     85        if(PILOT_ID>0) $klist->addCombinedPilot(PILOT_ID); 
     86    } 
     87    else involved::load($klist,'kill'); 
    8188 
    82 // boards with low killcount could not display 20 kills with those limits 
    8389$klist->setLimit(config::get('killcount')); 
    8490 
     
    8995 
    9096$table = new KillListTable($klist); 
     97if(config::get('show_comb_home')) $table->setCombined(true); 
    9198$table->setLimit(config::get('killcount')); 
    9299$html .= $table->generate(); 
     
    96103$menubox->setIcon("menu-item.gif"); 
    97104$menubox->addOption("caption","Navigation"); 
    98 $menubox->addOption("link","Kills ". date('F'), "?a=killsmonthly&m=" . $month . "&y=" . $year); 
    99 $menubox->addOption("link","Losses ". date('F'), "?a=lossesmonthly&m=" . $month . "&y=" . $year); 
     105$menubox->addOption("link","Kills ". date('F'), "?a=killsmonthly&amp;m=" . $month . "&amp;y=" . $year); 
     106$menubox->addOption("link","Losses ". date('F'), "?a=lossesmonthly&amp;m=" . $month . "&amp;y=" . $year); 
    100107$page->addContext($menubox->generate()); 
    101108 
     109// Show the Eve time. 
     110if(config::get('show_clock')) 
     111{ 
     112        $clock = new Clock(); 
     113        $page->addContext($clock->generate()); 
     114} 
    102115$tklist = new TopKillsList(); 
    103116$tklist->setStartDate(date('Y-m').'-1 00:00:00');