function gmap_load_scripts() { global $CONFIG; if (!(isset($CONFIG->views) && isset($CONFIG->views->extensions) && isset($CONFIG->views->extensions['google-map/metatags']))) { extend_view('metatags', 'google-map/metatags'); } }
/** * Messages initialisation * * These parameters are required for the event API, but we won't use them: * * @param unknown_type $event * @param unknown_type $object_type * @param unknown_type $object */ function messages_init() { // Load system configuration global $CONFIG; //add submenu options if (get_context() == "messages") { add_submenu_item(elgg_echo('messages:compose'), $CONFIG->wwwroot . "mod/messages/send.php"); add_submenu_item(elgg_echo('messages:inbox'), $CONFIG->wwwroot . "pg/messages/" . $_SESSION['user']->username); add_submenu_item(elgg_echo('messages:sentmessages'), $CONFIG->wwwroot . "mod/messages/sent.php"); } // Extend system CSS with our own styles, which are defined in the shouts/css view extend_view('css', 'messages/css'); // Extend the elgg topbar extend_view('elgg_topbar/extend', 'messages/topbar'); // Register a page handler, so we can have nice URLs register_page_handler('messages', 'messages_page_handler'); // Register a URL handler for shouts posts register_entity_url_handler('messages_url', 'object', 'messages'); // Extend hover-over and profile menu extend_view('profile/menu/links', 'messages/menu'); // Register a notification handler for site messages register_notification_handler("site", "messages_site_notify_handler"); register_plugin_hook('notify:entity:message', 'object', 'messages_notification_msg'); if (is_callable('register_notification_object')) { register_notification_object('object', 'messages', elgg_echo('messages:new')); } // Shares widget // add_widget_type('messages',elgg_echo("messages:recent"),elgg_echo("messages:widget:description")); // Override metadata permissions register_plugin_hook('permissions_check:metadata', 'object', 'messages_can_edit_metadata'); }
/** * File plugin initialisation functions. */ function file_init() { // Get config global $CONFIG; // Set up menu for logged in users if (isloggedin()) { add_menu(elgg_echo('file'), $CONFIG->wwwroot . "pg/file/" . $_SESSION['user']->username); } // Extend CSS extend_view('css', 'file/css'); // Extend hover-over and profile menu extend_view('profile/menu/links', 'file/menu'); extend_view('groups/left_column', 'file/groupprofile_files'); extend_view('dgroups/left_column', 'file/groupprofile_files'); // Register a page handler, so we can have nice URLs register_page_handler('file', 'file_page_handler'); // Add a new file widget add_widget_type('filerepo', elgg_echo("file:widget"), elgg_echo("file:widget:description")); // Register a URL handler for files register_entity_url_handler('file_url', 'object', 'file'); // Register granular notification for this type if (is_callable('register_notification_object')) { register_notification_object('object', 'file', elgg_echo('file:newupload')); } // Listen to notification events and supply a more useful message register_plugin_hook('notify:entity:message', 'object', 'file_notify_message'); // add the group files tool option add_group_tool_option('files', elgg_echo('groups:enablefiles'), true); // Register entity type register_entity_type('object', 'file'); }
function vazco_avatar_init() { global $CONFIG; define('VAZCO_AVATAR_PATH', 'vazco_avatars'); //set admin user ID to 2 - the default admin. TODO: do it cleaner. // Since we use ElggFile here, the ID has to belong to the user that is in the system all the time. define('VAZCO_AVATAR_ADMIN', 2); extend_view('profile/editicon', 'vazco_avatar/select', 601); extend_view('css', 'vazco_avatar/css', 601); register_action("vazco_avatar/upload", false, $CONFIG->pluginspath . "vazco_avatar/actions/upload.php"); register_action("vazco_avatar/select", false, $CONFIG->pluginspath . "vazco_avatar/actions/select.php"); register_action("vazco_avatar/delete", false, $CONFIG->pluginspath . "vazco_avatar/actions/delete.php"); register_plugin_hook('action', 'profile/cropicon', 'vazco_avatar_cropicon', 600); if (isadminloggedin() && get_context() == 'admin' || get_context() == 'vazco_avatar') { add_submenu_item(elgg_echo('vazco_avatar:menu'), $CONFIG->wwwroot . 'pg/vazco_avatar/edit'); } if (isadminloggedin() && get_context() == 'vazco_avatar') { add_submenu_item(elgg_echo('avatars:upload'), $CONFIG->wwwroot . 'pg/vazco_avatar/upload'); } if (isloggedin()) { //update current user's avatar for topbar and edit icon page setUserIcon($_SESSION['user'], 'topbar'); setUserIcon($_SESSION['user'], 'medium'); } }
/** * TinyMCE wysiwyg editor * @package ElggTinyMCE * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd * @copyright Curverider Ltd 2008-2009 * @link http://elgg.org/ **/ function tinymce_init() { // Load system configuration global $CONFIG; // Add our CSS extend_view('css', 'tinymce/css'); }
/** * thewire initialisation * * These parameters are required for the event API, but we won't use them: * * @param unknown_type $event * @param unknown_type $object_type * @param unknown_type $object */ function thewire_init() { // Load system configuration global $CONFIG; // Set up menu for logged in users if (isloggedin()) { add_menu(elgg_echo('thewire'), $CONFIG->wwwroot . "mod/thewire/everyone.php"); } // Extend system CSS with our own styles, which are defined in the thewire/css view extend_view('css', 'thewire/css'); //extend views extend_view('activity/thewire', 'thewire/activity_view'); extend_view('profile/status', 'thewire/profile_status'); // Register a page handler, so we can have nice URLs register_page_handler('thewire', 'thewire_page_handler'); // Register a URL handler for thewire posts register_entity_url_handler('thewire_url', 'object', 'thewire'); // Your thewire widget add_widget_type('thewire', elgg_echo("thewire:read"), elgg_echo("thewire:yourdesc")); // Register entity type register_entity_type('object', 'thewire'); // Listen for SMS create event register_elgg_event_handler('create', 'object', 'thewire_incoming_sms'); // Register granular notification for this type if (is_callable('register_notification_object')) { register_notification_object('object', 'thewire', elgg_echo('thewire:newpost')); } // Listen to notification events and supply a more useful message for SMS' register_plugin_hook('notify:entity:message', 'object', 'thewire_notify_message'); }
/** * Elgg custom index page * * @package ElggIndexCustom * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider <*****@*****.**> * @copyright Curverider Ltd 2008 * @link http://elgg.com/ */ function indexCustom_init() { // Extend system CSS with our own styles extend_view('css', 'custom_index/css'); // Replace the default index page register_plugin_hook('index', 'system', 'custom_index'); }
/** * @package Elgg * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Tingxi Tan, Grid Research Centre [txtan@cpsc.ucalgary.ca] * @link http://grc.ucalgary.ca/ */ function content_map_init() { extend_view('metatags', 'content_map/metatags'); //this line can be removed if you are not using google-map plugin extend_view('metatags', 'google-map/metatags'); extend_view('css', 'content_map/css'); }
/** * Blog extended initialization * * Register css extensions, contentes view for groups, widgets and event handlers */ function blogextended_init() { global $CONFIG; extend_view("css", "blogextended/css"); extend_view("blog/fields_before", "blog/forms/type"); extend_view("blog/fields_before", "groups/groupselector"); //extend_view('groups/left_column', 'groups/groupcontents',1); add_widget_type('blog', elgg_echo('blog:widget:title'), elgg_echo('blog:widget:description')); register_elgg_event_handler("create", "object", "blog_type_handler"); register_elgg_event_handler("update", "object", "blog_type_handler"); register_elgg_event_handler("create", "object", "group_selector_handler"); register_elgg_event_handler("update", "object", "group_selector_handler"); register_page_handler('gblog', 'gblog_page_handler'); if (is_plugin_enabled("itemicon")) { if (!isset($CONFIG->itemicon)) { $CONFIG->itemicon[] = array(); } $CONFIG->itemicon[] = "blog"; extend_view("blog/fields_after", "itemicon/add"); } $options = array("" => "All", "WorkStories" => "Work Stories", "HowTo" => "How To's", "GroupGuides" => "Group Guides", "ManagingProjects" => "Managing a Project", "TellingYourStory" => "Telling your Story"); $CONFIG->BLOG_TYPES = $options; if (file_exists(dirname(__FILE__) . "/config.php")) { @(require_once dirname(__FILE__) . "/config.php"); } $CONFIG->blogextended = $options; }
/** * Elgg twitter widget * This plugin allows users to pull in their twitter feed to display on their profile * * @package ElggTwitter * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd <*****@*****.**> * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ function twitter_init() { //extend css if style is required extend_view('css', 'twitter/css'); //add a widget add_widget_type('twitter', "Twitter", "This is your twitter feed"); }
function ckeditor_init() { global $CONFIG; register_action('CKEditor/upload', false, $CONFIG->pluginspath . "CKEditor/actions/upload.php"); register_plugin_hook('delete', 'user', 'Remove_files_when_user_isDel'); extend_view('metatags', 'CKEditor/js/javascript'); }
/** * Blog initialisation * * These parameters are required for the event API, but we won't use them: * * @param unknown_type $event * @param unknown_type $object_type * @param unknown_type $object */ function blog_init() { // Load system configuration global $CONFIG; // Set up menu for logged in users if (isloggedin()) { add_menu(elgg_echo('blogs'), $CONFIG->wwwroot . "pg/blog/" . $_SESSION['user']->username); // And for logged out users } else { add_menu(elgg_echo('blog'), $CONFIG->wwwroot . "mod/blog/everyone.php", array()); } // Extend system CSS with our own styles, which are defined in the blog/css view extend_view('css', 'blog/css'); // Extend hover-over menu extend_view('profile/menu/links', 'blog/menu'); // Register a page handler, so we can have nice URLs register_page_handler('blog', 'blog_page_handler'); // Register a URL handler for blog posts register_entity_url_handler('blog_url', 'object', 'blog'); // Register this plugin's object for sending pingbacks register_plugin_hook('pingback:object:subtypes', 'object', 'blog_pingback_subtypes'); // Register granular notification for this type if (is_callable('register_notification_object')) { register_notification_object('object', 'blog', elgg_echo('blog:newpost')); } // Listen to notification events and supply a more useful message register_plugin_hook('notify:entity:message', 'object', 'blog_notify_message'); // Listen for new pingbacks register_elgg_event_handler('create', 'object', 'blog_incoming_ping'); // Register entity type register_entity_type('object', 'blog'); }
function bookmarks_init() { // Grab the config file global $CONFIG; //add a tools menu option if (isloggedin()) { add_menu(elgg_echo('bookmarks'), $CONFIG->wwwroot . "pg/bookmarks/" . $_SESSION['user']->username . '/items'); } // Register a page handler, so we can have nice URLs register_page_handler('bookmarks', 'bookmarks_page_handler'); // Add our CSS extend_view('css', 'bookmarks/css'); // Register granular notification for this type if (is_callable('register_notification_object')) { register_notification_object('object', 'bookmarks', elgg_echo('bookmarks:new')); } // Listen to notification events and supply a more useful message register_plugin_hook('notify:entity:message', 'object', 'bookmarks_notify_message'); // Register a URL handler for shared items register_entity_url_handler('bookmark_url', 'object', 'bookmarks'); // Shares widget add_widget_type('bookmarks', "Companions", elgg_echo("bookmarks:widget:description")); // Register entity type register_entity_type('object', 'bookmarks'); // Add group menu option add_group_tool_option('bookmarks', elgg_echo('bookmarks:enablebookmarks'), true); }
function vazco_topbar_init() { global $CONFIG; extend_view('css', 'vazco_topbar/css'); extend_view('vanillaforum/topbar_css', 'vazco_topbar/css'); register_action("vazco_topbar/edit", false, $CONFIG->pluginspath . "vazco_topbar/actions/edit.php"); register_action("vazco_topbar/userlinks", false, $CONFIG->pluginspath . "vazco_topbar/actions/userlinks.php"); }
/** * Initialise categories actions etc * */ function categories_init() { // Get config global $CONFIG; extend_view('css', 'categories/css'); // Register action register_action('categories/save', false, $CONFIG->pluginspath . 'categories/actions/save.php', true); }
/** * Profile Counter * * @package profile_counter * @author ColdTrick IT Solutions * @copyright Coldtrick IT Solutions 2009 * @link http://www.coldtrick.com/ */ function profile_counter_init() { global $CONFIG; // Extend profile to keep track of count extend_view('profile/userdetails', 'profile_counter/count', 999); // Extend statistics to show current count extend_view('usersettings/statistics', 'profile_counter/stats', 999); }
/** * Autobox Friendly autocomplete for tags. * * @package autobox * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Pedro Prez * @copyright 2009 * @link http://www.pedroprez.com.ar/ */ function autobox_init() { global $CONFIG; extend_view('metatags', 'autobox/javascript'); //** VIEWS // Extend CSS extend_view('css', 'autobox/css'); }
/** * Profile init function; sets up the profile functions * */ function profile_init() { // Get config global $CONFIG; // Register a URL handler for users - this means that profile_url() // will dictate the URL for all ElggUser objects register_entity_url_handler('profile_url', 'user', 'all'); // Metadata on users needs to be independent register_metadata_as_independent('user'); elgg_view_register_simplecache('icon/user/default/tiny'); elgg_view_register_simplecache('icon/user/default/topbar'); elgg_view_register_simplecache('icon/user/default/small'); elgg_view_register_simplecache('icon/user/default/medium'); elgg_view_register_simplecache('icon/user/default/large'); elgg_view_register_simplecache('icon/user/default/master'); // For now, we'll hard code the profile items as follows: // TODO make this user configurable /*$CONFIG->profile = array( // Language short codes must be of the form "profile:key" // where key is the array key below 'description' => 'longtext', 'briefdescription' => 'text', 'location' => 'tags', 'interests' => 'tags', 'skills' => 'tags', 'contactemail' => 'email', 'phone' => 'text', 'mobile' => 'text', 'website' => 'url', );*/ // Register a page handler, so we can have nice URLs register_page_handler('profile', 'profile_page_handler'); register_page_handler('defaultprofile', 'profileedit_page_handler'); register_page_handler('icon', 'profile_icon_handler'); register_page_handler('iconjs', 'profile_iconjs_handler'); // Add Javascript reference to the page header extend_view('metatags', 'profile/metatags'); extend_view('css', 'profile/css'); extend_view('js/initialise_elgg', 'profile/javascript'); if (get_context() == "profile") { extend_view('canvas_header/submenu', 'profile/submenu'); } //add submenu options if (get_context() == "profile") { add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "mod/profile/edit.php"); add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "mod/profile/editicon.php"); } // Extend context menu with admin links if (isadminloggedin()) { extend_view('profile/menu/links', 'profile/menu/adminwrapper', 10000); } // Now override icons register_plugin_hook('entity:icon:url', 'user', 'profile_usericon_hook'); }
function flexprofile_pagesetup() { global $CONFIG; if (get_context() == 'profile') { $form = flexprofile_get_profile_form(); if (!$form->profile_format || $form->profile_format == 'default') { extend_view("profile/menu/actions", "flexprofile/menu/actions"); } } }
/** * Init function * */ function embed_init() { // Extend useful views with stuff we need for our embed modal extend_view('css', 'embed/css'); // extend_view('js/initialise_elgg','embed/js'); extend_view('metatags', 'embed/metatags'); extend_view('input/longtext', 'embed/link', 10); // Page handler for the modal media embed register_page_handler('embed', 'embed_page_handler'); }
/** * Elgg members plugin * This plugin has some interesting options for users; see who is online, site members, * * @package Elggmembers * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd <*****@*****.**> * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ function members_init() { // Load system configuration global $CONFIG; extend_view('css', 'members/css'); // Set up menu for logged in users if (isloggedin()) { add_menu(elgg_echo('Members'), $CONFIG->wwwroot . "mod/members/index.php"); } }
/** * Elgg Sitemap plugin * * @package * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Matthias Sutter email@matthias-sutter.de * @copyright CubeYoo.de * @link http://cubeyoo.de */ function sitemap_init() { global $CONFIG; // Extend footer extend_view("footer/links", "sitemap/footer"); extend_view('css', 'sitemap/css'); // Register page handler and translations register_page_handler('sitemap', 'sitemap_page_handler'); register_translations($CONFIG->pluginspath . "sitemap/languages/"); }
function fivestar_init() { fivestar_settings(); $style = get_plugin_setting('style'); if ($style == 'basic') { extend_view('css', 'fivestar/basic'); } extend_view('metatags', 'fivestar/metatags'); register_plugin_hook('display', 'view', 'fivestar_view'); }
function plugin_installer_pagesetup() { global $CONFIG; if (isadminloggedin()) { if (get_context() == "admin") { add_submenu_item(elgg_echo("plugin_installer:title"), $CONFIG->wwwroot . "mod/plugin_installer/index.php"); // fast tool admin extend_view("admin/plugins", "plugin_installer/plugin_admin", 400); } } }
/** * MessageBoard initialisation * * These parameters are required for the event API, but we won't use them: * * @param unknown_type $event * @param unknown_type $object_type * @param unknown_type $object */ function messageboard_init() { // Load system configuration global $CONFIG; // Extend system CSS with our own styles, which are defined in the messageboard/css view extend_view('css', 'messageboard/css'); // Register a page handler, so we can have nice URLs register_page_handler('messageboard', 'messageboard_page_handler'); // add a messageboard widget add_widget_type('messageboard', "" . elgg_echo("messageboard:board") . "", "" . elgg_echo("messageboard:desc") . ".", "profile"); }
/** * Elgg members plugin * This plugin has some interesting options for users; see who is online, site members, * * @package Elggmembers * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd <*****@*****.**> * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ function members_init() { // Load system configuration global $CONFIG; extend_view('css', 'members/css'); // Set up menu for logged in users if (isloggedin()) { add_menu(elgg_echo('Members'), $CONFIG->wwwroot . "mod/members/index.php"); } $CONFIG->member_skills = 'Arts, Account Management / Sales, Business Services, Coaching and Mentorship, Community Management, Education and Training, Engineering - Industrial, Engineering - Software, Environmental, Design, Group Facilitation, Funding, Fundraising, Health and Wellness, Insurance, ICT - Information Communication Tech, Marketing, NGO Management, Outsourcing, Project Management, Strategy / Planning, Value and Social Impact Analysis, Virtual Assistance - Data / Contact management, Virtual Assistance - Research, Virtual Assistance - Social networking, Virtual Assistance - Scheduling / ToDo List, Virtual Assistance - Technical, Virtual Assistance - Transcription, Web hosting - Systems Administration, Writing, Other'; }
function friends_of_friends_init() { global $CONFIG; // Register a page handler, so we can have nice URLs register_page_handler('friendsoffriends', 'friends_of_friends_page_handler'); // Extend CSS extend_view('css', 'friends_of_friends/css'); //Read Settings $CONFIG->mod->friends_of_friends->config->hidefriendsof = get_plugin_setting('hidefriendsof', 'friends_of_friends'); register_action("friends_of_friends/get_text", false, $CONFIG->pluginspath . "friends_of_friends/actions/get_text.php", true); register_action("friends_of_friends/translate", false, $CONFIG->pluginspath . "friends_of_friends/actions/translate.php", true); }
/** * Initialise the Reported content and set up the menus. * */ function reportedcontent_init() { global $CONFIG; // Register a page handler, so we can have nice URLs register_page_handler('reportedcontent', 'reportedcontent_page_handler'); // Extend CSS extend_view('css', 'reportedcontent/css'); // Extend context menu with reported content link if (isloggedin()) { extend_view('profile/menu/links', 'reportedcontent/user_report'); } }
/** * Initialise the log browser and set up the menus. * */ function logbrowser_init() { global $CONFIG; // Register a page handler, so we can have nice URLs register_page_handler('logbrowser', 'logbrowser_page_handler'); // Extend CSS extend_view('css', 'logbrowser/css'); // Extend context menu with admin logbrowsre link if (isadminloggedin()) { extend_view('profile/menu/adminlinks', 'logbrowser/adminlinks', 10000); } }
/** * Elgg Simple editing of external pages frontpage/about/term/contact and privacy * * @package ElggExPages * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ function expages_init() { global $CONFIG; // Register a page handler, so we can have nice URLs register_page_handler('expages', 'expages_page_handler'); // Register a URL handler for external pages register_entity_url_handler('expages_url', 'object', 'expages'); // extend views extend_view('footer/links', 'expages/footer_menu'); extend_view('index/righthandside', 'expages/front_right'); extend_view('index/lefthandside', 'expages/front_left'); }