-
Posts
8148 -
Joined
-
Last visited
-
Days Won
39
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Nabeel
-
I only do support on the forum. Which templates have you modified? Can you list them?
-
It's upcoming in the next update, basics are there (check the build-log forum)
-
You need to re-install from scratch, though it looks fine now?
-
Actually, had an idea, why do you need to send a email on your own? Just modify the default email to include that link to your module, which has the link o activate
-
The image size is probably too large, your apache has a setting for maximum file size. I think my limit is 400k or so, because of the memory it uses
-
Sure, first thing, everything is returned as objects from the API, unless there's multiple rows. We can check out GetLastReports() It's plural, so it'll return a list. So we can do (I'm just using 1 to return the reports from user number 1) <?php $lastreport = PIREPData::GetLastReports(1, 1); print_r($lastreport); Which will show this: stdClass Object ( [pirepid] => 65 [pilotid] => 1 [code] => ABC [flightnum] => 38 [depicao] => LFPG [arricao] => KJFK [aircraft] => 4 [flighttime] => 5.3 [distance] => 0 [submitdate] => 2008-12-21 10:04:16 [accepted] => 2 [log] => [load] => 24000 [price] => 5 [flighttype] => C [pilotpay] => 120 ) We can see it says "stdClass Object", so it returned an object So now we can do: <?php echo $lastreport->depicao; /// Will say "LFPG" ?> Now let's return the last 2 reports.. <?php $lastreport = PIREPData::GetLastReports(1, 2); print_r($lastreport); Which will echo out: Array ( [list][*] => stdClass Object[/list] ( [pirepid] => 65 [pilotid] => 1 [code] => ABC [flightnum] => 38 [depicao] => LFPG [arricao] => KJFK [aircraft] => 4 [flighttime] => 5.3 [distance] => 0 [submitdate] => 2008-12-21 10:04:16 [accepted] => 2 [log] => [load] => 24000 [price] => 5 [flighttype] => C [pilotpay] => 120 ) [1] => stdClass Object ( [pirepid] => 61 [pilotid] => 1 [code] => ABC [flightnum] => 4004 [depicao] => KORD [arricao] => KDTW [aircraft] => 2 [flighttime] => 5.3 [distance] => 0 [submitdate] => 2008-11-30 20:25:35 [accepted] => 1 [log] => [load] => 77 [price] => 140 [flighttype] => P [pilotpay] => 120 ) ) This one says "Array", and there's results in => ..., and [1] => ..., meaning the first value (0) has the first report, then the second (1) has the second report. Numbering starts from 0 Now do mess with this we do: <?php // This will loop through each one, and assign each report, one // at a time, to $report foreach($lastreport as $report) { // Now we use $report as a normal object echo $report->depicao .'<br />'; } Which will output: LFPG KORD All the API functions operate this way Hopefully that helps!
-
You can query the ACARSData module, there's a function, It'll return an array with all the current flights, and you can parse it however you like
-
Yeah, it'll send two, but that's ok for now. I'll add in an option for the next version
-
If you've registered on there, you'll need to do "forgot password" in order to get your login back. After doing that, edit the airlines you've added, to generate the 'slug' which is needed. This is an entirely new codebase, so hopefully should be much faster, and progress should go along pretty quickly. There will also be a few vaC client updates in the next few phpVMS versions. I'll add a thread into here when that's available. Thanks!!
-
What's the size of the one you're using now? Might have to replace that code with something else I've been using
-
It's not $pilotid, it's $userinfo->pilotid
-
The JS file changes at times. What I do is create a setting in the log file, then set that in the core_htmlhead.tpl, so it's available. What other mods did you make?
-
Ok great, just keep in mind to change that in future updates! I'm gonna look through it and see what I can do to remedy that
-
^ Haha! Which file are you guys working in?
-
No prob! If you use that API hook, you'll have the pilot's info who just registered. If you look at this post: http://forum.phpvms.net/index.php?topic=272.msg3972#msg3972 <?php public function EventListener($eventinfo) { if($eventinfo[0] == 'registration_complete') { $userinfo = $eventinfo[2]; $fname = $userinfo['firstname']; $lname = $userinfo['lastname']; $pass = $userinfo['password1']; $email = $userinfo['email']; $code = $userinfo['code']; // THent heir ID $pilotdata = GetPilotByEmail ( $email); echo $pilotdata->pilotid ?> That's all the information of the pilot who just registered
-
Aha, got it. For some reason, you were including jquery 1.2.6, which was conflicting with the version of jquery i packed (1.3.2). I commented out the line in your header.tpl. Seems OK now
-
This one's got me completely puzzled, I'm in your FTP now so a heads up if things change under you...
-
Good catch... What that'll do is zoom it in just enough to cover both the arrival and departure airports. You can remove that line and use only the center, and then manually center it where you want (I think there's a config option). Which file are you looking at? The acarsmap.js? Or is it the routemap.tpl?
-
Is error reporting on? What's your error level in the local.config? Try using just E_ALL then uploading an image, might give a clue
-
I'll integrate this into the main source tree, thanks!
-
Hey, Don't modify code directly for this, you can use the post_registration hook. http://docs.phpvms.net/development/02_events_list#registration_complete Scroll up on that page to see what to put in your module That way, you don't need to touch the registration module code If you look at the thread for the smf/phpbb integration, it's the same thing And don't use SQL directly, there's a API function to do that - check my signature. Good job though! Doh! Just saw you were editing the API function. You can add a function in your module called "EmailConfirmation" or something, and call your customized email thing there. Makes it a bit cleaner for everyone, and updates don't wipe anything out
-
What values did you try for the level? The numbers work backwards almost, like a 19 is really zoomed out. Adding a config value directly won't do anything since it's not parsed by JS.
-
You can PM them but I might not get to it for a few days... well , maybe tomorrow
-
That's by design for now