Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. You have php tags within php tags, you cant do that
  2. Ah, if you are trying to use it as a defined value Mark is right, define it in your local config; define('YOUTUBE_URL', '<a href="http://www.youtube.com">YouTube</a>'); Then in your template; <?php echo YOUTUBE_URL; ?>
  3. To do it in php you can do; <?php echo '<a href="http://www.youtube.com">YouTube</a>'; ?> but if you are outside of php there is no reason to use it, just use the html command <a href="http://www.youtube.com">YouTube</a>
  4. That is not the code from the original post, not sure where you got it from but it should be; <?php Screenshots::show_random_screenshot(); ?>
  5. The popupnews_list.tpl file repeats however many times you have it set to, so anything you have in it is going to show that many times. Move the title into the main page you are using prior to calling the popupnews function.
  6. Add the link to your menu, probably located in core_navigation.tpl
  7. The popupnews_list template is called through a foreach loop in the module so you need to do one of two things, 1- open and close the table in the module and just have row commands in the template or 2 - create a table for each line in the template example template <table> <tr> <td> <a href="<?php echo SITE_URL ?>/index.php/PopUpNews/popupnewsitem/?itemid=<?php echo $id;?>"><b><u><?php echo $subject;?></b></u></a><br /> <?php echo $postdate;?> </td> </tr> </table>
  8. The file is missing or corrupted, make sure it is in the correct path for the templates and if it is load a new one up, it may have been corrupted in the transfer.
  9. Do this then, <table> <?php $results = ACARSData::GetACARSData(); if (count($results) > 0) { foreach($results as $flight) { if($flight->client == 'FSACARS') {$plane = OperationsData::getAircraftInfo($flight->aircraft);} else {$plane = OperationsData::getAircraftByReg($flight->aircraft);} ?> <tr> <td align="center"> <?php if($flight->phasedetail == "Boarding") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Taxiing to Runway") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Taking Off") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Climbing") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Cruise") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Arrived") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ARRIVED.gif'>"; } elseif($flight->phasedetail == "Descending") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Level Flight") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "On Approach") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Taxiing to Gate") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/images/Boarding1.gif'>"; } else { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ARRIVED.gif'>"; } ?> </td> <td align="center"><?php echo $flight->flightnum;?></td> <td align="center"><?php echo $flight->depname;?></td> <td align="center"><?php echo $flight->arrname;?></td> <td align="center"><?php echo $flight->pilotname;?></td> <td align="center"><?php echo $plane->fullname;?></td> <td align="center"><?php echo $flight->phasedetail; ?></td> </tr> <?php } } else { ?> <tr><td width="20%" align="center" colspan="6" style="padding: 5px; font-size: 13px; font-weight: bold; color: #ff961e;">No Flights in Progress!</td></tr> <?php } ?> </table>
  10. Again, Is there any current data in your acars data table?
  11. Is there an aircraft id in your acars data table that is current?
  12. Not sure what all you have going on there, looks like a live flight board with remenants of a current bids board.... I changed your code to show the live flight board and it works on my test site. If you are still getting a blank in the "Name" section for the aircraft my guess would be that you have not assigned a full name to the aircraft in your admin panel. <table> <?php $results = ACARSData::GetACARSData(); if (count($results) > 0) { foreach($results as $flight) { $plane = OperationsData::getAircraftByReg($flight->aircraft); ?> <tr> <td align="center"> <?php if($flight->phasedetail == "Boarding") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Taxiing to Runway") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Taking Off") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Climbing") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Cruise") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Arrived") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ARRIVED.gif'>"; } elseif($flight->phasedetail == "Descending") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "Level Flight") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/Boarding1.gif'>"; } elseif($flight->phasedetail == "On Approach") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ONAPPROCH.gif'>"; } elseif($flight->phasedetail == "Taxiing to Gate") { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/images/Boarding1.gif'>"; } else { echo "<img style='padding-left:3px;' src='http://www.vpia.org/VirtualPIA/lib/skins/brilliancev1/images/ARRIVED.gif'>"; } ?> </td> <td align="center"><?php echo $flight->flightnum;?></td> <td align="center"><?php echo $flight->depname;?></td> <td align="center"><?php echo $flight->arrname;?></td> <td align="center"><?php echo $flight->pilotname;?></td> <td align="center"><?php echo $plane->fullname;?></td> <td align="center"><?php echo $flight->phasedetail; ?></td> </tr> <?php } } else { ?> <tr><td width="20%" align="center" colspan="6" style="padding: 5px; font-size: 13px; font-weight: bold; color: #ff961e;">No Flights in Progress!</td></tr> <?php } ?> </table> And your reference to me using the wrong code to get the ac name, look at what you have posted - getAircraftBYname - You are wanting the name because you dont have it, so how are you going to find it by name? Nor do you have the registration, you only have the db id of the aircraft from acars data.
  13. The acars data only records the db id of the aircraft in flight, no other data. You need to convert that id into the aircraft data using the built in functions of the operations data class. A simple example for a front page flight board would be: Live Flights In Progress <table> <tr> <th>Flight #</th> <th>Pilot</th> <th>Aircraft</th> <th>Departure</th> <th>Arrival</th> <th>Altitude</th> <th>Phase</th> </tr> <?php $flights = ACARSData::GetACARSData(); if ($flights) { foreach ($flights as $flight) { $plane = OperationsData::getAircraftByReg($flight->aircraft); echo '<tr>'; echo '<td>' . $flight->flightnum . '</td>'; echo '<td>' . $flight->pilotname . '</td>'; echo '<td>' . $plane->fullname . '</td>'; echo '<td>' . $flight->depicao . '</td>'; echo '<td>' . $flight->arricao . '</td>'; echo '<td>' . $flight->alt . 'ft</td>'; echo '<td>' . $flight->phasedetail . '</td>'; echo '</tr>'; } } else { echo '<tr><td colspan="7">No Flights At This Time</td></tr>'; } ?> </table> Notice the data extraction on line 16 and how it is used on line 20. You can apply the same concept to the acars map but will need to change the sql function or add the data to the variable within the acars module.
  14. The easiest thing to do is to take the registration script that is native to the forum board you are using and modify it to be a phpvms module that listens for new pilot approvals, that is all I did really with the smf registration module.
  15. It should work without issue on the latest 1.x version of smf, it will not however work with the new 2.x versions
  16. You have php tags within already open php tags, you need to adjust the code around those instances.
  17. Looks like the ranks table in the database is empty or the code that loads the variable from the database has been altered.
  18. You have white space in a core php file that you have edited, most likely right before the opening php tag. Very common error if you search for it.
  19. Server config issue, most likely the connection to the sql server. Check what settings your host has for the sql server.
  20. You are going to have to use curl to get the file, inside of phpVMS you could use something like; $url = 'http://www.site.com/file' $file = new CodonWebService(); $contents = @$file->get($url);
  21. You need to put <img src="<?=php echo $award->image?>" alt="<?php echo $award->descrip?>" /> inside your foreach loop, it is above it and probably still commented out.
  22. Ok, just so I am following.... In the sent items display you just want the subject, date, and who you sent it to; and you want to click on the subject as a link to view the body... Am I close?
  23. You have phpvms in a sub folder named phpvms so it would be; http://5starvirtualaviation.com/phpvms/index.php/toppilot Like This
×
×
  • Create New...