PHP-Fusion Development

Core functions

Here are the articles in this section:
addslash()
Add correct number of slashes depending on QUOTES_GPC.
blacklist()
UF blacklist for SQL.
cache_bbcode()
Cache of all installed BBCodes from the database.
cache_groups()
Cache of all user groups from the database.
cache_smileys()
Cache of all smileys from the database.
calculate_byte()
Returns nearest data unit.
censorwords()
Replace offensive words with the defined replacement word. The list of offensive words and the replacement word are both...
clean_request()
Generate a clean request URI.
cleanurl()
Clean URL will clean the URL and prevents entities in server globals.
define_site_language()
Define constants for defined site language.
descript()
Sanitize text and remove a potentially dangerous HTML and JavaScript.
display_captcha()
Display captcha.
display_html()
Display set of buttons.
displaysmileys()
Show smiley's button which will insert the smileys to the given textarea and form.
encode_code()
Encode and format code inside <code> tag.
flatten_array()
To flatten any multidimensional array.
flood_control()
With this function you are able to prevent users from flooding the system, typical spam bots and others. This function s...
formatcode()
Add correct amount of spaces and tabs inside code.
fusion_detect_installation()
Detect whether the system is installed.
fusion_first_words()
Trim a text to a number of words.
fusion_get_aidlink()
Get Aidlink.
fusion_get_currency()
Get currency symbol by using a 3-letter ISO 4217 currency code.
fusion_get_detected_language()
Get the array of detected languages.
fusion_get_enabled_languages()
Get the array of enabled languages.
fusion_get_groups()
Gets array of all access levels and user groups.
fusion_get_language_switch()
Get language switch arrays.
fusion_get_locale()
Fetch a locales.
fusion_get_settings()
Fetch the settings from DB_SETTINGS.
fusion_get_token()
Get form tokens.
fusion_get_user()
Get the data of any user by ID.
fusion_get_userdata()
Fetch user data of the currently logged in user from DB_USERS.
fusion_get_username()
Fetch user name by ID.
fusion_parse_user()
Tag a user by simply just posting his name like @Nick and if found, returns a tooltip.
fusion_run_installer()
Run the installer or halt the script.
get_available_languages_list()
Create a selection list of possible languages in list.
get_http_response_code()
Get HTTP response code.
get_image()
Get the imagepath or <img> tag.
getgroupname()
Get the name of the access level or user group.
getusergroups()
Gets all access levels and user groups and make one array out of them for easy access and usage.
getuserlevel()
Get a user level's name by the numeric code of level.
getuserstatus()
Get a user status by the numeric code of status.
groupaccess()
Getting the access levels used when asking the database for data.
hide_email()
Hide email from robots that have JavaScript disabled, as it requires JavaScript to view email.
highlight_words()
Highlights given words in string.
check_admin_pass()
Check if admin password matches userdata.
checkgroup()
Check if user is assigned to the specified user group.
checkrights()
checkusergroup()
Check if user is assigned to the specified user group and has the required user level.
infinite_scroll()
Infinite scroll pagination.
isnum()
Validate numeric input.
jsminify()
Minify JS code.
lang_switcher()
Language switcher function.
make_page_breadcrumbs()
Hierarchy Page Breadcrumbs, generates breadcrumbs on all your category needs.
makefilelist()
Create a list of files or folders and store them in an array.
makefileopts()
Create <option></option> from the entries in a given array.
makepagenav()
Creates a full page navigation used.
pageAccess()
Check the user rights and redirect if the user does not have rights for the page.
parse_imageDir()
Parse and force image/ to own directory.
parse_textarea()
Parse BBCodes, smileys and any special characters to HTML string.
parsebytesize()
Translate bytes into kB, MB, GB or TB.
parsesmileys()
Parse the smileys in string and display smiley codes as smiley images.
parseubb()
Parse BBCodes in the given string.
phpentities()
Converts all applicable characters to HTML entities.
preg_check()
Custom preg_match function.
print_p()
Prints human-readable information about a variable.
profile_link()
User profile link.
random_string()
Generate random string.
redirect()
Redirect to internal or external URL.
redirect_img_dir()
Replace a part in each image path.
rrmdir()
Recursively remove folder and all files/subdirectories.
save_user_log()
Log user actions.
sendemail()
Send a mail to one or more email addresses.
sendemail_template()
set_admin_pass()
Set password of the currently logged in an administrator.
set_image()
Set a path of an image.
set_language()
Set the requested language.
set_status_header()
Set HTTP status header.
set_theme()
Set a valid theme.
showdate()
Format the date and time according to the site and user offset.
stripfilename()
Strips a given filename from any unwanted characters and symbols.
stripget()
Prevent any possible XSS attacks via $_GET.
stripinput()
Strip Input, prevents HTML in unwanted places.
stripslash()
Stripslash function, only strip slashes if magic_quotes_gpc is on.
theme_exists()
Check if a given theme exists and is valid.
trim_text()
Pure trim function.
trimlink()
Prevent strings from growing to long and breaking the layout.
uncompressIPv6()
Convert a shortened IPv6 address to its full length form.
user_blacklisted()
Check if user was blacklisted by a member.
user_pm_settings()
Fetch user PM settings.
users_groupaccess()
Check if user has access to the group.
valid_language()
Check if a given language is valid or if exists.
verify_image()
Scan image files for malicious code.
write_file()
A wrapper function for file_put_contents with cache invalidation.