Bookmarks - warwickfoster/qurantools GitHub Wiki

File: app/admin/translation_word_tag_stats.php

Purpose

The provided PHP script generates a report on translation tagging statistics for each translation in the Quran database.

Features

  • Displays a table with the following data for each translation:
    • Translation name
    • Number of verses tagged
    • Number of verses remaining to be tagged
    • Next verse to tag
    • Percentage complete
  • Provides a link to the next verse to tag for each translation.
  • Uses FusionCharts library for data visualization.

Target Audience

  • Administrators

Technical Details

  • Database Quran database
  • Tables
    • TRANSLATION-LIST: Stores translation information.
    • QURAN-TRANSLATION: Stores Quran verses translated into different languages.
  • PHP Functions
    • db_query()
    • db_rowcount()
    • db_return_row()
    • db_return_one_record_one_field()
  • JavaScript Libraries
    • FusionCharts library
    • Persistent Table Headers JavaScript library

Steps

  1. Authentication

    • The script requires authentication using the auth/auth.php file.
    • Only administrators have access to this page.
  2. Data Retrieval

    • Retrieves translation information from the TRANSLATION-LIST table.
    • Calculates the number of tagged and remaining verses for each translation.
    • Determines the next verse to tag.
  3. Table Display

    • Creates a table with the specified columns.
    • Populates the table with the calculated statistics.
  4. FusionCharts Integration

    • The script includes the necessary FusionCharts JavaScript files for data visualization.
    • However, the code for generating the charts is not included in this snippet.

Benefits

  • Provides administrators with insights into translation progress.
  • Facilitates tracking of verses tagged and remaining to be tagged.
  • Helps identify the next verse to focus on for translation.