Jump to content

AIRMail Beta 2.1


simpilot

Recommended Posts

I found a decent work around for this for the time being. I simply removed the message part from the heading and dropped the colspan down to make it look right. Then I added in the message part below the rest in standard table cell. Works out quite nice.

Link to comment
Share on other sites

  • Moderators

I found a decent work around for this for the time being. I simply removed the message part from the heading and dropped the colspan down to make it look right. Then I added in the message part below the rest in standard table cell. Works out quite nice.

Care to share the code :)

Link to comment
Share on other sites

Hi Mark. Here is my change. I am sure it is not the cleanest in the world and there is a better way to do it, but this was my quick dirty fix that worked and made the guys happy.

<?php
//simpilotgroup addon module for phpVMS virtual airline system
//
//simpilotgroup addon modules are licenced under the following license:
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full icense text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright (c) 2009-2010, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
?>
<style type="text/css">
   .left {
       width: 200px;
       float: left;
       min-height: 300px;
       padding: 15px 0 15px 5px;
   }
   .right {
       float: left;
       margin-left: 10px;
   }
</style>
<div>
   <?php Template::Show ('mail_menu.tpl'); ?>
</div>
<div>
   <center>
       <table width="100%" cellspacing="1" cellpadding="5" border="1">
           <tr>
               <td colspan="2"><img src="<?php echo SITE_URL?>/mailimages/airmail_logo.png" border="0" alt="AIRMail" /></td>
               <td colspan="3" align="center"><b>AIR</b>mail sent items for <b><?php echo Auth::$userinfo->firstname.' '.Auth::$userinfo->lastname.' '.$pilotcode; ?></b></td>
               <td colspan="1" align="center"><img src="<?php echo SITE_URL?>/mailimages/mail_small.png" border="0" alt="AIRMail" /></td>
           </tr>
           <tr bgcolor="#cccccc">
               <td colspan="7" align="center"><img src="<?php echo SITE_URL?>/mailimages/env_closed.gif" border="0" alt="Unread"> = message unread | <img src="<?php echo SITE_URL?>/mailimages/env_open.gif" border="0" alt="Read">= message read</td>
           </tr>
           <tr bgcolor="#cccccc">
               <td align="center"><b>Status</b></td>
               <td align="center"><b>To</b></td>
               <td align="center"><b>Subject</b></td>
               <td align="center"><b>Date sent</b></td>
               <td align="center"><b>Time sent</b></td>
               <td align="center"><b>Remove From<br />Sent List</b></td>
           </tr>
		<?php
       if(!$mail) {
           echo '<tr><td colspan="7">You have no sent messages.</td></tr>';
       }
       else {
           ?>
   <?php
   foreach($mail as $test) {
                   if ($test->read_state=='0') {
                       $status = 'env_closed.gif ';
                   }
                   else {
                       $status = 'env_open.gif';
                   }
                   ?>
                   <?php $user = PilotData::GetPilotData($test->who_to); $pilot = PilotData::GetPilotCode($user->code, $test->who_to); ?>

           <tr bgcolor="#eeeeee">
               <td align="center"><img src="<?php echo SITE_URL?>/mailimages/<?php echo $status;?>" border="0" /></td>
               <td align="center"><?php
                   if ($test->notam=='1') {
           echo 'NOTAM<br />(All Pilots)';
       }
       else {
           echo $user->firstname.' '.$user->lastname; ?><br /><?php echo $pilot;
                           } ?>
               </td>
               <td align="center"><?php echo $test->subject; ?></td>
               <td align="center"><?php echo $test->date; ?></td>
               <td align="center"><?php echo $test->time; ?></td>
               <td align="center"><a href="<?php echo SITE_URL ?>/index.php/Mail/sent_delete/?mailid=<?php echo $test->id;?>"><img src="<?php echo SITE_URL?>/mailimages\delete.gif" alt="Delete" border="0"/></a></td>
           </tr>
		<tr bordercolor="eeeeee">
		    <td colspan="7"align="center"><?php echo $test->message; ?></td>
		</tr>

   <?php
   }
}
?>	
       </table>
   </center>
       <br />
</div>
<br />
<center><b><font size="1.5px">AIRmail © 2009 <a href="http://www.simpilotgroup.com">simpilotgroup.com</a></font></b></center>
<br />

You will have to fix the opening two div tags if you still use the default menu. I have a custom menu so I got rid of the div classes.

Link to comment
Share on other sites

Cheers Ray working a treat :)

I dont know why i didnt think about adding an extra row, what a plank :lol:

