Show text header frame.
More...
|
| | get_text_data ($textid) |
| |
| | getTextData ($textid) |
| |
| | get_language_settings ($langid) |
| |
| | getLanguagesSettings ($langid) |
| |
| | echo_term ($actcode, $showAll, $spanid, $hidetag, $currcharcount, $record) |
| |
| | echoTerm ( $actcode, $showAll, $hideuntil, $spanid, $hidetag, $currcharcount, $record) |
| |
| | wordProcessor ($record, $showAll, $currcharcount) |
| |
| | sentence_parser ($sid, $old_sid) |
| |
| | sentenceParser ($sid, $old_sid) |
| |
| | word_parser ($record, $showAll, $currcharcount, $hideuntil) |
| |
| | wordParser ($record, $showAll, $currcharcount, $hideuntil) |
| |
| | main_word_loop ($textid, $showAll) |
| |
| | mainWordLoop ($textid, $showAll) |
| |
| | do_text_text_style ($showLearning, $mode_trans, $textsize, $ann_exists) |
| |
| | prepareStyle ($showLearning, $mode_trans, $textsize, $ann_exists) |
| |
| | do_text_text_javascript ($var_array) |
| |
| | do_text_javascript ($var_array) |
| |
Show text header frame.
Call: do_text_text.php?text=[textid]
◆ do_text_javascript()
| do_text_javascript |
( |
|
$var_array | ) |
|
Print JavaScript-formatted content.
- Parameters
-
| array<string,mixed> | Associative array of all global variables for JS |
- Returns
- void
- Deprecated:
- Use do_text_text_javascript instead.
◆ do_text_text_javascript()
| do_text_text_javascript |
( |
|
$var_array | ) |
|
Print JavaScript-formatted content.
- Parameters
-
| array<string,mixed> | Associative array of all global variables for JS |
- Returns
- void
Map global variables as a JSON object
◆ do_text_text_style()
| do_text_text_style |
( |
|
$showLearning, |
|
|
|
$mode_trans, |
|
|
|
$textsize, |
|
|
|
$ann_exists |
|
) |
| |
Prepare style for showing word status. Write a now STYLE object
- Parameters
-
| int | $showLearning | 1 to show learning translations |
| int<1,4> | $mode_trans Annotation position |
| int | $textsize | Text font size |
| bool | $ann_exist | Does annotations exist for this text |
- Returns
- void
◆ echo_term()
| echo_term |
( |
|
$actcode, |
|
|
|
$showAll, |
|
|
|
$spanid, |
|
|
|
$hidetag, |
|
|
|
$currcharcount, |
|
|
|
$record |
|
) |
| |
Print the output when the word is a term.
- Parameters
-
| int | $actcode | Action code, > 1 for multiword |
| int | $showAll | Show all words or not |
| int | $hideuntil | Unused |
| string | $spanid | ID for this span element |
| int | $currcharcount | Current number of characters |
| array<string,string> | $record Various data |
- Returns
- void
◆ echoTerm()
| echoTerm |
( |
|
$actcode, |
|
|
|
$showAll, |
|
|
|
$hideuntil, |
|
|
|
$spanid, |
|
|
|
$hidetag, |
|
|
|
$currcharcount, |
|
|
|
$record |
|
) |
| |
Print the output when the word is a term.
- Parameters
-
| int | $actcode | Action code, > 1 for multiword |
| int | $showAll | Show all words or not |
| int | $hideuntil | Unused |
| string | $spanid | ID for this span element |
| int | $currcharcount | Current number of characters |
| array<string,string> | $record Various data |
- Returns
- int 0
- Since
- 2.2.1 Return 0 instead of a new value for $hideuntil
- Deprecated:
- Use echo_term instead.
◆ get_language_settings()
| get_language_settings |
( |
|
$langid | ) |
|
Return the settings relative to this language.
- Parameters
-
| int | $langid | Language ID as defined in the database. |
- Returns
- array{LgName: string, LgDict1URI: string, LgDict2URI: string, LgGoogleTranslateURI: string, LgTextSize: int, LgRemoveSpaces: int, LgRightToLeft: int}|false|null Record corresponding to this language.
@global string $tbpref Table name prefix
◆ get_text_data()
Get the record for this text in the database.
- Parameters
-
| string | $textid | ID of the text |
- Returns
- array{TxLgID: int, TxTitle: string, TxAnnotatedText: string, TxPosition: int}|false|null Record corresponding to this text.
@global string $tbpref Table name prefix
◆ getLanguagesSettings()
| getLanguagesSettings |
( |
|
$langid | ) |
|
Return the settings relative to this language.
- Parameters
-
| int | $langid | Language ID as defined in the database. |
- Returns
- array{LgName: string, LgDict1URI: string, LgDict2URI: string, LgGoogleTranslateURI: string, LgTextSize: int, LgRemoveSpaces: int, LgRightToLeft: int}|false|null Record corresponding to this language.
@global string $tbpref Table name prefix
- Deprecated:
- Use get_language_settings instead.
◆ getTextData()
Get the record for this text in the database.
- Parameters
-
| string | $textid | ID of the text |
- Returns
- array{TxLgID: int, TxTitle: string, TxAnnotatedText: string, TxPosition: int}|false|null Record corresponding to this text.
@global string $tbpref Table name prefix
- Deprecated:
- Use get_text_data instead.
◆ main_word_loop()
| main_word_loop |
( |
|
$textid, |
|
|
|
$showAll |
|
) |
| |
Get all words and start the iterate over them.
- Parameters
-
| string | $textid | ID of the text |
| 0 | 1 | $showAll | Show all words or not |
- Returns
- void
@global string $tbpref Table name prefix
◆ mainWordLoop()
| mainWordLoop |
( |
|
$textid, |
|
|
|
$showAll |
|
) |
| |
Get all words and start the iterate over them.
- Parameters
-
| string | $textid | ID of the text |
| 0 | 1 | $showAll | Show all words or not |
- Returns
- void
@global string $tbpref Table name prefix
- Deprecated:
- Use main_word_loop instead.
◆ prepareStyle()
| prepareStyle |
( |
|
$showLearning, |
|
|
|
$mode_trans, |
|
|
|
$textsize, |
|
|
|
$ann_exists |
|
) |
| |
Prepare style for showing word status. Write a now STYLE object
- Parameters
-
| int | $showLearning | 1 to show learning translations |
| int<1,4> | $mode_trans Annotation position |
| int | $textsize | Text font size |
| bool | $ann_exist | Does annotations exist for this text |
- Returns
- void
- Deprecated:
- Use do_text_text_style instead.
◆ sentence_parser()
| sentence_parser |
( |
|
$sid, |
|
|
|
$old_sid |
|
) |
| |
Check if a new sentence SPAN should be started.
- Parameters
-
| int | $sid | Sentence ID |
| int | $old_sid | Old sentence ID |
- Returns
- int Sentence ID
◆ sentenceParser()
| sentenceParser |
( |
|
$sid, |
|
|
|
$old_sid |
|
) |
| |
Check if a new sentence SPAN should be started.
- Parameters
-
| int | $sid | Sentence ID |
| int | $old_sid | Old sentence ID |
- Returns
- int Sentence ID
- Deprecated:
- Use sentence_parser instead.
◆ word_parser()
| word_parser |
( |
|
$record, |
|
|
|
$showAll, |
|
|
|
$currcharcount, |
|
|
|
$hideuntil |
|
) |
| |
Process each word (can be punction, term, etc...)
- Parameters
-
| string[] | $record | Record information |
| 0 | 1 | $showAll | Show all words or not |
| int | $currcharcount | Current number of caracters |
| int | $cnt | |
| int | $sid | Sentence ID |
| int | $hideuntil | Should the value be hidden or not |
- Returns
- int New value for $hideuntil
◆ wordParser()
| wordParser |
( |
|
$record, |
|
|
|
$showAll, |
|
|
|
$currcharcount, |
|
|
|
$hideuntil |
|
) |
| |
Process each word (can be punction, term, etc...)
- Parameters
-
| string[] | $record | Record information |
| 0 | 1 | $showAll | Show all words or not |
| int | $currcharcount | Current number of caracters |
| int | $cnt | |
| int | $sid | Sentence ID |
| int | $hideuntil | Should the value be hidden or not |
- Returns
- int New value for $hideuntil
- Deprecated:
- Use word_parser instead.
◆ wordProcessor()
| wordProcessor |
( |
|
$record, |
|
|
|
$showAll, |
|
|
|
$currcharcount |
|
) |
| |
Process each word (can be punction, term, etc...). Caused laggy texts, replaced by wordParser.
- Parameters
-
| string[] | $record | Record information |
| 0 | 1 | $showAll | Show all words or not |
| int | $currcharcount | Current number of caracters |
- Returns
- int New number of caracters
- Deprecated:
- Use sentenceParser and wordParser instead.