custom page

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

custom page

Postby blackice » Wed Jun 20, 2007 8:04 pm

Morning all, I taking to custom one of the page in roster to show the officer notes & have not be having much luck with it & want to see if some one here would be able to help me out.

I took the indexalt.php page and edited it up a bit & got this.
Code: Select all
<?php
require_once( 'settings.php' );

$header_title = $wordings[$roster_conf['roster_lang']]['alternate'];
include_once (ROSTER_BASE.'roster_header.tpl');


$FIELD[] = array (
   'name' => array(
      'lang_field' => 'name',
      'order'    => array( '`members`.`name` ASC' ),
      'order_d'    => array( '`members`.`name` DESC' ),
      'required' => true,
      'default'  => true,
      'value' => 'name_value',
   ),
);

$FIELD[] = array (
   'class' => array(
      'lang_field' => 'class',
      'divider' => true,
      'divider_value' => 'class_divider',
      'order'    => array( '`members`.`class` ASC' ),
      'order_d'    => array( '`members`.`class` DESC' ),
      'default'  => true,
      'value' => 'class_value',
   ),
);

$FIELD[] = array (
   'level' => array(
      'lang_field' => 'level',
      'divider' => true,
      'divider_prefix' => 'Level ',
      'order_d'    => array( '`members`.`level` ASC' ),
      'default'  => true,
      'value' => 'level_value',
   ),
);

$FIELD[] = array (
   'officer_note' => array(
      'lang_field' => 'officer_note',
      'order'    => array( '`members`.`officer_note` ASC' ),
      'order_d'    => array( '`members`.`officer_note` DESC' ),
//      'value' => 'officer_note_value',
   ),
);

include_once (ROSTER_BASE.'memberslist.php');

include_once (ROSTER_BASE.'roster_footer.tpl');
?>


The problem I have at this point is I have not been able to get the ON to show I can get just about anything else to show but not the officer notes.

Any help would be great.
User avatar
blackice
WR.net Apprentice
WR.net Apprentice
 
Posts: 34
Joined: Tue Jul 25, 2006 4:15 pm

custom page

Postby PleegWat » Wed Jun 20, 2007 11:19 pm

Looks fine to me. What's it returning?

You probably won't need the value field for the officer note, unless you also put a function with the specified name (in this case officer_note_value( $row ) )
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

custom page

Postby Samadhi » Thu Jun 21, 2007 12:23 am

You'll also need to modify the memberslist.php to actually pull the officer note from the database. It doesn't do so by default.

find:
Code: Select all
   '`members`.`zone`, '.

After, Add:
Code: Select all
//  Officer note
   '`members`.`officer_note`, '.   
Image
User avatar
Samadhi
Roster AddOn Dev
Roster AddOn Dev
 
Posts: 114
Joined: Mon Jul 17, 2006 10:38 pm
Location: NJ, USA

Re: custom page

Postby blackice » Thu Jun 21, 2007 1:26 am

PleegWat wrote:Looks fine to me. What's it returning?


nothing
User avatar
blackice
WR.net Apprentice
WR.net Apprentice
 
Posts: 34
Joined: Tue Jul 25, 2006 4:15 pm

Re: custom page

Postby blackice » Thu Jun 21, 2007 1:27 am

Samadhi wrote:You'll also need to modify the memberslist.php to actually pull the officer note from the database. It doesn't do so by default.

find:
Code: Select all
   '`members`.`zone`, '.

After, Add:
Code: Select all
//  Officer note
   '`members`.`officer_note`, '.   


Ahhh that got it.

Thanks again
User avatar
blackice
WR.net Apprentice
WR.net Apprentice
 
Posts: 34
Joined: Tue Jul 25, 2006 4:15 pm

custom page

Postby blackice » Thu Jun 21, 2007 1:59 am

Okay two questions...

How would I set it up to only show 70s.

We are using the office note for displaying DKP in format like 0|0|0|0 the numbers will be different from player to player but it should always be in a number|number|number|number format.

There are a small number of player that don't have DKP namely alts. For them it looks like it is the name of the main. How would I filter them out?
User avatar
blackice
WR.net Apprentice
WR.net Apprentice
 
Posts: 34
Joined: Tue Jul 25, 2006 4:15 pm

custom page

Postby zanix » Thu Jun 21, 2007 10:46 am

You would have to edit memberslist.php to be able to do this

Code: Select all
// All those people asking about guild searching, here's a spot!  and here's the simple alteration to stop guild filtering in this particular place
   "LEFT JOIN `".ROSTER_PLAYERSTABLE."` AS players ON `members`.`member_id` = `players`.`member_id` AND `members`.`guild_id` = '$guildId' ".
   "ORDER BY ";

I think before the ORDER BY you should put WHERE members.level =70 or something

This change would also mean that all files that use memberslist would be show only level 70 too

You could also use an if statement to switch this on and off and have your new file set the switch
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


Return to General Support & Feedback

Who is online

Users browsing this forum: No registered users and 1 guest

cron