Just a formatting question...

Requests, feedback, and general discussion about WoWRoster
DO NOT post topics about WoWRoster AddOns here!

Just a formatting question...

Postby raithkell » Tue Apr 03, 2007 11:20 pm

Was wondering if the list of member lvls can be changed or tweaked easily. It defaults to

Members: 94 (+82 Alts)

* Average Level: 29
* Level 70: 4
* Level 60-69: 18
* Level 50-59: 9
* Level 40-49: 23
* Level 30-39: 24
* Level 1-29: 98

can it be done breaking up the last set of lvls to show this?

Members: 94 (+82 Alts)

* Average Level: 29
* Level 70: 4
* Level 60-69: 18
* Level 50-59: 9
* Level 40-49: 23
* Level 30-39: 24
* Level 20-29: ??
*Level 10-19:??
* Level 1-9:??


We have a lot of ALTS that will never make it out of lvl 1-5...storage mules or AH characters...and the 1-29 is gonna be huge forever.

Let me know please...thank you
User avatar
raithkell
WR.net Apprentice
WR.net Apprentice
 
Posts: 29
Joined: Thu Jan 11, 2007 3:51 am

Just a formatting question...

Postby PleegWat » Wed Apr 04, 2007 12:22 am

You need to edit lib/menu.php

FIND:
Code: Select all
   $num_lvl_1_29 = 0;

REPLACE:
Code: Select all
   $num_lvl_20_29 = 0;
   $num_lvl_10_19 = 0;
   $num_lvl_1_9 = 0;


FIND:
Code: Select all
         case 2:
         case 1:
         case 0:
            $num_lvl_1_29 += $row['amount'];

REPLACE:
Code: Select all
         case 2:
            $num_lvl_20_29 += $row['amount'];
         case 1:
            $num_lvl_10_19 += $row['amount'];
         case 0:
            $num_lvl_1_9 += $row['amount'];


FIND:
Code: Select all
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 1-29: '.$num_lvl_1_29.'</li>

REPLACE:
Code: Select all
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 20-29: '.$num_lvl_20_29.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 10-19: '.$num_lvl_10_19.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 1-9: '.$num_lvl_1_9.'</li>
Last edited by PleegWat on Wed Apr 04, 2007 12:23 am, 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

Just a formatting question...

Postby raithkell » Wed Apr 04, 2007 1:38 am

Members: 94 (+82 Alts)

* Average Level: 29
* Level 70: 0
* Level 60-69: 4
* Level 50-59: 18
* Level 40-49: 9
* Level 30-39: 23
* Level 20-29: 24
* Level 10-19: 28
* Level 2-9: 33
* Level 1: 37

What you sent me was perfect...
Now I tried to get it to do that now...
level 1 alone and 2-9 on one line
those totals are wrong, it should be
* Level 2-9: 30
* Level 1: 7

this is what i have done to the areas you sent me before...please inform of what is wrong..
Code: Select all
$num_lvl_70 = 0;
   $num_lvl_60_69 = 0;
   $num_lvl_50_59 = 0;
   $num_lvl_40_49 = 0;
   $num_lvl_30_39 = 0;
   $num_lvl_20_29 = 0;
   $num_lvl_10_19 = 0;
   $num_lvl_2_9 = 0;
   $num_lvl_0_1 = 0;


Code: Select all
switch ($row['levelgroup'])
      {
         case 8:
            $num_lvl_70 += $row['amount'];
            break;
         case 7:
            $num_lvl_60_69 += $row['amount'];
            break;
         case 6:
            $num_lvl_50_59 += $row['amount'];
            break;
         case 5:
            $num_lvl_40_49 += $row['amount'];
            break;
         case 4:
            $num_lvl_30_39 += $row['amount'];
            break;
         case 3:
            $num_lvl_20_29 += $row['amount'];
            break;
         case 2:
            $num_lvl_10_19 += $row['amount'];
            break;
         case 1:
            $num_lvl_2_9 += $row['amount'];
            break;
         case 0:
            $num_lvl_0_1 += $row['amount'];
            break;
         default:
      }
      $level_sum += $row['sum'];


