Jump to content

Vatsim Coding....again


CPC900

Recommended Posts

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 :)

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

  • 1 month later...
  • Moderators

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>

Link to comment
Share on other sites

<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...

Link to comment
Share on other sites

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...