Legend of the Green Dragon

Documentation

Packages

Application

Namespaces

Lotgd

Interfaces, Classes, Traits and Enums

ServerFunctions

Table of Contents

process_post_save_data()  : mixed
dump_item()  : mixed
dump_item_ascode()  : mixed
handle_event()  : mixed
do_forced_nav()  : mixed
lotgd_mail()  : mixed
Function for send Mails to users Has the same structure as the php "mail()" function, but this function checks if you want to send emails in html format or not.
activate_module()  : mixed
deactivate_module()  : mixed
uninstall_module()  : mixed
install_module()  : mixed
blockmodule()  : mixed
unblockmodule()  : mixed
module_collect_events()  : mixed
module_events()  : mixed
module_do_event()  : mixed
event_sort()  : mixed
module_display_events()  : mixed
modulehook()  : mixed
module_wipehooks()  : mixed
Delete hooks of module.
module_addeventhook()  : mixed
module_drophook()  : void
module_addhook()  : mixed
Called by modules to register themselves for a game module hook point, with default priority.
module_addhook_priority()  : mixed
Called by modules to register themselves for a game module hook point, with a given priority -- lower numbers execute first.
injectmodule()  : mixed
module_status()  : int
Returns the status of a module as a bitfield.
is_module_active()  : bool
Determines if a module is activated.
is_module_installed()  : bool
Determines if a module is installed.
get_module_install_status()  : array<string|int, mixed>
Get status of module.
module_delete_objprefs()  : mixed
Delete all objtype for objid.
get_module_objpref()  : mixed
Get value for a setting for a module, objtype and objid.
set_module_objpref()  : mixed
Set value for a setting for a module, objtype and objid.
increment_module_objpref()  : mixed
Increment value for a setting for a module, objtype and objid.
load_module_objpref()  : array<string|int, mixed>
Load objpref of a module.
module_delete_userprefs()  : mixed
Delete all module user preferences.
get_all_module_prefs()  : array<string|int, mixed>
Get all module prefs of a user.
get_module_pref()  : mixed
Get pref of user for a given module and setting.
set_module_pref()  : mixed
Set pref of user for a given module and setting.
increment_module_pref()  : mixed
Increment pref of user for a given module and setting.
clear_module_pref()  : mixed
Clear a setting for a given module and user.
load_module_prefs()  : array<string|int, mixed>
Load prefs of a module.
get_all_module_settings()  : array<string|int, mixed>
An associative array of all the settings for the given module.
get_module_setting()  : mixed
Get value for setting of a module.
set_module_setting()  : mixed
Set value for setting of a module.
increment_module_setting()  : mixed
Increment value for a setting of module.
clear_module_settings()  : mixed
Clear settings of a module.
load_module_settings()  : array<string|int, mixed>
Load settings of a module.
module_check_requirements()  : bool
Checks if the module requirements are satisfied. Should a module require other modules to be installed and active, then optionally makes them so.
mass_module_prepare()  : bool
Preloads data for multiple modules in one shot rather than having to make SQL calls for each hook, when many of the hooks are found on every page.
get_module_info()  : mixed
module_editor_navs()  : mixed
module_objpref_edit()  : mixed
module_compare_versions()  : mixed
module_condition()  : bool
Evaluates a PHP Expression.
get_racename()  : mixed
module_pref_filter()  : mixed
redirect()  : mixed
lotgd_showform()  : mixed
Construct FORM LOTGD style.
lotgd_show_form_field()  : mixed
lotgd_showtabs()  : mixed
Construct TABS Semantic UI style.
check_su_access()  : mixed
checkSuPermission()  : bool|redirect
Check Superuser premission.
bell_rand()  : mixed

Functions

process_post_save_data()

process_post_save_data(mixed $post, mixed $old, mixed &$flashMessages, mixed $module, mixed $textDomain) : mixed
Parameters
$post : mixed
$old : mixed
$flashMessages : mixed
$module : mixed
$textDomain : mixed
Return values
mixed

dump_item()

dump_item(mixed $item) : mixed
Parameters
$item : mixed
Tags
deprecated
6.1.0

deleted in future version.

Return values
mixed

dump_item_ascode()

dump_item_ascode(mixed $item[, mixed $indent = " " ]) : mixed
Parameters
$item : mixed
$indent : mixed = " "
Tags
deprecated
6.1.0

deleted in future version.

Return values
mixed

handle_event()

handle_event(mixed $location[, mixed $baseLink = false ]) : mixed
Parameters
$location : mixed
$baseLink : mixed = false
Return values
mixed

do_forced_nav()

