Elgg  Version 1.11
Functions
deprecated-1.8.php File Reference

Go to the source code of this file.

Functions

 list_entities_from_access_id ($access_id, $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=true, $pagination=true)
 Lists entities from an access collection. More...
 
 register_action ($action, $public=false, $filename="", $admin_only=false)
 Registers a particular action in memory. More...
 
 extend_elgg_admin_page ($new_admin_view, $view= 'admin/main', $priority=500)
 Register an admin page with the admin panel. More...
 
 get_entities_from_annotations_calculate_x ($sum="sum", $entity_type="", $entity_subtype="", $name="", $mdname= '', $mdvalue= '', $owner_guid=0, $limit=10, $offset=0, $orderdir= 'desc', $count=false)
 Get entities ordered by a mathematical calculation. More...
 
 get_entities_from_annotation_count ($entity_type="", $entity_subtype="", $name="", $mdname= '', $mdvalue= '', $owner_guid=0, $limit=10, $offset=0, $orderdir= 'desc', $count=false)
 Returns entities ordered by the sum of an annotation. More...
 
 list_entities_from_annotation_count ($entity_type="", $entity_subtype="", $name="", $limit=10, $owner_guid=0, $group_guid=0, $asc=false, $fullview=true, $listtypetoggle=false, $pagination=true, $orderdir= 'desc')
 Lists entities by the totals of a particular kind of annotation. More...
 
 add_to_register ($register_name, $subregister_name, $subregister_value, $children_array=array())
 Adds an entry in $CONFIG[$register_name][$subregister_name]. More...
 
 remove_from_register ($register_name, $subregister_name)
 Removes a register entry from $CONFIG[register_name][subregister_name]. More...
 
 get_register ($register_name)
 If it exists, returns a particular register as an array. More...
 
 events ($event="", $object_type="", $function="", $priority=500, $call=false, $object=null)
 Deprecated events core function. More...
 
 register_elgg_event_handler ($event, $object_type, $callback, $priority=500)
 Alias function for events, that registers a function to a particular kind of event. More...
 
 unregister_elgg_event_handler ($event, $object_type, $callback)
 Unregisters a function to a particular kind of event. More...
 
 trigger_elgg_event ($event, $object_type, $object=null)
 Alias function for events, that triggers a particular kind of event. More...
 
 register_plugin_hook ($hook, $type, $callback, $priority=500)
 Register a function to a plugin hook for a particular entity type, with a given priority. More...
 
 unregister_plugin_hook ($hook, $entity_type, $callback)
 Unregister a function to a plugin hook for a particular entity type. More...
 
 trigger_plugin_hook ($hook, $type, $params=null, $returnvalue=null)
 Triggers a plugin hook, with various parameters as an array. More...
 
 call_gatekeeper ($function, $file="")
 Checks if code is being called from a certain function. More...
 
 callpath_gatekeeper ($path, $include_subdirs=true, $strict_mode=false)
 This function checks to see if it is being called at somepoint by a function defined somewhere on a given path (optionally including subdirectories). More...
 
 elgg_get_entity_owner_where_sql ($table, $owner_guids)
 Returns SQL where clause for owner and containers. More...
 
 elgg_get_entity_container_where_sql ($table, $container_guids)
 Returns SQL where clause for containers. More...
 
 elgg_get_entity_site_where_sql ($table, $site_guids)
 Returns SQL where clause for site entities. More...
 
 get_objects_in_group ($group_guid, $subtype="", $owner_guid=0, $site_guid=0, $order_by="", $limit=10, $offset=0, $count=FALSE)
 Return an array of objects in a given container. More...
 
 list_entities_groups ($subtype="", $owner_guid=0, $container_guid=0, $limit=10, $fullview=true, $listtypetoggle=true, $pagination=true)
 Lists entities that belong to a group. More...
 
 get_entities_from_metadata_groups ($group_guid, $meta_name, $meta_value="", $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 Get all the entities from metadata from a group. More...
 
 get_entities_from_metadata_groups_multi ($group_guid, $meta_array, $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $offset=0, $order_by="", $site_guid=0, $count=false)
 As get_entities_from_metadata_groups() but with multiple entities. More...
 
 list_entities_in_area ($lat, $long, $radius, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $navigation=true)
 List items within a given geographic area. More...
 
 list_entities_location ($location, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $navigation=true)
 List entities in a given location. More...
 
 get_entities_in_area ($lat, $long, $radius, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=NULL)
 Return entities within a given geographic area. More...
 
 list_entities_from_metadata ($meta_name, $meta_value="", $entity_type=ELGG_ENTITIES_ANY_VALUE, $entity_subtype=ELGG_ENTITIES_ANY_VALUE, $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=true, $pagination=true, $case_sensitive=true)
 Return a list of entities suitable for display based on the given search criteria. More...
 
 list_entities_from_metadata_multi ($meta_array, $entity_type="", $entity_subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=true, $pagination=true)
 Returns a viewable list of entities based on the given search criteria. More...
 
 add_submenu_item ($label, $link, $group= 'default', $onclick=false, $selected=NULL)
 Deprecated by elgg_register_menu_item(). More...
 
 remove_submenu_item ($label, $group= 'a')
 Remove an item from submenu by label. More...
 
 get_submenu ()
 Use elgg_view_menu(). More...
 
 add_menu ($menu_name, $menu_url, $menu_children=array(), $context="")
 Adds an item to the site-wide menu. More...
 
 remove_menu ($menu_name)
 Removes an item from the menu register. More...
 
 friendly_title ($title)
 When given a title, returns a version suitable for inclusion in a URL. More...
 
 friendly_time ($time)
 Displays a UNIX timestamp in a friendly way (eg "less than a minute ago") More...
 
 filter_string ($string)
 Filters a string into an array of significant words. More...
 
 remove_blacklist ($input)
 Returns true if the word in $input is considered significant. More...
 
 page_owner ()
 Gets the guid of the entity that owns the current page. More...
 
 page_owner_entity ()
 Gets the owner entity for the current page. More...
 
 add_page_owner_handler ($functionname)
 Registers a page owner handler function. More...
 
 set_page_owner ($entitytoset=-1)
 Set a page owner entity. More...
 
 set_context ($context)
 Sets the functional context of a page. More...
 
 get_context ()
 Returns the functional context of a page. More...
 
 get_plugin_list ()
 Returns a list of plugins to load, in the order that they should be loaded. More...
 
 regenerate_plugin_list ($pluginorder=FALSE)
 Regenerates the list of known plugins and saves it to the current site. More...
 
 get_plugin_name ($mainfilename=false)
 Get the name of the most recent plugin to be called in the call stack (or the plugin that owns the current page, if any). More...
 
 load_plugin_manifest ($plugin)
 Load and parse a plugin manifest from a plugin XML file. More...
 
 check_plugin_compatibility ($manifest_elgg_version_string)
 This function checks a plugin manifest 'elgg_version' value against the current install returning TRUE if the elgg_version is >= the current install's version. More...
 
 find_plugin_settings ($plugin_id=null)
 Shorthand function for finding the plugin settings. More...
 
 get_installed_plugins ($status= 'all')
 Return an array of installed plugins. More...
 
 enable_plugin ($plugin, $site_guid=null)
 Enable a plugin for a site (default current site) More...
 
 disable_plugin ($plugin, $site_guid=0)
 Disable a plugin for a site (default current site) More...
 
 is_plugin_enabled ($plugin, $site_guid=0)
 Return whether a plugin is enabled or not. More...
 
 get_entities_from_private_setting ($name="", $value="", $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
 Get entities based on their private data. More...
 
 get_entities_from_private_setting_multi (array $name, $type="", $subtype="", $owner_guid=0, $order_by="", $limit=10, $offset=0, $count=false, $site_guid=0, $container_guid=null)
 Get entities based on their private data by multiple keys. More...
 
 list_entities_from_relationship ($relationship, $relationship_guid, $inverse_relationship=false, $type=ELGG_ENTITIES_ANY_VALUE, $subtype=ELGG_ENTITIES_ANY_VALUE, $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $pagination=true, $order_by= '')
 Returns a viewable list of entities by relationship. More...
 
 get_entities_by_relationship_count ($relationship, $inverse_relationship=true, $type="", $subtype="", $owner_guid=0, $limit=10, $offset=0, $count=false, $site_guid=0)
 Gets the number of entities by a the number of entities related to them in a particular way. More...
 
 list_entities_by_relationship_count ($relationship, $inverse_relationship=true, $type="", $subtype="", $owner_guid=0, $limit=10, $fullview=true, $listtypetoggle=false, $pagination=true)
 Displays a human-readable list of entities. More...
 
 get_entities_from_relationships_and_meta ($relationship, $relationship_guid, $inverse_relationship=false, $meta_name="", $meta_value="", $type="", $subtype="", $owner_guid=0, $limit=10, $offset=0, $count=false, $site_guid=0)
 Gets the number of entities by a the number of entities related to them in a particular way also constrained by metadata. More...
 
 get_river_items ($subject_guid=0, $object_guid=0, $subject_relationship= '', $type= '', $subtype= '', $action_type= '', $limit=20, $offset=0, $posted_min=0, $posted_max=0)
 Retrieves items from the river. More...
 
 elgg_view_river_items ($subject_guid=0, $object_guid=0, $subject_relationship= '', $type= '', $subtype= '', $action_type= '', $limit=20, $posted_min=0, $posted_max=0, $pagination=true)
 Returns a human-readable version of the river. More...
 
 get_activity_stream_data ($limit=10, $offset=0, $type="", $subtype="", $owner_guid="", $owner_relationship="")
 Construct and execute the query required for the activity stream. More...
 
 authenticate ($username, $password)
 Perform standard authentication with a given username and password. More...
 
 get_site_members ($site_guid, $limit=10, $offset=0)
 Get the members of a site. More...
 
 list_site_members ($site_guid, $limit=10, $fullview=true)
 Display a list of site members. More...
 
 add_site_collection ($site_guid, $collection_guid)
 Add a collection to a site. More...
 
 remove_site_collection ($site_guid, $collection_guid)
 Remove a collection from a site. More...
 
 get_site_collections ($site_guid, $subtype="", $limit=10, $offset=0)
 Get the collections belonging to a site. More...
 
 get_tags ($threshold=1, $limit=10, $metadata_name="", $entity_type="object", $entity_subtype="", $owner_guid="", $site_guid=-1, $start_ts="", $end_ts="")
 Get an array of tags with weights for use with the output/tagcloud view. More...
 
 display_tagcloud ($threshold=1, $limit=10, $metadata_name="", $entity_type="object", $entity_subtype="", $owner_guid="", $site_guid=-1, $start_ts="", $end_ts="")
 Loads and displays a tagcloud given particular criteria. More...
 
 get_user_objects ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $offset=0, $timelower=0, $timeupper=0)
 Obtains a list of objects owned by a user. More...
 
 count_user_objects ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $timelower=0, $timeupper=0)
 Counts the objects (optionally of a particular subtype) owned by a user. More...
 
 list_user_objects ($user_guid, $subtype=ELGG_ENTITIES_ANY_VALUE, $limit=10, $fullview=true, $listtypetoggle=true, $pagination=true, $timelower=0, $timeupper=0)
 Displays a list of user objects of a particular subtype, with navigation. More...
 
 get_user_objects_by_metadata ($user_guid, $subtype="", $metadata=array(), $limit=0, $offset=0)
 Get user objects by an array of metadata. More...
 
 set_user_validation_status ($user_guid, $status, $method= '')
 Set the validation status for a user. More...
 
 request_user_validation ($user_guid)
 Trigger an event requesting that a user guid be validated somehow - either by email address or some other way. More...
 
 extend_elgg_settings_page ($new_settings_view, $view= 'usersettings/main', $priority=500)
 Register a user settings page with the admin panel. More...
 
 page_draw ($title, $body, $sidebar="")
 Returns a representation of a full 'page' (which might be an HTML page, RSS file, etc, depending on the current viewtype) More...
 
 elgg_view_listing ($icon, $info)
 Wrapper function to display search listings. More...
 
 get_entity_icon_url (\ElggEntity $entity, $size= 'medium')
 Return the icon URL for an entity. More...
 
 get_loggedin_user ()
 Return the current logged in user, or NULL if no user is logged in. More...
 
 get_loggedin_userid ()
 Return the current logged in user by id. More...
 
 isloggedin ()
 Returns whether or not the user is currently logged in. More...
 
 isadminloggedin ()
 Returns whether or not the user is currently logged in and that they are an admin user. More...
 
 load_plugins ()
 Loads plugins. More...
 
 find_plugin_usersettings ($plugin_id=null, $user_guid=0)
 Find the plugin settings for a user. More...
 
 set_plugin_usersetting ($name, $value, $user_guid=0, $plugin_id="")
 Set a user specific setting for a plugin. More...
 
 clear_plugin_usersetting ($name, $user_guid=0, $plugin_id= '')
 Clears a user-specific plugin setting. More...
 
 get_plugin_usersetting ($name, $user_guid=0, $plugin_id="")
 Get a user specific setting for a plugin. More...
 
 set_plugin_setting ($name, $value, $plugin_id=null)
 Set a setting for a plugin. More...
 
 get_plugin_setting ($name, $plugin_id="")
 Get setting for a plugin. More...
 
 clear_plugin_setting ($name, $plugin_id="")
 Clear a plugin setting. More...
 
 clear_all_plugin_settings ($plugin_id="")
 Unsets all plugin settings for a plugin. More...
 
 get_annotations ($entity_guid=0, $entity_type="", $entity_subtype="", $name="", $value="", $owner_guid=0, $limit=10, $offset=0, $order_by="asc", $timelower=0, $timeupper=0, $entity_owner_guid=0)
 Get a list of annotations for a given object/user/annotation type. More...
 
 list_annotations ($entity_guid, $name="", $limit=25, $asc=true)
 Returns a human-readable list of annotations on a particular entity. More...
 
 elgg_deprecated_annotation_calculation ($entity_guid=0, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0, $timelower=0, $timeupper=0, $calculation= '')
 Helper function to deprecate annotation calculation functions. More...
 
 count_annotations ($entity_guid=0, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0, $timelower=0, $timeupper=0)
 Count the number of annotations based on search parameters. More...
 
 get_annotations_sum ($entity_guid, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0)
 Return the sum of a given integer annotation. More...
 
 get_annotations_max ($entity_guid, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0)
 Return the max of a given integer annotation. More...
 
 get_annotations_min ($entity_guid, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0)
 Return the minumum of a given integer annotation. More...
 
 get_annotations_avg ($entity_guid, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0)
 Return the average of a given integer annotation. More...
 
 get_annotations_calculate_x ($sum="avg", $entity_guid, $entity_type="", $entity_subtype="", $name="", $value="", $value_type="", $owner_guid=0, $timelower=0, $timeupper=0)
 Perform a mathmatical calculation on integer annotations. More...
 
 list_entities_from_annotation_count_by_metadata ($entity_type="", $entity_subtype="", $name="", $mdname= '', $mdvalue= '', $limit=10, $owner_guid=0, $group_guid=0, $asc=false, $fullview=true, $listtypetoggle=false, $pagination=true, $orderdir= 'desc')
 Lists entities by the totals of a particular kind of annotation AND the value of a piece of metadata. More...
 
 set_view_location ($view, $location, $viewtype= '')
 Set an alternative base location for a view (as opposed to the default of $CONFIG->viewpath) More...
 
 register_entity_url_handler ($function_name, $entity_type="all", $entity_subtype="all")
 Sets the URL handler for a particular entity type and subtype. More...
 
 find_metadata ($meta_name="", $meta_value="", $entity_type="", $entity_subtype="", $limit=10, $offset=0, $order_by="", $site_guid=0)
 Get the metadata where the entities they are referring to match a given criteria. More...
 
 get_metadata_byname ($entity_guid, $meta_name)
 Get metadata objects by name. More...
 
 get_metadata_for_entity ($entity_guid)
 Return all the metadata for a given GUID. More...
 
 get_metadata ($id)
 Get a specific metadata object. More...
 
 clear_metadata ($guid)
 Clear all the metadata for a given entity, assuming you have access to that entity. More...
 
 clear_metadata_by_owner ($owner_guid)
 Clear all metadata belonging to a given owner_guid. More...
 
 delete_metadata ($id)
 Delete a piece of metadata, where the current user has access. More...
 
 remove_metadata ($guid, $name, $value="")
 Removes metadata on an entity with a particular name, optionally with a given value. More...
 
 get_annotation ($annotation_id)
 Get a specific annotation. More...
 
 delete_annotation ($id)
 Delete a given annotation. More...
 
 clear_annotations ($guid, $name="")
 Clear all the annotations for a given entity, assuming you have access to that metadata. More...
 
 clear_annotations_by_owner ($owner_guid)
 Clear all annotations belonging to a given owner_guid. More...
 
 register_page_handler ($handler, $function)
 Registers a page handler for a particular identifier. More...
 
 unregister_page_handler ($handler)
 Unregister a page handler for an identifier. More...
 
 register_annotation_url_handler ($function, $extender_name)
 Register an annotation url handler. More...
 
 register_extender_url_handler ($function, $type="all", $name="all")
 Sets the URL handler for a particular extender type and name. More...
 
 register_entity_type ($type, $subtype=null)
 Registers and entity type and subtype to return in search and other places. More...
 
 register_metadata_url_handler ($function, $extender_name="all")
 Register a metadata url handler. More...
 
 register_relationship_url_handler ($function_name, $relationship_type="all")
 Sets the URL handler for a particular relationship type. More...
 
 elgg_view_register_simplecache ($viewname)
 Registers a view to be simply cached. More...
 
 elgg_view_regenerate_simplecache ($viewtype=NULL)
 Regenerates the simple cache. More...
 
 elgg_view_enable_simplecache ()
 Enables the simple cache. More...
 
 elgg_view_disable_simplecache ()
 Disables the simple cache. More...
 
 is_db_installed ()
 
 is_installed ()
 
 pam_authenticate ($credentials=NULL, $policy="user")
 Attempt to authenticate. More...
 
 save_widget_location (\ElggObject $widget, $order, $column)
 When given a widget entity and a new requested location, saves the new location and also provides a sensible ordering for all widgets in that column. More...
 
 get_widgets ($user_guid, $context, $column)
 Get widgets for a particular context and column, in order of display. More...
 
 add_widget ($entity_guid, $handler, $context, $order=0, $column=1, $access_id=null)
 Add a new widget instance. More...
 
 add_widget_type ($handler, $name, $description, $context="all", $multiple=false, $positions="side,main")
 Define a new widget type. More...
 
 remove_widget_type ($handler)
 Remove a widget type. More...
 
 widget_type_exists ($handler)
 Determines whether or not widgets with the specified handler have been defined. More...
 
 get_widget_types ()
 Returns an array of objects representing the defined widget types. More...
 
 save_widget_info ($widget_guid, $params)
 Saves a widget's settings (by passing an array of (name => value) pairs to save_{$handler}_widget) More...
 
 reorder_widgets_from_panel ($panelstring1, $panelstring2, $panelstring3, $context, $owner)
 Reorders the widgets from a widget panel. More...
 
 use_widgets ($context)
 Register a particular context for use with widgets. More...
 
 using_widgets ()
 Determines whether or not the current context is using widgets. More...
 
 display_widget (\ElggObject $widget)
 Displays a particular widget. More...
 
 elgg_count_comments ($entity)
 Count the number of comments attached to an entity. More...
 
 remove_from_river_by_subject ($subject_guid)
 Removes all items relating to a particular acting entity from the river. More...
 
 remove_from_river_by_object ($object_guid)
 Removes all items relating to a particular entity being acted upon from the river. More...
 
 remove_from_river_by_annotation ($annotation_id)
 Removes all items relating to a particular annotation being acted upon from the river. More...
 
 remove_from_river_by_id ($id)
 Removes a single river entry. More...
 
 default_page_handler ($page, $handler)
 A default page handler Tries to locate a suitable file to include. More...
 
 invalidate_cache_for_entity ($guid)
 Invalidate this class's entry in the cache. More...
 
 cache_entity (\ElggEntity $entity)
 Cache an entity. More...
 
 retrieve_cached_entity ($guid)
 Retrieve a entity from the cache. More...
 
 get_general_file_type ($mime_type)
 Returns the category of a file from its MIME type. More...
 

