Jump to content

Recommended Posts

Posted

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?

2. 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.

3. 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

  • Administrators
Posted

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

Posted

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}

  • Administrators
Posted

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

Posted

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?

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...