do_forced_nav(mixed $anonymous, mixed $overrideforced) : mixed
Parameters
$anonymous : mixed
$overrideforced : mixed
Return values
mixed

lotgd_mail()

Function for send Mails to users Has the same structure as the php "mail()" function, but this function checks if you want to send emails in html format or not.

lotgd_mail(mixed $to, mixed $subject, mixed $message[, mixed $additional_headers = '' ][, mixed $additional_parameters = '' ]) : mixed
Parameters
$to : mixed
$subject : mixed
$message : mixed
$additional_headers : mixed = ''
$additional_parameters : mixed = ''
Tags
deprecated
5.3.0

Removed in future versions.

Return values
mixed

activate_module()

activate_module(mixed $module) : mixed
Parameters
$module : mixed
Return values
mixed

deactivate_module()

deactivate_module(mixed $module) : mixed
Parameters
$module : mixed
Return values
mixed

uninstall_module()

uninstall_module(mixed $module) : mixed
Parameters
$module : mixed
Return values
mixed

install_module()

install_module(mixed $module[, mixed $force = true ]) : mixed
Parameters
$module : mixed
$force : mixed = true
Return values
mixed

blockmodule()

blockmodule(mixed $modulename) : mixed
Parameters
$modulename : mixed
Return values
mixed

unblockmodule()

unblockmodule(mixed $modulename) : mixed
Parameters
$modulename : mixed
Return values
mixed

module_collect_events()

module_collect_events(mixed $type[, mixed $allowinactive = false ]) : mixed
Parameters
$type : mixed
$allowinactive : mixed = false
Return values
mixed

module_events()

module_events(mixed $eventtype, mixed $basechance[, mixed $baseLink = false ]) : mixed
Parameters
$eventtype : mixed
$basechance : mixed
$baseLink : mixed = false
Return values
mixed

module_do_event()

module_do_event(mixed $type, mixed $module[, mixed $allowinactive = false ][, mixed $baseLink = false ]) : mixed
Parameters
$type : mixed
$module : mixed
$allowinactive : mixed = false
$baseLink : mixed = false
Return values
mixed

event_sort()

