-
Posts
35 -
Joined
-
Last visited
Recent Profile Visitors
4097 profile views
warpennys's Achievements
Newbie (1/14)
11
Reputation
-
Some are changed at lib/js/phpvms.js and some are changed on the acarsmap.js in same directory, AND some are changed on the acarsmap.tpl or php. That covers all icons for the map.
-
This is the way you test a variable: Activate the variable on the page where you need to use it from another module: <?php echo $leg = SchedulesData::getScheduleByFlight($flightAirlineCode, $flightAirlineCode2 ); ?> ($leg can be anything you want it to be, just used as an example.) Then put this at the bottom of the page and you will see the coded calls to use with $leg: <h3><?php echo var_dump($leg);?></h3> Once all the variables apear you would use it like this: <?php echo $leg->distremaining; ?> (any of the variables you want to use.) The code to show the pilots rank image is -- <?php $pilot = PilotData::getPilotData($flight->pilotid); ?> <img src="<?php echo $pilot->rankimage?>" style="height: 20px;" title="<?php echo $pilot->rank;?>"alt="<?php echo $pilot->rank;?>" />
-
PILOTS ONLINE and STAFF ONLINE with avatar, country, and link to profile It was late, so the only thing to add in this code is to have the counts show '0' when there are no pilots to count for staff and pilots online. Know that an admin must have access to your admin panel in order to be included in the Staff Online side of the table. Also, the pic below is not accurate, but only the first attempt. The code posted has been fixed to show staff only on the left and pilots only on the right. Also, the only problem with the code is the counts. Guests are counted correctly, however when a pilot or staff member is online with kacars and flying a flight, they are counted again, so when it says there's 2 there is actually only 1. If anyone can find a fix or knows of a fix, this code would be 100%. Thank You. <table class="(to your favorite table style in your css)" border="0" align="center" width="100%" height="300"> <th colspan="1" align="center" class="(to your favorite th style in your css)">Pilots Online</th> <tr> <td> <table align="center" width="100%" style="text-align:center; background-color: #F1AD43; font-weight: bold; color: #000000; height: 10px;"> <tr> <td>STAFF ONLINE</td> <td>PILOTS ONLINE</td> </tr> </table> <table border="0" align="center" width="100%" height="150"> <tr> <!-- ==================================================VVVV STAFF ONLINE VVVV============================================== --> <td align="left" width="50%" style="padding-left: 100px;"> <div style="overflow-y: auto; overflow-x: hidden; height: 150px; background: transparent;"> <?php $shown = array(); $staff = StatsData::UsersOnline(); foreach($staff as $pilot) { if(PilotGroups::group_has_perm(PilotGroups::getUserGroups($pilot->pilotid), ACCESS_ADMIN) == true) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; ?> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>" title="Visit Pilots Profile"><img style="padding-bottom: 2px; border: 1px; border-radius: 4px;" align="center" height="28px" width="28px" src="<?php echo PilotData::getPilotAvatar($pilot->pilotid);?>"/> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" title="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' - ' .$pilot->firstname . ' ' . $pilot->lastname?> </a><br /> <?php } } if(count($shown) < 1){ echo '<br /><br /><br /><h3><font color="#ff0000"><p style="padding-left: 50px;">No Staff Online</p></font></h3>'; } ?> </div> </td> <!-- ==================================================VVVV PILOTS ONLINE VVVV============================================== --> <td align="left" width="50%" style="padding-left: 100px;"> <div style="overflow-y: auto; overflow-x: hidden; height: 150px; background: transparent;"> <?php $shown = array(); $usersonline = StatsData::UsersOnline(); foreach($usersonline as $pilot) { if(PilotGroups::group_has_perm(PilotGroups::getUserGroups($pilot->pilotid), ACCESS_ADMIN) == false) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; ?> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>" title="Visit Pilots Profile"><img style="padding-bottom: 2px; border: 1px; border-radius: 4px;" align="center" height="28px" width="28px" src="<?php echo PilotData::getPilotAvatar($pilot->pilotid);?>"/> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" title="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' - ' .$pilot->firstname . ' ' . $pilot->lastname?> </a><br /> <?php } } if(count($shown) < 1){ echo '<br /><br /><br /><h3><font color="#ff0000"><p style="padding-left: 50px;">No Pilots Online</p></font></h3>'; } ?> </div> </td> </tr> </table> </td> </tr> <tr> <td> <hr /> <?php $userCount = 0; $staffCount = 0; $guestsonline = count(StatsData::GuestsOnline()); $pilots = StatsData::UsersOnline(); foreach($pilots as $staff){ if(PilotGroups::group_has_perm(PilotGroups::getUserGroups($staff->pilotid), ACCESS_ADMIN) == true) { $staffCount++; }else{ $userCount++; } } ?> <p align="center"> <b> <font color="#F1AD43">Staff Online:</font> <font color="#00FF00"><?php echo $staffCount; ?></font> <font color="#F1AD43">Pilots Online:</font> <font color="#00FF00"><?php echo $userCount; ?></font> <font color="#F1AD43">Guests Online:</font> <font color="#00FF00"><?php echo $guestsonline; ?></font> </b> </p> <br /> </td> </tr> </table>
-
I was thinking it was linux
-
PILOTS ONLINE and STAFF ONLINE with avatar, country, and link to profile It was late, so the only thing to add in this code is to have the counts show '0' when there are no pilots to count for staff and pilots online. Know that an admin must have access to your admin panel in order to be included in the Staff Online side of the table. Also, the pic below is not accurate, but only the first attempt. The code posted has been fixed to show staff only on the left and pilots only on the right. Also, the only problem with the code is the counts. Guests are counted correctly, however when a pilot or staff member is online with kacars and flying a flight, they are counted again, so when it says there's 2 there is actually only 1. If anyone can find a fix or knows of a fix, this code would be 100%. Thank You. <table class="(to your favorite table style in your css)" border="0" align="center" width="100%" height="300"> <th colspan="1" align="center" class="(to your favorite th style in your css)">Pilots Online</th> <tr> <td> <table align="center" width="100%" style="text-align:center; background-color: #F1AD43; font-weight: bold; color: #000000; height: 10px;"> <tr> <td>STAFF ONLINE</td> <td>PILOTS ONLINE</td> </tr> </table> <table border="0" align="center" width="100%" height="150"> <tr> <!-- ==================================================VVVV STAFF ONLINE VVVV============================================== --> <td align="left" width="50%" style="padding-left: 100px;"> <div style="overflow-y: auto; overflow-x: hidden; height: 150px; background: transparent;"> <?php $shown = array(); $staff = StatsData::UsersOnline(); foreach($staff as $pilot) { if(PilotGroups::group_has_perm(PilotGroups::getUserGroups($pilot->pilotid), ACCESS_ADMIN) == true) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; ?> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>" title="Visit Pilots Profile"><img style="padding-bottom: 2px; border: 1px; border-radius: 4px;" align="center" height="28px" width="28px" src="<?php echo PilotData::getPilotAvatar($pilot->pilotid);?>"/> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" title="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' - ' .$pilot->firstname . ' ' . $pilot->lastname?> </a><br /> <?php } } if(count($shown) < 1){ echo '<br /><br /><br /><h3><font color="#ff0000"><p style="padding-left: 50px;">No Staff Online</p></font></h3>'; } ?> </div> </td> <!-- ==================================================VVVV PILOTS ONLINE VVVV============================================== --> <td align="left" width="50%" style="padding-left: 100px;"> <div style="overflow-y: auto; overflow-x: hidden; height: 150px; background: transparent;"> <?php $shown = array(); $usersonline = StatsData::UsersOnline(); foreach($usersonline as $pilot) { if(PilotGroups::group_has_perm(PilotGroups::getUserGroups($pilot->pilotid), ACCESS_ADMIN) == false) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; ?> <a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>" title="Visit Pilots Profile"><img style="padding-bottom: 2px; border: 1px; border-radius: 4px;" align="center" height="28px" width="28px" src="<?php echo PilotData::getPilotAvatar($pilot->pilotid);?>"/> <img src="<?php echo Countries::getCountryImage($pilot->location);?>" alt="<?php echo Countries::getCountryName($pilot->location);?>" title="<?php echo Countries::getCountryName($pilot->location);?>" /> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid). ' - ' .$pilot->firstname . ' ' . $pilot->lastname?> </a><br /> <?php } } if(count($shown) < 1){ echo '<br /><br /><br /><h3><font color="#ff0000"><p style="padding-left: 50px;">No Pilots Online</p></font></h3>'; } ?> </div> </td> </tr> </table> </td> </tr> <tr> <td> <hr /> <?php $userCount = 0; $staffCount = 0; $guestsonline = count(StatsData::GuestsOnline()); $pilots = StatsData::UsersOnline(); foreach($pilots as $staff){ if(PilotGroups::group_has_perm(PilotGroups::getUserGroups($staff->pilotid), ACCESS_ADMIN) == true) { $staffCount++; }else{ $userCount++; } } ?> <p align="center"> <b> <font color="#F1AD43">Staff Online:</font> <font color="#00FF00"><?php echo $staffCount; ?></font> <font color="#F1AD43">Pilots Online:</font> <font color="#00FF00"><?php echo $userCount; ?></font> <font color="#F1AD43">Guests Online:</font> <font color="#00FF00"><?php echo $guestsonline; ?></font> </b> </p> <br /> </td> </tr> </table>
-
The source code can be found Here @ Github in the Files Changed Tab. If you are willing to assemble it and begin using it. You will need to copy the code from those pages referring to contacts. The file structure is as follows: core/common/ContactsData.class.php core/modules/Contacts/Contacts.php core/templates/contacts/contacts_home.tpl core/templates/contacts/view_contact.tpl You can get the info for the sql tables from Github. Before you can use this AirMail addition you must update AirMail 3.0 with the newest changes by Oxymoron. (information for that is here.) Keep in mind that we are constantly updating this new addon for AirMail. There will be more updates to it to include features like a mini buddy list you can put on the pilot pub profile and pull counts of how many contacts you have and blocked contacts you have. Also, there are option buttons that can be used on the pilot pub profile, like message, block, unblock. They are complete, but have not been posted yet. When Oxy has time they will be added to the source code. The links to create the buttons are as follows: site_url/contacts - view contacts site_url/contacts/blocked - blocked contacts site_url/contacts/add/PILOTID - add a contact site_url/contacts/remove/PILOTID - remove a contact site_url/contacts/block/PILOTID Fix the links to work with your site; <?php $contact = ContactsData::getContact($pilot->pilotid, Auth::$userinfo->pilotid); if($contact->blocked == 'Y'){ echo '<a href="'.SITE_URL.'/index.php/contacts/unblock/'.$pilot->pilotid.'">'; echo '<img height="30" src="'.SITE_URL.'/lib/skins/yoursite/images/pilot_pub_profile/unblock_pilot.png" title="Unblock Pilot" alt="Unblock Pilot" border="0" />'; echo '</a>'; }else{ if($contact == null){ echo '<a href="'.SITE_URL.'/index.php/contacts/add/'.$pilot->pilotid.'">'; echo '<img height="30" src="'.SITE_URL.'/lib/skins/yoursite/images/pilot_pub_profile/add_pilot.png" title="Add Pilot To Your Contacts" alt="Add Pilot" border="0" />'; echo '</a>'; echo '<a href="'.SITE_URL.'/index.php/contacts/block/'.$pilot->pilotid.'">'; echo '<img height="30" src="'.SITE_URL.'/lib/skins/yoursite/images/pilot_pub_profile/block_pilot.png" title="Block Pilot" alt="Block Pilot" border="0" />'; echo '</a>'; }else{ if($contact->blocked == 'N'){ echo '<a href="'.SITE_URL.'/index.php/contacts/remove/'.$pilot->pilotid.'">'; echo '<img height="30" src="'.SITE_URL.'/lib/skins/yoursite/images/pilot_pub_profile/remove_pilot.png" title="Remove Pilot From Your Contacts" alt="Remove Pilot as Contact" border="0" />'; echo '</a>'; } } } ?>
-
Yes, it will be packaged and be maid available as an addon as soon as Oxy has the time. For now, however the source code can be found Here @ Github in the Files Changed Tab. If you are willing to assemble it and begin using it. You will need to copy the code from those pages referring to contacts. The file structure is as follows: core/common/ContactsData.class.php core/modules/Contacts/Contacts.php core/templates/contacts/contacts_home.tpl core/templates/contacts/view_contact.tpl Before you can use this AirMail addition you must update AirMail 3.0 with the newest changes by Oxymoron. (information for that is here.) Keep in mind that we are constantly updating this new addon for AirMail. There will be more updates to it to include features like a mini buddy list you can put on the pilot pub profile and pull counts of how many contacts you have and blocked contacts you have. They are complete, but have not been posted yet. When Oxy has time they will be added to the source code.
-
Wunderful! Who wooda thunk it?! Good Job, Oxy!
-
A little Update: The Address Book is available, thanks to Oxymoron. This is a really neat add-on module to work with Simpilots' AirMail 3.0. It's a separate module, because it can work with AirMail or without, provided the links to message a pilot are removed. This module is essentially a Buddy List. A link to add a pilot can be put in the Pilot's Roster, or on the public profile. Or even be called to show on the pilot center. If you are real familiar with PHPVMS you will see all the possibility's. This module is in current development for more features, however the working source code is available now; Look Here
-
Not that hard. Update everything except the templates, and then compare the new ones adding and replacing the code where it needs to be in your design.
-
Oh, wasn't even worried. But you get better, soon. Lots of rest, Sir. So far, not too many complaints. Oxy's pretty busy with his work, so it will be a bit before the next updates.
-
I'm not sure where you are referring to seeing that code. and are you talking about the messages in your inbox? If you've removed your sql tables before updating to the new sql tables the messages would be deleted as well because they are stored in my sql. I'm not sure what you did since you are telling me you are still using 2.0. If you are using Airmail 2.0, I recommend updating to 3.0 completely and re skinning the modules templates to fit your needs. A clean update. The updates talked about here are for 3.0 and not 2.0. Alot of the files have basically been rewritten since 2.0, so if you update just parts, you will miss something and essentially break functionality in the module. |Code On Github|
-
Thank You, Simpilot. And Thank You for an awesome module.
-
Be sure you have all the parts and they are installed in the right directory. The Templates/Mail folder can be moved or copied to your skins directory for editing or skinning. The file the code there refers to is the mail/mail_message.tpl. If you do not have it or it is in the wrong place, then you will get that error. If you modified the mail_message.tpl incorrectly, that will cause the same result. Hope this helps.
-
If the AIRMail module is updated properly, there shouldn't be a problem. If it is then you are having a problem caused by some other reason. ('.$subject.') on line 143 of the mail.php file in the modules/mail directory refers to a public static function written in the MailDataClass.php on line 83. Let me know if you have both of those files written and if you are still having the same problem. In Reference to the NOTAM Problem, on line 142 and 155 of the Mail.php file in the modules/mail directory " $sub = 'You have reveived a new message at '.SITE_NAME; is written to say its from your site. This only works if you have phpvms set up correctly and if you do then something else is causing your site name not to show up. That code if you have it correctly should pull it. The site name is set by going to your PHPVMS Admin Panel, then to Site and Settings, then General Settings... You should see it there. `OR` You can simply delete '.SITE_NAME and write in your site name and it will still work the same. Or, you can try replacing it with '.SITE_URL , or even typing out your url, being sure to use http// . The site url is set in the same place. On line 142,143, 155, and 156 you can edit them to say whatever you want. They are your email template area. Earlier I posted This