Documentation

set_text_mode.php

\file \brief Change the text display mode

Call: set_text_mode.php?text=[textid]&mode=0/1&showLeaning=0/1

PHP version 8.1

Tags
category

Helper_Frame

author

LWT Project lwt-project@hotmail.com

since
1.0.3.1

Table of Contents

Functions

text_mode_save_settings()  : int
Save text mode settings.
text_annotations_mode_javascript()  : void
Do the JavaScript action to change the display of translations.
text_mode_page_content()  : void
Do the main page content when chaning display of translations.
change_text_mode()  : void
Complete workflow for changing text mode.

Functions

text_mode_save_settings()

Save text mode settings.

text_mode_save_settings(int $showAll, int $showLearning) : int
Parameters
$showAll : int

Whether all word should be shown

$showLearning : int

Whether to show translation of learning words

Tags
psalm-return

0|1

Return values
int

If show learning were previously true (1) or false (0)

text_annotations_mode_javascript()

Do the JavaScript action to change the display of translations.

text_annotations_mode_javascript(int $showLearning, int $oldShowLearning) : void
Parameters
$showLearning : int

Whether to show translation of learning words

$oldShowLearning : int

If show learning was previously true (1) or false (0)

text_mode_page_content()

Do the main page content when chaning display of translations.

text_mode_page_content(int $showAll, int $showLearning, int $oldShowLearning) : void
Parameters
$showAll : int

Whether all word should be shown

$showLearning : int

Whether to show translation of learning words

$oldShowLearning : int

If show learning was previously true (1) or false (0)

change_text_mode()

Complete workflow for changing text mode.

change_text_mode(int $textid, int $showAll, int $showLearning) : void

It edits the settings in the database, show the success message and do JavaScript action to change its display.

Parameters
$textid : int

ID of the current text

$showAll : int

Whether all word should be shown

$showLearning : int

Whether to show translation of learning words


        
On this page

Search results