event_sort(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Return values
mixed

module_display_events()

module_display_events(mixed $eventtype[, mixed $forcescript = false ]) : mixed
Parameters
$eventtype : mixed
$forcescript : mixed = false
Return values
mixed

modulehook()

modulehook(mixed $hookname[, mixed $args = false ][, mixed $allowinactive = false ][, mixed $only = false ]) : mixed
Parameters
$hookname : mixed
$args : mixed = false
$allowinactive : mixed = false
$only : mixed = false
Tags
deprecated
4.4.0

Remove in future version.

Return values
mixed

module_wipehooks()

Delete hooks of module.

module_wipehooks(string $module) : mixed
Parameters
$module : string
Tags
deprecated
4.4.0

Remove in future version.

Return values
mixed

module_addeventhook()

module_addeventhook(mixed $type, mixed $chance) : mixed
Parameters
$type : mixed
$chance : mixed
Return values
mixed

module_drophook()

module_drophook(mixed $hookname[, bool $functioncall = false ]) : void
Parameters
$hookname : mixed
$functioncall : bool = false
Tags
deprecated
4.4.0

Remove in future version

Return values
void

module_addhook()

Called by modules to register themselves for a game module hook point, with default priority.

module_addhook(string $hookname[, string $functioncall = false ][, string $whenactive = false ]) : mixed

Modules with identical priorities will execute alphabetically. Modules can only have one hook on a given hook name, even if they call this function multiple times, unless they specify different values for the functioncall argument.

Parameters
$hookname : string

The hook to receive a notification for

$functioncall : string = false

The function that should be called, if not specified, use {modulename}_dohook() as the function

$whenactive : string = false

an expression that should be evaluated before triggering the event, if not specified, none

Tags
deprecated
4.4.0

Remove in future version

Return values
mixed

module_addhook_priority()

Called by modules to register themselves for a game module hook point, with a given priority -- lower numbers execute first.

module_addhook_priority(string $hookname[, int $priority = 50 ][, string $functioncall = false ][, string $whenactive = false ]) : mixed

Modules with identical priorities will execute alphabetically. Modules can only have one hook on a given hook name, even if they call this function multiple times, unless they specify different values for the functioncall argument.

Parameters
$hookname : string

The hook to receive a notification for

$priority : int = 50

The priority for this hooking -- lower numbers execute first. < 50 means earlier-than-normal execution, > 50 means later than normal execution. Priority only affects execution order compared to other events registered on the same hook, all events on a given hook will execute before the game resumes execution.

$functioncall : string = false

The function that should be called, if not specified, use {modulename}_dohook() as the function

$whenactive : string = false

an expression that should be evaluated before triggering the event, if not specified, none

Tags
deprecated
4.4.0

Remove in future version

Return values
mixed

injectmodule()

injectmodule(mixed $modulename[, mixed $force = false ]) : mixed
Parameters
$modulename : mixed
$force : mixed = false
Return values
mixed

module_status()

Returns the status of a module as a bitfield.

module_status(string $modulename[, string $version = null ]) : int
Parameters
$modulename : string

The module name

$version : string = null

The version to check for (null for don't care)

Return values
int

The status codes for the module

is_module_active()

Determines if a module is activated.

is_module_active(string $modulename) : bool
Parameters
$modulename : string

The module name

Return values
bool

If the module is active or not

is_module_installed()

Determines if a module is installed.

is_module_installed(string $modulename[, string $version = false ]) : bool
Parameters
$modulename : string

The module name

$version : string = false

The version to check for

Return values
bool

If the module is installed

get_module_install_status()

Get status of module.

get_module_install_status() : array<string|int, mixed>
Return values
array<string|int, mixed>

module_delete_objprefs()

Delete all objtype for objid.

module_delete_objprefs(string $objtype, int $objid) : mixed
Parameters
$objtype : string
$objid : int
Return values
mixed

get_module_objpref()

Get value for a setting for a module, objtype and objid.

get_module_objpref(string $objtype, int $objid, string $name[, string $module = false ]) : mixed
Parameters
$objtype : string
$objid : int
$name : string
$module : string = false
Return values
mixed

set_module_objpref()

Set value for a setting for a module, objtype and objid.

set_module_objpref(string $objtype, int $objid, string $name, mixed $value[, string $module = false ]) : mixed
Parameters
$objtype : string
$objid : int
$name : string
$value : mixed
$module : string = false
Return values
mixed

increment_module_objpref()

Increment value for a setting for a module, objtype and objid.

increment_module_objpref(string $objtype, int $objid, string $name[, float|int $value = 1 ][, string $module = false ]) : mixed
Parameters
$objtype : string
$objid : int
$name : string
$value : float|int = 1
$module : string = false
Return values
mixed

load_module_objpref()

Load objpref of a module.

load_module_objpref(string $objtype, int $objid[, string $module = false ]) : array<string|int, mixed>
Parameters
$objtype : string
$objid : int
$module : string = false
Return values
array<string|int, mixed>

module_delete_userprefs()

Delete all module user preferences.

module_delete_userprefs(int $user) : mixed
Parameters
$user : int
Return values
mixed

get_all_module_prefs()

Get all module prefs of a user.

get_all_module_prefs([string $module = false ][, int $user = false ]) : array<string|int, mixed>
Parameters
$module : string = false
$user : int = false
Return values
array<string|int, mixed>

get_module_pref()

Get pref of user for a given module and setting.

get_module_pref(string $name[, string $module = false ][, int $user = false ]) : mixed
Parameters
$name : string
$module : string = false
$user : int = false
Return values
mixed

set_module_pref()

Set pref of user for a given module and setting.

set_module_pref(string $name, mixed $value[, string $module = false ][, int $user = false ]) : mixed
Parameters
$name : string
$value : mixed
$module : string = false
$user : int = false
Return values
mixed

increment_module_pref()

Increment pref of user for a given module and setting.

increment_module_pref(string $name[, int|float $value = 1 ][, string $module = false ][, int $user = false ]) : mixed
Parameters
$name : string
$value : int|float = 1
$module : string = false
$user : int = false
Return values
mixed

clear_module_pref()

Clear a setting for a given module and user.

clear_module_pref(string $name[, string $module = false ][, int $user = false ]) : mixed
Parameters
$name : string
$module : string = false
$user : int = false
Return values
mixed

load_module_prefs()

Load prefs of a module.

load_module_prefs(string $module[, int $user = false ]) : array<string|int, mixed>
Parameters
$module : string
$user : int = false
Return values
array<string|int, mixed>

get_all_module_settings()

An associative array of all the settings for the given module.

get_all_module_settings([string $module = false ]) : array<string|int, mixed>
Parameters
$module : string = false
Return values
array<string|int, mixed>

get_module_setting()

Get value for setting of a module.

get_module_setting(mixed $name[, mixed $module = false ]) : mixed
Parameters
$name : mixed
$module : mixed = false
Return values
mixed

set_module_setting()

Set value for setting of a module.

set_module_setting(string $name, mixed $value[, string $module = false ]) : mixed
Parameters
$name : string
$value : mixed
$module : string = false
Return values
mixed

increment_module_setting()

Increment value for a setting of module.

increment_module_setting(string $name[, float|int $value = 1 ][, string $module = false ]) : mixed
Parameters
$name : string
$value : float|int = 1
$module : string = false
Return values
mixed

clear_module_settings()

Clear settings of a module.

clear_module_settings([string $module = false ]) : mixed
Parameters
$module : string = false
Return values
mixed

load_module_settings()

Load settings of a module.

load_module_settings(string $module) : array<string|int, mixed>
Parameters
$module : string
Return values
array<string|int, mixed>

module_check_requirements()

Checks if the module requirements are satisfied. Should a module require other modules to be installed and active, then optionally makes them so.

module_check_requirements(array<string|int, mixed> $reqs[, mixed $forceinject = false ]) : bool
Parameters
$reqs : array<string|int, mixed>

Requirements of a module from _getmoduleinfo()

$forceinject : mixed = false
Return values
bool

If successful or not

mass_module_prepare()

Preloads data for multiple modules in one shot rather than having to make SQL calls for each hook, when many of the hooks are found on every page.

mass_module_prepare(array<string|int, mixed> $hooknames) : bool
Parameters
$hooknames : array<string|int, mixed>

names of hooks whose attached modules should be preloaded

Return values
bool

Success

get_module_info()

get_module_info(mixed $shortname) : mixed
Parameters
$shortname : mixed
Return values
mixed

module_editor_navs()

module_editor_navs(mixed $like, mixed $linkprefix) : mixed
Parameters
$like : mixed
$linkprefix : mixed
Return values
mixed

module_objpref_edit()

module_objpref_edit(mixed $type, mixed $module, mixed $id) : mixed
Parameters
$type : mixed
$module : mixed
$id : mixed
Return values
mixed

module_compare_versions()

module_compare_versions(mixed $a, mixed $b) : mixed
Parameters
$a : mixed
$b : mixed
Return values
mixed

module_condition()

Evaluates a PHP Expression.

module_condition(string $condition) : bool
Parameters
$condition : string

The PHP condition to evaluate

Return values
bool

The result of the evaluated expression

get_racename()

get_racename([mixed $thisuser = true ]) : mixed
Parameters
$thisuser : mixed = true
Return values
mixed

module_pref_filter()

module_pref_filter(mixed $a) : mixed
Parameters
$a : mixed
Return values
mixed

redirect()

redirect(mixed $location[, mixed $reason = false ]) : mixed
Parameters
$location : mixed
$reason : mixed = false
Return values
mixed

lotgd_showform()

Construct FORM LOTGD style.

lotgd_showform(mixed $layout, array<string|int, mixed> $row[, bool $nosave = false ][, false|pattern $keypref = false ][, bool $print = true ][, callable $callback = null ]) : mixed
Parameters
$layout : mixed
$row : array<string|int, mixed>
$nosave : bool = false
$keypref : false|pattern = false
$print : bool = true
$callback : callable = null

This can use for personalize the form used to show all inputs or for more process. Can still use lotgd_show_form_field in your callable Both functions get same parameters function($info, $row, $key, $keyout, $val, $extensions)

Tags
deprecated
4.1.0
Return values
mixed

lotgd_show_form_field()

lotgd_show_form_field(mixed $info, mixed $row, mixed $key, mixed $keyout, mixed $val, mixed $extensions) : mixed
Parameters
$info : mixed
$row : mixed
$key : mixed
$keyout : mixed
$val : mixed
$extensions : mixed
Return values
mixed

lotgd_showtabs()

Construct TABS Semantic UI style.

lotgd_showtabs(array<string|int, mixed> $tabs[, bool $print = true ][, callable $callback = null ][, bool $browse = false ]) : mixed
Parameters
$tabs : array<string|int, mixed>

Format: [ 'title for tab 1' => 'Content of tab 1' 'title for tab 2' => 'Content of tab 2' ]

$print : bool = true

Print tabs or return

$callback : callable = null

If you need proccess de content of tab can pass a callback. Default no process content and only show. callback recibe paraments $callback($content, $title)

$browse : bool = false

Indicate type of menu: tabular or browse menu

Return values
mixed

check_su_access()

check_su_access(mixed $level) : mixed
Parameters
$level : mixed
Return values
mixed

checkSuPermission()

Check Superuser premission.

checkSuPermission(int $permission[, string|null $return = null ]) : bool|redirect

Just check and redirect if denied you have permission.

Parameters
$permission : int
$return : string|null = null
Return values
bool|redirect

bell_rand()

bell_rand([mixed $min = false ][, mixed $max = false ]) : mixed
Parameters
$min : mixed = false
$max : mixed = false
Return values
mixed

Search results