Sura Rhyme Analysis - warwickfoster/qurantools GitHub Wiki

File: app/intertextuality/intertextual_viewer.php

Purpose

The provided PHP code is a web page that displays information about a source and its intertextual links.

Functionality

  • Retrieves source data from the database based on an ID provided in the URL.
  • Determines if the page is being loaded in Lightview mode (a pop-up window).
  • Displays the source name, alternative name, date, language, and reference.
  • Parses the source text to create paragraph breaks and verse numbers.
  • Lists the intertextual links to other verses in the Bible.
  • Provides links to further reading and the source URL.

Features

  • Uses CSS styling to format the page and highlight intertextual links.
  • Includes a menu and footer for navigation.
  • Provides a Lightview option for displaying the page in a separate window.

Usage

  • The page is accessed with an ID parameter in the URL, which corresponds to the ID of the source in the database.
  • The LIGHTVIEW parameter can be set to "YES" to enable Lightview mode.

Data Retrieval

  • The db_query() function is used to retrieve source data from the INTERTEXTUAL LINKS, INTERTEXTUAL SOURCES, and SOURCES tables.

Rendering

  • The parsed source text is displayed in a formatted manner.
  • Intertextual links are displayed as hyperlinks.
  • Additional information such as bibliography and source URL are provided.

Lightview Mode

  • In Lightview mode, an icon is displayed to open the page in a new tab.
  • The footer is not displayed.

Conclusion

The PHP code provides a comprehensive and interactive way to view intertextual links in the Bible. It offers features such as Lightview mode, navigation options, and additional source information.