Jump to content

Add owner to aircraft


Jakes

Recommended Posts

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 ?

post-679-089949200 1308321909_thumb.jpg

Link to comment
Share on other sites

Guest lorathon

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

Link to comment
Share on other sites

  • 4 months later...

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

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