Jump to content

Recommended Posts

Posted

Ok, I have been looking through the forums and tinkering with my site, and I need to try to wrap my head around it....

For adding the vatsim link info to my site, I need to:

1. Add a text column to the phpvms_pilots table in the sql database, called Vatsim ID?!

2. Add a box for the inclusion of the Vatsim ID in the registration_mainform.tpl file?!

3. Change the pilots.tpl file to include the vstsim info already mentioned many times in the forum?!

Is that basically correct. I find reading so many posts about this topic, has only messed up my head :)

  • Moderators
Posted

Nope, you need to edit PilotData.class to edit it and Pilots.php module too.

Really Tricky and requires good knowleage. But why not use custom fields?

  • Administrators
Posted

Your best and easiest bet in my opinion is to add custom fields in your registration section.

Goto admin -> Site & Settings -> Profile fields

Add a profile field you would like - ie Vatsim, and it will be available in all pilot profiles and the registration form.

There is no need to edit any core files with this method. You can go into individual pilot profiles and edit the field for those that were in the system prior to adding it.

  • 1 month later...
  • Administrators
Posted

so would that be something like:

<a href="http://www.vataware.com/flight.cfm?id=<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?>"</a>

That looks close, I think you will want to change

flight.cfm?id=

to

pilot.cfm?cid=

  • Moderators
Posted

Sorry guys i have just read this thread, this is more complex than it need be.

Add another field on registration VatsimID, IVAO ID etc or what you like then you can call that field in the pilots list or where ever you like,

Examples,

http://www.easyjetva.com/index.php/pilots

You can then output the id's as a link variable.

<td><div align="center">
     <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'Vatsim ID' );
if( $fieldvalue != '' )
{
echo '<a href="http://www.vataware.com/pilot.cfm?cid=' . $fieldvalue . '" target="_blank"><img src="/images/charticon.jpg" width="28" height="28" border="0" alt="Vatsim ID" /></a></a>' ;
}
else
{
echo '<img src="/images/nonreg.png" width="20" height="18" border="0" alt="Not Listed" /></a>' ;
}
?>
   </div></td>

Posted

Actually, what do i need to change to just have the pilot cid shown linking to the VATAWARE stats? i have tried all the methods but can't get it to show.

Mark your way works fine but rather than images just the id number is what im after.

Posted

<td><div align="center">
     <?php $fieldvalue = PilotData :: GetFieldValue ( $pilot -> pilotid , 'Vatsim ID' );
if( $fieldvalue != '' )
{
echo '<a href="http://www.vataware.com/pilot.cfm?cid=' . $fieldvalue . '" target="_blank">' . $fieldvalue . '</a></a>' ;
}
else
{
echo '<img src="/images/nonreg.png" width="20" height="18" border="0" alt="" /></a>' ;
}
?>
   </div></td>

That works a treat, thanks Mark...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...