Changeset 281 for dev/mods/example_mod

Show
Ignore:
Timestamp:
12/11/07 13:45:56 (14 years ago)
Author:
ralle030583
Message:

- redesign of public mode, so only choosen summarytables are changed not all
- rowcount summarytables increased setBreak(5)-> setBreak(6)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/example_mod/home.php

    r240 r281  
    11<?php 
    2 require_once('common/includes/class.killsummarytable.php'); 
     2require_once('common/includes/class.killsummarytable.public.php'); 
    33require_once('common/includes/class.corp.php'); 
    44require_once('common/includes/class.alliance.php'); 
     
    1111$year = kbdate('Y'); 
    1212 
    13 $page = new Page("omgwtfpwnd!!!1"); 
     13$page = new Page('THIS PAGE IS REPLACED BY THE ONE FROM EXAMPLE MOD!'); 
    1414 
    1515$kslist = new KillList(); 
     
    1818$kslist->setYear($year); 
    1919 
    20 $llist = new KillList(); 
    21 involved::load($llist,'loss'); 
    22 $llist->setWeek($week); 
    23 $llist->setYear($year); 
    24  
    25 $summarytable = new KillSummaryTable($kslist, $llist); 
    26 $summarytable->setBreak(5); 
     20if (config::get('public_summarytable')){ 
     21        $summarytable = new KillSummaryTablePublic($kslist); 
     22} 
     23else 
     24{ 
     25        $llist = new KillList(); 
     26        involved::load($llist,'loss'); 
     27        $llist->setWeek($week); 
     28        $llist->setYear($year); 
     29        $summarytable = new KillSummaryTable($kslist, $llist); 
     30} 
     31$summarytable->setBreak(6); 
    2732$html .= $summarytable->generate(); 
    2833