Help please - Hide money per character on Alternate 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

Help please - Hide money per character on Alternate page

Postby Speedtorch » Sat Sep 02, 2006 4:30 am

Can anyone assist me with hiding gold on the Alternate page. I would like to do this per character, not just a global off...
Speedtorch
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jul 12, 2006 3:08 am

Help please - Hide money per character on Alternate page

Postby zanix » Sat Sep 02, 2006 9:51 am

Open indexalt.php in a text editor

Look for and delete
Code: Select all
    '`players`.`money_g`, ',
    
'`players`.`money_s`, ',
    
'`players`.`money_c`, '

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',
        ),
    );
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Help please - Hide money per character on Alternate page

Postby Speedtorch » Sat Sep 02, 2006 10:05 am

That will delete the gold listing from everyone, won't it? I would like to add in the ability to hide those that have it disabled but show those that want it enabled. I was thinking of using some crazy IF statement, but was wondering if there was a better way.
Speedtorch
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jul 12, 2006 3:08 am

Help please - Hide money per character on Alternate page

Postby zanix » Sat Sep 02, 2006 10:11 am

There is no way to do what you ask without heavy modification

You would need to pull the setting for money display for that character and have that row honor that value
Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
zanix
Admin
Admin
WoWRoster.net Dev Team
WoWRoster.net Dev Team
UA/UU Developer
UA/UU Developer
 
Posts: 5546
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Help please - Hide money per character on Alternate page

Postby DreadPickle » Tue Sep 05, 2006 6:52 am

Actually, I did it by adding an IF statement right around the money display.

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',
        ),
    );


This does it for the guild as a whole and ignores the user setting in the roster config. Doing it on an individual basis would mean ripping into that array and I'm not that good at php yet. :/
Image
User avatar
DreadPickle
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 33
Joined: Sat Jul 08, 2006 6:23 am

Help please - Hide money per character on Alternate page

Postby PleegWat » Tue Sep 05, 2006 2:16 pm

If you want to influence it per user you'd have to adapt the money_value to return   for users who have their money off.
Last edited by PleegWat on Wed Sep 06, 2006 7:40 pm, edited 1 time in total.
I <3 /bin/bash
User avatar
PleegWat
WoWRoster.net Dev Team
WoWRoster.net Dev Team
 
Posts: 1636
Joined: Tue Jul 04, 2006 1:43 pm

Re: Help please - Hide money per character on Alternate page

Postby Speedtorch » Wed Sep 06, 2006 4:11 pm

Yes, that's exactly what we're looking to do. Half the guild wants their money displayed and the other half doesn't. We love all features of the Roster and would rather not disable the Alternate page. Thanks for the info. I definately don't have the PHP/SQL skills for this, so maybe something will come about in a future version.
Speedtorch
WR.net Apprentice
WR.net Apprentice
 
Posts: 12
Joined: Wed Jul 12, 2006 3:08 am


Return to General Code Help

Who is online

Users browsing this forum: No registered users and 0 guests

cron