Patch for adding "totals" and "number of different items"

Categorizes items in your guildbank(s)

Moderator: Mathos

Patch for adding "totals" and "number of different items"

Postby [PUPPETS]Gonzo » Mon Dec 18, 2006 3:56 am

To add counters of "totals" and "different items" to your cat. guildbank:

in the file gbank.php, just after the line containing
Code: Select all
                // Show the Column Header for this Category 


Add:

Code: Select all
                if (isset($itemsarray[$CategoryID]))
                {
                  
$anzahl 0;
                  foreach(
$itemsarray[$CategoryID] as $myitem)
                  {
//print_r($myitem);
                    
$anzahl+=$myitem['quantity'];
                  }
                  
$num " ($anzahl, ".sizeof($itemsarray[$CategoryID])." verschiedene)";
                }
                 else
                {
                  
$num "";
                } 


and change the next line to
Code: Select all
$content .= "<tr><th colspan='".$row_columns."' class='membersHeader'>".$wordings[$roster_conf['roster_lang']]['bankitem_'.$CategoryID]."$num<
/th></tr>"


(add $num to output)

You could change "verschiedene" to "different" or something similar, regarding to your localization

Example output in my 1.72 beta roster:

http://helden2.deswahnsinns.de/roster/a ... =guildbank

Enjoy
User avatar
[PUPPETS]Gonzo
WR.net Apprentice
WR.net Apprentice
 
Posts: 50
Joined: Tue Aug 22, 2006 12:46 am
Location: Frankfurt, Germany

Return to Categorized Guild Bank

Who is online

Users browsing this forum: No registered users and 0 guests