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
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
See if that field is empty
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
How should i assign getfieldvalue() to a variable? I only know very very basic php.
Cheers
Dan C
<?php
$fieldvalue = ...;
if($fieldvalue != '')
// echo out the image
It is still not working, where do i put the code i am using?
Cheers
Dan C
Where your vatsim button is
It still not working, it shows the gif now, but it has "> what else should i do to get it working?
Cheers
Dan C
Check your code, paste it in, you have an extra > , that’s all
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
Post the code
<?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
why is it commented out?
$fieldvalue should be equal to the getfieldvalue() function, I don’t remember exactly what it is off the top of my head atm
flyzen it said to comment it out.
Cheers
Dan C
I have equaled the fliedvalue to the getfieldvalue and it still doesn’t want to be a good little boy.
Cheers
Dan C
can you post the code you have so far?
<?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
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>';
}
<?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