Show
Ignore:
Timestamp:
11/28/06 22:32:11 (16 years ago)
Author:
knifee
Message:

Changed the class.box.php to use smarty, and changed all pages that use the class to use the options. Menu Boxes can now be created as follows:
$menubox = new box("Menu");
$menubox->setIcon("menu-item.gif"); // only needed if adding a Menu (ie u want the little icon)
$menubox->addOption("caption","View"); // Add a Caption
$menubox->addOption("link","Name","URL"); // Add a Link
$menubox->addOption("points","Points Value"); // Add points to a Points Box
$menubox->addOption("img","/path to img"); // Add an Image

changed the AwardBox? Class to use smarty, that is called in the same way as before so no need to change anything.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/common/corp_detail.php

    r92 r104  
    306306} 
    307307 
    308 $menubox = new MenuBox(); 
    309 $menubox->addCaption("Kills & losses"); 
    310 $menubox->addOption("Recent activity", "?a=corp_detail&crp_id=" . $corp->getID()); 
    311 $menubox->addOption("Kills", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=kills"); 
    312 $menubox->addOption("Losses", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=losses"); 
    313 $menubox->addCaption("Pilot statistics"); 
    314 $menubox->addOption("Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); 
     308$menubox = new box("Menu"); 
     309$menubox->setIcon("menu-item.gif"); 
     310$menubox->addOption("caption","Kills & losses"); 
     311$menubox->addOption("link","Recent activity", "?a=corp_detail&crp_id=" . $corp->getID()); 
     312$menubox->addOption("link","Kills", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=kills"); 
     313$menubox->addOption("link","Losses", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=losses"); 
     314$menubox->addOption("caption","Pilot statistics"); 
     315$menubox->addOption("link","Top killers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_kills"); 
    315316 
    316317$killboard = $page->killboard_; 
    317318$config = $killboard->getConfig(); 
    318319if ($config->getKillPoints()) 
    319     $menubox->addOption("Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
    320 $menubox->addOption("Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); 
    321 $menubox->addOption("Top damagedealers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_damage"); 
    322 $menubox->addOption("Top griefers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_griefer"); 
    323 $menubox->addOption("Top losers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_losses"); 
    324 $menubox->addCaption("Global statistics"); 
    325 $menubox->addOption("Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); 
     320    $menubox->addOption("link","Top scorers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_scores"); 
     321$menubox->addOption("link","Top solokillers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_solo"); 
     322$menubox->addOption("link","Top damagedealers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_damage"); 
     323$menubox->addOption("link","Top griefers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_griefer"); 
     324$menubox->addOption("link","Top losers", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=pilot_losses"); 
     325$menubox->addOption("caption","Global statistics"); 
     326$menubox->addOption("link","Ships & weapons", "?a=corp_detail&crp_id=" . $corp->getID() . "&view=ships_weapons"); 
    326327$page->addContext($menubox->generate()); 
    327328$page->setContent($html);