Strider Posted March 30, 2009 Report Share Posted March 30, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 30, 2009 Administrators Report Share Posted March 30, 2009 See if that field is empty Quote Link to comment Share on other sites More sharing options...
Strider Posted March 30, 2009 Author Report Share Posted March 30, 2009 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 Quote Link to comment Share on other sites More sharing options...
Strider Posted March 31, 2009 Author Report Share Posted March 31, 2009 How should i assign getfieldvalue() to a variable? I only know very very basic php. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 31, 2009 Administrators Report Share Posted March 31, 2009 <?php $fieldvalue = ...; if($fieldvalue != '') // echo out the image Quote Link to comment Share on other sites More sharing options...
Strider Posted March 31, 2009 Author Report Share Posted March 31, 2009 It is still not working, where do i put the code i am using? Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 31, 2009 Administrators Report Share Posted March 31, 2009 Where your vatsim button is Quote Link to comment Share on other sites More sharing options...
Strider Posted March 31, 2009 Author Report Share Posted March 31, 2009 It still not working, it shows the gif now, but it has "> what else should i do to get it working? Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted March 31, 2009 Administrators Report Share Posted March 31, 2009 Check your code, paste it in, you have an extra > , that's all Quote Link to comment Share on other sites More sharing options...
Strider Posted March 31, 2009 Author Report Share Posted March 31, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 1, 2009 Administrators Report Share Posted April 1, 2009 Post the code Quote Link to comment Share on other sites More sharing options...
Strider Posted April 1, 2009 Author Report Share Posted April 1, 2009 <?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 Quote Link to comment Share on other sites More sharing options...
Leiserson Posted April 1, 2009 Report Share Posted April 1, 2009 why is it commented out? Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 1, 2009 Administrators Report Share Posted April 1, 2009 $fieldvalue should be equal to the getfieldvalue() function, I don't remember exactly what it is off the top of my head atm Quote Link to comment Share on other sites More sharing options...
Strider Posted April 1, 2009 Author Report Share Posted April 1, 2009 flyzen it said to comment it out. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Strider Posted April 1, 2009 Author Report Share Posted April 1, 2009 I have equaled the fliedvalue to the getfieldvalue and it still doesn't want to be a good little boy. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 3, 2009 Administrators Report Share Posted April 3, 2009 can you post the code you have so far? Quote Link to comment Share on other sites More sharing options...
Strider Posted April 3, 2009 Author Report Share Posted April 3, 2009 <?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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 3, 2009 Administrators Report Share Posted April 3, 2009 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>'; } Quote Link to comment Share on other sites More sharing options...
Strider Posted April 3, 2009 Author Report Share Posted April 3, 2009 <?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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 3, 2009 Administrators Report Share Posted April 3, 2009 Use what I posted. Why's there a quote in front of the PilotData? Quote Link to comment Share on other sites More sharing options...
Strider Posted April 3, 2009 Author Report Share Posted April 3, 2009 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 4, 2009 Administrators Report Share Posted April 4, 2009 <?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>'; } Quote Link to comment Share on other sites More sharing options...
Strider Posted April 4, 2009 Author Report Share Posted April 4, 2009 Parse error: syntax error, unexpected '<' in /home/globalai/public_html/lib/skins/global/pilots_list.tpl on line 57 Am getting that error now. http://globalaircargovirtual.org/download/pilots_list.zip Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted April 4, 2009 Administrators Report Share Posted April 4, 2009 You didn't close the php tag, above that </tr> put ?> Quote Link to comment Share on other sites More sharing options...
Strider Posted April 5, 2009 Author Report Share Posted April 5, 2009 YAY got it working, If anyone wants it pm me, will send you the file. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
RogerB Posted April 5, 2009 Report Share Posted April 5, 2009 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!! Quote Link to comment Share on other sites More sharing options...
Strider Posted April 5, 2009 Author Report Share Posted April 5, 2009 Roger i am gonna come and rip ya a new one....lol jk Yea will resize them. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
Strider Posted April 5, 2009 Author Report Share Posted April 5, 2009 Re made them and at a smaller size of 50x30. Cheers Dan C Quote Link to comment Share on other sites More sharing options...
BBuchanan Posted September 4, 2009 Report Share Posted September 4, 2009 This is what I get: Parse error: syntax error, unexpected $end in /home/vdefense/public_html/ultrair-virtual.org/lib/skins/biz/pilots_list.tpl on line 60 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.