Unclassified NewsBoard Code Reference

UnbLink function

Builds links to other forum and web pages in a unified way

function UnbLink ($url, $params = null, $html = false, $sid = true, $derefer = false, $allowshort = true, $complete = false, $parse = true);

Parameters:

url
(string) URL to other website
params  –  optional, default: null
(array(name => value)) all GET parameters
(string) short simple parameters (this is only an ugly hack because I'm too lazy sometimes... ;))
example: "page=4&code=0"
html  –  optional, default: false
(bool) html-quote the link
sid  –  optional, default: true
(bool) include session ID if required. forced false if $derefer
derefer  –  optional, default: false
(bool) use dereferer
allowshort  –  optional, default: true
(bool) allow shortened URLs. should be false for GET forms
complete  –  optional, default: false
(bool) auto-complete URL by adding http:// if not present
parse  –  optional, default: true
(bool) parse URL for parameters

Return value:

(string) correctly built URL

Remarks:

NOTE: How to change the 'req' request parameter: Search all files for the
REQUEST-PARAMETER tag and replace occurences of the string 'req' with your
new parameter name.

NOTE: How to change the page request keys: Search all files for the
REQUEST-NAME tag and replace occurences of the request key string (not the
ones with the @ in front) with your new key name.

Implementation file: unb_lib/common.lib.php, line 871

© 2006 Yves Goergen. Unclassified NewsBoard Homepage. Reference based on UNB unb.devel.20060128, dated 2006-01-28.