Well, to be honest, I never thought about it either. I was just siting here staring off in to space and I was suddenly like Duhhhhh! Why not add a extra row Ray? Hell it might work....and it did. Like I said, it is a dirty fix, but it works. ;)

Glad it worked out for ya.

Link to comment
Share on other sites

Now I am working on a delete all function for it. I find my self getting carpel tunnel trying to delete a mass amount of mail. I have a ll the tick boxes working and in place and a delete all button, but for some reason I can not get it to delete the mails from the system.

Link to comment
Share on other sites

  • 2 weeks later...

Well after many failed attempts, I am not sure what I was doing wrong. I could get the button to work when I clicked check all, but when I clicked the delete all button, it would never work. If any of you php/sql wizards would like to have a try at it, that would be the cats ass! ;)

Link to comment
Share on other sites

I have put the Delete All option on hold momentarily. The date the mail is sent is showing as yyyy/mm/dd in the Inbox. I found this in the inbox.tpl file

<?php echo $data->date; ?>

Is that server date? And if so how can I make the airmail show as mm/dd/yyyy instead?

I tried to grab some code from the forum addon and make it work but it was a slight disaster.

Link to comment
Share on other sites

  • 4 weeks later...

Good day,

Could someone assist please...

I am on the latest phpvms 2.1.934

I tried installing AIRMail2 and i encountered the following message

"Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Mail::inbox' was given in /home5/XXXXXX/public_html/PIREP/core/classes/MainController.class.php on line 218"

I guess i did install it correctly and the SQL commands were executed without errors.

Your help are much appreciated

Thank you

Link to comment
Share on other sites

  • Administrators

This is the second time today I have seen this pop up. I have just downloaded the copy of this module off of the site and installed it on a fresh install of ver934 without issue. Are you using the base template? if not try switching back to the crystal template and see if the module works and let me know.

Link to comment
Share on other sites

I tried with both Obsesblue and Crystal template. The error seems the same.

"Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Mail::inbox' was given in /home5/XXXXXXX/public_html/PIREP/core/classes/MainController.class.php on line 218"

Thank you

Link to comment
Share on other sites

  • Administrators

I tried with both Obsesblue and Crystal template. The error seems the same.

"Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'Mail::inbox' was given in /home5/XXXXXXX/public_html/PIREP/core/classes/MainController.class.php on line 218"

Thank you

I just found that the other site with this issue has the original version of AirMail (1.0) installed. I am not sure where it came from as I believe the only one posted here in the forum is the latest (2.1) at the beginning of this thread. Any version prior to 2.0 will not work with any phpVMS version past 785.

Overwrite the files with the files at the start of this thread and either drop the airmail table from your database and run the new install sql file or use the update file to change the database from version 1.0.

Link to comment
Share on other sites

Hi Dave, I have been trying and trying for a couple months now to get a delete all to work with AIRMail. Do you think that is even worth trying? I can get it to check all but when clicking delete all, it only deletes 1 message.

Just curious if you think it will work.

Thanks.

Ray

P.S. Hell, if ANYONE can get a delete all to work, I could probably pay for it.

Link to comment
Share on other sites

Is it possible that when a pilot gets a new message instead of it showing the image it could just say 1 new message(s) or 6 new message(s) etc.. and display it on the homepage.

Thanks!

Just edit the code with the little mailbox, and change your text to what you want.

Link to comment
Share on other sites

I believe, and I stand to be corrected if I am wrong, that that info would be stored in the database and I find no where what so ever in the db that shows how many new messages one has in his or her mail box. I believe with out that info, pulling a number would be impossible. Now that being said, if you can code it, nothing is impossible. But as long as that info is not in the database, you are stuck in the mud so to speak.

Link to comment
Share on other sites

  • 2 weeks later...

Those are the sql files. You do not put them anywhere.

If you are installing airmail fresh, then you need to go in to phpmyadmin via your web hosts control panel and import the sql in to your phpVMS database.

If you already have an old version of airmail running, you import the update sql.

OR

You can open which ever one you need, copy it, and in phpmyadmin, paste it in the query box and run it.

Link to comment
Share on other sites

Not sure if this has been posted before but I am unable to delete sent mail..Get this error.

Notice: The template file "/home1/pirateai/public_html/kesukvirtual//core/templates/mail_deleted.tpl" doesn't exist in /home1/pirateai/public_html/kesukvirtual/core/classes/TemplateSet.class.php on line 248

Link to comment
Share on other sites

That error came up a long time ago when the file was missing from the package. But I thought that was on version 1 not version 2. Version 2 does in fact have all necessary files. So I would say if you are running v2, it got deleted off your server or as Mark said, is corrupted.

Link to comment
Share on other sites

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