Just wanted to post as i just figured out how to successfully do all this. I edited quite a few more files than is posted above, as i wanted my variables to be searchable.
Here is a list of files i edited:
CompanyDirectory.module.php
action.fe_edit.php
action.exportcsv.php
action.editcompany.php
action.details.php
action.defaultadmin.php
action.default.php
action.addcompany.php - add extra ? for extra variable
en_US.php
orig_frontendform_template.tpl
orig_detail_template.tpl
editcompany.tpl
I basically just followed the format of the existing variables in the files, however one threw me off and i missed it during editing and wanted to point it out specifically.
When editing action.addcompany.php, there is a place about line 167 where it takes your variables and puts them into an array.
Code: Select all
$query = 'INSERT INTO '.cms_db_prefix().'module_compdir_companies (company_name, address, telephone, cell, fax, contact_email, website, team, title, reports_to, responsible_areas, details, picture_location, logo_location, create_date, modified_date, status) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)';
$db->Execute($query, array($company_name, $address, $telephone, $cell, $fax, $contact_email, $website, $team, $title, $reports_to, $responsible_areas, $details, $image, $logo, trim($db->DBTimeStamp(time()), "'"), trim($db->DBTimeStamp(time()), "'"), $status));
The section
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)'; needs to have the same number of ?'s as variables to pass the information into the array to be written to your tables.
If you don't, you will find yourself unable to add new entry's to the database, but you are able to edit them fine. I missed it and it caused a minor headache, so i wanted to point it out.