Learning with Texts - Fork  2.10.0-fork
Learn foreign languages with texts
Namespaces | Functions
insert_word_wellknown.php File Reference

Ignore single word (new term with status 99) More...

Namespaces

 Lwt
 

Functions

 get_word ($textid, $textpos)
 
 insert_word_wellknown_to_database ($textid, $word)
 
 insert_word_wellknown_javascript ($word, $wid, $hex, $textid)
 
 show_page_insert_word_wellknown ($word, $wid, $hex, $textid)
 
 do_insert_word_wellknown ($textid, $textpos)
 

Detailed Description

Ignore single word (new term with status 99)

Call: insert_word_wellknown.php?tid=[textid]&ord=[textpos]

PHP version 8.1

Function Documentation

◆ do_insert_word_wellknown()

do_insert_word_wellknown (   $textid,
  $textpos 
)

Main function to insert a new word with display and JS action.

Parameters
string$textidID of the text
string$textposPosition of the word in the text.
Returns
void
Since
2.0.4-fork

◆ get_word()

get_word (   $textid,
  $textpos 
)

Return the word at a specific position in a text.

Parameters
string$textidID of the text
string$textposPosition of the word in the text.
Returns
string A word

@global string $tbpref

◆ insert_word_wellknown_javascript()

insert_word_wellknown_javascript (   $word,
  $wid,
  $hex,
  $textid 
)

Make the well-known word as no longer marked.

Parameters
string$wordNew well-known word
string | int$widNew well-known word ID
string$hexHexadecimal version of the lowercase word.
string | int$textidID of the text.

@global string $tbpref

Returns
void

◆ insert_word_wellknown_to_database()

insert_word_wellknown_to_database (   $textid,
  $word 
)

Edit the database to add the word.

Parameters
string$textifID of the text
string$wordWord to add
Returns
int Word ID

@global string $tbpref

◆ show_page_insert_word_wellknown()

show_page_insert_word_wellknown (   $word,
  $wid,
  $hex,
  $textid 
)

Echoes a complete HTML page, with JavaScript content.

Parameters
string$wordNew well-known word
string | int$widNew well-known word ID
string$hexHexadecimal version of the lowercase word.
string | int$textidID of the text.
Returns
void