|
Learning with Texts - Fork
2.10.0-fork
Learn foreign languages with texts
|
Import terms from file or Text area. More...
Functions | |
| my_str_getcsv ($input) | |
| upload_words_import_simple ( $lang, $fields, $columns, $tabs, $file_name, $status) | |
| upload_words_import_complete ( $lang, $fields, $columns, $tabs, $file_name, $status, $overwrite) | |
| upload_words_handle_multiwords ($lang, $last_update) | |
| upload_words_import_terms ($fields, $tabs, $file_upl, $col, $lang) | |
| display_imported_terms ($last_update, $rtl) | |
| upload_words_import_tags ($fields, $tabs, $file_upl) | |
| upload_words_import () | |
| upload_words_display () | |
Variables | |
| if(isset($_REQUEST['op'])) | else |
Import terms from file or Text area.
Call: upload_words.php?.... ... op=Import ... do the import
PHP version 8.1
| display_imported_terms | ( | $last_update, | |
| $rtl | |||
| ) |
Navigation header for the imported terms.
| {JSON} | data Data object for navigation. |
| {string} | last_update Terms import timestamp for SQL |
| {bool} | rtl If text is right-to-left |
Create the rows with the imported terms.
| {JSON} | data Data object containing terms. |
| {bool} | rtl If text is right-to-left. |
Display page content based on raw server answer.
| {JSON} | data Data object for navigation. |
| {string} | last_update Terms import timestamp for SQL |
| {bool} | rtl If text is right-to-left |
Show the terms imported.
| {string} | last_update Last update date in SQL compatible format |
| {bool} | rtl If text is right-to-left |
| {int} | count Number of terms imported |
| {int} | page Current page number |
| my_str_getcsv | ( | $input | ) |
Get the CSV from a string.
| string | $input | Input string. |
@psalm-return false|non-empty-list<null|string>|null
| upload_words_display | ( | ) |
Display the main for adding new words.
Show a supplementary field depending on long text import mode.
| upload_words_import | ( | ) |
Import terms of tags to the database.
@global string $tbpref Database table prefix
| upload_words_import_tags | ( | $fields, | |
| $tabs, | |||
| $file_upl | |||
| ) |
Import term tags only to the database.
| array | $fields | Fields indexes |
| string | $tabs | Columns separator |
| bool | $file_upl | If the input text is an uploaded file |
@global string $tbpref Database table prefix
| upload_words_import_terms | ( | $fields, | |
| $tabs, | |||
| $file_upl, | |||
| $col, | |||
| $lang | |||
| ) |
Import terms to the database.
| array | $fields | Fields indexes |
| string | $tabs | Columns separator |
| bool | $file_upl | If the input text is an uploaded file |
| array<int,string> | $col Columns names | |
| int | $lang | Language ID |
@global string $tbpref Database table prefix
| if (isset( $_REQUEST[ 'op'])) else |