Functions new to Luna 1.0 are currenlty missing from this documentation, stay tuned.
These function are in common.php and functions.php.
Returns the time in milliseconds.
Takes $luna_user, and populates it with the user data.
Takes a string with CDATA for scripts in it, and escapes it for HTML.
$str = '<script type="text/javascript"> //<![CDATA[ alert('foo'); //]]>';
echo escape_cdata($str);
Authenticates the provided username and password against the user database.
Delete threads from $forum_id that are "older than" $prune_date.
This gets the URL, and returns null if the URL is longer than $max_length. If $max_length is left out, then it will return the current URL regardless of length.
Returns the protocol being used to access the server ('http' or 'https');.
This returns the base URL of the forum (i.e. what was set up in the configuration), and if $support_https is set to true, it will return it in HTTP or HTTPS, depending on how the page is accessed.
Fetches admin IDs.
This sets $luna_user to the defaults for a guest.
A hash function, no better description at this time.
Sets a cookie for the current user, based on the settings you put in the parameters.
Sets a cookie for the cookie bar.
This is simply a wrapper for setcookie.
This gets the bans and puts them into $luna_bans, and will check for expired ones.
Checks whether or not the given username is allowed.
Updates the database table containing the users online.
Generates the HTML to display the avatar for the user sent in $user_id. Deprecated.
Same function as generatie_avatar_markup() but allows you to choose wether or not the avatar should be responsive and add additional classes.
Checks if the given user has an avatar.
Sets the title for the page you are on.
No description at this time.
No description at this time.
Updates the database entries for the last commenter and last comment in a forum.
Deletes the avatar for the user with ID $user_id.
Deletes a thread and all of its replies.
Deletes the comment specified.
Deletes all cached date (i.e. bans, config, etc.).
Runs the censoring filter on the text sent in $text, and returns the censored version.
Gets the user title of the user sent in $user. $user must contain:
array (
'title' => '*custom user title*',
'username' => '*username*',
'g_user_title' => '*default user group title*'
)
Generates the page links (i.e. page 1, page 2, next page, previous page, etc.).
Same function as paginate, but for inline.
This displays a message to the user and stops the current script. If $no_back_link is left out, then a back link won't be displayed.
Same as above, but fo Backstage
Checks if a forum is a subforum.
format_time($timestamp, $date_only = false, $date_format = null, $time_format = null, $time_only = false, $no_text = false)
Formats the time for the user (depending on the user's formatting preferences).
No description at this time.
No description at this time.
Make sure that HTTP_REFERER matches base_url/script.
Generates a random password of length $len.
A wrapper for the SHA-1 function.
A wrapper for the SHA-512 function and its salt.
Compute a random hash used against CSRF attacks.
Check if the CSRF hash is correct.
Returns the IP address of the current user.
Returns $str with all HTML stripped.
Calls htmlspecialchars_decode with a few options already set.
Returns the UTF-8 length of a string.
Converts linkbreaks to the standard UNIX style.
No description at this time.
Checks if a string is all uppercase.
Inserts $element into $input at $offset. If $key is set, it is used for setting the key for adding into an array where the keys are strings.
Displays a maintenance message when the board is in maintenance mode.
Redirects the user to $destination_url with $message.
Clears all output and displays an error message.
$result = $db->query('SELECT id FROM users WHERE id=' . $luna_user['id']) or error('Could not select user ID', __FILE__, __LINE__, $db->error());
Unset any variables created as a result of register_globals.
Removes any characters that can cause undesired result or are invisible from text.
Removes "bad" characters from the array.
Converts a file size in bytes into a more human version (e.g. 1024 B changed into 1 KiB).
Returns a list of the styles.
Returns a list of the accents.
Returns a list of the available languages.
No description at this time.
Generates a list of the plugins available for the forum.
No description at this time.
No description at this time.
Checks if $url is a valid URL.
Replace string matching regular expression.
A wrapper for ucp_preg_replace.
Strips all characters that are multiple bytes.
Checks whether $path is writable.
Displays all executed queries, if it is enabled.
Shows all variables.
Get the template that is required.
Get the object that is required.
Get the view that is required.
Get the styles that are required.
Get the meta tags that are required.
Check wheter or not to enable night mode and force the accent.
Delete all content in a folder but not the htaccess-file.
Validate the given redirect URL, use the fallback otherwise.
Fetch online users.
Number of guests online.
Get forum_id by comment_id.
Decrease user comment counts (used before deleting comments).
Create or delete configuration items.