File Structure Overview The following pages detail the structure used for the organization of the TNG_coGenWeb files. Main PHP Files The PHP files in the main directory are the defining structure for each page of the site. Follow these guidelines for naming the main level PHP files and their associated assets: Naming Convention Use lowercase letters with words separated by hyphens (-) or underscores (_). Avoid spaces or special characters; use only A–Z, a–z, 0–9, _, and -. Usage File names should clearly identify the purpose of the page. For example, cemeteries.php should be used for a list of all county cemeteries, while cemetery.php should be used for an individual cemetery page. Likewise for church/churches, school/schools, and town/towns. Related File Names Each PHP file must have an associated JS (.js) and CSS (.scss) file. To ensure consistent file loading, these files must share the exact same name as the PHP file (e.g., cemetery.php, cemetery.js, and cemetery.scss). Assets Folder/Files The assets folder contains subfolders and files used across the site. The files are included in an assets folder of the project. The items listed below are subfolders within the assets folder. Main level files The main level assets files are those used on basically every page on the site. Files to set the configuration, navigation, header, and footer. See the section on Page Structure for more detail on some of these files. Assets Subfolders Within the assets folder are several subfolders as detailed below. ajax - Ajax files are used to obtain records from tables in the database. The term ajax comes for the JavaScript method for obtaining records from a database.  Files are named 'ajax_Module.php' where Module generally identifies the associated database table. functions_java - JavaScript functions are used by JavaScript files across the site. All file names begin with an underscore character (_). Two files in this subfolder serve a specific purpose. _AllBuildJava.js - This file combines the individual function files into a single file (_allFunctionsJava.js). Thus, if a change is made to a function this file must be run to update the single file.The following three files are also combined into the single function file. Each file consists of a JavaScript array containing relevant information about the county. County in these files would be the county name. County_article.js - A JS array detailing the elements used with article files County_co_maps.js - A JS array detailing the map elements used for headings and coordinates. County_config.js - A JS array similar to the County_config.php file. functions_php - PHP functions are used by PHP files across the site. All names begin with an underscore character (_). As with the JavaScript functions the individual function files are combined into one file. This is accomplished by the system at page load time so special building is not required. json - Several json files are used to specify various entities of the site. Except for the County_master.json file, each file MUST begin with the name of the county (i.e., Delta, Fannin, Holmes, etc.). See the section on Special Files for more detail. geojson - Included within the json folder is a folder for the geojson files. These files detail the coordinates of an entity, The files are of two varieties. See the section on Special Files for more detail. Files for both Counties and Towns are included in this subfolder. County - Provides the outline coordinates for the main county and the surrounding counties. Town - Provides the outline coordinates for any towns within the area of the main county. menus - may not be needed if County_subnav.json file is used. CRON Job Files Cron Jobs Cron is a time-based job scheduler. A scheduled job is known as a cron job. Although typically used to automate system maintenance and administration it can be used to automate any task. Cron is most suitable for scheduling repetitive tasks.  These are scripts that are set to run at selected times (day, week, month). The desired time and frequency is set using the site cPanel. Because the 'jobs' are scheduled and run via the main cPanel the files are placed in the main file structure. Some of the primary Cron files are: Missing Images - Provides a list of all Memorial records that reference an image file but the file cannot be located in the images/cem_images directory. This should be scheduled to run weekly. Not Used Images - This is the reverse of Missing Images. This provides a list of all images in the images/cem_images directory that are not referenced in any Memorial record. This should be scheduled to run weekly. Missing GPS - Searches all images/cem_images directories for image files that contain GPS coordinates. For such records the memorial record is ??? This should be scheduled to run weekly. Missing Credits - Provides a list of all Memorial records that contain image references but do no include a reference to the person credited for providing the image. This should be scheduled to run weekly. Sitemap - Provides a series of .xml files used by bots that crawl websites to gather page results for SEO (Search Engine Optimization) statistics. The module uses the County_search.json file to produce the sitemap directory files. This is run on the first day of each month. Cron Jobs that create a 'report' send an email to the County Coordinator. Additionally, the Admin area contains links to each report so Admin level users can generate a report as desired. These requests will display the report results in the user's browser. Scheduled Run Time Depending on the number of Memorial records, it may take several minutes for some of the Cron Job to finish. Thus, it is best to schedule the 'jobs' at a low traffic period. Early morning (1-2 a.m.) is a good window to schedule. Additionally, some time during the hour rather than just on the hour (e.g., 1:18 a.m.). Further, for a job scheduled once a week, Monday morning is a good time.CSS Files Files in the in CSS folder are generated by the vsCode IDE when the .scss file is saved. This is accomplished by vsCode settings for the Live Sass Compiler extension. The compiled .css files are stored in the main part of this folder. Compiling and placement of these files requires an IDE extension and a setting in the vsCode IDE. See the section on IDE Setup & Usage for more detail. dist - This subfolder contains the compiled and minified files of the individual scss files. The module.min.css files are then used for loading to save time. (reword). Live Sass Compiler vsCode Settings "liveSassCompile.settings.generateMap": false, "liveSassCompile.settings.formats": [ { "format": "expanded", "extensionName": ".css", "savePath": "/css" }, { "format": "compressed", "extensionName": ".min.css", "savePath": "/css/dist" } ], "liveSassCompile.settings.excludeList": [ "/.unused-Delta/**", "/.vscode/**", "/scss/mixins/**", "/scss/base/**" ],Image Files images - All images used by the system are placed in the subfolders of this folder. cem_images - mis_images - arrors - awards - icons - logos - masters - sort - xxx_images - Javascript (JS) Files java - This folder contains the .js files associated with the primary .php file (e.g., school.js us loaded by the school.php file)SCSS Files scss - The scss files are contained in five subfolders as follows. base - The 'base' scss files are used to establish the basic css styles for the site. There are 13 files with each containing a specific part (e.g., header, topography, footer) of the overall site styles. Given that each file name begin with an underscore (_) character, these files do not get compiled individually. The file County_styles.scss, which resides in the main scss folder, loads each file and compiles them as a group. mixins - Mixins are scss 'functions' used to expand the capability of css. An individual mixin is used to do a specific task, usually indicated by the name. pages - This subfolder contains the individual scss files relating to the specific main php file (e.g., the school.scss file is loaded by the school.php file). Sitemap Files sitemaps - Sitemap files are used by the site to enhance the SEO bots that crawl the site. The files are created by one of the CRON scripts usually on a weekly basis. Once the CRON job is established in the cPanel this folder can be ignored. (reword).Vendor Files vendor - These are specific files provided by third-party's that provide assistance to the vendor's API. Bootstrap, DataTables, and jQuery are specifically used on the TNG_coGenWeb sites.