Adding money to the main Roster Page

Here you can find plenty of help with your general coding needs and projects
If it is about a specific program, use the corresponding forum
DO NOT ask basic questions such as "How do I print a variable", use Google for that

Adding money to the main Roster Page

Postby Stravides » Sun Mar 04, 2007 9:31 pm

Just looking to see if anyone has done this with their rosters, I want to see all the guild members and the money they have on the main roster page.

Please can you assist if you know where I should start
Last edited by Stravides on Sun Mar 04, 2007 9:33 pm, edited 1 time in total.
-----
WIN2K3 | IIS6 | Roster 1.7.3 | MySQL 5.0.21 Community NT | PHP 5.1.4
User avatar
Stravides
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Fri Aug 18, 2006 12:22 am

Re: Adding money to the main Roster Page

Postby Stravides » Wed Mar 07, 2007 9:24 pm

:thumright: ok now that i've discovered indexalt.php i have managed to sort this myself

open index.php and change the following from

Code: Select all
$additional_sql = array(
   '`players`.`hearth`, ',
   "IF( `players`.`hearth` IS NULL OR `players`.`hearth` = '', 1, 0 ) AS 'hisnull', ",
   "`players`.`dateupdatedutc` AS 'last_update', ",
   "IF( `players`.`dateupdatedutc` IS NULL OR `players`.`dateupdatedutc` = '', 1, 0 ) AS 'luisnull' ",
);

to
Code: Select all
$additional_sql = array(
   '`players`.`money_g`, ',
   '`players`.`money_s`, ',
   '`players`.`money_c`, ',
   '`players`.`hearth`, ',
   "IF( `players`.`hearth` IS NULL OR `players`.`hearth` = '', 1, 0 ) AS 'hisnull', ",
   "`players`.`dateupdatedutc` AS 'last_update', ",
   "IF( `players`.`dateupdatedutc` IS NULL OR `players`.`dateupdatedutc` = '', 1, 0 ) AS 'luisnull' ",
);


also add the following column data in the order that you want it to appear

Code: Select all
if( $roster_conf['show_money'] )
{
   $FIELD[] = array (
      'money_g' => array(
         'lang_field' => 'gold',
         'order' => array( '`players`.`money_g` DESC','`players`.`money_s` DESC','`players`.`money_c` DESC' ),
         'order_d' => array( '`players`.`money_g` ASC','`players`.`money_s` ASC','`players`.`money_c` ASC' ),
         'value' => 'money_value',
      ),
   );
}
-----
WIN2K3 | IIS6 | Roster 1.7.3 | MySQL 5.0.21 Community NT | PHP 5.1.4
User avatar
Stravides
WR.net Apprentice
WR.net Apprentice
 
Posts: 4
Joined: Fri Aug 18, 2006 12:22 am


Return to General Code Help

Who is online

Users browsing this forum: No registered users and 1 guest

cron