Jump to content

Recommended Posts

Posted

I have some code to get the vataware gif onto the roster, but it shows for every pilot even if they dont have a vatsim id, what code do i need to put in to stop that from happening?

Cheers

Dan C

Posted

no what is happening it shows the button even if it is empty and when it isn't empty. I need it to show nothing when it is empty and the button when it isn't empty.

Cheers

Dan C

Posted

It still doesn't work. I have tried different combos, and it still doesn't want to work, it now shows the gif, but it doesn't link to vataware.

Cheers

Dan C

Posted

<?php
$fieldvalue = 0;
if($fieldvalue != '')
//<a href="http://www.vataware.com/pilot.cfm?cid=<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); target="_blank"?><img src="<?php echo SITE_URL ?>/lib/skins/global/images/vatsim.gif" alt="Vatsim ID" /></a>

That is the code.

Cheers

Dan C

Posted

<?php
$fieldvalue = $pilot;
if($fieldvalue != 'VATSIM_ID')
// <a href="http://www.vataware.com/pilot.cfm?cid=<?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); target="_blank"?><img src="<?php echo SITE_URL ?>/lib/skins/global/images/vatsim.gif" alt="Vatsim ID" /></a>

there you go nabeel.

Cheers

Dan C

  • Administrators
Posted

Should be enough to ge tyou goin:

<?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="'.SITE_URL.'/lib/skins/global/images/vatsim.gif" alt="Vatsim ID" /></a>';
}

Posted

<?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="'.SITE_URL.'/lib/skins/global/images/vatsim.gif" alt="Vatsim ID" /></a>'";
}

Still not working.

Cheers

Dan C

Posted

Parse error: syntax error, unexpected '<' in /home/globalai/public_html/lib/skins/global/pilots_list.tpl on line 57

I get that error with your code. I know the piece of code causing it, but there is no way of stopping it from occuring.

Cheers

Dan C

  • Administrators
Posted
<?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="'.SITE_URL.'/lib/skins/global/images/vatsim.gif" alt="Vatsim ID" /></a>';
}

Posted

Nightfox, don't get pissed, but those large rank badges really don't look good, You may want to bring those down to a small size......Other than that, looking good!!

  • 4 months later...

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