Function Documentation

add_menu (   $menu_name,
  $menu_url,
  $menu_children = array(),
  $context = "" 
)

Adds an item to the site-wide menu.

You can obtain the menu array by calling get_register('menu')

Parameters
string$menu_nameThe name of the menu item
string$menu_urlThe URL of the page
array$menu_childrenOptionally, an array of submenu items (not used)
string$context(not used)
Returns
true|false Depending on success

Definition at line 1381 of file deprecated-1.8.php.

add_page_owner_handler (   $functionname)

Registers a page owner handler function.

Parameters
string$functionnameThe callback function
Returns
void

Definition at line 1521 of file deprecated-1.8.php.

add_site_collection (   $site_guid,
  $collection_guid 
)

Add a collection to a site.

Parameters
int$site_guidSite GUID
int$collection_guidCollection GUID
Returns
mixed

Definition at line 2585 of file deprecated-1.8.php.

add_submenu_item (   $label,
  $link,
  $group = 'default',
  $onclick = false,
  $selected = NULL 
)

Deprecated by elgg_register_menu_item().

Set $menu_name to 'page'.

See also
elgg_register_menu_item()
Parameters
string$labelThe label
string$linkThe link
string$groupThe group to store item in
boolean$onclickAdd a confirmation when clicked?
boolean$selectedIs menu item selected
Returns
bool

