本文整理汇总了PHP中elgg_set_config函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_set_config函数的具体用法?PHP elgg_set_config怎么用?PHP elgg_set_config使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elgg_set_config函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: developers_process_settings
function developers_process_settings()
{
if (elgg_get_plugin_setting('display_errors', 'developers') == 1) {
ini_set('display_errors', 1);
} else {
ini_set('display_errors', 0);
}
if (elgg_get_plugin_setting('screen_log', 'developers') == 1) {
$cache = new ElggLogCache();
elgg_set_config('log_cache', $cache);
elgg_register_plugin_hook_handler('debug', 'log', array($cache, 'insertDump'));
elgg_extend_view('page/elements/foot', 'developers/log');
}
if (elgg_get_plugin_setting('show_strings', 'developers') == 1) {
// first and last in case a plugin registers a translation in an init method
elgg_register_event_handler('init', 'system', 'developers_clear_strings', 1000);
elgg_register_event_handler('init', 'system', 'developers_clear_strings', 1);
}
if (elgg_get_plugin_setting('wrap_views', 'developers') == 1) {
elgg_register_plugin_hook_handler('view', 'all', 'developers_wrap_views');
}
if (elgg_get_plugin_setting('log_events', 'developers') == 1) {
elgg_register_event_handler('all', 'all', 'developers_log_events', 1);
elgg_register_plugin_hook_handler('all', 'all', 'developers_log_events', 1);
}
}
示例2: publications_init
/**
* Initialize the pages plugin.
*
*/
function publications_init()
{
// register a library of helper functions
elgg_register_library('elgg:publications', elgg_get_plugins_path() . 'publications/lib/publications.php');
$item = new ElggMenuItem('pages', elgg_echo('publications'), 'publications/all');
elgg_register_menu_item('site', $item);
// Register a page handler, so we can have nice URLs
elgg_register_page_handler('publications', 'publications_page_handler');
// Register an icon handler for blog
elgg_register_page_handler("publicationsicon", "publications_icon_handler");
// Register a url handler
elgg_register_entity_url_handler('object', 'publication', 'publication_url_handler');
// Register some actions
$action_base = elgg_get_plugins_path() . 'publications/actions';
elgg_register_action("publications/edit", "{$action_base}/publications/edit.php");
elgg_register_action("publications/delete", "{$action_base}/publications/delete.php");
// Register entity type for search
elgg_register_entity_type('object', 'publication');
//icon url overide
elgg_register_plugin_hook_handler("entity:icon:url", "object", "publications_icon_hook");
//add a widget
elgg_register_widget_type('publications', elgg_echo('publications'), elgg_echo('publications:widget:description'), "index");
// Language short codes must be of the form "pages:key"
// where key is the array key below
elgg_set_config('publications', array('title' => 'text', 'description' => 'longtext', 'pubDate' => 'text', 'tags' => 'tags', 'access_id' => 'access'));
}
示例3: router
/**
* hook called on route, all
* check if $returnvalue['handler'] to see if we need to replace it
* if the handler is an original handler, we want to foward it to the new url
*
* @param type $hook
* @param type $type
* @param type $returnvalue
* @param type $params
* @return array
*/
function router($hook, $type, $returnvalue, $params)
{
if (elgg_get_config('pagehandler_hijack')) {
return $returnvalue;
}
$handlers = get_replacement_handlers();
if (in_array($returnvalue['handler'], array_keys($handlers))) {
// we have been given an old handler -> we should forward to the replacement
// probably from an old link or something
$currenturl = current_page_url();
//get everything after the pagehandler
$afterhandler = str_replace(elgg_get_site_url() . $returnvalue['handler'], "", $currenturl);
$newurl = elgg_get_site_url() . $handlers[$returnvalue['handler']] . $afterhandler;
// forward to the new url
forward($newurl);
}
if (in_array($returnvalue['handler'], $handlers)) {
// we need to do something about it
// get the original handler
$original = array_search($returnvalue['handler'], $handlers);
if (!empty($original)) {
// reset the context for non-hijack aware code
elgg_set_context($original);
// let the system load content for the original handler
$returnvalue['handler'] = $original;
$returnvalue['identifier'] = $original;
// set a flag so we don't infinite loop ourselves in route hooks
elgg_set_config('pagehandler_hijack', true);
return elgg_trigger_plugin_hook('route', $original, null, $returnvalue);
}
}
}
示例4: _elgg_cron_init
/**
* Cron initialization
*
* @return void
* @access private
*/
function _elgg_cron_init()
{
elgg_register_page_handler('cron', '_elgg_cron_page_handler');
elgg_register_plugin_hook_handler('cron', 'all', '_elgg_cron_monitor', 1000);
elgg_set_config('elgg_cron_periods', array('minute', 'fiveminute', 'fifteenmin', 'halfhour', 'hourly', 'daily', 'weekly', 'monthly', 'yearly'));
elgg_register_admin_menu_item('administer', 'cron', 'statistics');
}
示例5: surveys_init
/**
* Initialize the projects plugin.
*
*/
function surveys_init()
{
// register a library of helper functions
elgg_register_library('surveys', elgg_get_plugins_path() . 'surveys/lib/surveys.php');
elgg_load_library('surveys');
//register css
$css_url = 'mod/surveys/css/styles.css';
elgg_register_css('surveysCss', $css_url);
elgg_load_css('surveysCss');
// register a project handler, so we can have nice URLs
elgg_register_page_handler('surveys', 'surveys_page_handler');
// register a url handler
elgg_register_entity_url_handler('object', 'survey', 'surveys_url');
// register entity type for search
elgg_register_entity_type('object', 'survey');
// register some actions
$action_base = elgg_get_plugins_path() . 'surveys/actions';
elgg_register_action("surveys/submit", "{$action_base}/submit.php");
elgg_register_action("surveys/delete", "{$action_base}/delete.php");
elgg_register_action("surveys/edit", "{$action_base}/edit.php");
// Language short codes must be of the form "projects:key"
// where key is the array key below
elgg_set_config('surveys', array('hear[]' => 'custom_checkbox', 'reason[]' => 'custom_checkbox', 'overall' => 'dropdown', 'speakers' => 'dropdown', 'facilitators' => 'dropdown', 'topics' => 'dropdown', 'structure' => 'dropdown', 'relevance' => 'dropdown', 'venue' => 'dropdown', 'overall_length' => 'dropdown', 'presentations' => 'dropdown', 'breaks' => 'dropdown', 'networking' => 'dropdown', 'groups' => 'dropdown', 'plenaries' => 'dropdown', 'worked' => 'plaintext', 'not_useful' => 'plaintext', 'useful' => 'plaintext', 'willAttend' => 'radio', 'attendExplain' => 'plaintext', 'help' => 'radio', 'helpExplain' => 'plaintext', 'recommend' => 'radio', 'otherDeparts' => 'radio', 'otherDepartsExplain' => 'plaintext', 'usefulDev' => 'radio', 'usefulDevExplain' => 'plaintext', 'suggestion' => 'plaintext', 'final1' => 'radio', 'final2' => 'radio', 'final3' => 'radio', 'final4' => 'radio', 'final5' => 'radio', 'final6' => 'radio', 'final7' => 'radio', 'final8[]' => 'custom_checkbox', 'final9' => 'plaintext', 'final10' => 'text'));
// register the hook handler
//elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'projects_owner_block_menu');
// Access permissions
//elgg_register_plugin_hook_handler('access:collections:write', 'all', 'projects_write_acl_plugin_hook');
//elgg_register_plugin_hook_handler('access:collections:read', 'all', 'projects_read_acl_plugin_hook');
}
示例6: setLegacyConfig
/**
* Initializes config values on system init
* @return void
*/
public function setLegacyConfig()
{
// legacy definitions
define('HYPECATEGORIES_RELATIONSHIP', $this->get('relationship'));
define('HYPECATEGORIES_SUBTYPE', $this->get('subtype'));
define('HYPECATEGORIES_ENTITY_MENU', $this->get('entity_menu'));
define('HYPECATEGORIES_GROUP_CATEGORIES', $this->get('group_categories'));
define('HYPECATEGORIES_GROUP_TREE_SITE', $this->get('group_tree_site'));
define('HYPECATEGORIES_INPUT_MULTIPLE', $this->get('input_multiple'));
// legacy config values
$pairs = $this->getEntityTypeSubtypePairs() ?: array();
$subtypes = array();
array_walk_recursive($pairs, function ($current) use(&$subtypes) {
$subtypes[] = $current;
});
elgg_set_config('taxonomy_types', array_keys($pairs));
elgg_set_config('taxonomy_subtypes', $subtypes);
$tsp = array();
foreach ($pairs as $type => $subtypes) {
if (empty($subtypes)) {
$subtypes = array('default');
}
foreach ($subtypes as $subtype) {
$tsp[] = "{$type}:{$subtype}";
}
}
elgg_set_config('taxonomy_type_subtype_pairs', $tsp);
elgg_set_config('taxonomy_tree_subtypes', array(Category::SUBTYPE));
}
示例7: au_landing_page_update
function au_landing_page_update($event, $type, $object)
{
if (!elgg_instanceof($object, 'page') && elgg_instanceof($object, 'page_top')) {
return true;
}
// only process this event once
if (elgg_get_config('page_update_notify_sent_' . $object->guid)) {
return true;
}
elgg_set_config('page_update_notify_sent_' . $object->guid, true);
// get revision history for the page
$revisions = $object->getAnnotations(array('annotation_name' => 'page', 'limit' => false));
// create an array of unique users to notify, excluding the current user
// and the object owner (as core notifies them)
$users = array();
foreach ($revisions as $revision) {
if ($revision->owner_guid != $object->owner_guid && $revision->owner_guid != elgg_get_logged_in_user_guid()) {
$users[] = $revision->owner_guid;
}
}
$users = array_unique($users);
// notify the users
if (count($users)) {
notify_user($users, elgg_get_logged_in_user_guid(), elgg_echo('au_landing:page:update:subject', array($object->title)), elgg_echo('au_landing:page:update:message', array($object->title, elgg_get_logged_in_user_entity()->name, $object->getURL())));
}
}
示例8: subsite_manager_plugins_boot
function subsite_manager_plugins_boot()
{
// handle run once functions
run_function_once("subsite_manager_runonce");
run_function_once("subsite_manager_runonce_elgg18");
// Check if current user should be a admin of this site
if ($user = elgg_get_logged_in_user_entity()) {
// don't check for super admins
if (!subsite_manager_is_superadmin($user->getGUID())) {
// where are we
if (subsite_manager_on_subsite()) {
// is the user suppose to be an admin
if (elgg_get_site_entity()->isAdmin($user->getGUID())) {
// is the user currently an admin
if (!$user->isAdmin()) {
$user->makeAdmin();
}
} elseif ($user->isAdmin()) {
// user is an admin, but shouldn't be
$user->removeAdmin();
}
} elseif ($user->isAdmin()) {
// user is an admin, but shouldn't be
$user->removeAdmin();
}
}
}
// check the site email address
$config_email = elgg_get_config("siteemail");
$site = elgg_get_site_entity();
if (empty($config_email) || $site->email != $config_email) {
elgg_set_config("siteemail", $site->email);
}
}
示例9: ui_icons_init
/**
* Initialize the plugin
* @return void
*/
function ui_icons_init()
{
elgg_extend_view('elements/icons.css', 'elements/avatar.css');
elgg_register_simplecache_view('elements/avatar.sizes.css.php');
elgg_extend_view('elements/icons.css', 'elements/avatar.sizes.css');
elgg_set_config('icon_sizes', ui_icons_get_sizes());
elgg_register_plugin_hook_handler('entity:icon:url', 'all', 'ui_icons_default_icon', 900);
}
示例10: generateMultiSizesForType
function generateMultiSizesForType($type)
{
$config = 'myicon_' . $type;
$icons = elgg_get_config($config);
foreach ($icons as $icon) {
generateMultiSizesForFile($type, $icon);
}
elgg_set_config('myicon_' . $type . '_processed', true);
}
示例11: pages_init
/**
* Initialize the pages plugin.
*
*/
function pages_init()
{
// register a library of helper functions
elgg_register_library('elgg:pages', elgg_get_plugins_path() . 'pages/lib/pages.php');
$item = new ElggMenuItem('pages', elgg_echo('pages'), 'pages/all');
elgg_register_menu_item('site', $item);
// Register a page handler, so we can have nice URLs
elgg_register_page_handler('pages', 'pages_page_handler');
// Register a url handler
elgg_register_entity_url_handler('object', 'page_top', 'pages_url');
elgg_register_entity_url_handler('object', 'page', 'pages_url');
elgg_register_annotation_url_handler('page', 'pages_revision_url');
// Register some actions
$action_base = elgg_get_plugins_path() . 'pages/actions';
elgg_register_action("pages/edit", "{$action_base}/pages/edit.php");
elgg_register_action("pages/delete", "{$action_base}/pages/delete.php");
elgg_register_action("pages/checkout", "{$action_base}/pages/checkout.php");
elgg_register_action("pages/checkin", "{$action_base}/pages/checkin.php");
elgg_register_action("annotations/page/delete", "{$action_base}/annotations/page/delete.php");
// Extend the main css view
elgg_extend_view('css/elgg', 'pages/css');
// Register javascript needed for sidebar menu
$js_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.min.js';
elgg_register_js('jquery-treeview', $js_url);
$css_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.css';
elgg_register_css('jquery-treeview', $css_url);
// Register entity type for search
elgg_register_entity_type('object', 'page');
elgg_register_entity_type('object', 'page_top');
// Register granular notification for this type
//register_notification_object('object', 'page', elgg_echo('pages:new'));
//register_notification_object('object', 'page_top', elgg_echo('pages:new'));
//elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'page_notify_message');
// add to groups
add_group_tool_option('pages', elgg_echo('groups:enablepages'), true);
elgg_extend_view('groups/tool_latest', 'pages/group_module');
//add a widget
elgg_register_widget_type('pages', elgg_echo('pages'), elgg_echo('pages:widget:description'));
// Language short codes must be of the form "pages:key"
// where key is the array key below
elgg_set_config('pages', array('title' => 'text', 'description' => 'longtext', 'tags' => 'tags', 'parent_guid' => 'parent', 'access_id' => 'access', 'write_access_id' => 'write_access'));
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'pages_owner_block_menu');
// write permission plugin hooks
elgg_register_plugin_hook_handler('permissions_check', 'object', 'pages_write_permission_check');
elgg_register_plugin_hook_handler('container_permissions_check', 'object', 'pages_container_permission_check');
// icon url override
elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'pages_icon_url_override');
// entity menu
elgg_register_plugin_hook_handler('register', 'menu:entity', 'pages_entity_menu_setup');
// hook into annotation menu
//elgg_register_plugin_hook_handler('register', 'menu:annotation', 'pages_annotation_menu_setup');
// register ecml views to parse
elgg_register_plugin_hook_handler('get_views', 'ecml', 'pages_ecml_views_hook');
elgg_register_event_handler('upgrade', 'system', 'pages_run_upgrades');
}
示例12: pages_init
/**
* Initialize the pages plugin.
*
*/
function pages_init()
{
// register a library of helper functions
elgg_register_library('elgg:pages', __DIR__ . '/lib/pages.php');
$item = new ElggMenuItem('pages', elgg_echo('pages'), 'pages/all');
elgg_register_menu_item('site', $item);
// Register a page handler, so we can have nice URLs
elgg_register_page_handler('pages', 'pages_page_handler');
// Register a url handler
elgg_register_plugin_hook_handler('entity:url', 'object', 'pages_set_url');
elgg_register_plugin_hook_handler('entity:url', 'object', 'pages_set_url');
elgg_register_plugin_hook_handler('extender:url', 'annotation', 'pages_set_revision_url');
// Register some actions
$action_base = __DIR__ . '/actions';
elgg_register_action("pages/edit", "{$action_base}/pages/edit.php");
elgg_register_action("pages/delete", "{$action_base}/pages/delete.php");
elgg_register_action("annotations/page/delete", "{$action_base}/annotations/page/delete.php");
// Extend the main css view
elgg_extend_view('elgg.css', 'pages/css');
elgg_define_js('jquery.treeview', array('src' => '/mod/pages/vendors/jquery-treeview/jquery.treeview.min.js', 'exports' => 'jQuery.fn.treeview', 'deps' => array('jquery')));
$css_url = 'mod/pages/vendors/jquery-treeview/jquery.treeview.css';
elgg_register_css('jquery.treeview', $css_url);
// Register entity type for search
elgg_register_entity_type('object', 'page');
elgg_register_entity_type('object', 'page_top');
// Register for notifications
elgg_register_notification_event('object', 'page');
elgg_register_notification_event('object', 'page_top');
elgg_register_plugin_hook_handler('prepare', 'notification:create:object:page', 'pages_prepare_notification');
elgg_register_plugin_hook_handler('prepare', 'notification:create:object:page_top', 'pages_prepare_notification');
// add to groups
add_group_tool_option('pages', elgg_echo('groups:enablepages'), true);
elgg_extend_view('groups/tool_latest', 'pages/group_module');
//add a widget
elgg_register_widget_type('pages', elgg_echo('pages'), elgg_echo('pages:widget:description'));
// Language short codes must be of the form "pages:key"
// where key is the array key below
elgg_set_config('pages', array('title' => 'text', 'description' => 'longtext', 'tags' => 'tags', 'parent_guid' => 'parent', 'access_id' => 'access', 'write_access_id' => 'write_access'));
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'pages_owner_block_menu');
// write permission plugin hooks
elgg_register_plugin_hook_handler('permissions_check', 'object', 'pages_write_permission_check');
elgg_register_plugin_hook_handler('container_permissions_check', 'object', 'pages_container_permission_check');
elgg_register_plugin_hook_handler('access:collections:write', 'user', 'pages_write_access_options_hook');
// icon url override
elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'pages_icon_url_override');
// entity menu
elgg_register_plugin_hook_handler('register', 'menu:entity', 'pages_entity_menu_setup');
// register ecml views to parse
elgg_register_plugin_hook_handler('get_views', 'ecml', 'pages_ecml_views_hook');
// allow to be liked
elgg_register_plugin_hook_handler('likes:is_likable', 'object:page', 'Elgg\\Values::getTrue');
elgg_register_plugin_hook_handler('likes:is_likable', 'object:page_top', 'Elgg\\Values::getTrue');
// prevent public write access
elgg_register_plugin_hook_handler('view_vars', 'input/access', 'pages_write_access_vars');
}
示例13: projects_init
/**
* Initialize the projects plugin.
*
*/
function projects_init()
{
// register a library of helper functions
elgg_register_library('elgg:projects', elgg_get_plugins_path() . 'projects/lib/projects.php');
elgg_load_library('elgg:projects');
//register css
$css_url = 'mod/projects/css/styles.css';
elgg_register_css('projectsCss', $css_url);
elgg_load_css('projectsCss');
// register an elgg menu item
$item = new ElggMenuItem('projects', elgg_echo('projects'), 'projects/all');
//elgg_register_menu_item('site', $item);
// register a project handler, so we can have nice URLs
elgg_register_page_handler('projects', 'projects_page_handler');
// register a url handler
elgg_register_entity_url_handler('object', 'project_top', 'projects_url');
elgg_register_entity_url_handler('object', 'project', 'projects_url');
elgg_register_annotation_url_handler('project', 'projects_revision_url');
// register entity type for search
elgg_register_entity_type('object', 'project');
elgg_register_entity_type('object', 'project_top');
// register some actions
$action_base = elgg_get_plugins_path() . 'projects/actions/projects';
$requests_action_base = elgg_get_plugins_path() . 'projects/actions/requests';
elgg_register_action("projects/edit", "{$action_base}/edit.php");
elgg_register_action("projects/editwelcome", "{$action_base}/editwelcome.php");
elgg_register_action("projects/delete", "{$action_base}/delete.php");
elgg_register_action("requests/add", "{$requests_action_base}/add.php");
elgg_register_action("requests/edit", "{$requests_action_base}/edit.php");
elgg_register_action("projects/helperFuncs", elgg_get_plugins_path() . 'lib/projects.php');
//elgg_register_action("projects/search", elgg_get_plugins_path() ."projects/pages/projects/search.php");
// register granular notification for this type
register_notification_object('object', 'project', elgg_echo('projects:new'));
register_notification_object('object', 'project_top', elgg_echo('projects:new'));
elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'project_notify_message');
// add to groups
add_group_tool_option('projects', elgg_echo('groups:enableprojects'), true);
elgg_extend_view('groups/tool_latest', 'projects/group_module');
// Language short codes must be of the form "projects:key"
// where key is the array key below
elgg_set_config('projects', array('title' => 'text', 'description' => 'longtext', 'project_type' => 'dr_down', 'cost' => 'text', 'organization' => 'text', 'funding' => 'text', 'status' => 'dr_down', 'start_date' => 'date', 'end_date' => 'date', 'assigned_to[]' => 'assign_to', 'tags' => 'tags', 'access_id' => 'access', 'write_access_id' => 'write_access', 'upload' => 'file'));
// register the hook handler
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'projects_owner_block_menu');
// write permission plugin hooks
elgg_register_plugin_hook_handler('permissions_check', 'object', 'projects_write_permission_check');
elgg_register_plugin_hook_handler('container_permissions_check', 'object', 'projects_container_permission_check');
// icon url override
elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'projects_icon_url_override');
// entity menu
elgg_register_plugin_hook_handler('register', 'menu:entity', 'projects_entity_menu_setup');
// Access permissions
//elgg_register_plugin_hook_handler('access:collections:write', 'all', 'projects_write_acl_plugin_hook');
//elgg_register_plugin_hook_handler('access:collections:read', 'all', 'projects_read_acl_plugin_hook');
}
示例14: elgg_stars_register_rating_annotation_name
/**
* Add an annotation name to a list of valid rating names
*
* @param string $annotation_name
*/
function elgg_stars_register_rating_annotation_name($annotation_name)
{
$rating_annotation_names = elgg_get_config('elgg_stars_annotation_names');
if (!is_array($rating_annotation_names)) {
$rating_annotation_names = array();
}
if (!in_array($annotation_name, $rating_annotation_names)) {
$rating_annotation_names[] = $annotation_name;
}
elgg_set_config('elgg_stars_annotation_names', $rating_annotation_names);
}
示例15: videolist_init
function videolist_init()
{
elgg_register_library('elgg:videolist', elgg_get_plugins_path() . 'videolist/lib/videolist.php');
if (!class_exists('Videolist_PlatformInterface')) {
// ./classes autoloading failed (pre 1.9)
spl_autoload_register('videolist_load_class');
}
// add a site navigation item
$item = new ElggMenuItem('videolist', elgg_echo('videolist'), 'videolist/all');
elgg_register_menu_item('site', $item);
// Extend system CSS with our own styles
elgg_extend_view('css/elgg', 'videolist/css');
// register the js
$js = elgg_get_simplecache_url('js', 'videolist/videolist');
elgg_register_simplecache_view('js/videolist/videolist');
elgg_register_js('elgg.videolist', $js);
$js = elgg_get_simplecache_url('js', 'videolist/json2');
elgg_register_simplecache_view('js/videolist/json2');
elgg_register_js('elgg.videolist.json2', $js);
// Register a page handler, so we can have nice URLs
elgg_register_page_handler('videolist', 'videolist_page_handler');
// Language short codes must be of the form "videolist:key"
// where key is the array key below
elgg_set_config('videolist', array('video_url' => 'url', 'title' => 'text', 'description' => 'longtext', 'tags' => 'tags', 'access_id' => 'access'));
elgg_set_config('videolist_dimensions', array('width' => 600, 'height' => 400));
// add to groups
add_group_tool_option('videolist', elgg_echo('groups:enablevideolist'), true);
elgg_extend_view('groups/tool_latest', 'videolist/group_module');
//add a widget
elgg_register_widget_type('videolist', elgg_echo('videolist'), elgg_echo('videolist:widget:description'));
// Register granular notification for this type
register_notification_object('object', 'videolist_item', elgg_echo('videolist:notification:subject'));
elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'videolist_notify_message');
// Register entity type for search
elgg_register_entity_type('object', 'videolist_item');
// add a file link to owner blocks
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'videolist_owner_block_menu');
//register entity url handler
elgg_register_entity_url_handler('object', 'videolist_item', 'videolist_url');
elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'videolist_icon_url_override');
// register for embed
elgg_register_plugin_hook_handler('embed_get_sections', 'all', 'videolist_embed_get_sections');
elgg_register_plugin_hook_handler('embed_get_items', 'videolist', 'videolist_embed_get_items');
// handle URLs without scheme
elgg_register_plugin_hook_handler('videolist:preprocess', 'url', 'videolist_preprocess_url');
// Register actions
$actions_path = elgg_get_plugins_path() . "videolist/actions/videolist";
elgg_register_action("videolist/add", "{$actions_path}/add.php");
elgg_register_action("videolist/edit", "{$actions_path}/edit.php");
elgg_register_action("videolist/delete", "{$actions_path}/delete.php");
elgg_register_action("videolist/get_metadata_from_url", "{$actions_path}/get_metadata_from_url.php");
elgg_register_event_handler('upgrade', 'system', 'videolist_run_upgrades');
}