Fixing a small css issue in the user class.
[elgg.git] / lib / constants.php
blob2bf4bf214c45d4ef254be4abd5084c88992b44e5
1 <?php
3 // define all the constants and other global vars that are used by elgglib.
5 /// Parameter constants - if set then the parameter is cleaned of scripts etc. ///
6 /**
7 * PARAM_RAW specifies a parameter that should contain:
8 */
9 define('PARAM_RAW', 0x0000);
11 /**
12 * PARAM_CLEAN specifies a parameter that should contain:
14 define('PARAM_CLEAN', 0x0001);
16 /**
17 * PARAM_INT specifies a parameter that should contain an integer value only.
19 define('PARAM_INT', 0x0002);
21 /**
22 * PARAM_INTEGER - an alias for PARAM_INT
24 define('PARAM_INTEGER', 0x0002);
26 /**
27 * PARAM_ALPHA specifies a parameter that should contain a string type (?).
29 define('PARAM_ALPHA', 0x0004);
31 /**
32 * PARAM_ACTION - an alias for PARAM_ALPHA
34 define('PARAM_ACTION', 0x0004);
36 /**
37 * PARAM_FORMAT - an alias for PARAM_ALPHA
39 define('PARAM_FORMAT', 0x0004);
41 /**
42 * PARAM_NOTAGS specifies a parameter that should contain:
44 define('PARAM_NOTAGS', 0x0008);
46 /**
47 * PARAM_FILE specifies a parameter that should contain:
49 define('PARAM_FILE', 0x0010);
51 /**
52 * PARAM_PATH specifies a parameter that should contain:
54 define('PARAM_PATH', 0x0020);
56 /**
57 * PARAM_HOST specifies a parameter that should contain a fully qualified domain name (FQDN) or an IPv4 dotted quad (IP address)
59 define('PARAM_HOST', 0x0040);
61 /**
62 * PARAM_URL specifies a parameter that should contain a string in the form of a properly formatted URL.
64 define('PARAM_URL', 0x0080);
66 /**
67 * PARAM_LOCALURL specifies a parameter that should contain a string in the form of a properly formatted URL as well as one that refers to the local server itself. (NOT orthogonal to the others! Implies PARAM_URL!)
69 define('PARAM_LOCALURL', 0x0180);
71 /**
72 * PARAM_CLEANFILE specifies a parameter that should contain:
74 define('PARAM_CLEANFILE',0x0200);
76 /**
77 * PARAM_ALPHANUM specifies a parameter that should contain either numbers or letters only.
79 define('PARAM_ALPHANUM', 0x0400);
81 /**
82 * PARAM_BOOL specifies a parameter that should contain a 0 or 1 boolean value only. It will convert to value 1 or 0 using empty()
84 define('PARAM_BOOL', 0x0800);
86 /**
87 * PARAM_CLEANHTML specifies a parameter that should contain actual HTML code that you want cleaned and slashes removed
89 define('PARAM_CLEANHTML',0x1000);
91 /**
92 * PARAM_ALPHAEXT specifies a parameter that should contain the same contents as PARAM_ALPHA plus the chars in quotes: "/-_" allowed
94 define('PARAM_ALPHAEXT', 0x2000);
96 /**
97 * PARAM_SAFEDIR specifies a parameter that should contain a safe directory name, suitable for include() and require()
99 define('PARAM_SAFEDIR', 0x4000);
102 /// Define text formatting types ... eventually we can add Wiki, BBcode etc
105 * Does all sorts of transformations and filtering
107 define('FORMAT_MOODLE', '0'); // Does all sorts of transformations and filtering
110 * Plain HTML (with some tags stripped)
112 define('FORMAT_HTML', '1'); // Plain HTML (with some tags stripped)
115 * Plain text (even tags are printed in full)
117 define('FORMAT_PLAIN', '2'); // Plain text (even tags are printed in full)
120 * Wiki-formatted text
121 * Deprecated: left here just to note that '3' is not used (at the moment)
122 * and to catch any latent wiki-like text (which generates an error)
124 define('FORMAT_WIKI', '3'); // Wiki-formatted text
127 * Markdown-formatted text http://daringfireball.net/projects/markdown/
129 define('FORMAT_MARKDOWN', '4'); // Markdown-formatted text http://daringfireball.net/projects/markdown/
133 * Allowed tags - string of html tags that can be tested against for safe html tags
134 * @global string $ALLOWED_TAGS
136 $ALLOWED_TAGS =
137 '<p><br><b><i><u><font><table><tbody><span><div><tr><td><th><ol><ul><dl><li><dt><dd><h1><h2><h3><h4><h5><h6><hr><img><a><strong><emphasis><em><sup><sub><address><cite><blockquote><pre><strike><acronym><nolink><lang><tex><algebra><math><mi><mn><mo><mtext><mspace><ms><mrow><mfrac><msqrt><mroot><mstyle><merror><mpadded><mphantom><mfenced><msub><msup><msubsup><munder><mover><munderover><mmultiscripts><mtable><mtr><mtd><maligngroup><malignmark><maction><cn><ci><apply><reln><fn><interval><inverse><sep><condition><declare><lambda><compose><ident><quotient><exp><factorial><divide><max><min><minus><plus><power><rem><times><root><gcd><and><or><xor><not><implies><forall><exists><abs><conjugate><eq><neq><gt><lt><geq><leq><ln><log><int><diff><partialdiff><lowlimit><uplimit><bvar><degree><set><list><union><intersect><in><notin><subset><prsubset><notsubset><notprsubset><setdiff><sum><product><limit><tendsto><mean><sdev><variance><median><mode><moment><vector><matrix><matrixrow><determinant><transpose><selector><annotation><semantics><annotation-xml><tt><code>';
140 * Allowed protocols - array of protocols that are safe to use in links and so on
141 * @global string $ALLOWED_PROTOCOLS
143 $ALLOWED_PROTOCOLS = array('http', 'https', 'ftp', 'news', 'mailto', 'rtsp', 'teamspeak', 'gopher', 'mms',
144 'color', 'callto', 'cursor', 'text-align', 'font-size', 'font-weight', 'font-style',
145 'border', 'margin', 'padding'); // CSS as well to get through kses