function friend_init() { global $CFG, $function; // Functions to perform upon initialisation $function['friends:init'][] = $CFG->dirroot . "mod/friend/lib/friends_init.php"; $function['friends:init'][] = $CFG->dirroot . "mod/friend/lib/friends_actions.php"; // Get list of friends $function['friends:get'][] = $CFG->dirroot . "mod/friend/lib/get_friends.php"; // 'Friends' aspect to user profiles $function['users:infobox:delete'][] = $CFG->dirroot . "mod/friend/lib/user_info_menu.php"; $function['users:infobox:menu:text'][] = $CFG->dirroot . "mod/friend/lib/user_info_menu_text.php"; // 'Friends' list in the portfolio view $function['profile:log_on_pane'][] = $CFG->dirroot . "mod/friend/lib/profile_friends.php"; $function['display:sidebar'][] = $CFG->dirroot . "mod/friend/lib/profile_friends.php"; // Friends full view / edit section $function['friends:editpage'][] = $CFG->dirroot . "mod/friend/lib/friends_edit_wrapper.php"; $function['friends:edit'][] = $CFG->dirroot . "mod/friend/lib/friends_edit.php"; $function['allfriends:edit'][] = $CFG->dirroot . "mod/friend/lib/allfriends.php"; // Friendship requests $function['friends:requests:view'][] = $CFG->dirroot . "mod/friend/lib/user_friendship_requests.php"; // 'Friends of' full view / edit section $function['friends:of:editpage'][] = $CFG->dirroot . "mod/friend/lib/friends_of_edit_wrapper.php"; $function['friends:of:edit'][] = $CFG->dirroot . "mod/friend/lib/friends_of_edit.php"; // FOAF file $function['foaf:generate'][] = $CFG->dirroot . "mod/friend/lib/generate_foaf.php"; // Delete users listen_for_event("user", "delete", "friend_user_delete"); }
function profile_photo_init() { global $CFG; $CFG->display_field_module['profile_photo'] = "profile_photo"; listen_for_event("user", "publish", "profile_photo_user_publish"); // Trick to set data if the checkbox hasn't been ticked, solves access setting problem for profile picture if ($_SERVER['REQUEST_METHOD'] == 'POST' && !isset($_POST['profiledetails']['profilephoto']) && isset($_POST['_profile_photo_name'])) { $_POST['profiledetails']['profilephoto'] = $_POST['_profile_photo_name']; } }
function template_init() { global $CFG, $function; // Load default values $function['init'][] = dirname(__FILE__) . "/lib/default_template.php"; // Actions $function['templates:init'][] = dirname(__FILE__) . "/lib/template_actions.php"; // Draw template (returns HTML as opposed to echoing it straight to the screen) $function['templates:draw'][] = dirname(__FILE__) . "/lib/template_draw.php"; // Function to substitute variables within a template, used in templates:draw $function['templates:variables:substitute'][] = dirname(__FILE__) . "/lib/variables_substitute.php"; // Function to draw the page, once supplied with a main body and title $function['templates:draw:page'][] = dirname(__FILE__) . "/lib/page_draw.php"; // Function to display a list of templates $function['templates:view'][] = dirname(__FILE__) . "/lib/templates_view.php"; $function['templates:preview'][] = dirname(__FILE__) . "/lib/templates_preview.php"; // Function to display input fields for template editing $function['templates:edit'][] = dirname(__FILE__) . "/lib/templates_edit.php"; // Function to allow the user to create a new template $function['templates:add'][] = dirname(__FILE__) . "/lib/templates_add.php"; // Delete users listen_for_event("user", "delete", "template_user_delete"); }
function widget_init() { global $CFG, $function, $db, $METATABLES; $function['init'][] = $CFG->dirroot . "mod/widget/init.php"; // Initialise the 'allcontent' widget array - i.e., widgets where Javascript is allowed if (!isset($CFG->widgets->allcontent)) { $CFG->widgets->allcontent = array(); } // register the widgets that this module provides $CFG->widgets->list[] = array('name' => gettext("Text box"), 'description' => gettext("Displays the text of your choice."), 'type' => "widget::text"); if (!in_array($CFG->prefix . "widget_data", $METATABLES) || !in_array($CFG->prefix . "widgets", $METATABLES)) { if (file_exists($CFG->dirroot . "mod/widget/{$CFG->dbtype}.sql")) { modify_database($CFG->dirroot . "mod/widget/{$CFG->dbtype}.sql"); //reload system header_redirect($CFG->wwwroot); } else { error("Error: Your database ({$CFG->dbtype}) is not yet fully supported by the Elgg widgets. See the mod/widget directory."); } print_continue("index.php"); exit; } // Delete users listen_for_event("user", "delete", "widget_user_delete"); }
function file_init() { global $CFG; global $function; global $metatags; //Add new Photo $function['photo:add'][] = $CFG->dirroot . "mod/file/lib/upload_file.php"; //Add new Folder $function['folder:add'][] = $CFG->dirroot . "mod/file/lib/addfolder.php"; //View Photo Folders $function['folder:photo'][] = $CFG->dirroot . "mod/file/lib/photo_folder_view.php"; // Styles for file icons $metatags .= "<style type=\"text/css\">"; $metatags .= str_replace("{{url}}", $CFG->wwwroot, file_get_contents(dirname(__FILE__) . "/file-icons.css")); $metatags .= "</style>"; // Functions to perform upon initialisation $function['files:init'][] = $CFG->dirroot . "mod/file/lib/files_init.php"; $function['files:init'][] = $CFG->dirroot . "mod/file/lib/metadata_defaults.php"; $function['files:init'][] = $CFG->dirroot . "mod/file/lib/inline_mimetypes.php"; $function['init'][] = $CFG->dirroot . "mod/file/default_templates.php"; // Mime-type init $function['files:metadata:init'][] = $CFG->dirroot . "mod/file/lib/inline_mimetypes.php"; // Actions to perform $function['files:init'][] = $CFG->dirroot . "mod/file/lib/files_actions.php"; // Init for search $function['search:init'][] = $CFG->dirroot . "mod/file/lib/files_init.php"; $function['search:all:tagtypes'][] = $CFG->dirroot . "mod/file/lib/function_search_all_tagtypes.php"; // Function to search through weblog posts $function['search:display_results'][] = $CFG->dirroot . "mod/file/lib/function_search.php"; $function['search:display_results:rss'][] = $CFG->dirroot . "mod/file/lib/function_search_rss.php"; // Determines whether or not a file should be displayed in the browser $function['files:mimetype:inline'][] = $CFG->dirroot . "mod/file/lib/files_mimetype_inline.php"; // View files $function['files:view'][] = $CFG->dirroot . "mod/file/lib/files_view.php"; // View the contents of a specific folder $function['files:folder:view'][] = $CFG->dirroot . "mod/file/lib/folder_view.php"; // Edit the contents of a specific folder $function['files:folder:edit'][] = $CFG->dirroot . "mod/file/lib/edit_folder.php"; // Edit the contents of a specific folder $function['files:file:upload'][] = $CFG->dirroot . "mod/file/lib/upload_file.php"; // Add files through the wizard $function['files:wizard:add:file'][] = $CFG->dirroot . "mod/file/lib/add_file.php"; // Edit the metadata for a specific file $function['files:edit'][] = $CFG->dirroot . "mod/file/lib/edit_file.php"; $function['folder:select'][] = $CFG->dirroot . "mod/file/lib/select_folder.php"; // Edit metadata $function['metadata:edit'][] = $CFG->dirroot . "mod/file/lib/metadata_edit.php"; // Turn file ID into a link $function['files:links:make'][] = $CFG->dirroot . "mod/file/lib/files_links_make.php"; // Allow users to embed files in weblog posts $function['weblogs:text:process'][] = $CFG->dirroot . "mod/file/lib/weblogs_text_process.php"; $function['weblogs:posts:add:fields'][] = $CFG->dirroot . "mod/file/lib/weblogs_posts_add_fields.php"; $function['weblogs:posts:edit:fields'][] = $CFG->dirroot . "mod/file/lib/weblogs_posts_add_fields.php"; // Log on bar down the right hand side $function['display:sidebar'][] = $CFG->dirroot . "mod/file/lib/files_user_info_menu.php"; // Template preview $function['templates:preview'][] = $CFG->dirroot . "mod/file/lib/templates_preview.php"; // Establish permissions $function['permissions:check'][] = $CFG->dirroot . "mod/file/lib/permissions_check.php"; // Actions to perform when an access group is deleted $function['groups:delete'][] = $CFG->dirroot . "mod/file/lib/groups_delete.php"; // Publish static RSS file of files $function['files:rss:getitems'][] = $CFG->dirroot . "mod/file/lib/function_rss_getitems.php"; $function['files:rss:publish'][] = $CFG->dirroot . "mod/file/lib/function_rss_publish.php"; // Has the $CFG->files->default_handler been set? If not, set it to local if (empty($CFG->files->default_handler)) { $CFG->files->default_handler = "elgg"; } if (empty($CFG->folders->default_handler)) { $CFG->folders->default_handler = "elgg"; } $CFG->folders->handler["elgg"]['menuitem'] = __gettext("Default file folder"); $CFG->folders->handler["elgg"]['view'] = "file_folder_view"; $CFG->folders->handler["elgg"]['preview'] = "file_folder_preview"; $CFG->widgets->list[] = array('name' => __gettext("Files widget"), 'description' => __gettext("Displays images of some of your files."), 'type' => "file::files"); // Delete users listen_for_event("user", "delete", "file_user_delete"); // Register a display object function display_set_display_function('file', 'file_displayobject'); // Register file river hook (if there) if (function_exists('river_save_event')) { river_register_friendlyname_hook('file::file', 'file_get_friendly_name'); listen_for_event('file', 'publish', 'file_river_hook'); listen_for_event('file', 'delete', 'file_river_hook'); } }
function profile_init() { global $CFG, $messages, $function, $metatags, $data; // Check to see if the profile config file doesn't exist if (!isset($CFG->profilelocation)) { $CFG->profilelocation = $CFG->dirroot . "mod/profile/"; } else { if (!file_exists($CFG->profilelocation . "profile.config.php")) { if (!copy($CFG->dirroot . "mod/profile/profile.config.php", $CFG->profilelocation . "profile.config.php")) { $CFG->profilelocation = $CFG->dirroot . "mod/profile/"; } } } $css = file_get_contents($CFG->dirroot . "mod/profile/css"); $css = str_replace("{{url}}", $CFG->wwwroot, $css); $metatags .= $css; // Profile initialisation $function['profile:init'][] = dirname(__FILE__) . "/lib/function_init.php"; // $function['profile:init'][] = $CFG->dirroot . "units/profile/function_editfield_defaults.php"; $function['profile:init'][] = dirname(__FILE__) . "/lib/function_upload_foaf.php"; $function['profile:init'][] = $CFG->profilelocation . "profile.config.php"; // Initialisation for the search function $function['search:init'][] = dirname(__FILE__) . "/lib/function_init.php"; $function['search:init'][] = $CFG->profilelocation . "profile.config.php"; $function['search:all:tagtypes'][] = dirname(__FILE__) . "/lib/function_search_all_tagtypes.php"; $function['search:all:tagtypes:rss'][] = dirname(__FILE__) . "/lib/function_search_all_tagtypes_rss.php"; // Function to search through profiles $function['search:display_results'][] = dirname(__FILE__) . "/lib/function_search.php"; $function['search:display_results:rss'][] = dirname(__FILE__) . "/lib/function_search_rss.php"; // Functions to view and edit individual profile fields $function['profile:editfield:display'][] = dirname(__FILE__) . "/lib/function_editfield_display.php"; $function['profile:field:display'][] = dirname(__FILE__) . "/lib/function_field_display.php"; // Function to edit all profile fields $function['profile:edit'][] = dirname(__FILE__) . "/lib/function_edit.php"; // Function to view all profile fields $function['profile:view'][] = dirname(__FILE__) . "/lib/function_view.php"; // Function to display user's name $function['profile:display:name'][] = dirname(__FILE__) . "/lib/function_display_name.php"; $function['profile:user:info'][] = dirname(__FILE__) . "/lib/profile_user_info.php"; // Descriptive text $function['content:profile:edit'][] = dirname(__FILE__) . "/lib/content_edit.php"; // Establish permissions $function['permissions:check'][] = dirname(__FILE__) . "/lib/permissions_check.php"; // FOAF $function['foaf:generate:fields'][] = dirname(__FILE__) . "/lib/generate_foaf_fields.php"; $function['vcard:generate:fields:adr'][] = dirname(__FILE__) . "/lib/generate_vcard_adr_fields.php"; // Actions to perform when an access group is deleted $function['groups:delete'][] = dirname(__FILE__) . "/lib/groups_delete.php"; // Publish static RSS file of posts and files $function['profile:rss:publish'][] = dirname(__FILE__) . "/lib/function_rss_publish.php"; // Delete users listen_for_event("user", "delete", "profile_user_delete"); // Add items to the dashboard if it exists //$CFG->widgets->display['profile'] = "profile_widget_display"; //$CFG->widgets->edit['profile'] = "profile_widget_edit"; $CFG->widgets->list[] = array('name' => __gettext("Profile widget"), 'description' => __gettext("Displays the contents of a profile field."), 'type' => "profile::profile"); $CFG->widgets->list[] = array('name' => __gettext("Friends widget"), 'description' => __gettext("Displays the icons of your most recently logged-in friends."), 'type' => "profile::friends"); /* $CFG->widgets->list[] = array( 'name' => __gettext("Files widget"), 'description' => __gettext("Displays images of some of your files."), 'type' => "profile::files" ); */ }
function newsclient_init() { global $CFG, $function; // Magpie unit for Elgg // ben@elgg.net Oct 17, 2005 // Library functions require_once $CFG->dirroot . "mod/newsclient/lib/library.php"; // Load default template $function['init'][] = $CFG->dirroot . "mod/newsclient/lib/default_template.php"; // Initialise RSS parser $function['rss:init'][] = $CFG->dirroot . "mod/newsclient/lib/function_init.php"; $function['rss:init'][] = $CFG->dirroot . "mod/newsclient/lib/function_actions.php"; // Get current contents of a feed (raw) $function['rss:get'][] = $CFG->dirroot . "mod/newsclient/lib/function_get.php"; // Display a user's subscriptions $function['rss:subscriptions'][] = $CFG->dirroot . "mod/newsclient/lib/function_subscriptions.php"; // Allow a user to publish feeds to their blog $function['rss:subscriptions:publish:blog'][] = $CFG->dirroot . "mod/newsclient/lib/function_subscriptions_publish_to_blog.php"; // Load variable containing all subscriptions for a user $function['rss:subscriptions:get'][] = $CFG->dirroot . "mod/newsclient/lib/function_get_subscriptions.php"; // Display the most popular subscriptions $function['rss:subscriptions:popular'][] = $CFG->dirroot . "mod/newsclient/lib/function_subscriptions_popular.php"; // Update a feed by ID $function['rss:update'][] = $CFG->dirroot . "mod/newsclient/lib/function_update.php"; // Update all feeds by user $function['rss:update:all'][] = $CFG->dirroot . "mod/newsclient/lib/function_update_all.php"; // Update all feeds in system (for use with cron job) $function['rss:update:all:cron'][] = $CFG->dirroot . "mod/newsclient/lib/function_update_all_cron.php"; // Permissions check $function['permissions:check'][] = $CFG->dirroot . "mod/newsclient/lib/permissions_check.php"; // View a user's posts $function['rss:view'][] = $CFG->dirroot . "mod/newsclient/lib/function_view.php"; $function['rss:view:feed'][] = $CFG->dirroot . "mod/newsclient/lib/function_view_individual.php"; $function['rss:view:post'][] = $CFG->dirroot . "mod/newsclient/lib/function_view_post.php"; // Is the current user subscribed to a feed? $function['rss:subscribed'][] = $CFG->dirroot . "mod/newsclient/lib/function_is_subscribed.php"; // Prune feed posts older than a configured age $function['rss:prune'][] = $CFG->dirroot . "mod/newsclient/lib/function_prune.php"; // Delete users listen_for_event("user", "delete", "newsclient_user_delete"); //$CFG->widgets->display['feed'] = "newsclient_widget_display"; //$CFG->widgets->edit['feed'] = "newsclient_widget_edit"; $CFG->widgets->list[] = array('name' => __gettext("Feed widget"), 'description' => __gettext("Displays the latest entries from an external feed of your choice."), 'type' => "newsclient::feed"); }
function community_init() { global $CFG, $function; //Ver todas las comunides $function['allcommunities:out'][] = $CFG->dirroot . "mod/community/lib/allcommunities.php"; // Add communities to access levels $function['init'][] = $CFG->dirroot . "mod/community/lib/communities_access_levels.php"; $function['userdetails:init'][] = $CFG->dirroot . "mod/community/lib/userdetails_actions.php"; // Communities actions $function['communities:init'][] = $CFG->dirroot . "mod/community/lib/communities_config.php"; $function['communities:init'][] = $CFG->dirroot . "mod/community/lib/communities_actions.php"; // Communities bar down the right hand side $function['display:sidebar'][] = $CFG->dirroot . "mod/community/lib/communities_owned.php"; $function['display:sidebar'][] = $CFG->dirroot . "mod/community/lib/community_memberships.php"; // 'Communities' aspect to the little menus beneath peoples' icons $function['community:infobox:menu'][] = $CFG->dirroot . "mod/community/lib/user_info_menu.php"; $function['users:infobox:menu:text'][] = $CFG->dirroot . "mod/community/lib/user_info_menu_text.php"; // Permissions for communities $function['permissions:check'][] = $CFG->dirroot . "mod/community/lib/permissions_check.php"; // View community memberships $function['communities:editpage'][] = $CFG->dirroot . "mod/community/lib/communities_edit_wrapper.php"; $function['communities:edit'][] = $CFG->dirroot . "mod/community/lib/communities_edit.php"; $function['communities:members'][] = $CFG->dirroot . "mod/community/lib/communities_members.php"; $function['communities:owned'][] = $CFG->dirroot . "mod/community/lib/communities_moderator_of.php"; //$function['communities:owned'][] = $CFG->dirroot . "mod/community/lib/communities_create.php"; $function['communities:create'][] = $CFG->dirroot . "mod/community/lib/communities_create.php"; //Show community details $function['communities:showdetails'][] = $CFG->dirroot . "mod/community/lib/community_showdetails.php"; // Membership requests $function['communities:requests:view'][] = $CFG->dirroot . "mod/community/lib/communities_membership_requests.php"; // Check access levels $function['users:access_level_check'][] = $CFG->dirroot . "mod/community/lib/communities_access_level_check.php"; // Obtain SQL "where" string for access levels $function['users:access_level_sql_where'][] = $CFG->dirroot . "mod/community/lib/communities_access_level_sql_check.php"; // Link to edit icons $function['profile:edit:link'][] = $CFG->dirroot . "mod/community/lib/profile_edit_link.php"; // Edit profile details $function['userdetails:edit'][] = $CFG->dirroot . "mod/community/lib/userdetails_edit.php"; // Get the community members $function['community:members:data'][] = $CFG->dirroot . "mod/community/lib/community_members_data.php"; $function['community:members:count'][] = $CFG->dirroot . "mod/community/lib/community_members_count.php"; $function['community:membership'][] = $CFG->dirroot . "mod/community/lib/community_membership.php"; $function['community:membership:check'][] = $CFG->dirroot . "mod/community/lib/community_membership_check.php"; $function['community:membership:data'][] = $CFG->dirroot . "mod/community/lib/community_membership_data.php"; // Add/ Remove community members $function['community:member:add'][] = $CFG->dirroot . "mod/community/lib/community_member_add.php"; $function['community:member:remove'][] = $CFG->dirroot . "mod/community/lib/community_member_remove.php"; // Add owner as member listen_for_event("community", "publish", "community_owner_as_member"); // Delete users listen_for_event("user", "delete", "community_user_delete"); // Register file river hook (if there) if (function_exists('river_save_event')) { listen_for_event('community', 'publish', 'community_river_hook'); listen_for_event('community', 'delete', 'community_river_hook'); river_register_friendlyname_hook('community::community', 'community_get_friendly_name'); } register_user_type('community'); }
function blog_init() { global $CFG, $function; // Load default template $function['init'][] = $CFG->dirroot . "mod/blog/default_template.php"; // Functions to perform upon initialisation $function['weblogs:init'][] = $CFG->dirroot . "mod/blog/lib/weblogs_init.php"; $function['weblogs:init'][] = $CFG->dirroot . "mod/blog/lib/weblogs_actions.php"; // Init for search $function['search:init'][] = $CFG->dirroot . "mod/blog/lib/weblogs_init.php"; $function['search:all:tagtypes'][] = $CFG->dirroot . "mod/blog/lib/function_search_all_tagtypes.php"; // Function to search through weblog posts $function['search:display_results'][] = $CFG->dirroot . "mod/blog/lib/function_search.php"; $function['search:display_results:rss'][] = $CFG->dirroot . "mod/blog/lib/function_search_rss.php"; // Edit / create weblog posts $function['weblogs:edit'][] = $CFG->dirroot . "mod/blog/lib/weblogs_edit.php"; $function['weblogs:posts:add'][] = $CFG->dirroot . "mod/blog/lib/weblogs_posts_add.php"; $function['weblogs:posts:edit'][] = $CFG->dirroot . "mod/blog/lib/weblogs_posts_edit.php"; // View weblog posts //$function['weblogs:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_post_field_wrapper.php"; $function['weblogs:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_view.php"; $function['weblogs:posts:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_posts_view.php"; // Add assign list $function['weblogs:assign:field'][] = $CFG->dirroot . "mod/blog/lib/weblogs_assign_field.php"; // Put this one before the Flag content form $index = count($function['weblogs:posts:view:individual']); for ($i = 0; $i < count($function['weblogs:posts:view:individual']); $i++) { $weblog_individual = $function['weblogs:posts:view:individual'][$i]; if (strpos($weblog_individual, "flag_form") > 0) { $index = $i; $flag_form = $weblog_individual; } } $function['weblogs:posts:view:individual'][$index] = $CFG->dirroot . "mod/blog/lib/weblogs_posts_view.php"; if (!empty($flag_form)) { $function['weblogs:posts:view:individual'][] = $flag_form; } $function['weblogs:friends:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_friends_view.php"; $function['weblogs:everyone:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_all_users_view.php"; // This is necessary to ensure that the blog text process function its the first one to be called if (array_key_exists("weblogs:text:process", $function)) { $function['weblogs:text:process'] = array_merge(array($CFG->dirroot . "mod/blog/lib/weblogs_text_process.php"), $function['weblogs:text:process']); } else { $function['weblogs:text:process'][] = $CFG->dirroot . "mod/blog/lib/weblogs_text_process.php"; } $function['weblogs:archives:view'][] = $CFG->dirroot . "mod/blog/lib/archives_view.php"; $function['weblogs:archives:month:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_view_month.php"; $function['weblogs:interesting:view'][] = $CFG->dirroot . "mod/blog/lib/weblogs_interesting_view.php"; // Mark posts as interesting (or not) $function['weblogs:interesting:form'][] = $CFG->dirroot . "mod/blog/lib/display_interesting_post_form.php"; // Edit / create weblog comments $function['weblogs:comments:add'][] = $CFG->dirroot . "mod/blog/lib/weblogs_comments_add.php"; // Log on bar down the right hand side // $function['profile:log_on_pane'][] = $CFG->dirroot . "units/weblogs/weblogs_user_info_menu.php"; $function['display:sidebar'][] = $CFG->dirroot . "mod/blog/lib/weblogs_user_info_menu.php"; // Weblog preview $function['templates:preview'][] = $CFG->dirroot . "mod/blog/templates_preview.php"; // Establish permissions $function['permissions:check'][] = $CFG->dirroot . "mod/blog/lib/permissions_check.php"; // Actions to perform when an access group is deleted $function['groups:delete'][] = $CFG->dirroot . "mod/blog/lib/groups_delete.php"; // Publish static RSS file of posts $function['weblogs:rss:getitems'][] = $CFG->dirroot . "mod/blog/lib/function_rss_getitems.php"; $function['weblogs:rss:publish'][] = $CFG->dirroot . "mod/blog/lib/function_rss_publish.php"; // Removing function from weblogs_init.php $function['weblogs:html_activate_urls'][] = $CFG->dirroot . "mod/blog/lib/function_html_activate_urls.php"; //$CFG->widgets->display['blog'] = "blog_widget_display"; //$CFG->widgets->edit['blog'] = "blog_widget_edit"; $CFG->widgets->list[] = array('name' => __gettext("Blog widget"), 'description' => __gettext("Displays the latest blog posts from a blog of your choice."), 'type' => "blog::blog"); $CFG->templates->variables_substitute['blog'][] = "blog_keyword"; $CFG->templates->variables_substitute['blogsummary'][] = "blog_summary_keyword"; $CFG->templates->variables_substitute['blogexecutivesummary'][] = "blog_executive_summary_keyword"; // Delete users listen_for_event("user", "delete", "blog_user_delete"); // Display modules if (!isset($CFG->display_field_module)) { $CFG->display_field_module = array(); } if (!array_key_exists("select", $CFG->display_field_module)) { $CFG->display_field_module["select"] = "blog"; } if (!array_key_exists("select_associative", $CFG->display_field_module)) { $CFG->display_field_module["select_associative"] = "blog"; } if (!array_key_exists("selectg", $CFG->display_field_module)) { $CFG->display_field_module["selectg"] = "blog"; } if (!array_key_exists("selectd", $CFG->display_field_module) && !array_key_exists("date_select", $CFG->display_field_module)) { $CFG->display_field_module["selectd"] = "blog"; $CFG->display_field_module["date_select"] = "blog"; } if (!array_key_exists("radio", $CFG->display_field_module)) { $CFG->display_field_module["radio"] = "blog"; } if (!array_key_exists("vertical_radio", $CFG->display_field_module)) { $CFG->display_field_module["vertical_radio"] = "blog"; } if (!isset($CFG->weblog_extensions)) { $CFG->weblog_extensions = array(); } //$CFG->weblog_extensions['weblog']= array (); // Register file river hook (if there) if (function_exists('river_save_event')) { listen_for_event('weblog_post', 'publish', 'blog_river_hook'); listen_for_event('weblog_post', 'delete', 'blog_river_hook'); river_register_friendlyname_hook('weblog_post::post', 'blog_get_friendly_name'); } }
function a_home_init() { global $CFG; // Delete users listen_for_event("user", "delete", "newsclient_user_delete"); }