Procedural File: _functions.php
Source Location: /blogs/b2evocore/_functions.php
Includes
require_once
(dirname(__FILE__).'/_functions_cats.php')
[line 18]
Includes:
require_once
(dirname(__FILE__).'/_functions_pings.php')
[line 24]
require_once
(dirname(__FILE__).'/_functions_errors.php')
[line 26]
require_once
(dirname(__FILE__).'/_functions_skins.php')
[line 25]
require_once
(dirname(__FILE__).'/_functions_blogs.php')
[line 19]
require_once
(dirname(__FILE__).'/_functions_pingback.php')
[line 23]
require_once
(dirname(__FILE__).'/_functions_users.php')
[line 21]
require_once
(dirname(__FILE__).'/_class_htmlchecker.php')
[line 29]
require_once
(dirname(__FILE__).'/_functions_antispam.php')
[line 27]
require_once
(dirname(__FILE__).'/_functions_trackback.php')
[line 22]
require_once
(dirname(__FILE__).'/_functions_bposts.php')
[line 20]
Functions
void alert_confirm(
$msg
)
|
|
Parameters:
void antispambot(
$emailaddy, [ $mailto = 0]
)
|
|
Parameters:
void autobrize(
$content
)
|
|
Parameters:
void autoquote(
&$string
)
|
|
Parameters:
void balanceTags(
$text
)
|
|
Parameters:
void convert_chars(
$content, [ $flag = 'html']
)
|
|
Parameters:
void date_i18n(
$dateformatstring, $unixtimestamp, [ $useGM = false]
)
|
|
Parameters:
|
|
$dateformatstring: |
|
|
|
$unixtimestamp: |
|
|
|
$useGM: |
|
void debug_fopen(
$filename, $mode
)
|
|
Parameters:
void debug_fwrite(
$fp, $string
)
|
|
Parameters:
void debug_info(
[boolean $force = false]
)
|
|
Outputs debug info. (Typically at the end of the page)
Parameters:
|
boolean |
$force: |
true to force output |
void debug_log(
boolean $message
)
|
|
Log a debug string to be displayed later. (Typically at the end of the page)
Parameters:
|
boolean |
$message: |
true to force output |
format_to_edit [line 145]
void format_to_edit(
$content, [ $autobr = false]
)
|
|
Parameters:
format_to_output [line 76]
string format_to_output(
string $content, [string $format = 'htmlbody']
)
|
|
Format a string/content for being output
Parameters:
|
string |
$content: |
raw text |
|
string |
$format: |
format, can be one of the following - raw: do nothing
- htmlbody: display in HTML page body: allow full HTML
- entityencoded: Special mode for RSS 0.92: allow full HTML but escape it
- htmlhead: strips out HTML (mainly for use in Title)
- htmlattr: use as an attribute: strips tags and escapes quotes
- formvalue: use as a form value: escapes quotes and < > but leaves code alone
- xml: use in an XML file: strip HTML tags
- xmlattr: use as an attribute: strips tags and escapes quotes
|
API Tags:
Information Tags:
format_to_post [line 161]
void format_to_post(
$content, [ $autobr = 0], [ $is_comment = 0], [ $encoding = '']
)
|
|
Parameters:
|
|
$content: |
|
|
|
$autobr: |
|
|
|
$is_comment: |
|
|
|
$encoding: |
|
void get_path(
[ $which = '']
)
|
|
get_path(-)
Parameters:
get_weekstartend [line 421]
void get_weekstartend(
$mysqlstring, $start_of_week
)
|
|
Get start and end day of a week, based on week number and start-of-week
Used by Calendar
Parameters:
|
|
$mysqlstring: |
|
|
|
$start_of_week: |
|
void is_email(
$user_email
)
|
|
Parameters:
make_clickable [line 316]
void make_clickable(
$text, [ $moredelim = '&amp;']
)
|
|
Make links clickable in a given text.
Parameters:
Information Tags:
| Todo: | IMHO it would be better to use "\b" (word boundary) to match the beginning of links.. original function: phpBB, extended here for AIM & ICQ fplanque restricted :// to http:// and mailto:// |
void mysql2date(
$dateformatstring, $mysqlstring, [ $useGM = false]
)
|
|
*** // Formatting functions ****
Parameters:
|
|
$dateformatstring: |
|
|
|
$mysqlstring: |
|
|
|
$useGM: |
|
boolean mysql_oops(
string $sql_query
)
|
|
Report MySQL errors in detail.
Parameters:
|
string |
$sql_query: |
The query which led to the error |
API Tags:
| Return: | success? |
| Deprecated: | use class DB instead |
void obhandler(
string $output
)
|
|
Output Buffer handler.
It will be set in /blogs/evocore/_main.php and handle the output. It strips every line and generates a md5-ETag, which is checked against the one eventually being sent by the browser.
Parameters:
|
string |
$output: |
output given by PHP |
Information Tags:
mixed param(
string $var, [string $type = ''], [mixed $default = ''], [boolean $memorize = false], [boolean $override = false], [boolean $forceset = true]
)
|
|
Sets a parameter with values from the request or to provided default, except if param is already set!
Also removes magic quotes if they are set automatically by PHP. Also forces type. Priority order: POST, GET, COOKIE, DEFAULT.
Parameters:
|
string |
$var: |
Variable to set |
|
string |
$type: |
Force value type to one of: - boolean
- integer
- float
- string
- array
- object
- null
- html (does nothing)
|
|
mixed |
$default: |
Default value or TRUE if user input required |
|
boolean |
$memorize: |
Do we need to memorize this to regenerate the URL for this page? |
|
boolean |
$override: |
Override if variable already set |
|
boolean |
$forceset: |
Force setting of variable to default? |
API Tags:
| Return: | Final value of Variable, or false if we don't force setting and and did not set |
Information Tags:
| Author: | fplanque |
| Todo: | add option to override what's already set. DONE. |
void pre_dump(
mixed $dump, [string $title = '']
)
|
|
wrap pre around var_dump(), better debuggin'
Parameters:
|
mixed |
$dump: |
variable to dump |
|
string |
$title: |
title to display |
Information Tags:
void redirect_js(
$url, [ $title = "..."]
)
|
|
Parameters:
regenerate_url [line 937]
void regenerate_url(
[ $ignore = ''], [ $set = ''], [ $pagefileurl = '']
)
|
|
Parameters:
|
|
$ignore: |
|
|
|
$set: |
|
|
|
$pagefileurl: |
|
remove_magic_quotes [line 789]
void remove_magic_quotes(
mixed $mixed
)
|
|
Clean up the mess PHP has created with its funky quoting everything!
Parameters:
|
mixed |
$mixed: |
string or array (function is recursive) |
void send_mail(
string $to, string $subject, string $message, [string $from = ''], [array $headers = array()]
)
|
|
sends a mail, wraps PHP's mail() function.
$current_locale will be used to set the charset
send_mail(-)
Parameters:
|
string |
$to: |
recipient |
|
string |
$subject: |
subject of the mail |
|
string |
$message: |
the message |
|
string |
$from: |
From address, being added to headers |
|
array |
$headers: |
additional headers |
void timer_stop(
[ $display = 0], [ $precision = 3]
)
|
|
Parameters:
void unautobrize(
$content
)
|
|
Parameters:
url_add_param [line 1274]
void url_add_param(
string $url, string $param, [string $moredelim = '&amp;']
)
|
|
Add param(s) at the end of an URL, using either ? or & depending on exiting url
url_add_param(-)
Parameters:
|
string |
$url: |
existing url |
|
string |
$param: |
params to add |
|
string |
$moredelim: |
delimiter to use for more params |
void url_add_tail(
string $url, string $tail
)
|
|
Add a tail (starting with /) at the end of an URL before any params (starting with ?)
url_add_tail(-)
Parameters:
|
string |
$url: |
existing url |
|
string |
$tail: |
tail to add |
mixed validate_url(
string $url, array &$allowed_uri_scheme
)
|
|
Check the validity of a given URL
Checks allowed URI schemes and URL ban list URL can be empty
Parameters:
|
string |
$url: |
Url to validate |
|
array |
&$allowed_uri_scheme: |
Allowed URI schemes (see /conf/_formatting.php) |
API Tags:
| Return: | false or error message |
xmlrpc_displayresult [line 599]
void xmlrpc_displayresult(
$result, [ $log = ''], [ $display = true]
)
|
|
Parameters:
xmlrpc_getpostcategory [line 572]
void xmlrpc_getpostcategory(
$content
)
|
|
Also used by post by mail
Parameters:
xmlrpc_getposttitle [line 555]
void xmlrpc_getposttitle(
$content
)
|
|
Parameters:
xmlrpc_removepostdata [line 585]
void xmlrpc_removepostdata(
$content
)
|
|
Parameters:
void zeroise(
$number, $threshold
)
|
|
Parameters: