Enquiries

Hello, three enquiries here:

  1. I was reading about ‘How Addons work’ and I notice you pass variables through GET like this…

    class ModuleTest extends CodonModule
    {
    public function pageone($fruit=‘’, $orange=‘’)
    { …

How would I do the same using POST variables?

  1. Is there a way to disable automatic flight logging? I suppose I could just delete the links to the config files but that’s not all too professional.

  2. Is there a specific set of standars guidelines for phpVMS addon developers? I plan on writing some soon so it’s quite important that I am aware of any regulations.

Thanks!

Kieran

  1. $this->post->fieldname

  2. Just delete the configs, there’s no way to really turn it on or off.

  3. In the docs there’s a section called “conventions” I think. It’s incomplete, but if you’re wondering how to do things you can poke around the default modules too and see how it’s done, there’s nothing crazy in there

Thanks.

Another one as well. Do the news items get instered into an RSS feed by default?

Nope there’s no RSS feed for those

Right Thanks…

I want to run an if/elseif/else statement to test what page somebody is currently on.

The header menu will be highlighted to whatever page somebody is on eg.

Home Contact About Join

Do you have an idea about how to do this?

if (module is contact) {show this menu}

Yeah search for that, it’s $_GET[‘module’]

Thanks for that produced some great design using it.

Does phpVMS have an RSS create and RSS write function?

I’m also having real trouble importing NavDb.sql due to its huge size. What method is best?

I’m also having real trouble importing NavDb.sql due to its huge size. What method is best?

You don’t need to, it automatically will from the API server

Thanks for that produced some great design using it.

Does phpVMS have an RSS create and RSS write function?

Yeah, there’s a class for it, if you poke around in the pirepdata file, there’s a function called generate feed or something, it will show you the basic code on how to

Will do, thanks.

On my google maps, the routes just show a straight red line… should this be showing VORs and intersections etc?

Is there a route attached to it? Even in the table?

Spoke a little too soon - seems to be working now 

Im having a little trouble integrating the auto forum register script.

I’ve made the module ForumRegistration… but what is it you have to do next?

What forum are you using?

phpBB

Oh, OK.  I’m not too sure about that one.  I got the one working for SMF quite easily.

Check out page 3 on the below forum and see if that works for you.

I’ve currently got this script on the go:

<?php

class ForumRegister extends CodonModule

{

public function __construct()

{

CodonEvent::addListener(‘ForumRegister’);

}

public function EventListener($eventinfo)

{

if($eventinfo[0] == ‘registration_complete’)

{

echo ‘Receiving You!’;

$userinfo = $eventinfo[2];

$fname = $userinfo[‘firstname’];

$lname = $userinfo[‘lastname’];

$pass = $userinfo[‘password1’];

$email = $userinfo[‘email’];

$code = $userinfo[‘code’];

$uinfo = PilotData::GetPilotByEmail($userinfo[‘email’]);

$code = PilotData::GetPilotCode($uinfo->code, $uinfo->pilotid);

$pilot_id = $fname. ‘’ .$lname. ‘’ .$code.$pilot_id;

$pilot_id_klein = strtolower($pilot_id);

$passMD5 = md5($pass);

$tm = time();

DB::Query(“INSERT INTO phpbb_users (username, username_clean, user_password, user_email, group_id, user_timezone, user_dst, user_rank, user_lang, user_colour, user_type, user_dateformat, user_style, user_regdate) VALUES ('”.$pilot_id.“', '”.$pilot_id_klein.“', '”.$passMD5.“', '”.$email.“‘, ‘2’,‘0.0’, ‘0’, ‘2’,‘en_us’,‘0099FF’,‘1’,‘1’, jS F Y g:i:s A’, ‘1’, '”.$tm.“')”);

}

}

}

?>

This script shows ‘Receiving You’, but does not insert anything into the database

Has anybody got this working?

You’d have to post on the thread for that

Have done, but that post is doormant