JackPlumb Posted March 26, 2009 Report Share Posted March 26, 2009 Dear All, As a requirement of VATSIM airline I need to have the ability to place the User I.D on the roster. Is there anyway I can do this at all? Quote Link to comment Share on other sites More sharing options...
cale250 Posted March 26, 2009 Report Share Posted March 26, 2009 Use the custom fields option in the administration panel under Site & Settings/ Profile Fields. Quote Link to comment Share on other sites More sharing options...
JackPlumb Posted March 26, 2009 Author Report Share Posted March 26, 2009 I have done this, but i need to know how it could be placed on the 'pilots' page. Quote Link to comment Share on other sites More sharing options...
Wayne Posted March 26, 2009 Report Share Posted March 26, 2009 What exactly do you mean the pilots page? The pilot center in phpVMS or somewhere for VATSIM? Quote Link to comment Share on other sites More sharing options...
Strider Posted March 26, 2009 Report Share Posted March 26, 2009 He means to show on the roster, and not have people go into the public profiles. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
cale250 Posted March 26, 2009 Report Share Posted March 26, 2009 That's not all that hard either. Check what Nabeel already added into the template for the pilot list: /* To include a custom field, use the following example: <td> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </td> For instance, if you added a field called "IVAO Callsign": echo PilotData::GetFieldValue($pilot->pilotid, 'IVAO Callsign'); */ You can find this in the your core/templates/pilots_list.tpl. Quote Link to comment Share on other sites More sharing options...
JackPlumb Posted March 26, 2009 Author Report Share Posted March 26, 2009 I have done this and have abit of problem, the vatsim id is on the table. Concluding from this the actual I.D isn't showing, even though it has been inserted on the profile of every pilot. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 26, 2009 Administrators Report Share Posted March 26, 2009 Hey, Can you try this real quick, where you put the GetFieldValue();, immediately after, if you put DB::debug(), what's the result?: <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); DB::debug() ?> Can you paste it in? Thanks! Quote Link to comment Share on other sites More sharing options...
JackPlumb Posted March 27, 2009 Author Report Share Posted March 27, 2009 I get this reply: ezSQL (v2.03) Debug.. Query [7] -- [sELECT v.value FROM phpvms_customfields f, phpvms_fieldvalues v WHERE f.fieldid=v.fieldid AND f.title='VATSIM ID' AND v.pilotid=4] Query Result.. (row) string 0 value No Results Quote Link to comment Share on other sites More sharing options...
Strider Posted March 27, 2009 Report Share Posted March 27, 2009 What code would i need to put the vataware link and graphic onto the roster? Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 27, 2009 Administrators Report Share Posted March 27, 2009 What did you call that field in the admin panel? Quote Link to comment Share on other sites More sharing options...
JackPlumb Posted March 27, 2009 Author Report Share Posted March 27, 2009 The feild is VATSIM I.D Quote Link to comment Share on other sites More sharing options...
Leiserson Posted March 27, 2009 Report Share Posted March 27, 2009 If its really has the dot between the I and the D you must include it in the query because as you add it in the admin panel it inserts it in the DB as you wrote it. Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 30, 2009 Administrators Report Share Posted March 30, 2009 Then you would do: <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM.ID'); DB::debug() ?> That field name must be exactly as you entered it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.