do_text_header.php
\file \brief Responsible for drawing the header when reading texts
Call: do_text_header.php?text=[textid]
PHP version 8.1
Tags
Table of Contents
Functions
- getData() : array<string|int, float|int|null|string>|false|null
 - Get the text and language data associated with the text.
 - do_header_row() : void
 - Print the main title row.
 - do_title() : void
 - Print the title of the text.
 - do_settings() : void
 - Prepare user settings for this text.
 - browser_tts() : void
 - Prints javascript data and function to read text in your browser.
 - save_audio_position() : void
 - Save the position of the audio reading for a text.
 - do_text_header_content() : void
 - Main function for displaying header. It will print HTML content.
 
Functions
getData()
Get the text and language data associated with the text.
    
                    getData(string|int $textid) : array<string|int, float|int|null|string>|false|null
    
        Parameters
- $textid : string|int
 - 
                    
ID of the text
 
Tags
Return values
array<string|int, float|int|null|string>|false|null —LgName, TxLgID, TxText, TxTitle, TxAudioURI, TxSourceURI, TxAudioPosition for the text.
do_header_row()
Print the main title row.
    
                    do_header_row(int $textid, string $langid) : void
    
        Parameters
- $textid : int
 - 
                    
Text ID
 - $langid : string
 - 
                    
Language ID to navigate between texts of same language
 
Tags
do_title()
Print the title of the text.
    
                    do_title(string $title, string $sourceURI) : void
    
        Parameters
- $title : string
 - 
                    
Title of the text
 - $sourceURI : string
 - 
                    
URL of the text (if any)
 
Tags
do_settings()
Prepare user settings for this text.
    
                    do_settings(string|int $textid) : void
    
        Parameters
- $textid : string|int
 - 
                    
Text ID
 
Tags
browser_tts()
Prints javascript data and function to read text in your browser.
    
                    browser_tts(string $text, string $languageName) : void
    
        Parameters
- $text : string
 - 
                    
Text to read
 - $languageName : string
 - 
                    
Full name of the language (i. e.: "English")
 
Tags
save_audio_position()
Save the position of the audio reading for a text.
    
                    save_audio_position(string|int $textid) : void
    
        Parameters
- $textid : string|int
 - 
                    
ID of the text
 
Tags
do_text_header_content()
Main function for displaying header. It will print HTML content.
    
                    do_text_header_content(string|int $textid[, bool $only_body = true ]) : void
    
        Parameters
- $textid : string|int
 - 
                    
ID of the required text
 - $only_body : bool = true
 - 
                    
If true, only show the inner body. If false, create a complete HTML document.