Definition at line 1307 of file deprecated-1.8.php.

add_to_register (   $register_name,
  $subregister_name,
  $subregister_value,
  $children_array = array() 
)

Adds an entry in $CONFIG[$register_name][$subregister_name].

This is only used for the site-wide menu. See add_menu().

Parameters
string$register_nameThe name of the top-level register
string$subregister_nameThe name of the subregister
mixed$subregister_valueThe value of the subregister
array$children_arrayOptionally, an array of children
Returns
true|false Depending on success

Definition at line 280 of file deprecated-1.8.php.

add_widget (   $entity_guid,
  $handler,
  $context,
  $order = 0,
  $column = 1,
  $access_id = null 
)

Add a new widget instance.

Parameters
int$entity_guidGUID of entity that owns this widget
string$handlerThe handler for this widget
string$contextThe page context for this widget
int$orderThe order to display this widget in
int$columnThe column to display this widget in (1, 2 or 3)
int$access_idIf not specified, it is set to the default access level
Returns
int|false Widget GUID or false on failure

Definition at line 4255 of file deprecated-1.8.php.

add_widget_type (   $handler,
  $name,
  $description,
  $context = "all",
  $multiple = false,
  $positions = "side,main" 
)

Define a new widget type.

Parameters
string$handlerThe identifier for the widget handler
string$nameThe name of the widget type
string$descriptionA description for the widget type
string$contextA comma-separated list of contexts where this widget is allowed (default: 'all')
bool$multipleWhether or not multiple instances of this widget are allowed on a single dashboard (default: false)
string$positionsA comma-separated list of positions on the page (side or main) where this widget is allowed (default: "side,main")
Returns
bool Depending on success

Definition at line 4301 of file deprecated-1.8.php.

authenticate (   $username,
  $password 
)

Perform standard authentication with a given username and password.

Returns an object for use with login.

See also
login
Parameters
string$usernameThe username, optionally (for standard logins)
string$passwordThe password, optionally (for standard logins)
Returns
|false The authenticated user object, or false on failure.

Definition at line 2514 of file deprecated-1.8.php.

cache_entity ( \ElggEntity  $entity)

Cache an entity.

Stores an entity in $ENTITY_CACHE;

Parameters
\ElggEntity$entityEntity to cache
Returns
void private

Definition at line 4712 of file deprecated-1.8.php.

call_gatekeeper (   $function,
  $file = "" 
)

Checks if code is being called from a certain function.

To use, call this function with the function name (and optional file location) that it has to be called from, it will either return true or false.

e.g.

function my_secure_function() { if (!call_gatekeeper("my_call_function")) return false;

... do secure stuff ... }