Code: Select all
<ul>
        <li style="color:#999999;">Average Level: '.round($result_avg).'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 70: '.$num_lvl_70.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 60-69: '.$num_lvl_60_69.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 50-59: '.$num_lvl_50_59.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 40-49: '.$num_lvl_40_49.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 30-39: '.$num_lvl_30_39.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 20-29: '.$num_lvl_20_29.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 10-19: '.$num_lvl_10_19.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 2-9: '.$num_lvl_2_9.'</li>
   <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 1: '.$num_lvl_0_1.'</li>
      </ul></td>';


the sections that have _0_1...I tried with _1_1 same result.
Last edited by raithkell on Wed Apr 04, 2007 1:48 am, edited 1 time in total.
User avatar
raithkell
WR.net Apprentice
WR.net Apprentice
 
Posts: 29
Joined: Thu Jan 11, 2007 3:51 am

Just a formatting question...

Postby PleegWat » Wed Apr 04, 2007 2:54 am

That doesn't work, since the case 0: would only be triggered for a char of level 0. In the edit I've used the fact that 0-9, 10-19, 20-29 are actually fetched separately from the DB. You'd have to change the query to show L1 separately.
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

Just a formatting question...

Postby raithkell » Wed Apr 04, 2007 3:19 am

would this be the proper way of giving level 1 its own line? If it's not, can you please show me how it would be written if it can be done...thank you for all your help so far, you've been great

Code: Select all
$num_lvl_70 = 0;
   $num_lvl_60_69 = 0;
   $num_lvl_50_59 = 0;
   $num_lvl_40_49 = 0;
   $num_lvl_30_39 = 0;
   $num_lvl_20_29 = 0;
   $num_lvl_10_19 = 0;
   $num_lvl_2_9 = 0;
   $num_lvl_1 = 0;


Code: Select all
switch ($row['levelgroup'])
      {
         case 8:
            $num_lvl_70 += $row['amount'];
            break;
         case 7:
            $num_lvl_60_69 += $row['amount'];
            break;
         case 6:
            $num_lvl_50_59 += $row['amount'];
            break;
         case 5:
            $num_lvl_40_49 += $row['amount'];
            break;
         case 4:
            $num_lvl_30_39 += $row['amount'];
            break;
         case 3:
            $num_lvl_20_29 += $row['amount'];
            break;
         case 2:
            $num_lvl_10_19 += $row['amount'];
            break;
         case 1:
            $num_lvl_2_9 += $row['amount'];
            break;
         case 0:
            $num_lvl_1 += $row['amount'];
            break;
         default:
      }
      $level_sum += $row['sum'];



Code: Select all
<ul>
        <li style="color:#999999;">Average Level: '.round($result_avg).'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 70: '.$num_lvl_70.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 60-69: '.$num_lvl_60_69.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 50-59: '.$num_lvl_50_59.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 40-49: '.$num_lvl_40_49.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 30-39: '.$num_lvl_30_39.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 20-29: '.$num_lvl_20_29.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 10-19: '.$num_lvl_10_19.'</li>
        <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 2-9: '.$num_lvl_2_9.'</li>
   <li>'.$wordings[$roster_conf['roster_lang']]['level'].' 1: '.$num_lvl_1.'</li>
      </ul></td>';
User avatar
raithkell
WR.net Apprentice
WR.net Apprentice
 
Posts: 29
Joined: Thu Jan 11, 2007 3:51 am

Just a formatting question...

Postby PleegWat » Wed Apr 04, 2007 10:25 pm

No, it doesn't work like that. There is a sql query further up, which fetches the number of players per 10 levels. You'd have to add a second query to fetch the number of level 1 players, substract the result from the number of level 1-9 players, and display it separately.

How to do that is left as an exercise to the reader.
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


Return to General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron