Exhaustive Root References - warwickfoster/qurantools GitHub Wiki
app/charts/chart_user_searches_by_month.php
File:Purpose
This PHP script generates a chart that displays the monthly or daily search/verse lookup activity for a specific user.
Features
- Sorts data by date or number of searches/lookups.
- Filters data by month and year.
- Links to a detailed view of daily searches.
Steps
-
Data Retrieval The script retrieves user information, email address, and search/verse lookup data based on the provided user ID.
-
Chart Configuration The JavaScript code configures a chart using the Chart.js library.
- Data points are created based on the retrieved search/verse lookup data.
- Labels represent the months or days.
- Values represent the number of searches/lookups.
- Links are added for daily views.
-
Chart Rendering The chart is rendered within an HTML element with the id "chartContainer".
-
Navigation The script provides links to the user details page and a print control.
Usage
To use the script, pass the user ID as a parameter in the URL. For example:
/admin/chart_user_searches_by_month.php?USER=123
Note
- The script assumes that the
USERS
andSEARCH_HISTORY
tables are available in the database. - The
menu.php
andfooter.php
files should be included in the project.