hjhjhgjgjh Posted February 24, 2010 Report Posted February 24, 2010 This addon shows the 3 latest NOTAMs of both your departure and arrival airport. A readme is included in the zip file. Its possible to display more NOTAMs than 3, for this, just check out the code of notamdep/arr.tpl.. Its self explaining. Download here Quote
llju1 Posted February 24, 2010 Report Posted February 24, 2010 Works Great Thanks. I put the two tpl files in my skins folder and also copied the schedules_briefing.tpl folder in to my skins folder and it worked great Quote
hjhjhgjgjh Posted February 24, 2010 Author Report Posted February 24, 2010 you did what ? well, as long as it works Quote
llju1 Posted February 24, 2010 Report Posted February 24, 2010 you did what ? well, as long as it works I just hate to mess with the core tpl files so I usually add any new addons to my skins folders. but the notamarr.tpl, notamdep.tpl and the schedule_briefing.tpl must all be in the same folder to get it to work right. Quote
hjhjhgjgjh Posted February 24, 2010 Author Report Posted February 24, 2010 ahhh okay, i just wondered Quote
Moderators mark1million Posted February 24, 2010 Moderators Report Posted February 24, 2010 Just added that to my site, with a bit of modding Thanks for the addition. Quote
stuartpb Posted February 24, 2010 Report Posted February 24, 2010 Thanks for this addition, it works very well! Cheers, Stu Quote
stuartpb Posted February 24, 2010 Report Posted February 24, 2010 I have just been checking all my flights, and one seems to be throwing up errors: Warning: simplexml_load_file() [function.simplexml-load-file]: http://www.ourairports.com/airports/EGHI/notams.rss:139: parser error : Input is not proper UTF-8, indicate encoding ! Bytes: 0x86 0x20 0x50 0x4C in /customers/britair.net/britair.net/httpd.www/core/templates/notamdep.tpl on line 5 Warning: simplexml_load_file() [function.simplexml-load-file]: CLIMB TO 3000 VIA TR 201 DEG, THEN CONT AS DIRECTED. †PLANVIEW - ADD in /customers/britair.net/britair.net/httpd.www/core/templates/notamdep.tpl on line 5 Warning: simplexml_load_file() [function.simplexml-load-file]: ^ in /customers/britair.net/britair.net/httpd.www/core/templates/notamdep.tpl on line 5 Fehler beim Einlesen der XML Datei It's for EGHI (Southampton, UK). All other ICAO codes seem to be working fine. Quote
Administrators Nabeel Posted February 24, 2010 Administrators Report Posted February 24, 2010 Seems like when you pull the XML, before you load it into simplexml, it needs a utf8_encode() call Quote
stuartpb Posted February 26, 2010 Report Posted February 26, 2010 I have been googling utf8_encode, and tried various methods I found with no joy A clue would be great EDIT: It seems that some of the RSS feeds from the site have errors in them, and that's what's causing the problem. http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.ourairports.com%2Fairports%2Feghi%2Fnotams.rss Quote
Moderators joeri Posted February 26, 2010 Moderators Report Posted February 26, 2010 i also tried to put it on my site but not working getting this error Warning: simplexml_load_file() [function.simplexml-load-file]: URL file-access is disabled in the server configuration in /home/tntvirtua/domains/tnt-virtual.be/public_html/lib/skins/tnt_ver2.0/notamdep.tpl on line 5 Warning: simplexml_load_file(http://www.ourairports.com/airports/EBBR/notams.rss) [function.simplexml-load-file]: failed to open stream: no suitable wrapper could be found in /home/tntvirtua/domains/tnt-virtual.be/public_html/lib/skins/tnt_ver2.0/notamdep.tpl on line 5 Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "http://www.ourairports.com/airports/EBBR/notams.rss" in /home/tntvirtua/domains/tnt-virtual.be/public_html/lib/skins/tnt_ver2.0/notamdep.tpl on line 5 Fehler beim Einlesen der XML Datei tebin anny sugestions? Quote
hjhjhgjgjh Posted February 28, 2010 Author Report Posted February 28, 2010 hmm it looks like you have a wrong server configuration.. check out this link: http://www.tubepress.net/url-file-access-is-disabled-in-the-server-configuration.html maybe it works ps: Toyuko: for me everything works :S sorry i dont know whats wrong there 1 Quote
Moderators joeri Posted February 28, 2010 Moderators Report Posted February 28, 2010 hmm it looks like you have a wrong server configuration.. check out this link: http://www.tubepress.net/url-file-access-is-disabled-in-the-server-configuration.html maybe it works ps: Toyuko: for me everything works :S sorry i dont know whats wrong there ok will ask the host on this gr joeri Quote
Moderators joeri Posted March 2, 2010 Moderators Report Posted March 2, 2010 that got it working thanks +1 for you tebinu Quote
stuartpb Posted March 5, 2010 Report Posted March 5, 2010 I still haven't got this working on my site. How and where would I place the utf8_encode() call please? Quote
hjhjhgjgjh Posted March 7, 2010 Author Report Posted March 7, 2010 thanks joeri I still haven't got this working on my site. How and where would I place the utf8_encode() call please? could you send me your schedules_briefing.tpl ? then i can check it. and a link to your va would also be good so i can see whats wrong Quote
Administrators Nabeel Posted June 12, 2010 Administrators Report Posted June 12, 2010 To fix the URL fopen error: In notamdep.tpl, replace: if (!$xml = simplexml_load_file ($stream)) { die("Fehler beim Einlesen der XML Datei"); } With: $file = new CodonWebService(); $contents = @$file->get($stream); $xml = @simplexml_load_string($contents); And then in notamarr.tpl do the same thing. This uses the CodonWebService class to pull the stream via cURL, and load it that way. This is the safer way since alot of hosts (including mine) disable url_fopen. 1 Quote
TennShadow Posted June 12, 2010 Report Posted June 12, 2010 To fix the URL fopen error: In notamdep.tpl, replace: if (!$xml = simplexml_load_file ($stream)) { die("Fehler beim Einlesen der XML Datei"); } With: $file = new CodonWebService(); $contents = @$file->get($stream); $xml = @simplexml_load_string($contents); And then in notamarr.tpl do the same thing. This uses the CodonWebService class to pull the stream via cURL, and load it that way. This is the safer way since alot of hosts (including mine) disable url_fopen. That did the trick. Thanks! Quote
Fly Star Alliance Posted November 1, 2010 Report Posted November 1, 2010 I wonder.... Maybe it's a stupid question. Does it work with IATA codes ?? Thanks Will Quote
Moderators mark1million Posted November 10, 2010 Moderators Report Posted November 10, 2010 Top job Quote
HighFlyerPL185 Posted February 15, 2013 Report Posted February 15, 2013 I'm not sure what's wrong, but on certain schedules with this plugin, the template breaks. I have however noticed a pattern, and it seems to happen on schedules in which airports have no NOTAMs. In this case, Esbjerg has no NOTAMs to display. Any ideas how this can be fixed? EDIT:// Apologies for asking, got it sorted. If anyone has trouble with this in the future, here's how you solve it. Replace the die() function which apparently kills off the page, with an echo, followed by a return, which will terminate our given target. Replace this in notamarr.tpl and notamdep.tpl: if (!isset($xml->channel->item)) { die("Keine Items vorhanden"); } with... if (!isset($xml->channel->item)) { $message = 'There are no NOTAMs available for this airport.'; echo $message; return; } Quote
Strider Posted February 27, 2013 Report Posted February 27, 2013 For anyone having trouble with the files not being in the same place, replace the: <?php include('notamdep.tpl'); ?> with: <?php Template::Show('notamdep.tpl'); ?> Do that with the second one, and it will work just fine. Quote
HighFlyer Posted May 4 Report Posted May 4 Do we know why this doesn't work anymore? It just defaults to no NOTAMs being shown, but the RSS feed is still there! Quote
DisposableHero Posted May 6 Report Posted May 6 (edited) Works fine on my end (not using v2/v5 though), same source being used for the RSS feed... So it can be server/code related on your end. Edited May 6 by DisposableHero Quote
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.