[ Index ]

PHP Cross Reference of phpBB-3.2.0-deutsch




/includes/ -> functions_content.php (summary)

This file is part of the phpBB Forum Software package.

Copyright: (c) phpBB Limited
License: GNU General Public License, version 2 (GPL-2.0)
File Size: 1750 lines (50 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

bitfield:: (9 methods):

Defines 9 functions


Class: bitfield  - X-Ref

bitfield($bitfield = '')   X-Ref
No description

get($n)   X-Ref
No description

set($n)   X-Ref
No description

clear($n)   X-Ref
No description

get_blob()   X-Ref
No description

get_base64()   X-Ref
No description

get_bin()   X-Ref
No description

get_all_set()   X-Ref
No description

merge($bitfield)   X-Ref
No description

Functions that are not part of a class:

gen_sort_selects(&$limit_days, &$sort_by_text, &$sort_days, &$sort_key, &$sort_dir, &$s_limit_days, &$s_sort_key, &$s_sort_dir, &$u_sort_param, $def_st = false, $def_sk = false, $def_sd = false)   X-Ref
Generate sort selection fields

make_jumpbox($action, $forum_id = false, $select_all = false, $acl_list = false, $force_display = false)   X-Ref
Generate Jumpbox

bump_topic_allowed($forum_id, $topic_bumped, $last_post_time, $topic_poster, $last_topic_poster)   X-Ref
Bump Topic Check - used by posting and viewtopic

get_context($text, $words, $length = 400)   X-Ref
Generates a text with approx. the specified length which contains the specified words and their context

return: string            Context of the specified words separated by "..."
param: string    $text    The full text from which context shall be extracted
param: string    $words    An array of words which should be contained in the result, has to be a valid part of a PCRE pattern (escape with preg_quote!)
param: int        $length    The desired length of the resulting text, however the result might be shorter or longer than this value

phpbb_clean_search_string($search_string)   X-Ref
Cleans a search string by removing single wildcards from it and replacing multiple spaces with a single one.

return: string The cleaned search string without any wildcards and multiple spaces.
param: string $search_string The full search string which should be cleaned.

decode_message(&$message, $bbcode_uid = '')   X-Ref
Decode text whereby text is coming from the db and expected to be pre-parsed content
We are placing this outside of the message parser because we are often in need of it...

NOTE: special chars are kept encoded

return: null
param: string &$message Original message, passed by reference
param: string $bbcode_uid BBCode UID

strip_bbcode(&$text, $uid = '')   X-Ref
Strips all bbcode from a text in place

generate_text_for_display($text, $uid, $bitfield, $flags, $censor_text = true)   X-Ref
For display of custom parsed text on user-facing pages
Expects $text to be the value directly from the database (stored value)

generate_text_for_storage(&$text, &$uid, &$bitfield, &$flags, $allow_bbcode = false, $allow_urls = false, $allow_smilies = false, $allow_img_bbcode = true, $allow_flash_bbcode = true, $allow_quote_bbcode = true, $allow_url_bbcode = true, $mode = 'post')   X-Ref
For parsing custom parsed text to be stored within the database.
This function additionally returns the uid and bitfield that needs to be stored.
Expects $text to be the value directly from $request->variable() and in it's non-parsed form

return: array    An array of string with the errors that occurred while parsing
param: string $text The text to be replaced with the parsed one
param: string $uid The BBCode uid for this parse
param: string $bitfield The BBCode bitfield for this parse
param: int $flags The allow_bbcode, allow_urls and allow_smilies compiled into a single integer.
param: bool $allow_bbcode If BBCode is allowed (i.e. if BBCode is parsed)
param: bool $allow_urls If urls is allowed
param: bool $allow_smilies If smilies are allowed
param: bool $allow_img_bbcode
param: bool $allow_flash_bbcode
param: bool $allow_quote_bbcode
param: bool $allow_url_bbcode
param: string $mode Mode to parse text as, e.g. post or sig

generate_text_for_edit($text, $uid, $flags)   X-Ref
For decoding custom parsed text for edits as well as extracting the flags
Expects $text to be the value directly from the database (pre-parsed content)

make_clickable_callback($type, $whitespace, $url, $relative_url, $class)   X-Ref
A subroutine of make_clickable used with preg_replace
It places correct HTML around an url, shortens the displayed text
and makes sure no entities are inside URLs

make_clickable($text, $server_url = false, $class = 'postlink')   X-Ref
make_clickable function

Replace magic urls of form http://xxx.xxx., www.xxx. and xxx@xxx.xxx.
Cuts down displayed size of link if over 50 chars, turns absolute links
into relative versions when the server/script path matches the link

censor_text($text)   X-Ref

bbcode_nl2br($text)   X-Ref
custom version of nl2br which takes custom BBCodes into account

smiley_text($text, $force_option = false)   X-Ref
Smiley processing

parse_attachments($forum_id, &$message, &$attachments, &$update_count_ary, $preview = false)   X-Ref
General attachment parsing

param: mixed $forum_id The forum id the attachments are displayed in (false if in private message)
param: string &$message The post/private message
param: array &$attachments The attachments to parse for (inline) display. The attachments array will hold templated data after parsing.
param: array &$update_count_ary The attachment counts to be updated - will be filled
param: bool $preview If set to true the attachments are parsed for preview. Within preview mode the comments are fetched from the given $attachments array and not fetched from the database.

extension_allowed($forum_id, $extension, &$extensions)   X-Ref
Check if extension is allowed to be posted.

return: bool False if the extension is not allowed to be posted, else true.
param: mixed $forum_id The forum id to check or false if private message
param: string $extension The extension to check, for example zip.
param: array &$extensions The extension array holding the information from the cache (will be obtained if empty)

truncate_string($string, $max_length = 60, $max_store_length = 255, $allow_reply = false, $append = '')   X-Ref
Truncates string while retaining special characters if going over the max length
The default max length is 60 at the moment
The maximum storage length is there to fit the string within the given length. The string may be further truncated due to html entities.
For example: string given is 'a "quote"' (length: 9), would be a stored as 'a "quote"' (length: 19)

param: string $string The text to truncate to the given length. String is specialchared.
param: int $max_length Maximum length of string (multibyte character count as 1 char / Html entity count as 1 char)
param: int $max_store_length Maximum character length of string (multibyte character count as 1 char / Html entity count as entity chars).
param: bool $allow_reply Allow Re: in front of string
param: string $append String to be appended

get_username_string($mode, $user_id, $username, $username_colour = '', $guest_username = false, $custom_profile_url = false)   X-Ref
Get username details for placing into templates.
This function caches all modes on first call, except for no_profile and anonymous user - determined by $user_id.

return: string A string consisting of what is wanted based on $mode.
param: string $mode Can be profile (for getting an url to the profile), username (for obtaining the username), colour (for obtaining the user colour), full (for obtaining a html string representing a coloured link to the users profile) or no_profile (the same as full but forcing no profile link)
param: int $user_id The users id
param: string $username The users name
param: string $username_colour The users colour
param: string $guest_username optional parameter to specify the guest username. It will be used in favor of the GUEST language variable then.
param: string $custom_profile_url optional parameter to specify a profile url. The user id get appended to this url as &u={user_id}

phpbb_add_quickmod_option($url, $option, $lang_string)   X-Ref
Add an option to the quick-mod tools.

param: string $url The recepting URL for the quickmod actions.
param: string $option The language key for the value of the option.
param: string $lang_string The language string to use.

phpbb_generate_string_list($items, $user)   X-Ref
Concatenate an array into a string list.

return: string String list. Examples: "A"; "A and B"; "A, B, and C"
param: array $items Array of items to concatenate
param: object $user The phpBB $user object.

Generated: Sun Feb 19 19:47:08 2017 Cross-referenced by PHPXref 0.7.1