Jump to content

Oxymoron290

Members
  • Posts

    23
  • Joined

  • Last visited

1 Follower

Recent Profile Visitors

3295 profile views

Oxymoron290's Achievements

Newbie

Newbie (1/14)

17

Reputation

  1. Hey guys! Remember SimPilotGroup's Airmail Module available at https://github.com/D.../phpVMS-AirMail ? I've been doing a few additions to the module lately, specifically those we have set up as our milestones. (Viewable at https://github.com/D...sues/milestones ) With the most recent one being a contacts addition (Pull Request #6 https://github.com/D...-AirMail/pull/6 ) Here is a video demonstrating the new additions: This is already in production over at Wings on Air http://wingsonair.net ! Stay tuned for more updates to this module soon! A ton of thanks to SimPilotGroup for creating the original airmail module and making this neat little addition possible. Enjoy, Oxymoron290 Temprary Content: While we are waiting for SimPilot to evaluate and accept the pull request the download will not be available at his github, to get it while it's hot, download the source at https://github.com/O...l/tree/contacts (Because we all have a little hipster in us saying "I had an address book before it was even in the airmail module")
  2. https://github.com/D...-AirMail/pull/4 pull request submitted.
  3. a better solution coming up in the next release: http://forum.phpvms.net/topic/8375-installation-errors/
  4. Hey Vansers! I know we already discussed this issue on github, So I'm posting a link to the issue submitted to keep any researchers informed! https://github.com/n...pVMS/issues/102 For this one, refer to https://github.com/n...hpVMS/issues/77 This one I neglected to commit. after line 60, add the following: self::$request = new stdClass(); Edit: Sorry, I didn't forget to commit this, It's available at https://github.com/nshahzad/phpVMS/commit/96bee1315c14d1a576e80090ef66909fde3fa34f Good luck!
  5. I have a fix for the issues you guys are reporting, I also have some new features. Just waiting on david to create a development branch before submitting the pull request.
  6. I shall require 78 Smirnoffs, 12 rubber bands, 117 pop-sickle sticks, a bottle of pepto bismol and a bottle of elmers glue. I will PM you with the address where you can ship the supplies. Haha, just kidding. here is how I decided to implement that function: I placed the above function in ./core/common/MaintenanceData.class.php ​Now for the following bit you will have to forgive me as I have modded our installation of phpVMS tremendously and can't remember exactally what is in the default package. In ./core/common/PilotData.class.php around line 291 I put the following code (Keep in mind I have edited this file alot in my installation and might be on a different line for you. The function is changePilotID($old_pilotid, $new_pilotid) and it should go 3 lines after the $pilot_exists line) [/size] [size=4] $avatarFix = MaintenanceData::fixAvatar($old_pilotid, $new_pilotid); if($avatarFix !== true){ return $avatarFix; } Now for your convenience I will provide you with the full function that we are currently using on WOAVA, however, I would recommend AGAINST copying and using the code as I have made some security patches to the phpVMS Pilot Groups and this exact code wont work with the current release. (However, it might with the dev release! =] available here: https://github.com/n...archive/dev.zip ) [/size] [size=4]/** * PilotData::changePilotID() * * @param mixed $old_pilotid * @param mixed $new_pilotid * @return */ public static function changePilotID($old_pilotid, $new_pilotid) { if(!PilotGroups::group_has_perm(Auth::$usergroups, EDIT_PILOTS)) { Debug::showCritical('Unauthorized access - You do not have permissions to edit pilots'); die(); } $pilot_exists = self::getPilotData($new_pilotid); if (is_object($pilot_exists)) { return false; }[/size] [size=4] $avatarFix = MaintenanceData::fixAvatar($old_pilotid, $new_pilotid); if($avatarFix !== true){ return $avatarFix; } DB::query('SET foreign_key_checks = 0;'); // List of all the tables which need to update $table_list = array( 'groupmembers', 'pilots', 'adminlog', 'awardsgranted', 'acarsdata', 'sessions', 'pireps', 'pirepcomments', 'fieldvalues', 'bids');[/size] [size=4] foreach ($table_list as $table) { $sql = 'UPDATE `' . TABLE_PREFIX . $table . '` SET `pilotid`=' . $new_pilotid . ' WHERE `pilotid`=' . $old_pilotid; DB::query($sql); } return true; }[/size] [size=4]
  7. poor guy are you still wanting this buddy? What version of phpVMS do you want it on?
  8. This depends on several things and mainly by your network layout. For example, Lets say your Internet service provider has supplied you with a router or modem, this is their demarcation point. And let's say this modem only has one ethernet port, so in order for you to have multiple computers connected to the internet you install your own router, as most people do. You now have 3 firewalls in your network. The one on your modem, the one on your router, and the one built into your windows system. Here is what I would recommend you do. Identify your ISP's demarcation point and find out if it has a firewall, if it does, forward port 80 to the next "node", or next device, in your network. (moving towards your XAMPP web server) If you have a secondary router or device which is equipped with a firewall forward port 80 on it aswell to the next node on your network which by now should be your PC if it hasn't been hit yet. Once you have port 80 forwarded to your PC, verify the windows firewall isn't blocking it. The best way to know if your computer is configured properly as a web server is to try and access the webserver on that PC from an alternate PC on your network, such as your "work pc" as you discribed it above. You can also use http://www.yougetsignal.com/tools/open-ports/ as a tool to check if your successful. As a last resort, feel free to message me personally and I will be more than happy to assist you with this. Keep in mind however that worst case scenario your ISP may block you from hosting a web server, as any residential ISP would recommend you against doing. They also will provide absolutely no help in this situation. Good Luck! And happy hosting =)
  9. Give a man a fish, he eats for a day...
  10. Oxymoron290

    error

    That's a bit harsh and against the values of the open source community Although the license allows for such bigotry development, One shouldn't hinder the ability for another to approve and contribute upon the project. Especially when just asking for help.
  11. you alternatively want to do this: if($oldFile['filename'] != $pilotcode){ LogData::addLog(Auth::$userinfo->pilotid, "[Avatar HotFix]The file ".$newAvatar." was renamed to ".$pilotcode.'.'.$oldFile['extension']); $reply = @rename($directory.DS.$newAvatar, $directory.DS.$pilotcode.'.'.$oldFile['extension']); if (Config::Get('SIGNATURE_SHOW_AVATAR_IMAGE') == true) { LogData::addLog(Auth::$userinfo->pilotid, "[Avatar HotFix]Regernated signature for ".$pilotcode); PilotData::GenerateSignature($pilot->pilotid); } return $reply; }else{ return true; }
  12. I havn't used FSPAX, however it determines the users online status by the ACARS module, which i would assume, fspax ties into, as would any acars system.
  13. and a bottle of Elmer's glue. forgot to add that in there...
  14. Below is a function which will take any givin pilot and find the appropriate avatar for him and re-associate the avatar with the pilot after said pilot has been moved to another airline, or had their ID changed. ​it also deletes any unnecessary avatars. public static function fixAvatar($pilotid){ // Get the pilots Information. $pilotid = (int)$pilotid; $sql = "SELECT * FROM `".TABLE_PREFIX."pilots` WHERE `pilotid`=$pilotid"; $pilot = DB::get_row($sql); unset($pilotid); $err = DB::errno(); if($err != 0){ return false; } // Setting up the check (with regex) for an avatar with the pilots current ID. $pilotcode = PilotData::getPilotCode($pilot->code, $pilot->pilotid); $pilotid = preg_replace("/[^0-9]/", "", $pilotcode ); if(substr(SITE_ROOT, -1) == DS){ $rootDir = substr_replace(SITE_ROOT, "", -1); }else{ $rootDir = SITE_ROOT; } $directory = $rootDir.AVATAR_PATH; if (!is_dir($directory)) { return false; } $files = array(); if($handel = opendir($directory)){ // Go through each avatar and find any that match the pilots. while (false !== ($file = readdir($handel))){ if ('.' === $file) continue; if ('..' === $file) continue; if(preg_replace("/[^0-9]/", "", $file ) == $pilotid){ $files[] = $file; } } closedir($handel); if(count($files) == 0){ return true; // No files to update, exit successful. }else{ // if there is more than one avatars for the pilot find the newest one. if(count($files) > 1){ $newer = 0; foreach($files as $file){ $tmp = @filemtime($directory.DS.$file); if($tmp == NULL) $tmp = @filemtime(utf8_decode($directory.DS.$file)); if($tmp == null) // if your function is exiting here, try CHMODing your avatars directory. return false; if($tmp > $newer){ $newer = $tmp; $newAvatar = $file; } } // we will need to loop through these again and delete all matching $files that don't match $newAvatar. foreach($files as $file){ if($file != $newAvatar){ @unlink($directory.DS.$file); // delete the file. if(file_exists($directory.DS.$file)){ LogData::addLog(Auth::$userinfo->pilotid, "There was an error while deleting ".SITE_URL.AVATAR_PATH.$file.". Please delete it manually."); return false; }else{ LogData::addLog(Auth::$userinfo->pilotid, "The file ".SITE_URL.AVATAR_PATH.$file." was deleted successfully."); } } } }else{ $newAvatar = $files[0]; } $oldFile = pathinfo($directory.DS.$newAvatar); if($oldFile['filename'] != $pilotcode){ LogData::addLog(Auth::$userinfo->pilotid, "The file ".$newAvatar." was renamed to ".$pilotcode.'.'.$oldFile['extension']); return @rename($directory.DS.$newAvatar, $directory.DS.$pilotcode.'.'.$oldFile['extension']); }else{ return true; } } } return false; } This is the bare function and depending on where you put it, will be called different from implementation to implementation. For more information, or a pre-build implementation, I shall require 78 Smirnoffs, 12 rubber bands, 117 pop-sickle sticks, and a bottle of pepto bismol. ~wings on air~
×
×
  • Create New...