Jakes Posted June 17, 2011 Report Share Posted June 17, 2011 Hi there, I am busy modifying my site to add a Owner entry for each aircraft. Now, Ive already add the owner table to the database, and made a manual entry to test directly on the database. Then, in the /admin/templates/ops_aircraftlist.tpl Ive added the table, as well as <?php echo $aircraft->owner; ?>, and in the /core/templates/fleet.tpl Ive also modified the layout to show the table Ive added. Now, it shows up fine, as well as the manual entry Ive made. My problem is that when I edit an aircraft in the admin area, the place for the Owner info are there, , but when I make an entry, and save the data, it does not save the owner info to the database. What do I need to modify in order to save to the database? Cheers, Jakes Quote Link to comment Share on other sites More sharing options...
Harryh Posted June 17, 2011 Report Share Posted June 17, 2011 Because it is a new field in the database you have added. I have looked in my Admin Panel and in the "Add Fleet" form their is no Aircraft Owner field unless you added one ? Quote Link to comment Share on other sites More sharing options...
Jakes Posted June 17, 2011 Author Report Share Posted June 17, 2011 Because it is a new field in the database you have added. I have looked in my Admin Panel and in the "Add Fleet" form their is no Aircraft Owner field unless you added one ? Ii have added the owner fields, it is not standard. But I want to know where to add the coding that actually write to the database? Quote Link to comment Share on other sites More sharing options...
Harryh Posted June 17, 2011 Report Share Posted June 17, 2011 Ii have added the owner fields, it is not standard. But I want to know where to add the coding that actually write to the database? Okay, if you navigate to you PHPVMS Main folder and then go into Admin -> templates -> Then Open the .tpl file called "ops_aircraftform.tpl" and open it in your PHP editor (: In my case im using Dreamweaver MX, You should then find the form you are looking for ! (Image Attached) before i do this for you, did you enter the new field in the "_aircraft" table ? Quote Link to comment Share on other sites More sharing options...
Guest lorathon Posted June 17, 2011 Report Share Posted June 17, 2011 You will need to change the following functions in /admin/modules/Operations.php These two functions will add the data to the query that will add the data to the table. add_aircraft_post edit_aircraft_post Quote Link to comment Share on other sites More sharing options...
Gotcha_Buccs Posted November 17, 2011 Report Share Posted November 17, 2011 I'm looking at doing this as well, I want to add owners to certain aircraft, but not to all the aircraft. That way commanders within my VM can have a tail number assigned to them and the plane will be where they left it last, instead of some newbie moving it and it not being available. However, I'm pretty new to the php world I was wondering if you could post maybe a step by step all the way from adding the owner table to the coding that will actually write to the database. Thanks in advance. -Allen FSX Fleet FSX Fleet KaCARS Quote Link to comment Share on other sites More sharing options...
Gotcha_Buccs Posted November 21, 2011 Report Share Posted November 21, 2011 BUMP! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.