Jump to content

servetas

Moderators
  • Posts

    1726
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by servetas

  1. A lot of systems development has started during the last years in the virtual airline industry. A lot of developers develop their own systems such as the ones you already stated. As of phpVMS, it is currently fully compatible with PHP 5.6 (simpilot's version) and it includes many features such as templates and modules. As you previously stated, it is a CMS which allows you to select templates, install module without a lot of effort. Personally, I have submitted some pull requests to simpilot's phpVMS version correcting or implementing some features. It would be great if a small team of developers can be organized to support the project as it is and try to make it compatible with PHP 7 which is something I will personally try in the next few months. phpVMS is a very powerful CMS and I am pretty sure that there are lot who like it and as Vangelis said, if you know what you are doing, everything is easy.
  2. Yes, with the "two items" I mean that in the same file there are two items which need to be updated accordingly. Something can be found twice in the document and of course any update has to be made twice too. Thank you
  3. Thanks Keith for your reply. Is there anyone else who has implemented it into his/her phpVMS? It would be nice to see if everything is ok. Then I will be sure to push a pull request on github
  4. By default, the custom profile fields in phpVMS can't be set as required and most of us have issues when it comes to IVAO or VATSIM ids etc. Today, I decided to implement that feature. The changes can be found here. Let me list them here too: 1) On your database, go to your "TABLE_PREFIX"_customfields table and add a new column with the following details: `required` smallint(6) NOT NULL DEFAULT '0' 2) On your core/templates/registration_customfields.php (or the custom one if you are using a custom template) find this: <dt><?php echo $field->title; ?></dt> and replace with this: <dt><?php echo $field->title; ?><?php if($field->required == 1) echo ' *'; ?></dt> find this: else { ?> <input type="text" name="<?php echo $field->fieldname; ?>" value="<?php echo Vars::POST($field->fieldname);?>" /></dd> <?php } } } ?> and replace with this: else { ?> <input type="text" name="<?php echo $field->fieldname; ?>" value="<?php echo Vars::POST($field->fieldname);?>" /> <?php } ?> <?php if(${"custom_".$field->fieldname."_error"} == true) { echo '<p class="error">Please enter your '.$field->title.'.</p>'; } ?></dd> <?php } } ?> 3) On your admin/modules/PilotAdmin/PilotAdmin.php find this: case 'saveprofile': if ($this->post->firstname == '' || $this->post->lastname == '') { $this->set('message', 'The first or lastname cannot be blank!'); $this->render('core_error.php'); return; } and this after that: $fields = RegistrationData::getCustomFields(); if(count($fields) > 0) { foreach ($fields as $field) { $value = Vars::POST($field->fieldname); $value1 = DB::escape($value); if ($field->required == 1 && $value1 == '') { $this->set('message', ''.$field->title.' cannot be blank!'); $this->render('core_error.php'); return; } } } 4) On your admin/modules/Settings/Settings.php find this (there should be two items): 'showinregistration'=>$this->post->showinregistration, and replace it with this: 'showinregistration'=>$this->post->showinregistration, 'required'=>$this->post->required find this (there should be two items too): if($data['showinregistration'] == 'yes') $data['showinregistration'] = true; else $data['showinregistration'] = false; and add this after that: if($data['required'] == 'yes') $data['required'] = true; else $data['required'] = false; 5) On your admin/templates/settings_addcustomfield.php find this: <dt>Show During Registration</dt> <dd> <select name="showinregistration"> <option value="yes" <?php if($field->showonregister == 1) echo 'selected'; ?>>Yes</option> <option value="no" <?php if($field->showonregister == 0) echo 'selected'; ?>>No</option> </select> </dd> and add this after that: <dt>Required</dt> <dd> <select name="required"> <option value="yes" <?php if($field->required == 1) echo 'selected'; ?>>Yes</option> <option value="no" <?php if($field->required == 0) echo 'selected'; ?>>No</option> </select> </dd> 6) On your admin/templates/settings_customfieldsform.php find this: <th>Default Value</th> and add this after it: <th>Required</th> then find this: <td align="center"><?php echo $field->value;?></td> and add this after that: <td align="center"><?php if($field->required == 1) {echo 'YES';} else {echo 'NO';} ?></td> 7) On your core/common/SettingsData.class.php find this (there should be two items): if ($data['showinregistration'] == true) $data['showinregistration'] = 1; else $data['showinregistration'] = 0; and after that place this: if ($data['required'] == true) $data['required'] = 1; else $data['required'] = 0; Then find this: $sql = "INSERT INTO " . TABLE_PREFIX . "customfields (title, fieldname, value, type, public, showonregister) VALUES ('{$data['title']}', '$fieldname', '{$data['value']}', '{$data['type']}', {$data['public']}, {$data['showinregistration']})"; and replace it with this: $sql = "INSERT INTO " . TABLE_PREFIX . "customfields (title, fieldname, value, type, public, showonregister, required) VALUES ('{$data['title']}', '$fieldname', '{$data['value']}', '{$data['type']}', {$data['public']}, {$data['showinregistration']}, {$data['required']})"; Then find this: $sql = "UPDATE " . TABLE_PREFIX . "customfields SET title='{$data['title']}', fieldname='{$fieldname}', value='{$data['value']}', type='{$data['type']}', public={$data['public']}, showonregister={$data['showinregistration']} WHERE fieldid={$data['fieldid']}"; and replace it with this: $sql = "UPDATE " . TABLE_PREFIX . "customfields SET title='{$data['title']}', fieldname='{$fieldname}', value='{$data['value']}', type='{$data['type']}', public={$data['public']}, showonregister={$data['showinregistration']}, required={$data['required']} WHERE fieldid={$data['fieldid']}"; 8) On your core/modules/Profile/Profile.php find this: if($this->post->email == '') { return; } and replace it with this: if($this->post->email == '') { $this->set('message', 'The email address cannot be blank.'); $this->render('core_error.php'); return; } $fields = RegistrationData::getCustomFields(); if(count($fields) > 0) { foreach ($fields as $field) { $value = Vars::POST($field->fieldname); $value1 = DB::escape($value); if ($field->required == 1 && $value1 == '') { $this->set('message', ''.$field->title.' cannot be blank!'); $this->render('core_error.php'); return; } } } 9) On your core/modules/Registration/Registration.php find this: // Check is passwords are the same if($this->post->password1 != $this->post->password2) { $error = true; $this->set('password_error', 'The passwords do not match!'); } else { $this->set('password_error', ''); } and add the following after that: //Get customs fields $fields = RegistrationData::getCustomFields(); if(count($fields) > 0) { foreach ($fields as $field) { $value = Vars::POST($field->fieldname); $value1 = DB::escape($value); if ($field->required == 1 && $value1 == '') { $error = true; $this->set('custom_'.$field->fieldname.'_error', true); } else { $this->set('custom_'.$field->fieldname.'_error', ''); } } } I hope that the changes are correct and I have not forgot anything. I have tested it on my localhost server but if any of you is interested to check that too, please let me know in case you spot any issue. I am going to submit a pull request to phpVMS 5.5.2 by David as soon as you confirm that it works ok. I will be happy to answer any of your questions. George PS: I would suggest to make the changes only if you have some basic knowledge about coding in order to avoid messing up things. And, as always, BACKUP.
  5. Come on guys... Most of the phpVMS functions and free stuff you are currently using have been developed by simpilot. He has devoted a lot of time in it and the least we can do is respect that.. As far as I know, he has some personal problems he tries to overcome and let's hope that everything is fine. In case you have any issue you can PM me and I will do my best to assist you FREE of charge as far as the request has to do with any error/issue the system has. That's the least I can do to show my respect to him and what he has offered to the community during the last years without taking anything back in return. I will be waiting... @clawsonsa I am not talking to you personally. I mean I am referring to all who are currently waiting for an answer. It seems that for some reason, David can't handle the support tickets and we have to respect it and at least try to do our best to assist those who have any issues with the modules they have purchased.
  6. Can you let me know examples of airports that have not been imported? How do you manually add the airports? Aren't they shown up on your Airline Operations->Add & Edit Airports list?
  7. Which phpVMS version are you using? I remember that the hours are not deducted from the pilot's profile if you have previously accepted the pirep and then rejected it. Do you reject the pirep and the hours get added to the pilot profile?
  8. How did you uploaded your airports? Which sql did you use?
  9. Have you set a valid email adress in the settings of your phpVMS system? Have you set the smtp details in your local.config.php?
  10. This is an english speaking forum. Use english instead.
  11. You will have to place the snippet below before the closing </head> tag on your template: <script src='https://www.google.com/recaptcha/api.js'></script>
  12. I mean that in case David does not answer, you can let us know in case we can assist you but this should be done through PM or email and not in public.
  13. Check this: http://forum.phpvms.net/topic/19993-navdata-update/page__st__20#entry117743
  14. The bids shown in the acars system are based on the schedules you have bidded from your website. Get into your phpVMS schedules and you will see an Add to Bid link for each schedule.
  15. What email have you set in your phpVMS settings?
  16. This does not seem logical. Are you able to file reports through your phpVMS? I would suggest try reinstalling phpVMS.
  17. You are referring to a "sending PIREPs error" without explaining what is the error, how do you send the pireps, which phpVMS version are you using, what is your phpVMS url.... Unfortunately, we can't help if you first don't give us as many information as possible in order to understand what is the problem exactly. That's why your issues are not getting resolved, you are not describing them....
  18. Regarding the airport issue, read that topic, this should solve your issue http://forum.phpvms.net/topic/20668-add-new-airport-error/
  19. From what I see I think that the acars map does not understand airways and it shows the direct line between two points.
  20. http://forum.phpvms.net/topic/22757-vacentral-status-and-updates/#entry120870
  21. Have you added them? Through admin center->airline operations->add & edit airports.
  22. I think that that is based on the coordinates the acars reports. Can the check your "table_prefix"acarsdata database table? What coordinates does it have? Also, does the airway exist? Airways are not straight and the acars map might show the direct line from point A to point B.
×
×
  • Create New...