-
Posts
1470 -
Joined
-
Last visited
-
Days Won
2
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by freshJet
-
Here's the deal. I want to add a new field to the schedules table. I've done this before with the bids but it was a bit easier in that case because when you went to edit the php files there was very little to change, whereas with the schedules there's a bit more. Question is, is there an easy way to do this? And is there any way to prevent the changes being overwritten by updates? I know the usual way round the update overwrite issue is to create a new class file but this isn't going to work in this case because I need to modify an existing one. Any ideas?
-
Is AirMail 4 any different other than it is adapted for the newest version?
-
The skin was tested on Chrome at the time, I do not recall any issues with the icons. Let me double check your code.
-
I made my own by editing Simpilot's PopUpNews module, albeit quite heavily however.
-
I see. It would only need a little modification, just add the column and then edit the appropriate functions in OperationsData.class.php.
-
Agree with Tom, the shadows and gradients are a bit overkill, try going for a flatter design to make it more like Metro UI. And damn you for using Open Sans
-
Ah thanks a lot, never noticed they had that page.
-
Oh, OK, I read it wrong! $depinfo = OperationsData::getAirportInfo($flight->depicao); $arrinfo = OperationsData::getAirportInfo($flight->arricao); And then, where you want them displayed: <?php echo $depinfo->name;?> <?php echo $arrinfo->name;?>
-
Hmm this could be tricky. Does NOMADS only cover the US?
-
Should state that this is not for METAR/TAF retrieval
-
Anyone know of some open source weather data, whether it be raw data or a PHP class/XML module? I'm looking specifically for temperature and wind data, particularly winds aloft at certain altitudes and waypoints. Grateful for any help.
-
Try using phpMyAdmin or similar to view the phpvms_acars table, see if there are multiple rows there.
-
I use Limenex. Never had downtime yet, support is second to none. Get ticket responses within the hour usually. They even went the extra mile when I joined by sorting out the mess JustHost had left for me.
-
Could do with some padding fiddling in places but overall it's nice, something different.
-
JustHost is a bad idea. They scam their way into making themselves look good. I liked them at first, until they quoted me on my hosting renewal. Then when I tried to move they tried all sorts.
-
[Solved]Mysql Query inside template file
freshJet replied to skylineVirtual's topic in Support Forum
EDIT: Nope, that's nonsense. I think it's the use of <%=flight.flightnum%>, I think it should be in PHP format. Could be wrong though. -
Did you get this problem solved?
-
Doesn't take much to look, but here it is: http://forum.phpvms.net/topic/16598-21936-security-patch/
-
Whether anything is found or not, you must use the patch that Nabeel released last week.
-
OK, edited. I left out the bit about the core navigation because I find it much easier to have it all on the layout.tpl, but I suppose it's worth a mention for finding out the URLs for different pages.
-
Last modified 10/10/13 1. Choosing a template First, you need to choose the template you want to use for your site. There are hundreds of thousands of free CSS templates on the internet available for download, so choosing the right one can be difficult. I recommend this site for templates. Many sites also offer premium templates too, but these often cost you. When looking for a suitable template, you have to look at it and think to yourself; can I see this being my site? Does it suit? Don't worry about the colours, they can all be changed. It's the layout that matters. Even if there's something that you don't quite like, remember that they are fully customisable, so you can change it later. When you find the one you like, download it. Remember to check the Terms of Use and the licence. 2. Uploading the template Once you have downloaded your template, open it. Template packages typically contain two main files; an HTML file (usually index.html) and a CSS file. For this tutorial we will call the HTML file index.html and the CSS file styles.css. Often there will also be an images folder containing the images used in the template. Now, you'll need to access your File Manager on your site, such as cPanel. Go to the 'lib/skins' directory and upload the .zip file that you downloaded. Once done, extract it. This will create a new folder (in cPanel you'll need to click the refresh button). Rename the folder to either your VA name or the template name. 3. Modifying the template for phpVMS Once you have your folder created, open it. Inside you should find all the files, including the HTML and CSS files. Find the index.html file and rename it 'layout.tpl'. Once you have your layout.tpl, open it up. Find the line similar to this: <link href="styles.css" rel="stylesheet" media="all" /> This will not work with the skin. You need to change it to this: <link href="<?php echo SITE_URL?>/lib/skins/[YOUR SKIN NAME HERE]/styles.css" rel="stylesheet" media="all" /> Remember that styles.css must be changed to the name of the CSS file in your template. You may also need to enter this full path when linking to images, etc. Between the <title></title> tags, remove the existing text and replace it with this: <?php echo $page_title; ?> Then, on the next line: <?php echo $page_htmlhead; ?> Then skip to the <body> tag. On the line after it, enter this: <?php echo $page_htmlreq; ?> Now, find the <div> section where the page content is. Delete the page content, making sure the </div> remains where it is. Now, between the opening and closing div tags, enter the code: <?php echo $page_content;?> You should now edit the links provided in the template's navigation bar. The links (identified by finding <a></a> tags) will most likely have the href attribute set to '#' (<a href="#">Link text</a>). Change this to the links you want to show. The links to the default phpVMS pages can be found in the core_navigation.tpl file in core/templates. As per the phpVMS licence, you must display this in your footer: <a href="http://www.phpvms.net" target="_blank">powered by phpVMS</a> 4. Activating the new skin Now that you are finished with the coding part, you must now go to your phpVMS Admin Panel. You can access it at www.yoursite.com/admin. In the sidebar, select 'Site & Settings' and then 'General Options'. Select the name that you named the folder you uploaded and renamed earlier. 5. Final steps You're good to go, go check out your new skin by accessing your site. Now you can edit your site by changing the styles in the CSS file and changing the page layout in the layout.tpl. You can edit page content using the files in core/templates. If you don't see your new skin, try clearing the cache in the Maintenance Options. NOTE: Before you begin editing content files, copy the ones you wish to edit from core/templates to your skin folder, that way you have a backup of the original and they won't get overwritten in updates. Hope this helps someone!
-
$flights = ScheduleSearch::getSchedulesByDuration(5, 7); foreach($flights as $flight){ do stuff here... } This is only if you want to specify the min/max. If you want the user to specify it, assign them to the field names in the form.
-
I have tried getting schedules with a min/max flight time but the problem is that you'll need to edit the getSchedules function. Instead I recommend you create a new one. It's best to make a new class for it, create a new file in core/common and call it something along the lines of ScheduleSearch.class.php. This way, when you update, it won't get overwritten. Anyway, you could do this for the flight time: public function getSchedulesByDuration($min, $max){ $sql = "SELECT * FROM ".TABLE_PREFIX."_schedules"; WHERE flighttime >= '".$min."' AND flighttime <= '".$max."'; return DB::get_results($sql); } Obviously you'll need to pass the min and max values in when you use it. As for the day of week: public function getSchedulesByDayofWeek($dayofweek){ $sql = "SELECT * FROM ".TABLE_PREFIX."_schedules"; WHERE daysofweek LIKE '".$dayofweek."'; return DB::get_results($sql); } Remember that the value passed into that one must be a number, you could use a CASE or IF statement to assign each number to a day for the user to enter.