Elgg
Version 5.0
|
Go to the source code of this file.
Namespaces | |
Singleton | |
object for holding the Elgg javascript library | |
Variables | |
var | elgg = elgg || {} |
elgg | assertTypeOf |
Throw an exception of the type doesn't match. More... | |
elgg | normalize_url |
Converts shorthand urls to absolute urls. More... | |
elgg | deprecated_notice |
Informs admin users via a console message about use of a deprecated function or capability. More... | |
elgg | forward |
Meant to mimic the php forward() function by simply redirecting the user to another page. More... | |
elgg | parse_url |
Parse a URL into its parts. More... | |
elgg | parse_str |
Returns an object with key/values of the parsed query string. More... | |
elgg | getSelectorFromUrlFragment |
Returns a jQuery selector from a URL's fragment. More... | |
elgg | get_logged_in_user_guid |
Returns the GUID of the logged in user or 0. More... | |
elgg | is_logged_in |
Returns if a user is logged in. More... | |
elgg | is_admin_logged_in |
Returns if the currently logged in user is an admin. More... | |
elgg | get_site_url |
Returns the current site URL. More... | |
elgg | get_simplecache_url |
Get the URL for the cached file. More... | |
elgg assertTypeOf |
Throw an exception of the type doesn't match.
Definition at line 9 of file elgglib.js.
elgg deprecated_notice |
Informs admin users via a console message about use of a deprecated function or capability.
{String} | msg The deprecation message to display |
{String} | dep_version The version the function was deprecated for |
Definition at line 99 of file elgglib.js.
var elgg = elgg || {} |
Definition at line 4 of file elgglib.js.
elgg forward |
Meant to mimic the php forward() function by simply redirecting the user to another page.
{String} | url The url to forward to |
Definition at line 114 of file elgglib.js.
elgg get_logged_in_user_guid |
Returns the GUID of the logged in user or 0.
Definition at line 270 of file elgglib.js.
elgg get_simplecache_url |
Get the URL for the cached file.
{String} | view The full view name |
{String} | subview If the first arg is "css" or "js", the rest of the view name |
Definition at line 309 of file elgglib.js.
elgg get_site_url |
Returns the current site URL.
Definition at line 297 of file elgglib.js.
elgg getSelectorFromUrlFragment |
Returns a jQuery selector from a URL's fragment.
Defaults to expecting an ID.
Examples: http://elgg.org/download.php returns '' http://elgg.org/download.php#id returns #id http://elgg.org/download.php#.class-name return .class-name http://elgg.org/download.php#a.class-name return a.class-name
{String} | url The URL |
Definition at line 249 of file elgglib.js.
elgg is_admin_logged_in |
Returns if the currently logged in user is an admin.
Definition at line 288 of file elgglib.js.
elgg is_logged_in |
Returns if a user is logged in.
Definition at line 279 of file elgglib.js.
elgg normalize_url |
Converts shorthand urls to absolute urls.
If the url is already absolute or protocol-relative, no change is made.
elgg.normalize_url(''); // 'http://my.site.com/' elgg.normalize_url('dashboard'); // 'http://my.site.com/dashboard' elgg.normalize_url('http://google.com/'); // no change elgg.normalize_url('//google.com/'); // no change
{String} | url The url to normalize |
Definition at line 29 of file elgglib.js.
elgg parse_str |
Returns an object with key/values of the parsed query string.
{String} | string The string to parse |
Definition at line 208 of file elgglib.js.
elgg parse_url |
Parse a URL into its parts.
Mimicks http://php.net/parse_url
{String} | url The URL to parse |
{String} | component A component to return |
{Boolean} | expand Expand the query into an object? Else it's a string. |
Definition at line 139 of file elgglib.js.