SMPirepValidator
This module aims to validate if the pilot made his flights online on the IVAO and VATSIM networks
SMPirepValidator v.1.0 for phpVMS (tested under PHP 7.4 and phpVMS v5.5.2.72 by ProAvia https://github.com/ProAviaAZ/phpvms_5.5.2.72)
SmartModules addon module for phpVMS virtual airline system https://smartmodules.com.br
SmartModules addon modules are licenced under the following license: Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
@author Ton Nascoli (SmartModules) @copyright (c) 2021, Ton Nascoli @license http://creativecommons.org/licenses/by-nc-sa/3.0/
Install:
- Download the ZIP file in your computer
- Extract the zip file into a folder of your choice
- Go to the folder where you extracted the files and access the phpvms_content folder
- Upload the ADMIN and CORE folders to your website by placing them in the phpvms root folder
- If asked to replace files, click YES
Install sm_onlinelog.sql
Just import the sm_onlinelog.sql file using your PhpMyAdmin
Create Custom Fields
For SMPirepValidator to work correctly, you´ll have to create custom fields to receive the VID and CID. These fields are not available by default in phpVMS. After creating them, your pilots will be able to access them in their profile.
-
Access the phpVMS administrative panel
-
On the side menu, click on Site & Settings
-
Click on Profile Fields
-
At the top of the side menu, click Add a Custom Field
-
In pop-up window, enter the following values:
Title: Ivao ID
Field Type: Text
Default value: leave blank
Show in User Profile: YES
Show During Registration: YES
Required: {if you answer YES, it will be a required field when pilot registering}
Repeat the procedure in item 5 to include the field that will receive the CID. Just enter in the Title field: Vatsim ID.
Important: Inform Title exactly as described, considering the uppercases and spaces.
CRON JOB
This is the commonly used command line. If in doubt, consult your host provider
/usr/bin/GET https://{your_website}/{your_phpvms_folder}/action.php/SMPirepValidator/run_check
How does work?
After you enable CRON JOB, the module will add all the pilot's flight logs to the sm_onlinelog table. When validating the PIREP, the system will show if the LOG was found and will enable the administrator to see the LOG of the flight performed at IVAO/VATSIM.
ENJOY!!!!
NOTE
-
Tested under PHP 7.4 and phpVMS v5.5.2.72
-
We made a litle bit change to the original code of the pirep_list.php file to allow the IVAO / VATSIM flight log to be presented when validating PIREP. Therefore, it is important that you back up your file. This file is in the admin/templates folder. We have provided a backup of the original file in the bkp_original_file folder.
-
This module is designed to take IVAO and VATSIM logs every 15 minutes and add them to the sm_onlinelog table.