Jump to content

AIRMail Beta 2.1


simpilot

Recommended Posts

  • Administrators

If there are no errors being shown my guess at this point would be a corrupted file or something. Hard to tell without access. It seems that the files are in the proper tree as they show on your site and the database seems correct. What version of phpvms are you running?

Link to comment
Share on other sites

  • Administrators

Turn on error reporting and see if anything shows up in the error log, also does anything else related to the database and changing it work, ie can a pilot register or file a pirep and have it inserted into the database?

Link to comment
Share on other sites

Here is the latest in the log.txt

Time: 07.01.10 17:36:18

=====

Time: 07.01.10 17:36:18

Backtrace: DB::write_debug > DB::get_row > MailData::checkformail > Mail->checkmail > MainController::Run > include > TemplateSet->getTemplate > TemplateSet->showTemplate > TemplateSet->show > include > TemplateSet->getTemplate > TemplateSet->showTemplate > Template::show > CodonModule->show > Mail->index > call_user_func_array > MainController::RunAllActions

Query: SELECT COUNT(*) AS total FROM airmail WHERE read_state=0 AND who_to='1'

Error: (1054) - Unknown column 'read_state' in 'where clause'

Yes registering and pireps work correctly, as those recently happened with no problems. (should something have it's permissions set to 777 for the AirMail?)

Link to comment
Share on other sites

  • Administrators
Error: (1054) - Unknown column 'read_state' in 'where clause'

There is part of the issue - not sure why but your db has the table named readstate not read_state.

It looks like when you loaded the file for some reason it removed all the underscores. These all need to be changed.

Dump the table and use this.

-- --------------------------------------------------------

--
-- Table structure for table `airmail`
--

CREATE TABLE IF NOT EXISTS `airmail` (
 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
 `who_to` varchar(20) NOT NULL,
 `who_from` varchar(20) NOT NULL,
 `date` date NOT NULL DEFAULT '0000-00-00',
 `time` time NOT NULL DEFAULT '00:00:00',
 `read_state` smallint(1) unsigned NOT NULL DEFAULT '0',
 `deleted_state` smallint(4) NOT NULL DEFAULT '0',
 `sent_state` smallint(4) NOT NULL DEFAULT '0',
 `subject` varchar(20) NOT NULL DEFAULT '',
 `message` text NOT NULL,
 `notam` smallint(6) NOT NULL DEFAULT '0',
 `sender_folder` int(11) DEFAULT '0',
 `reciever_folder` int(11) DEFAULT '0',
 PRIMARY KEY (`id`),
 FULLTEXT KEY `subject` (`subject`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=175 ;

This is the same as the download, it is probably going to do the same thing. If it does you will need to go in the table and rename al the columns to match the sql commands above. It must be something with your db and how it is configured, or you are opening the file in an editor that does not support underscores and it is dropping them which would probably make more sense as the other table is correct with underscores.

Link to comment
Share on other sites

Okay, I deleted the airmail.sql from the database and installed it once again. This time it seems to be working. I'm not sure why it was removing the (_) I never had that happen before. I used the same file from the download, so I'm baffled that it did it then and not this time. Oh well, thanks for your help for solving the problem I appreciate it.

Link to comment
Share on other sites

I have completely tweaked the AirMail for the Obsess Blue theme. Took some major tweaking but it works. I have come up with a new menu to make it work a bit better as well. If anyone wants, I can post a few screenies of mine in action. Mine also includes a sound file for new mail.

Once again, I thank SimPilot for all the hard work and effort he puts in to phpVMS. Without your hard work, our sites would be a lot slimmer and need some tweaks real bad. Between you and Nabeel, phpVMS is the shat! ;)

Link to comment
Share on other sites

Here you go. Hope they re size right.

untitled1.jpg

untitled2.jpg

The menu is basic. One could skin it if they chose to do so I suppose.

I only showed the 2 of them and obviously I could not share the sound it makes when you have mail.

Oh I got one more for you. This one is where we access out Airmail from. You won't see the image, but when you get airmail, it shows the nifty little mail box that Simpilot has provided but it plays a female voice that says you have new mail.

untitled3.jpg

Like I said, it was a hack job, but it works out much better with that skin then it did before. I do plan on changing some colors to match the theme a bit better too. The menu had to change. the way it worked did not work at all with that template.

And I suppose I should have posted my thread about this in the Obsess Blue theme thread. ooops! Sorry guys.

Edited by TAV1702
Link to comment
Share on other sites

Excellent work, i put my notification in the main nav bar on the left hand side so when a pilot logs in where ever he goes he would be notified of mail.

I did that exact same thing originally, but when a pilot would switch pages each time he or she did, it would set off that sound bit that I added. I figured once would be enough when they log on they go to pilot center automatically normally, then after that if they don't check it and surf the rest of the site, they would not get hammered with the sound file.

Overall, I am more than happy with the mail system and how it is working with that template now. I need to work on it's appearance some, but it works great anyhow. ;)

Link to comment
Share on other sites

Yeah I can do that no probs. The script was given to us free of charge so it's the least I can do. It was real easy to do. I am heading off to bed now though. Gotta get up for work in the morn. As soon as I get home I will toss up some code on some of the things I did.

Link to comment
Share on other sites

Ok here is my files. I just zipped up all of my mail files and sound bits. Oh and I will provide a text file for code changes to pilot center home page for mail icon.

**PLEASE NOTE** Simpilot is not responsible for any of the changes I have made. Please do not bother him with any questions about it. If needs be, I will be glad to help out. Matters of fact, if a mod wanted to move this to snippets then that is fine too. I just felt more comfortable placing the file here with a disclaimer since the airmail script belongs to Simpilot not me. **NOTE #2** These files are only for the Obsess Blue template. The code edit can be used on any template for the pilot center.

**END OF NOTES**

If you do not wish to change your menu like I have mine then please do not use the included menu tpl file.

For any other questions, please feel free to ask me. Do NOT PM me about this addon. I will ignore it. If you have a question, someone else may have the same question. Talk about it in the open.

Maybe this does need to be moved to snippets. Sorry Simpilot. Did not mean to hijack your thread. Resume as normal boys!

visit_us.gif

AirMail Files and Edits

Link to comment
Share on other sites

When trying to delete sent messages, I get this error:

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

This is my line 248 in the TemplateSet.class.php file:

trigger_error('The template file "'.$tpl_path.'" doesn\'t exist');

But looking in the templates folder, the mail_deletefolder.tpl does exist in there. What's the solution?

Link to comment
Share on other sites

Guest lorathon

If you look at your post you can see that you are looking for the wrong template in your skin or core/templates folder.

Error states.....

mail_deleted.tpl

You say...

the mail_deletefolder.tpl does exist

Look for the mail_deleted.tpl

:) I have done the same thing too many times to count.

Link to comment
Share on other sites

  • Administrators

When trying to delete sent messages, I get this error:

This is my line 248 in the TemplateSet.class.php file:

trigger_error('The template file "'.$tpl_path.'" doesn\'t exist');

But looking in the templates folder, the mail_deletefolder.tpl does exist in there. What's the solution?

The solution is the second post in the thread.

Link to comment
Share on other sites

  • Administrators

HI Dave,

I have 2 user accounts in the system can i change the table some how to send all mail to user 1 to another user? Hope you know what i mean.

I think you mean to forward Mark. As of now it would have to be something in the data class. I would have to hunt around for a method, probably not really something I would build into a new version.

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