function my_call_function() { // will work my_secure_function(); }

function bad_function() { // Will not work my_secure_function(); }

Parameters
mixed$functionThe function that this function must have in its call stack, to test against a method pass an array containing a class and method name.
string$fileOptional file that the function must reside in.
Returns
bool

Definition at line 558 of file deprecated-1.8.php.

callpath_gatekeeper (   $path,
  $include_subdirs = true,
  $strict_mode = false 
)

This function checks to see if it is being called at somepoint by a function defined somewhere on a given path (optionally including subdirectories).

This function is similar to call_gatekeeper() but returns true if it is being called by a method or function which has been defined on a given path or by a specified file.

Parameters
string$pathThe full path and filename that this function must have in its call stack If a partial path is given and $include_subdirs is true, then the function will return true if called by any function in or below the specified path.
bool$include_subdirsAre subdirectories of the path ok, or must you specify an absolute path and filename.
bool$strict_modeIf true then the calling method or function must be directly called by something on $path, if false the whole call stack is searched.
Returns
void

Definition at line 624 of file deprecated-1.8.php.

check_plugin_compatibility (   $manifest_elgg_version_string)

This function checks a plugin manifest 'elgg_version' value against the current install returning TRUE if the elgg_version is >= the current install's version.

Parameters
string$manifest_elgg_version_stringThe build version (eg 2009010201).
Returns
bool

Definition at line 1682 of file deprecated-1.8.php.

clear_all_plugin_settings (   $plugin_id = "")

Unsets all plugin settings for a plugin.

Parameters
string$plugin_idOptional plugin name, if not specified then it is detected from where you are calling from.
Returns
bool
Since
1.7.0

Definition at line 3206 of file deprecated-1.8.php.

clear_annotations (   $guid,
  $name = "" 
)

Clear all the annotations for a given entity, assuming you have access to that metadata.

Parameters
int$guidThe entity guid
string$nameThe name of the annotation to delete.
Returns
int Number of annotations deleted or false if an error

Definition at line 3852 of file deprecated-1.8.php.

clear_annotations_by_owner (   $owner_guid)

Clear all annotations belonging to a given owner_guid.

Parameters
int$owner_guidThe owner
Returns
int Number of annotations deleted

Definition at line 3879 of file deprecated-1.8.php.

clear_metadata (   $guid)

Clear all the metadata for a given entity, assuming you have access to that entity.

Parameters
int$guidEntity GUID
Returns
bool

Definition at line 3743 of file deprecated-1.8.php.

clear_metadata_by_owner (   $owner_guid)

Clear all metadata belonging to a given owner_guid.

Parameters
int$owner_guidThe owner
Returns
bool

Definition at line 3759 of file deprecated-1.8.php.

clear_plugin_setting (   $name,
  $plugin_id = "" 
)

Clear a plugin setting.

Parameters
string$nameThe name.
string$plugin_idOptional plugin name, if not specified then it is detected from where you are calling from.
Returns
bool

Definition at line 3191 of file deprecated-1.8.php.

clear_plugin_usersetting (   $name,
  $user_guid = 0,
  $plugin_id = '' 
)

Clears a user-specific plugin setting.

Parameters
string$nameName of the plugin setting
int$user_guidDefaults to logged in user
string$plugin_idDefaults to contextual plugin name
Returns
bool Success

Definition at line 3129 of file deprecated-1.8.php.

count_annotations (   $entity_guid = 0,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0,
  $timelower = 0,
  $timeupper = 0 
)

Count the number of annotations based on search parameters.

Parameters
int$entity_guidGuid of Entity
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$valueValue of annotation
string$value_typeType of value
int$owner_guidGUID of owner of annotation
int$timelowerLower time limit
int$timeupperUpper time limit
Returns
int

Definition at line 3387 of file deprecated-1.8.php.

count_user_objects (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $timelower = 0,
  $timeupper = 0 
)

Counts the objects (optionally of a particular subtype) owned by a user.

Parameters
int$user_guidThe GUID of the owning user
string$subtypeOptionally, the subtype of objects
int$timelowerThe earliest time the entity can have been created. Default: all
int$timeupperThe latest time the entity can have been created. Default: all
Returns
int The number of objects the user owns (of this subtype)

Definition at line 2788 of file deprecated-1.8.php.

default_page_handler (   $page,
  $handler 
)

A default page handler Tries to locate a suitable file to include.

Only works for core pages, not plugins.

Parameters
array$pageThe page URL elements
string$handlerThe base handler
Returns
true|false Depending on success

Definition at line 4660 of file deprecated-1.8.php.

delete_annotation (   $id)

Delete a given annotation.

Parameters
int$idThe annotation id
Returns
bool

Definition at line 3835 of file deprecated-1.8.php.

delete_metadata (   $id)

Delete a piece of metadata, where the current user has access.

Parameters
int$idThe id of metadata to delete.
Returns
bool

Definition at line 3775 of file deprecated-1.8.php.

disable_plugin (   $plugin,
  $site_guid = 0 
)

Disable a plugin for a site (default current site)

Important: You should regenerate simplecache and the viewpath cache after executing this function otherwise you may experience view display artifacts. Do this with the following code:

    elgg_regenerate_simplecache();
elgg_reset_system_cache();
Parameters
string$pluginThe plugin name.
int$site_guidThe site id, if not specified then this is detected.
Returns
bool
Exceptions
InvalidClassException

Definition at line 1819 of file deprecated-1.8.php.

display_tagcloud (   $threshold = 1,
  $limit = 10,
  $metadata_name = "",
  $entity_type = "object",
  $entity_subtype = "",
  $owner_guid = "",
  $site_guid = -1,
  $start_ts = "",
  $end_ts = "" 
)

Loads and displays a tagcloud given particular criteria.

Parameters
int$thresholdGet the threshold of minimum number of each tags to bother with (ie only show tags where there are more than $threshold occurances)
int$limitNumber of tags to return
string$metadata_nameOptionally, the name of the field you want to grab for
string$entity_typeOptionally, the entity type ('object' etc)
string$entity_subtypeThe entity subtype, optionally
int$owner_guidThe GUID of the tags owner, optionally
int$site_guidOptionally, the site to restrict to (default is the current site)
int$start_tsOptionally specify a start timestamp for tags used to generate cloud.
int$end_tsOptionally specify an end timestamp for tags used to generate cloud.
Returns
string The HTML (or other, depending on view type) of the tagcloud.

Definition at line 2732 of file deprecated-1.8.php.

display_widget ( \ElggObject  $widget)

Displays a particular widget.

Parameters
\ElggObject$widgetThe widget to display
Returns
string The HTML for the widget, including JavaScript wrapper

Definition at line 4570 of file deprecated-1.8.php.

elgg_count_comments (   $entity)

Count the number of comments attached to an entity.

Parameters
\ElggEntity$entity
Returns
int Number of comments

Definition at line 4582 of file deprecated-1.8.php.

elgg_deprecated_annotation_calculation (   $entity_guid = 0,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0,
  $timelower = 0,
  $timeupper = 0,
  $calculation = '' 
)

Helper function to deprecate annotation calculation functions.

Don't use.

Parameters
unknown_type$entity_guid
unknown_type$entity_type
unknown_type$entity_subtype
unknown_type$name
unknown_type$value
unknown_type$value_type
unknown_type$owner_guid
unknown_type$timelower
unknown_type$timeupper
unknown_type$calculation

Definition at line 3330 of file deprecated-1.8.php.

elgg_get_entity_container_where_sql (   $table,
  $container_guids 
)

Returns SQL where clause for containers.

Parameters
string$tableEntity table prefix as defined in SELECT...FROM entities $table
NULL | array$container_guidsArray of container guids
Returns
FALSE|string
Since
1.7.0 private

Definition at line 703 of file deprecated-1.8.php.

elgg_get_entity_owner_where_sql (   $table,
  $owner_guids 
)

Returns SQL where clause for owner and containers.

Parameters
string$tableEntity table prefix as defined in SELECT...FROM entities $table
NULL | array$owner_guidsOwner GUIDs
Returns
string|false
Since
1.7.0 private

Definition at line 684 of file deprecated-1.8.php.

elgg_get_entity_site_where_sql (   $table,
  $site_guids 
)

Returns SQL where clause for site entities.

Parameters
string$tableEntity table prefix as defined in SELECT...FROM entities $table
NULL | array$site_guidsArray of site guids
Returns
FALSE|string
Since
1.7.0 private

Definition at line 721 of file deprecated-1.8.php.

elgg_view_disable_simplecache ( )

Disables the simple cache.

See also
elgg_view_register_simplecache()

Definition at line 4059 of file deprecated-1.8.php.

elgg_view_enable_simplecache ( )

Enables the simple cache.

See also
elgg_view_register_simplecache()

Definition at line 4047 of file deprecated-1.8.php.

elgg_view_listing (   $icon,
  $info 
)

Wrapper function to display search listings.

Parameters
string$iconThe icon for the listing
string$infoAny information that needs to be displayed.
Returns
string The HTML (etc) representing the listing

Definition at line 2945 of file deprecated-1.8.php.

elgg_view_regenerate_simplecache (   $viewtype = NULL)

Regenerates the simple cache.

Parameters
string$viewtypeOptional viewtype to regenerate
See also
elgg_view_register_simplecache()

Definition at line 4035 of file deprecated-1.8.php.

elgg_view_register_simplecache (   $viewname)

Registers a view to be simply cached.

Views cached in this manner must take no parameters and be login agnostic - that is to say, they look the same no matter who is logged in (or logged out).

CSS and the basic jS views are automatically cached like this.

Parameters
string$viewnameView name

Definition at line 4022 of file deprecated-1.8.php.

elgg_view_river_items (   $subject_guid = 0,
  $object_guid = 0,
  $subject_relationship = '',
  $type = '',
  $subtype = '',
  $action_type = '',
  $limit = 20,
  $posted_min = 0,
  $posted_max = 0,
  $pagination = true 
)

Returns a human-readable version of the river.

Parameters
int | array$subject_guidActing entity to restrict to. Default: all
int | array$object_guidEntity being acted on to restrict to. Default: all
string$subject_relationshipIf set to a relationship type, this will use $subject_guid as the starting point and set the subjects to be all users this entity has this relationship with (eg 'friend'). Default: blank
string$typeThe type of entity to restrict to. Default: all
string$subtypeThe subtype of entity to restrict to. Default: all
string$action_typeThe type of river action to restrict to. Default: all
int$limitThe number of items to retrieve. Default: 20
int$posted_minThe minimum time period to look at. Default: none
int$posted_maxThe maximum time period to look at. Default: none
bool$paginationShow pagination?
Returns
string Human-readable river.

Definition at line 2325 of file deprecated-1.8.php.

enable_plugin (   $plugin,
  $site_guid = null 
)

Enable a plugin for a site (default current site)

Important: You should regenerate simplecache and the viewpath cache after executing this function otherwise you may experience view display artifacts. Do this with the following code:

    elgg_regenerate_simplecache();
elgg_reset_system_cache();
Parameters
string$pluginThe plugin name.
int$site_guidThe site id, if not specified then this is detected.
Returns
array
Exceptions
InvalidClassException

Definition at line 1778 of file deprecated-1.8.php.

events (   $event = "",
  $object_type = "",
  $function = "",
  $priority = 500,
  $call = false,
  $object = null 
)

Deprecated events core function.

Code divided between elgg_register_event_handler() and trigger_elgg_event().

Parameters
string$eventThe type of event (eg 'init', 'update', 'delete')
string$object_typeThe type of object (eg 'system', 'blog', 'user')
string$functionThe name of the function that will handle the event
int$priorityPriority to call handler. Lower numbers called first (default 500)
boolean$callSet to true to call the event rather than add to it (default false)
mixed$objectOptionally, the object the event is being performed on (eg a user)
Returns
true|false Depending on success

Definition at line 397 of file deprecated-1.8.php.

extend_elgg_admin_page (   $new_admin_view,
  $view = 'admin/main',
  $priority = 500 
)

Register an admin page with the admin panel.

This function extends the view "admin/main" with the provided view. This view should provide a description and either a control or a link to.

Usage:

  • To add a control to the main admin panel then extend admin/main

To add a control to a new page create a page which renders a view admin/subpage (where subpage is your new page - nb. some pages already exist that you can extend), extend the main view to point to it, and add controls to your new view.

At the moment this is essentially a wrapper around elgg_extend_view().

Parameters
string$new_admin_viewThe view associated with the control you're adding
string$viewThe view to extend, by default this is 'admin/main'.
int$priorityOptional priority to govern the appearance in the list.
Returns
void

Definition at line 66 of file deprecated-1.8.php.

extend_elgg_settings_page (   $new_settings_view,
  $view = 'usersettings/main',
  $priority = 500 
)

Register a user settings page with the admin panel.

This function extends the view "usersettings/main" with the provided view. This view should provide a description and either a control or a link to.

Usage:

  • To add a control to the main admin panel then extend usersettings/main

To add a control to a new page create a page which renders a view usersettings/subpage (where subpage is your new page - nb. some pages already exist that you can extend), extend the main view to point to it, and add controls to your new view.

At the moment this is essentially a wrapper around elgg_extend_view().

Parameters
string$new_settings_viewThe view associated with the control you're adding
string$viewThe view to extend, by default this is 'usersettings/main'.
int$priorityOptional priority to govern the appearance in the list.
Returns
bool

Definition at line 2909 of file deprecated-1.8.php.

filter_string (   $string)

Filters a string into an array of significant words.

Parameters
string$stringA string
Returns
array

Definition at line 1436 of file deprecated-1.8.php.

find_metadata (   $meta_name = "",
  $meta_value = "",
  $entity_type = "",
  $entity_subtype = "",
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0 
)

Get the metadata where the entities they are referring to match a given criteria.

Parameters
mixed$meta_nameMetadata name
mixed$meta_valueMetadata value
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite GUID. 0 for current, -1 for any
Returns
mixed

Definition at line 3631 of file deprecated-1.8.php.

find_plugin_settings (   $plugin_id = null)

Shorthand function for finding the plugin settings.

Parameters
string$plugin_idOptional plugin id, if not specified then it is detected from where you are calling.
Returns
mixed

Definition at line 1707 of file deprecated-1.8.php.

find_plugin_usersettings (   $plugin_id = null,
  $user_guid = 0 
)

Find the plugin settings for a user.

Parameters
string$plugin_idPlugin name.
int$user_guidThe guid who's settings to retrieve.
Returns
StdClass Object with all user settings.

Definition at line 3097 of file deprecated-1.8.php.

friendly_time (   $time)

Displays a UNIX timestamp in a friendly way (eg "less than a minute ago")

Parameters
int$timeA UNIX epoch timestamp
Returns
string The friendly time

Definition at line 1422 of file deprecated-1.8.php.

friendly_title (   $title)

When given a title, returns a version suitable for inclusion in a URL.

Parameters
string$titleThe title
Returns
string The optimised title

Definition at line 1409 of file deprecated-1.8.php.

get_activity_stream_data (   $limit = 10,
  $offset = 0,
  $type = "",
  $subtype = "",
  $owner_guid = "",
  $owner_relationship = "" 
)

Construct and execute the query required for the activity stream.

Definition at line 2355 of file deprecated-1.8.php.

get_annotation (   $annotation_id)

Get a specific annotation.

Parameters
int$annotation_idAnnotation ID
Returns

Definition at line 3822 of file deprecated-1.8.php.

get_annotations (   $entity_guid = 0,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "asc",
  $timelower = 0,
  $timeupper = 0,
  $entity_owner_guid = 0 
)

Get a list of annotations for a given object/user/annotation type.

Parameters
int | array$entity_guidGUID to return annotations of (falsey for any)
string$entity_typeType of entity
string$entity_subtypeSubtype of entity
string$nameName of annotation
mixed$valueValue of annotation
int | array$owner_guidOwner(s) of annotation
int$limitLimit
int$offsetOffset
string$order_byOrder annotations by SQL
int$timelowerLower time limit
int$timeupperUpper time limit
int$entity_owner_guidOwner guid for the entity
Returns
array

Definition at line 3231 of file deprecated-1.8.php.

get_annotations_avg (   $entity_guid,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0 
)

Return the average of a given integer annotation.

Parameters
int$entity_guidGuid of Entity
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$valueValue of annotation
string$value_typeType of value
int$owner_guidGUID of owner of annotation
Returns
int

Definition at line 3478 of file deprecated-1.8.php.

get_annotations_calculate_x (   $sum = "avg",
  $entity_guid,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0,
  $timelower = 0,
  $timeupper = 0 
)

Perform a mathmatical calculation on integer annotations.

Parameters
string$sumWhat sort of calculation to perform
int$entity_guidGuid of Entity
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$valueValue of annotation
string$value_typeType of value
int$owner_guidGUID of owner of annotation
int$timelowerLower time limit
int$timeupperUpper time limit
Returns
int

Definition at line 3504 of file deprecated-1.8.php.

get_annotations_max (   $entity_guid,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0 
)

Return the max of a given integer annotation.

Parameters
int$entity_guidGuid of Entity
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$valueValue of annotation
string$value_typeType of value
int$owner_guidGUID of owner of annotation
Returns
int

Definition at line 3431 of file deprecated-1.8.php.

get_annotations_min (   $entity_guid,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0 
)

Return the minumum of a given integer annotation.

Parameters
int$entity_guidGuid of Entity
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$valueValue of annotation
string$value_typeType of value
int$owner_guidGUID of owner of annotation
Returns
int

Definition at line 3454 of file deprecated-1.8.php.

get_annotations_sum (   $entity_guid,
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $value = "",
  $value_type = "",
  $owner_guid = 0 
)

Return the sum of a given integer annotation.

Parameters
int$entity_guidGuid of Entity
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$valueValue of annotation
string$value_typeType of value
int$owner_guidGUID of owner of annotation
Returns
int

Definition at line 3409 of file deprecated-1.8.php.

get_context ( )

Returns the functional context of a page.

Returns
string The context, or 'main' if no context has been provided

Definition at line 1563 of file deprecated-1.8.php.

get_entities_by_relationship_count (   $relationship,
  $inverse_relationship = true,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0 
)

Gets the number of entities by a the number of entities related to them in a particular way.

This is a good way to get out the users with the most friends, or the groups with the most members.

Parameters
string$relationshipThe relationship eg "friends_of"
bool$inverse_relationshipInverse relationship owners
string$typeThe type of entity (default: all)
string$subtypeThe entity subtype (default: all)
int$owner_guidThe owner of the entities (default: none)
int$limitLimit
int$offsetOffset
bool$countReturn a count instead of entities
int$site_guidSite GUID
Returns
array|int|false An array of entities, or the number of entities, or false on failure

Definition at line 2077 of file deprecated-1.8.php.

get_entities_from_annotation_count (   $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $mdname = '',
  $mdvalue = '',
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $orderdir = 'desc',
  $count = false 
)

Returns entities ordered by the sum of an annotation.

Warning
This is function uses sum instead of count. THIS IS SLOW. See #3366. This should be used when you have annotations with different values and you want a list of entities ordered by the sum of all of those values. If you want a list of entities ordered by the number of annotations on each entity, use __get_entities_from_annotations_calculate_x() and pass 'count' as the first param.
Parameters
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$mdnameMetadata name
string$mdvalueMetadata value
int$owner_guidGUID of owner of annotation
int$limitLimit of results
int$offsetOffset of results
string$orderdirOrder of results
bool$countReturn count or entities
Returns
ElggEntity[]|int

Definition at line 160 of file deprecated-1.8.php.

get_entities_from_annotations_calculate_x (   $sum = "sum",
  $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $mdname = '',
  $mdvalue = '',
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $orderdir = 'desc',
  $count = false 
)

Get entities ordered by a mathematical calculation.

Parameters
string$sumWhat sort of calculation to perform
string$entity_typeType of Entity
string$entity_subtypeSubtype of Entity
string$nameName of annotation
string$mdnameMetadata name
string$mdvalueMetadata value
int$owner_guidGUID of owner of annotation
int$limitLimit of results
int$offsetOffset of results
string$orderdirOrder of results
bool$countReturn count or entities
Returns
mixed

Definition at line 89 of file deprecated-1.8.php.

get_entities_from_metadata_groups (   $group_guid,
  $meta_name,
  $meta_value = "",
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false 
)

Get all the entities from metadata from a group.

Parameters
int$group_guidThe ID of the group.
mixed$meta_nameMetadata name
mixed$meta_valueMetadata value
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner guid
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite GUID. 0 for current, -1 for any
bool$countReturn count instead of entities
Returns
array|false

Definition at line 868 of file deprecated-1.8.php.

get_entities_from_metadata_groups_multi (   $group_guid,
  $meta_array,
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $order_by = "",
  $site_guid = 0,
  $count = false 
)

As get_entities_from_metadata_groups() but with multiple entities.

Parameters
int$group_guidThe ID of the group.
array$meta_arrayArray of 'name' => 'value' pairs
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner GUID
int$limitLimit
int$offsetOffset
string$order_byOptional ordering.
int$site_guidSite GUID. 0 for current, -1 for any
bool$countReturn count of entities instead of entities
Returns
int|array List of , or the total number if count is set to false

Definition at line 970 of file deprecated-1.8.php.

get_entities_from_private_setting (   $name = "",
  $value = "",
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0,
  $container_guid = null 
)

Get entities based on their private data.

Parameters
string$nameThe name of the setting
string$valueThe value of the setting
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
string$order_byThe field to order by; by default, time_created desc
int$limitThe number of entities to return; 10 by default
int$offsetThe indexing offset, 0 by default
boolean$countReturn a count of entities
int$site_guidThe site to get entities for. 0 for current, -1 for any
mixed$container_guidThe container(s) GUIDs
Returns
array A list of entities.

Definition at line 1872 of file deprecated-1.8.php.

get_entities_from_private_setting_multi ( array  $name,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0,
  $container_guid = null 
)

Get entities based on their private data by multiple keys.

Parameters
string$nameThe name of the setting
mixed$typeEntity type
string$subtypeEntity subtype
int$owner_guidThe GUID of the owning user
string$order_byThe field to order by; by default, time_created desc
int$limitThe number of entities to return; 10 by default
int$offsetThe indexing offset, 0 by default
bool$countCount entities
int$site_guidSite GUID. 0 for current, -1 for any.
mixed$container_guidContainer GUID
Returns
array A list of entities.

Definition at line 1951 of file deprecated-1.8.php.

get_entities_from_relationships_and_meta (   $relationship,
  $relationship_guid,
  $inverse_relationship = false,
  $meta_name = "",
  $meta_value = "",
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0 
)

Gets the number of entities by a the number of entities related to them in a particular way also constrained by metadata.

Parameters
string$relationshipThe relationship eg "friends_of"
int$relationship_guidThe guid of the entity to use query
bool$inverse_relationshipInverse relationship owner
String$meta_nameThe metadata name
String$meta_valueThe metadata value
string$typeThe type of entity (default: all)
string$subtypeThe entity subtype (default: all)
int$owner_guidThe owner of the entities (default: none)
int$limitLimit
int$offsetOffset
bool$countReturn a count instead of entities
int$site_guidSite GUID
Returns
array|int|false An array of entities, or the number of entities, or false on failure

Definition at line 2189 of file deprecated-1.8.php.

get_entities_in_area (   $lat,
  $long,
  $radius,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = false,
  $site_guid = 0,
  $container_guid = NULL 
)

Return entities within a given geographic area.

Parameters
float$latLatitude
float$longLongitude
float$radiusThe radius
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
string$order_byThe field to order by; by default, time_created desc
int$limitThe number of entities to return; 10 by default
int$offsetThe indexing offset, 0 by default
boolean$countCount entities
int$site_guidSite GUID. 0 for current, -1 for any
int | array$container_guidContainer GUID
Returns
array A list of entities.

Definition at line 1150 of file deprecated-1.8.php.

get_entity_icon_url ( \ElggEntity  $entity,
  $size = 'medium' 
)

Return the icon URL for an entity.

Can be overridden by registering a plugin hook for entity:icon:url, $entity_type.

Definition at line 2963 of file deprecated-1.8.php.

get_general_file_type (   $mime_type)

Returns the category of a file from its MIME type.

Parameters
string$mime_typeThe MIME type
Returns
string 'document', 'audio', 'video', or 'general' if the MIME type was unrecognized

Definition at line 4739 of file deprecated-1.8.php.

get_installed_plugins (   $status = 'all')

Return an array of installed plugins.

Parameters
string$statusany|enabled|disabled
Returns
array

Definition at line 1724 of file deprecated-1.8.php.

get_loggedin_user ( )

Return the current logged in user, or NULL if no user is logged in.

If no user can be found in the current session, a plugin hook - 'session:get' 'user' to give plugin authors another way to provide user details to the ACL system without touching the session.

Returns
|NULL

Definition at line 3035 of file deprecated-1.8.php.

get_loggedin_userid ( )

Return the current logged in user by id.

See also
elgg_get_logged_in_user_entity()
Returns
int

Definition at line 3047 of file deprecated-1.8.php.

get_metadata (   $id)

Get a specific metadata object.

Parameters
int$idThe id of the metadata being retrieved.
Returns
mixed False on failure or

Definition at line 3730 of file deprecated-1.8.php.

get_metadata_byname (   $entity_guid,
  $meta_name 
)

Get metadata objects by name.

Parameters
int$entity_guidEntity GUID
string$meta_nameMetadata name
Returns
ElggMetadata|ElggMetadata[]|false object, an array of or false.

Definition at line 3677 of file deprecated-1.8.php.

get_metadata_for_entity (   $entity_guid)

Return all the metadata for a given GUID.

Parameters
int$entity_guidEntity GUID
Returns
mixed

Definition at line 3707 of file deprecated-1.8.php.

get_objects_in_group (   $group_guid,
  $subtype = "",
  $owner_guid = 0,
  $site_guid = 0,
  $order_by = "",
  $limit = 10,
  $offset = 0,
  $count = FALSE 
)

Return an array of objects in a given container.

See also
get_entities()
Parameters
int$group_guidThe container (defaults to current page owner)
string$subtypeThe subtype
int$owner_guidOwner
int$site_guidThe site
string$order_byOrder
int$limitLimit on number of elements to return, by default 10.
int$offsetWhere to start, by default 0.
bool$countWhether to return the entities or a count of them.
Returns
array|false

Definition at line 744 of file deprecated-1.8.php.

get_plugin_list ( )

Returns a list of plugins to load, in the order that they should be loaded.

Returns
array List of plugins

Definition at line 1578 of file deprecated-1.8.php.

get_plugin_name (   $mainfilename = false)

Get the name of the most recent plugin to be called in the call stack (or the plugin that owns the current page, if any).

i.e., if the last plugin was in /mod/foobar/, get_plugin_name would return foo_bar.

Parameters
boolean$mainfilenameIf set to true, this will instead determine the context from the main script filename called by the browser. Default = false.
Returns
string|false Plugin name, or false if no plugin name was called

Definition at line 1645 of file deprecated-1.8.php.

get_plugin_setting (   $name,
  $plugin_id = "" 
)

Get setting for a plugin.

Parameters
string$nameThe name.
string$plugin_idOptional plugin name, if not specified then it is detected from where you are calling from.
Returns
mixed

Definition at line 3176 of file deprecated-1.8.php.

get_plugin_usersetting (   $name,
  $user_guid = 0,
  $plugin_id = "" 
)

Get a user specific setting for a plugin.

Parameters
string$nameThe name.
int$user_guidGuid of owning user
string$plugin_idOptional plugin name, if not specified it is detected from where you are calling.
Returns
mixed

Definition at line 3145 of file deprecated-1.8.php.

get_register (   $register_name)

If it exists, returns a particular register as an array.

Parameters
string$register_nameThe name of the register
Returns
array|false Depending on success

Definition at line 354 of file deprecated-1.8.php.

get_river_items (   $subject_guid = 0,
  $object_guid = 0,
  $subject_relationship = '',
  $type = '',
  $subtype = '',
  $action_type = '',
  $limit = 20,
  $offset = 0,
  $posted_min = 0,
  $posted_max = 0 
)

Retrieves items from the river.

All parameters are optional.

Parameters
int | array$subject_guidActing entity to restrict to. Default: all
int | array$object_guidEntity being acted on to restrict to. Default: all
string$subject_relationshipIf set to a relationship type, this will use $subject_guid as the starting point and set the subjects to be all users this entity has this relationship with (eg 'friend'). Default: blank
string$typeThe type of entity to restrict to. Default: all
string$subtypeThe subtype of entity to restrict to. Default: all
string$action_typeThe type of river action to restrict to. Default: all
int$limitThe number of items to retrieve. Default: 20
int$offsetThe page offset. Default: 0
int$posted_minThe minimum time period to look at. Default: none
int$posted_maxThe maximum time period to look at. Default: none
Returns
array|false Depending on success

Definition at line 2258 of file deprecated-1.8.php.

get_site_collections (   $site_guid,
  $subtype = "",
  $limit = 10,
  $offset = 0 
)

Get the collections belonging to a site.

Parameters
int$site_guidSite GUID
string$subtypeSubtype
int$limitLimit
int$offsetOffset
Returns
mixed

Definition at line 2623 of file deprecated-1.8.php.

get_site_members (   $site_guid,
  $limit = 10,
  $offset = 0 
)

Get the members of a site.

Parameters
int$site_guidSite GUID
int$limitUser GUID
int$offsetOffset
Returns
mixed

Definition at line 2536 of file deprecated-1.8.php.

get_submenu ( )

Use elgg_view_menu().

Set $menu_name to 'owner_block'.

See also
elgg_view_menu()
Returns
string

Definition at line 1361 of file deprecated-1.8.php.

get_tags (   $threshold = 1,
  $limit = 10,
  $metadata_name = "",
  $entity_type = "object",
  $entity_subtype = "",
  $owner_guid = "",
  $site_guid = -1,
  $start_ts = "",
  $end_ts = "" 
)

Get an array of tags with weights for use with the output/tagcloud view.

Parameters
int$thresholdGet the threshold of minimum number of each tags to bother with (ie only show tags where there are more than $threshold occurances)
int$limitNumber of tags to return
string$metadata_nameOptionally, the name of the field you want to grab for
string$entity_typeOptionally, the entity type ('object' etc)
string$entity_subtypeThe entity subtype, optionally
int$owner_guidThe GUID of the tags owner, optionally
int$site_guidOptionally, the site to restrict to (default is the current site)
int$start_tsOptionally specify a start timestamp for tags used to generate cloud.
int$end_tsOptionally specify an end timestamp for tags used to generate cloud
Returns
array|false Array of objects with ->tag and ->total values, or false on failure

Definition at line 2662 of file deprecated-1.8.php.

get_user_objects (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $limit = 10,
  $offset = 0,
  $timelower = 0,
  $timeupper = 0 
)

Obtains a list of objects owned by a user.

Parameters
int$user_guidThe GUID of the owning user
string$subtypeOptionally, the subtype of objects
int$limitThe number of results to return (default 10)
int$offsetIndexing offset, if any
int$timelowerThe earliest time the entity can have been created. Default: all
int$timeupperThe latest time the entity can have been created. Default: all
Returns
false|array An array of or false, depending on success

Definition at line 2761 of file deprecated-1.8.php.

get_user_objects_by_metadata (   $user_guid,
  $subtype = "",
  $metadata = array(),
  $limit = 0,
  $offset = 0 
)

Get user objects by an array of metadata.

Parameters
int$user_guidThe GUID of the owning user
string$subtypeOptionally, the subtype of objects
array$metadataAn array of metadata
int$limitThe number of results to return (default 10)
int$offsetIndexing offset, if any
Returns
false|array An array of or false, depending on success

Definition at line 2846 of file deprecated-1.8.php.

get_widget_types ( )

Returns an array of objects representing the defined widget types.

Returns
array A list of types defined (if any)

Definition at line 4341 of file deprecated-1.8.php.

get_widgets (   $user_guid,
  $context,
  $column 
)

Get widgets for a particular context and column, in order of display.

Parameters
int$user_guidThe owner user GUID
string$contextThe context (profile, dashboard etc)
int$columnThe column (1 or 2)
Returns
array|false An array of widget , or false

Definition at line 4215 of file deprecated-1.8.php.

invalidate_cache_for_entity (   $guid)

Invalidate this class's entry in the cache.

Parameters
int$guidThe entity guid
Returns
void private

Definition at line 4696 of file deprecated-1.8.php.

is_db_installed ( )

Definition at line 4068 of file deprecated-1.8.php.

is_installed ( )

Definition at line 4076 of file deprecated-1.8.php.

is_plugin_enabled (   $plugin,
  $site_guid = 0 
)

Return whether a plugin is enabled or not.

Parameters
string$pluginThe plugin name.
int$site_guidThe site id, if not specified then this is detected.
Returns
bool

Definition at line 1849 of file deprecated-1.8.php.

isadminloggedin ( )

Returns whether or not the user is currently logged in and that they are an admin user.

Returns
bool

Definition at line 3070 of file deprecated-1.8.php.

isloggedin ( )

Returns whether or not the user is currently logged in.

Returns
bool

Definition at line 3059 of file deprecated-1.8.php.

list_annotations (   $entity_guid,
  $name = "",
  $limit = 25,
  $asc = true 
)

Returns a human-readable list of annotations on a particular entity.

Parameters
int$entity_guidThe entity GUID
string$nameThe name of the kind of annotation
int$limitThe number of annotations to display at once
true | false$ascDisplay annotations in ascending order. (Default: true)
Returns
string HTML (etc) version of the annotation list

Definition at line 3296 of file deprecated-1.8.php.

list_entities_by_relationship_count (   $relationship,
  $inverse_relationship = true,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $pagination = true 
)

Displays a human-readable list of entities.

Parameters
string$relationshipThe relationship eg "friends_of"
bool$inverse_relationshipInverse relationship owners
string$typeThe type of entity (eg 'object')
string$subtypeThe entity subtype
int$owner_guidThe owner (default: all)
int$limitThe number of entities to display on a page
bool$fullviewWhether or not to display the full view (default: true)
bool$listtypetoggleWhether or not to allow gallery view
bool$paginationWhether to display pagination (default: true)
Returns
string The viewable list of entities

Definition at line 2135 of file deprecated-1.8.php.

list_entities_from_access_id (   $access_id,
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = true,
  $pagination = true 
)

Lists entities from an access collection.

Returns
str

Definition at line 10 of file deprecated-1.8.php.

list_entities_from_annotation_count (   $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $limit = 10,
  $owner_guid = 0,
  $group_guid = 0,
  $asc = false,
  $fullview = true,
  $listtypetoggle = false,
  $pagination = true,
  $orderdir = 'desc' 
)

Lists entities by the totals of a particular kind of annotation.

Parameters
string$entity_typeType of entity.
string$entity_subtypeSubtype of entity.
string$nameName of annotation.
int$limitMaximum number of results to return.
int$owner_guidOwner.
int$group_guidGroup container. Currently only supported if entity_type is object
boolean$ascWhether to list in ascending or descending order (default: desc)
boolean$fullviewWhether to display the entities in full
boolean$listtypetoggleCan the 'gallery' view can be displayed (default: no)
boolean$paginationAdd pagination
string$orderdirOrder desc or asc
Returns
string Formatted entity list

Definition at line 225 of file deprecated-1.8.php.

list_entities_from_annotation_count_by_metadata (   $entity_type = "",
  $entity_subtype = "",
  $name = "",
  $mdname = '',
  $mdvalue = '',
  $limit = 10,
  $owner_guid = 0,
  $group_guid = 0,
  $asc = false,
  $fullview = true,
  $listtypetoggle = false,
  $pagination = true,
  $orderdir = 'desc' 
)

Lists entities by the totals of a particular kind of annotation AND the value of a piece of metadata.

Parameters
string$entity_typeType of entity.
string$entity_subtypeSubtype of entity.
string$nameName of annotation.
string$mdnameMetadata name
string$mdvalueMetadata value
int$limitMaximum number of results to return.
int$owner_guidOwner.
int$group_guidGroup container. Currently only supported if entity_type is object
boolean$ascWhether to list in ascending or descending order (default: desc)
boolean$fullviewWhether to display the entities in full
boolean$listtypetoggleCan the 'gallery' view can be displayed (default: no)
boolean$paginationDisplay pagination
string$orderdir'desc' or 'asc'
Returns
string Formatted entity list

Definition at line 3536 of file deprecated-1.8.php.

list_entities_from_metadata (   $meta_name,
  $meta_value = "",
  $entity_type = ELGG_ENTITIES_ANY_VALUE,
  $entity_subtype = ELGG_ENTITIES_ANY_VALUE,
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = true,
  $pagination = true,
  $case_sensitive = true 
)

Return a list of entities suitable for display based on the given search criteria.

See also
elgg_view_entity_list
Parameters
mixed$meta_nameMetadata name to search on
mixed$meta_valueThe value to match, optionally
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity
int$owner_guidOwner GUID
int$limitNumber of entities to display per page
bool$fullviewWDisplay the full view (default: true)
bool$listtypetoggleAllow users to toggle to the gallery view. Default: true
bool$paginationDisplay pagination? Default: true
bool$case_sensitiveCase sensitive metadata names?
Returns
string
string A list of entities suitable for display

Definition at line 1233 of file deprecated-1.8.php.

list_entities_from_metadata_multi (   $meta_array,
  $entity_type = "",
  $entity_subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = true,
  $pagination = true 
)

Returns a viewable list of entities based on the given search criteria.

See also
elgg_view_entity_list
Parameters
array$meta_arrayArray of 'name' => 'value' pairs
string$entity_typeThe type of entity to look for, eg 'site' or 'object'
string$entity_subtypeThe subtype of the entity.
int$owner_guidOwner GUID
int$limitLimit
bool$fullviewWDisplay the full view (default: true)
bool$listtypetoggleAllow users to toggle to the gallery view. Default: true
bool$paginationDisplay pagination? Default: true
Returns
string List of suitable for display

Definition at line 1281 of file deprecated-1.8.php.

list_entities_from_relationship (   $relationship,
  $relationship_guid,
  $inverse_relationship = false,
  $type = ELGG_ENTITIES_ANY_VALUE,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $pagination = true,
  $order_by = '' 
)

Returns a viewable list of entities by relationship.

See also
elgg_view_entity_list
Parameters
string$relationshipThe relationship eg "friends_of"
int$relationship_guidThe guid of the entity to use query
bool$inverse_relationshipReverse the normal function of the query to instead say "give me all entities for whome $relationship_guid is a $relationship of"
string$typeThe type of entity (eg 'object')
string$subtypeThe entity subtype
int$owner_guidThe owner (default: all)
int$limitThe number of entities to display on a page
true | false$fullviewWhether or not to display the full view (default: true)
true | false$viewtypetoggleWhether or not to allow gallery view
true | false$paginationWhether to display pagination (default: true)
bool$order_bySQL order by clause
Returns
string The viewable list of entities

Definition at line 2037 of file deprecated-1.8.php.

list_entities_groups (   $subtype = "",
  $owner_guid = 0,
  $container_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = true,
  $pagination = true 
)

Lists entities that belong to a group.

Parameters
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
int$container_guidThe GUID of the containing group
int$limitThe number of entities to display per page (default: 10)
bool$fullviewWhether or not to display the full view (default: true)
bool$listtypetoggleWhether or not to allow gallery view (default: true)
bool$paginationWhether to display pagination (default: true)
Returns
string List of parsed entities
See also
elgg_list_entities()

Definition at line 841 of file deprecated-1.8.php.

list_entities_in_area (   $lat,
  $long,
  $radius,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $navigation = true 
)

List items within a given geographic area.

Parameters
float$latLatitude
float$longLongitude
float$radiusThe radius
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
int$limitThe number of entities to display per page (default: 10)
bool$fullviewWhether or not to display the full view (default: true)
bool$listtypetoggleWhether or not to allow gallery view
bool$navigationDisplay pagination? Default: true
Returns
string A viewable list of entities

Definition at line 1076 of file deprecated-1.8.php.

list_entities_location (   $location,
  $type = "",
  $subtype = "",
  $owner_guid = 0,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = false,
  $navigation = true 
)

List entities in a given location.

Parameters
string$locationLocation
string$typeThe type of entity (eg "user", "object" etc)
string$subtypeThe arbitrary subtype of the entity
int$owner_guidThe GUID of the owning user
int$limitThe number of entities to display per page (default: 10)
bool$fullviewWhether or not to display the full view (default: true)
bool$listtypetoggleWhether or not to allow gallery view
bool$navigationDisplay pagination? Default: true
Returns
string A viewable list of entities

Definition at line 1125 of file deprecated-1.8.php.

list_site_members (   $site_guid,
  $limit = 10,
  $fullview = true 
)

Display a list of site members.

Parameters
int$site_guidThe GUID of the site
int$limitThe number of members to display on a page
bool$fullviewWhether or not to display the full view (default: true)
Returns
string A displayable list of members

Definition at line 2558 of file deprecated-1.8.php.

list_user_objects (   $user_guid,
  $subtype = ELGG_ENTITIES_ANY_VALUE,
  $limit = 10,
  $fullview = true,
  $listtypetoggle = true,
  $pagination = true,
  $timelower = 0,
  $timeupper = 0 
)

Displays a list of user objects of a particular subtype, with navigation.

See also
elgg_view_entity_list
Parameters
int$user_guidThe GUID of the user
string$subtypeThe object subtype
int$limitThe number of entities to display on a page
bool$fullviewWhether or not to display the full view (default: true)
bool$listtypetoggleWhether or not to allow gallery view (default: true)
bool$paginationWhether to display pagination (default: true)
int$timelowerThe earliest time the entity can have been created. Default: all
int$timeupperThe latest time the entity can have been created. Default: all
Returns
string The list in a form suitable to display

Definition at line 2820 of file deprecated-1.8.php.

load_plugin_manifest (   $plugin)

Load and parse a plugin manifest from a plugin XML file.

Parameters
string$pluginPlugin name.
Returns
array of values

Definition at line 1659 of file deprecated-1.8.php.

load_plugins ( )

Loads plugins.

Returns
bool

Definition at line 3083 of file deprecated-1.8.php.

page_draw (   $title,
  $body,
  $sidebar = "" 
)

Returns a representation of a full 'page' (which might be an HTML page, RSS file, etc, depending on the current viewtype)

Parameters
string$title
string$body
Returns
string

Definition at line 2927 of file deprecated-1.8.php.

page_owner ( )

Gets the guid of the entity that owns the current page.

Returns
int The current page owner guid (0 if none).

Definition at line 1497 of file deprecated-1.8.php.

page_owner_entity ( )

Gets the owner entity for the current page.

Returns
|false The current page owner or false if none.

Definition at line 1508 of file deprecated-1.8.php.

pam_authenticate (   $credentials = NULL,
  $policy = "user" 
)

Attempt to authenticate.

This function will process all registered PAM handlers or stop when the first handler fails. A handler fails by either returning false or throwing an exception. The advantage of throwing an exception is that it returns a message through the global $_PAM_HANDLERS_MSG which can be used in communication with a user. The order that handlers are processed is determined by the order that they were registered.

If $credentials are provided the PAM handler should authenticate using the provided credentials, if not then credentials should be prompted for or otherwise retrieved (eg from the HTTP header or $_SESSION).

Parameters
mixed$credentialsMixed PAM handler specific credentials (e.g. username, password)
string$policy- the policy type, default is "user"
Returns
bool true if authenticated, false if not.

Definition at line 4100 of file deprecated-1.8.php.

regenerate_plugin_list (   $pluginorder = FALSE)

Regenerates the list of known plugins and saves it to the current site.

Important: You should regenerate simplecache and the viewpath cache after executing this function otherwise you may experience view display artifacts. Do this with the following code:

    elgg_regenerate_simplecache();
elgg_reset_system_cache();
Parameters
array$pluginorderOptionally, a list of existing plugins and their orders
Returns
array The new list of plugins and their orders

Definition at line 1611 of file deprecated-1.8.php.

register_action (   $action,
  $public = false,
  $filename = "",
  $admin_only = false 
)

Registers a particular action in memory.

Parameters
string$actionThe name of the action (eg "register", "account/settings/save")
boolean$publicCan this action be accessed by people not logged into the system?
string$filenameOptionally, the filename where this action is located
boolean$admin_onlyWhether this action is only available to admin users.

Definition at line 30 of file deprecated-1.8.php.

register_annotation_url_handler (   $function,
  $extender_name 
)

Register an annotation url handler.

Parameters
string$function_nameThe function.
string$extender_nameThe name, default 'all'.

Definition at line 3946 of file deprecated-1.8.php.

register_elgg_event_handler (   $event,
  $object_type,
  $callback,
  $priority = 500 
)

Alias function for events, that registers a function to a particular kind of event.

Parameters
string$eventThe event type
string$object_typeThe object type
string$functionThe function name
Returns
true|false Depending on success

Definition at line 419 of file deprecated-1.8.php.

register_entity_type (   $type,
  $subtype = null 
)

Registers and entity type and subtype to return in search and other places.

A description in the elgg_echo languages file of the form item:type:subtype is also expected.

Parameters
string$typeThe type of entity (object, site, user, group)
string$subtypeThe subtype to register (may be blank)
Returns
true|false Depending on success

Definition at line 3979 of file deprecated-1.8.php.

register_entity_url_handler (   $function_name,
  $entity_type = "all",
  $entity_subtype = "all" 
)

Sets the URL handler for a particular entity type and subtype.

Parameters
string$function_nameThe function to register
string$entity_typeThe entity type
string$entity_subtypeThe entity subtype
Returns
true|false Depending on success

Definition at line 3610 of file deprecated-1.8.php.

register_extender_url_handler (   $function,
  $type = "all",
  $name = "all" 
)

Sets the URL handler for a particular extender type and name.

It is recommended that you do not call this directly, instead use one of the wrapper functions in the subtype files.

Parameters
string$function_nameThe function to register
string$extender_typeExtender type
string$extender_nameThe name of the extender
Returns
true|false Depending on success

Definition at line 3963 of file deprecated-1.8.php.

register_metadata_url_handler (   $function,
  $extender_name = "all" 
)

Register a metadata url handler.

Parameters
string$function_nameThe function.
string$extender_nameThe name, default 'all'.

Definition at line 3992 of file deprecated-1.8.php.

register_page_handler (   $handler,
  $function 
)

Registers a page handler for a particular identifier.

For example, you can register a function called 'blog_page_handler' for handler type 'blog' Now for all URLs of type http://yoururl/pg/blog/*, the blog_page_handler() function will be called. The part of the URL marked with * above will be exploded on '/' characters and passed as an array to that function. For example, the URL http://yoururl/blog/username/friends/ would result in the call: blog_page_handler(array('username','friends'), blog);

Page handler functions should return true or the default page handler will be called.

A request to register a page handler with the same identifier as previously registered handler will replace the previous one.

The context is set to the page handler identifier before the registered page handler function is called. For the above example, the context is set to 'blog'.

Parameters
string$handlerThe page type to handle
string$functionYour function name
Returns
true|false Depending on success

Definition at line 3918 of file deprecated-1.8.php.

register_plugin_hook (   $hook,
  $type,
  $callback,
  $priority = 500 
)

Register a function to a plugin hook for a particular entity type, with a given priority.

eg if you want the function "export_user" to be called when the hook "export" for "user" entities is run, use:

    register_plugin_hook("export", "user", "export_user");

"all" is a valid value for both $hook and $entity_type. "none" is a valid value for $entity_type.

The export_user function would then be defined as:

    function export_user($hook, $entity_type, $returnvalue, $params);

Where $returnvalue is the return value returned by the last function returned by the hook, and $params is an array containing a set of parameters (or nothing).

Parameters
string$hookThe name of the hook
string$entity_typeThe name of the type of entity (eg "user", "object" etc)
string$functionThe name of a valid function to be run
string$priorityThe priority - 0 is first, 1000 last, default is 500
Returns
true|false Depending on success

Definition at line 479 of file deprecated-1.8.php.

register_relationship_url_handler (   $function_name,
  $relationship_type = "all" 
)

Sets the URL handler for a particular relationship type.

Parameters
string$function_nameThe function to register
string$relationship_typeThe relationship type.
Returns
true|false Depending on success

Definition at line 4005 of file deprecated-1.8.php.

remove_blacklist (   $input)

Returns true if the word in $input is considered significant.

Parameters
string$inputA word
Returns
true|false

Definition at line 1474 of file deprecated-1.8.php.

remove_from_register (   $register_name,
  $subregister_name 
)

Removes a register entry from $CONFIG[register_name][subregister_name].

This is used to by remove_menu() to remove site-wide menu items.

Parameters
string$register_nameThe name of the top-level register
string$subregister_nameThe name of the subregister
Returns
true|false Depending on success
Since
1.7.0

Definition at line 321 of file deprecated-1.8.php.

remove_from_river_by_annotation (   $annotation_id)

Removes all items relating to a particular annotation being acted upon from the river.

Parameters
int$annotation_idThe ID of the annotation
Returns
bool Depending on success
Since
1.7.0

Definition at line 4629 of file deprecated-1.8.php.

remove_from_river_by_id (   $id)

Removes a single river entry.

Parameters
int$idThe ID of the river entry
Returns
bool Depending on success
Since
1.7.2

Definition at line 4644 of file deprecated-1.8.php.

remove_from_river_by_object (   $object_guid)

Removes all items relating to a particular entity being acted upon from the river.

Parameters
int$object_guidThe GUID of the entity
Returns
bool Depending on success

Definition at line 4614 of file deprecated-1.8.php.

remove_from_river_by_subject (   $subject_guid)

Removes all items relating to a particular acting entity from the river.

Parameters
int$subject_guidThe GUID of the entity
Returns
bool Depending on success

Definition at line 4600 of file deprecated-1.8.php.

remove_menu (   $menu_name)

Removes an item from the menu register.

Parameters
string$menu_nameThe name of the menu item
Returns
true|false Depending on success

Definition at line 1396 of file deprecated-1.8.php.

remove_metadata (   $guid,
  $name,
  $value = "" 
)

Removes metadata on an entity with a particular name, optionally with a given value.

Parameters
int$guidThe entity GUID
string$nameThe name of the metadata
string$valueThe value of the metadata (useful to remove a single item of a set)
Returns
bool Depending on success

Definition at line 3793 of file deprecated-1.8.php.

remove_site_collection (   $site_guid,
  $collection_guid 
)

Remove a collection from a site.

Parameters
int$site_guidSite GUID
int$collection_guidCollection GUID
Returns
mixed

Definition at line 2604 of file deprecated-1.8.php.

remove_submenu_item (   $label,
  $group = 'a' 
)

Remove an item from submenu by label.

See also
elgg_unregister_menu_item()
Parameters
string$labelThe item label
string$groupThe submenu group (default "a")
Returns
bool whether the item was removed or not
Since
1.7.8

Definition at line 1347 of file deprecated-1.8.php.

remove_widget_type (   $handler)

Remove a widget type.

Parameters
string$handlerThe identifier for the widget handler
Returns
void
Since
1.7.1

Definition at line 4317 of file deprecated-1.8.php.

reorder_widgets_from_panel (   $panelstring1,
  $panelstring2,
  $panelstring3,
  $context,
  $owner 
)

Reorders the widgets from a widget panel.

Parameters
string$panelstring1String of guids of objects separated by ::
string$panelstring2String of guids of objects separated by ::
string$panelstring3String of guids of objects separated by ::
string$contextProfile or dashboard
int$ownerOwner guid
Returns
void

Definition at line 4415 of file deprecated-1.8.php.

request_user_validation (   $user_guid)

Trigger an event requesting that a user guid be validated somehow - either by email address or some other way.

This function invalidates any existing validation value.

Parameters
int$user_guidUser's GUID

Definition at line 2874 of file deprecated-1.8.php.

retrieve_cached_entity (   $guid)

Retrieve a entity from the cache.

Parameters
int$guidThe guid
Returns
|bool false if entity not cached, or not fully loaded private

Definition at line 4726 of file deprecated-1.8.php.

save_widget_info (   $widget_guid,
  $params 
)

Saves a widget's settings (by passing an array of (name => value) pairs to save_{$handler}_widget)

Parameters
int$widget_guidThe GUID of the widget we're saving to
array$paramsAn array of name => value parameters
Returns
bool

Definition at line 4356 of file deprecated-1.8.php.

save_widget_location ( \ElggObject  $widget,
  $order,
  $column 
)

When given a widget entity and a new requested location, saves the new location and also provides a sensible ordering for all widgets in that column.

Parameters
\ElggObject$widgetThe widget entity
int$orderThe order within the column
int$columnThe column (1, 2 or 3)
Returns
bool Depending on success

Definition at line 4152 of file deprecated-1.8.php.

set_context (   $context)

Sets the functional context of a page.

Parameters
string$contextThe context of the page
Returns
mixed Either the context string, or false on failure

Definition at line 1547 of file deprecated-1.8.php.

set_page_owner (   $entitytoset = -1)

Set a page owner entity.

Parameters
int$entitytosetThe GUID of the entity
Returns
void

Definition at line 1533 of file deprecated-1.8.php.

set_plugin_setting (   $name,
  $value,
  $plugin_id = null 
)

Set a setting for a plugin.

Parameters
string$nameThe name - note, can't be "title".
mixed$valueThe value.
string$plugin_idOptional plugin name, if not specified then it is detected from where you are calling from.
Returns
int|false

Definition at line 3161 of file deprecated-1.8.php.

set_plugin_usersetting (   $name,
  $value,
  $user_guid = 0,
  $plugin_id = "" 
)

Set a user specific setting for a plugin.

Parameters
string$nameThe name - note, can't be "title".
mixed$valueThe value.
int$user_guidOptional user.
string$plugin_idOptional plugin name, if not specified then it is detected from where you are calling from.
Returns
bool

Definition at line 3114 of file deprecated-1.8.php.

set_user_validation_status (   $user_guid,
  $status,
  $method = '' 
)

Set the validation status for a user.

Parameters
bool$statusValidated (true) or false
string$methodOptional method to say how a user was validated
Returns
bool

Definition at line 2861 of file deprecated-1.8.php.

set_view_location (   $view,
  $location,
  $viewtype = '' 
)

Set an alternative base location for a view (as opposed to the default of $CONFIG->viewpath)

Parameters
string$viewThe name of the view
string$locationThe base location path

Definition at line 3595 of file deprecated-1.8.php.

trigger_elgg_event (   $event,
  $object_type,
  $object = null 
)

Alias function for events, that triggers a particular kind of event.

Parameters
string$eventThe event type
string$object_typeThe object type
string$functionThe function name
Returns
true|false Depending on success

Definition at line 449 of file deprecated-1.8.php.

trigger_plugin_hook (   $hook,
  $type,
  $params = null,
  $returnvalue = null 
)

Triggers a plugin hook, with various parameters as an array.

For example, to provide a 'foo' hook that concerns an entity of type 'bar', with a parameter called 'param1' with value 'value1', that by default returns true, you'd call:

trigger_plugin_hook('foo', 'bar', array('param1' => 'value1'), true);

See also
register_plugin_hook
Parameters
string$hookThe name of the hook to trigger
string$entity_typeThe name of the entity type to trigger it for (or "all", or "none")
array$paramsAny parameters. It's good practice to name the keys, i.e. by using array('name' => 'value', 'name2' => 'value2')
mixed$returnvalueAn initial return value
Returns
mixed|null The cumulative return value for the plugin hook functions

Definition at line 515 of file deprecated-1.8.php.

unregister_elgg_event_handler (   $event,
  $object_type,
  $callback 
)

Unregisters a function to a particular kind of event.

Parameters
string$eventThe event type
string$object_typeThe object type
string$functionThe function name
Since
1.7.0

Definition at line 434 of file deprecated-1.8.php.

unregister_page_handler (   $handler)

Unregister a page handler for an identifier.

Note: to replace a page handler, call register_page_handler()

Parameters
string$handlerThe page type identifier
Since
1.7.2

Definition at line 3933 of file deprecated-1.8.php.

unregister_plugin_hook (   $hook,
  $entity_type,
  $callback 
)

Unregister a function to a plugin hook for a particular entity type.

Parameters
string$hookThe name of the hook
string$entity_typeThe name of the type of entity (eg "user", "object" etc)
string$functionThe name of a valid function to be run
Since
1.7.0

Definition at line 494 of file deprecated-1.8.php.

use_widgets (   $context)

Register a particular context for use with widgets.

Parameters
string$contextThe context we wish to enable context for
Returns
void

Definition at line 4525 of file deprecated-1.8.php.

using_widgets ( )

Determines whether or not the current context is using widgets.

Returns
bool Depending on widget status

Definition at line 4548 of file deprecated-1.8.php.

widget_type_exists (   $handler)

Determines whether or not widgets with the specified handler have been defined.

Parameters
string$handlerThe widget handler identifying string
Returns
bool Whether or not those widgets exist

Definition at line 4330 of file deprecated-1.8.php.