本文整理汇总了PHP中elgg_load_js函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_load_js函数的具体用法?PHP elgg_load_js怎么用?PHP elgg_load_js使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elgg_load_js函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: au_theme_init
function au_theme_init()
{
elgg_register_event_handler('pagesetup', 'system', 'au_theme_pagesetup', 1000);
// theme specific CSS
elgg_extend_view('css/elgg', 'au_theme/css');
//add friends list to collections for all-in-one page
elgg_extend_view('core/friends/collections', 'au_theme/following');
elgg_register_js('respond', 'mod/au_theme/vendors/js/respond.min.js');
elgg_load_js('respond');
// non-members do not get visible links to RSS feeds
if (!elgg_is_logged_in()) {
elgg_unregister_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link');
}
if (elgg_is_logged_in()) {
// add in header links for authenticated users
elgg_extend_view('page/elements/header', 'au_theme/header_links_auth');
} else {
// add in header links and guest login form for anonymous users
elgg_extend_view('page/elements/header', 'au_theme/header_links');
}
// kill the widget manager index page and add our own responsive version
if (elgg_is_active_plugin('widget_manager')) {
elgg_unregister_plugin_hook_handler("route", "all", "widget_manager_route_index_handler");
elgg_register_plugin_hook_handler('route', 'all', 'au_theme_custom_index');
// must be very early
}
//optionally show title buttons as dropdown list
if (elgg_get_plugin_setting("enable_compact_title_buttons", 'au_theme') == 'true') {
// set title menu to dropdown if more than one action exists
// use register, all to make sure this is called last
elgg_register_plugin_hook_handler('register', 'all', 'au_theme_titlemenu', 9999);
}
elgg_register_plugin_hook_handler('head', 'page', 'au_theme_metatags');
}
示例2: mobilize_init
function mobilize_init()
{
$action_path = dirname(__FILE__) . '/actions';
elgg_register_action("mobilize/admin/settings", "{$action_path}/settings.php", 'admin');
elgg_register_admin_menu_item('configure', 'mobilize', 'settings');
elgg_extend_view('css/admin', 'mobilize/admin');
elgg_register_page_handler('about', 'mobilize_expages_page_handler');
elgg_register_page_handler('terms', 'mobilize_expages_page_handler');
elgg_register_page_handler('privacy', 'mobilize_expages_page_handler');
elgg_register_css('elgg.mobilize', '/css/mobilize.css');
detectmobile();
$mobile = detectmobile();
$mobile = true;
if ($mobile == true) {
elgg_set_viewtype('mobile');
elgg_register_plugin_hook_handler('index', 'system', 'index_handler');
elgg_extend_view('js/elgg', 'js/mobilize');
elgg_register_page_handler('dashboard', 'dashboard_page_handler');
if (elgg_get_plugin_setting('use_friendspicker', 'mobilize') == 'yes') {
elgg_unregister_js('elgg.friendspicker');
}
elgg_unregister_js('elgg.tinymce');
elgg_extend_view('page/elements/head', 'mobilize/meta', 1);
elgg_register_js('mobilize', 'mod/mobilize/vendors/js/mobilize.js', 'footer');
elgg_load_js('mobilize');
elgg_register_event_handler('pagesetup', 'system', 'mobilize_setup_handler', 1000);
}
elgg_register_viewtype_fallback('mobile');
elgg_unregister_js("elgg.map");
elgg_register_js('elgg.map', 'mod/mobilize/views/mobile/js/map.js', 'footer');
elgg_load_js('elgg.map');
elgg_unregister_js("elgg.touch");
elgg_register_js('elgg.touch', 'mod/mobilize/views/mobile/js/jquery.ui.touch-punch.min.js', 'footer');
elgg_load_js('elgg.touch');
}
示例3: __construct
public function __construct($page)
{
admin_gatekeeper();
global $CONFIG;
$cshop = new stdClass();
$this->controller = GLOBAL_IZAP_CURRENT_CONTROLLER;
$this->action = 'action' . ucfirst($page[0]);
$this->_page = $page;
$this->url_vars = $this->_page;
$this->page_layout = $this->page_shell = 'admin';
$cshop->view = $this->_view = 'admin/' . implode('/', $page);
$this->page_elements['title'] = elgg_echo("admin:{$page[0]}");
if (count($page) > 1) {
$this->page_elements['title'] .= ' : ' . elgg_echo('admin:' . implode(':', $page));
}
if (method_exists($this, $this->action)) {
elgg_admin_add_plugin_settings_menu();
elgg_set_context('admin');
elgg_unregister_css('elgg');
$url = elgg_get_simplecache_url('js', 'admin');
elgg_register_js('elgg.admin', $url);
elgg_load_js('elgg.admin');
elgg_register_js('jquery.jeditable', 'vendors/jquery/jquery.jeditable.mini.js');
elgg_load_js('jquery.jeditable');
}
$CONFIG->cshop = $cshop;
}
示例4: notifier_init
/**
* Initialize the plugin
*
* @return void
*/
function notifier_init()
{
notifier_set_view_listener();
// Add hidden popup module to topbar
elgg_extend_view('page/elements/topbar', 'notifier/popup');
elgg_require_js('notifier/notifier');
// Must always have lightbox loaded because views needing it come via AJAX
elgg_load_js('lightbox');
elgg_load_css('lightbox');
elgg_register_page_handler('notifier', 'notifier_page_handler');
// Add css
elgg_extend_view('elgg.css', 'notifier/notifier.css');
elgg_register_notification_method('notifier');
elgg_register_plugin_hook_handler('send', 'notification:notifier', 'notifier_notification_send');
elgg_register_plugin_hook_handler('route', 'friendsof', 'notifier_read_friends_notification');
elgg_register_event_handler('create', 'relationship', 'notifier_relationship_notifications');
elgg_register_event_handler('delete', 'relationship', 'notifier_read_group_invitation_notification');
// Hook handler for cron that removes old messages
elgg_register_plugin_hook_handler('cron', 'daily', 'notifier_cron');
elgg_register_plugin_hook_handler('register', 'menu:topbar', 'notifier_topbar_menu_setup');
elgg_register_event_handler('create', 'user', 'notifier_enable_for_new_user');
elgg_register_event_handler('join', 'group', 'notifier_enable_for_new_group_member');
$action_path = elgg_get_plugins_path() . 'notifier/actions/notifier/';
elgg_register_action('notifier/dismiss', $action_path . 'dismiss.php');
elgg_register_action('notifier/clear', $action_path . 'clear.php');
elgg_register_action('notifier/delete', $action_path . 'delete.php');
}
示例5: modules_init
function modules_init()
{
// Register and load library
elgg_register_library('ajaxmodule', elgg_get_plugins_path() . 'modules/lib/ajaxmodule.php');
elgg_load_library('ajaxmodule');
// Ajax module page handler
elgg_register_page_handler('ajaxmodule', 'ajaxmodule_page_handler');
// Register view hook handler
elgg_register_plugin_hook_handler('view', 'all', 'ajaxmodule_view_hook_handler');
// Register icon handlers
elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'simpleicon_hook_handler', 600);
// Register JS
$ajaxmodule_js = elgg_get_simplecache_url('js', 'modules/ajaxmodule');
elgg_register_simplecache_view('js/modules/ajaxmodule');
elgg_register_js('elgg.modules.ajaxmodule', $ajaxmodule_js);
// Register JS
$genericmodule_js = elgg_get_simplecache_url('js', 'modules/genericmodule');
elgg_register_simplecache_view('js/modules/genericmodule');
elgg_register_js('elgg.modules.genericmodule', $genericmodule_js);
// Register CSS
$m_css = elgg_get_simplecache_url('css', 'modules/css');
elgg_register_simplecache_view('css/modules/css');
elgg_register_css('elgg.modules', $m_css);
// Load JS/CSS
elgg_load_js('elgg.modules.ajaxmodule');
elgg_load_js('elgg.modules.genericmodule');
elgg_load_css('lightbox');
elgg_load_js('lightbox');
elgg_load_css('elgg.modules');
}
示例6: igolf_map_init
function igolf_map_init()
{
elgg_register_js('mobilize', 'mod/igolf_map/js/map.js');
elgg_load_js('mobilize');
elgg_register_ajax_view('igolf_map/map');
elgg_register_ajax_view('igolf_map/test_token');
}
示例7: theme_eersel_init
/**
* Initialize the theme
*
* @return void
*/
function theme_eersel_init()
{
elgg_register_css('font-awesome', 'mod/theme_eersel/vendors/font-awesome-4.3.0/css/font-awesome.min.css');
elgg_load_css('font-awesome');
// extend views
elgg_extend_view("js/elgg", "js/theme_eersel");
elgg_extend_view("css/elgg", "css/theme_eersel");
elgg_extend_view("css/elgg", "css/theme_eersel_images");
elgg_extend_view("page/layouts/widgets", "theme_eersel/widgets_fix");
elgg_extend_view('icon/default', 'theme_eersel/group/icon', 400);
elgg_unextend_view("page/elements/header", "search/header");
elgg_unextend_view("page/elements/owner_block/extend", "group_tools/owner_block");
// page handlers
elgg_register_page_handler("theme_eersel", "theme_eersel_page_handler");
elgg_register_page_handler("profile", "theme_eersel_profile_page_handler");
elgg_register_js('jquery.flexslider', 'mod/theme_eersel/vendors/jquery.flexslider/jquery.flexslider-min.js');
elgg_load_js('jquery.flexslider');
// register widgets
elgg_register_widget_type("profile_owner_block", elgg_echo("theme_eersel:widgets:profile_owner_block:title"), elgg_echo("theme_eersel:widgets:profile_owner_block:description"), "profile");
elgg_register_widget_type("index_photos", elgg_echo("theme_eersel:widgets:index_photos:title"), elgg_echo("theme_eersel:widgets:index_photos:description"), "index");
elgg_register_widget_type("index_sidebar", elgg_echo("theme_eersel:widgets:index_sidebar:title"), elgg_echo("theme_eersel:widgets:index_sidebar:description"), "index");
// register plugin hooks
elgg_register_plugin_hook_handler("register", "menu:topbar", "theme_eersel_register_topbar_menu_handler");
elgg_register_plugin_hook_handler("prepare", "menu:owner_block", "theme_eersel_prepare_owner_block_menu_handler");
elgg_register_plugin_hook_handler('route', 'groups', 'theme_eersel_route_groups_handler');
// register events
elgg_register_event_handler('pagesetup', 'system', 'theme_eersel_pagesetup');
// register admin menu item
elgg_register_admin_menu_item("configure", "theme_eersel", "appearance");
// register actions
elgg_register_action("theme_eersel/slider_upload", dirname(__FILE__) . "/actions/slider_upload.php", "admin");
elgg_register_action("theme_eersel/links", dirname(__FILE__) . "/actions/links.php", "admin");
}
示例8: webshim_init
/**
* initialization of plugin
*
* @return void
*/
function webshim_init()
{
// register libraries
elgg_register_js('webshim', 'mod/webshim/vendors/webshim-1.15.5/js-webshim/minified/polyfiller.js');
elgg_load_js('webshim');
elgg_extend_view('page/elements/head', 'webshim/head');
}
示例9: hydra_theme_init
function hydra_theme_init()
{
elgg_unextend_view('page/elements/header', 'search/header');
elgg_extend_view('page/elements/sidebar', 'search/header', 0);
if (elgg_get_context() != "admin") {
elgg_require_js("lorea_hydra/js");
}
$bower = elgg_get_site_url() . "mod/lorea_hydra/vendors/bower_components/";
elgg_register_css("bootstrap", "{$bower}bootstrap/dist/css/bootstrap.css", 0);
elgg_register_css("bootstrap-select", "{$bower}bootstrap-select/dist/css/bootstrap-select.min.css");
elgg_register_css("jasny", "{$bower}jasny-bootstrap/dist/css/jasny-bootstrap.min.css");
elgg_register_css("lorea_hydra", elgg_get_site_url() . "mod/hydra_theme/css/lorea_hydra.css", 10000);
elgg_define_js("bootstrap", array("src" => "{$bower}bootstrap/dist/js/bootstrap.min.js"));
//elgg_register_js("bootstrap", "{$bower}bootstrap/dist/js/bootstrap.min.js");
elgg_register_js("bootstrap-select", "{$bower}bootstrap-select/dist/js/bootstrap-select.min.js");
elgg_register_js("jasny", "{$bower}jasny-bootstrap/dist/js/jasny-bootstrap.min.js");
elgg_register_js("lorea_hydra", elgg_get_site_url() . "mod/hydra_theme/css/lorea_hydra.css", 10000);
if (elgg_get_context() != "admin") {
elgg_load_css("bootstrap");
elgg_load_css("bootstrap-select");
elgg_load_css("lorea_hydra");
elgg_load_css("jasny");
elgg_load_js("bootstrap");
elgg_load_js("jasny");
elgg_load_js("bootstrap-select");
elgg_load_js("lorea_hydra");
}
}
示例10: simplekaltura_init
function simplekaltura_init()
{
$plugin_root = dirname(__FILE__);
elgg_register_library('simplekaltura', "{$plugin_root}/lib/simplekaltura_lib.php");
elgg_register_library('KalturaClient', "{$plugin_root}/vendors/kaltura_client/KalturaClient.php");
elgg_load_library('simplekaltura');
// helper libs
$libs = array('swfobject', 'html5', 'utility', 'thumbs');
foreach ($libs as $lib) {
$url = elgg_get_simplecache_url('js', "simplekaltura/{$lib}");
elgg_register_js("simplekaltura:{$lib}", $url);
}
// Register SKUploader
elgg_register_external_view('js/simplekaltura/SKUploader.js', TRUE);
// Include html5 js library
elgg_load_js('simplekaltura:html5');
elgg_load_js('simplekaltura:utility');
elgg_extend_view('css/elgg', 'simplekaltura/css');
// If plugin is properly configured
if (simplekaltura_is_configured()) {
// Add to main menu
$item = new ElggMenuItem('simplekaltura', elgg_get_plugin_setting('kaltura_entity_title', 'simplekaltura'), 'videos');
elgg_register_menu_item('site', $item);
// Register page handler
elgg_register_page_handler('videos', 'simplekaltura_page_handler');
} else {
elgg_add_admin_notice('simpkaltura_not_configured', elgg_echo('simplekaltura:error:pluginnotconfigured'));
}
// add the group pages tool option
add_group_tool_option('simplekaltura', elgg_echo('groups:enablesimplekaltura'), TRUE);
// Profile block hook
elgg_register_plugin_hook_handler('register', 'menu:owner_block', 'simplekaltura_owner_block_menu');
// Modify entity menu for addional video items
elgg_register_plugin_hook_handler('register', 'menu:entity', 'simplekaltura_setup_entity_menu');
// notifications
elgg_register_notification_event('object', 'simplekaltura_video', array('create'));
elgg_register_plugin_hook_handler('prepare', 'notification:publish:object:simplekaltura_video', 'simplekaltura_prepare_notification');
// actions
$actions_root = "{$plugin_root}/actions/simplekaltura";
elgg_register_action('simplekaltura/save', "{$actions_root}/save.php");
elgg_register_action('simplekaltura/update', "{$actions_root}/update.php");
elgg_register_action('simplekaltura/get_embed', "{$actions_root}/get_embed.php");
elgg_register_action('simplekaltura/featured', "{$actions_root}/featured.php", 'admin');
elgg_register_action('videos/delete', "{$actions_root}/delete.php");
elgg_register_action('simplekaltura/migrate', "{$actions_root}/migrate.php", 'admin');
// entity url and icon handlers
elgg_register_plugin_hook_handler('entity:url', 'object', 'simplekaltura_url_handler');
elgg_register_plugin_hook_handler('entity:icon:url', 'object', 'simplekaltura_icon_url_override');
// Register type
elgg_register_entity_type('object', 'simplekaltura_video');
// register CRON hook to poll video plays/duration/etc..
elgg_register_plugin_hook_handler('cron', 'fifteenmin', 'simplekaltura_bulk_update');
// Most Played Sidebar
elgg_extend_view('simplekaltura/sidebar', 'simplekaltura/featured');
elgg_extend_view('simplekaltura/sidebar', 'simplekaltura/most_played');
// Whitelist ajax views
elgg_register_ajax_view('simplekaltura/popup');
return TRUE;
}
示例11: elgg_clean_init
function elgg_clean_init()
{
elgg_unextend_view('page/elements/header', 'search/header');
elgg_extend_view('page/elements/sidebar', 'search/header', 0);
if (elgg_get_context() != "admin") {
elgg_require_js("elgg_clean/js");
}
elgg_register_event_handler('pagesetup', 'system', 'elgg_clean_pagesetup', 1000);
elgg_register_plugin_hook_handler('head', 'page', 'elgg_clean_setup_head');
$bower = elgg_get_site_url() . "mod/elgg_clean/vendors/bower_components/";
elgg_register_css("bootstrap", "{$bower}bootstrap/dist/css/bootstrap.css", 0);
elgg_register_css("open", "http://fonts.googleapis.com/css?family=Open+Sans:400,700,700italic,400italic");
elgg_register_css("passion", "http://fonts.googleapis.com/css?family=Passion+One");
elgg_register_css("elgg_clean", elgg_get_site_url() . "mod/elgg_clean/css/elgg_clean.css", 10000);
elgg_register_css("font-awesome", "{$bower}fontawesome/css/font-awesome.min.css");
elgg_register_css("bootstrap-select", "{$bower}bootstrap-select/dist/css/bootstrap-select.min.css");
elgg_register_css("jasny", "{$bower}jasny-bootstrap/dist/css/jasny-bootstrap.min.css");
elgg_register_css("fuelux", "{$bower}fuelux/dist/css/fuelux.min.css");
elgg_register_css("agency", elgg_get_site_url() . "mod/elgg_clean/css/agency.css", 20000);
elgg_register_css("home", elgg_get_site_url() . "mod/elgg_clean/css/home.css", 30000);
elgg_register_js('respond', '{$bower}respond/src/respond.js');
elgg_define_js("bootstrap", array("src" => "{$bower}bootstrap/dist/js/bootstrap.min.js"));
elgg_register_js("bootstrap-select", "{$bower}bootstrap-select/dist/js/bootstrap-select.min.js");
elgg_register_js("jasny", "{$bower}jasny-bootstrap/dist/js/jasny-bootstrap.min.js");
elgg_register_js("agency", elgg_get_site_url() . "mod/elgg_clean/js/agency.js");
elgg_register_js("cbpAnimatedHeader", elgg_get_site_url() . "mod/elgg_clean/js/cbpAnimatedHeader.js");
elgg_register_js("classie", elgg_get_site_url() . "mod/elgg_clean/js/classie.js");
elgg_register_js("contact_me", elgg_get_site_url() . "mod/elgg_clean/js/contact_me.js");
elgg_register_js("scrollspy", "{$bower}scrollspy/jquery.scrollspy.js");
elgg_register_js("parallax", "{$boder}jquery-parallax/scripts/jquery.parallax-1.13.js");
elgg_register_js("scrollto", "{$bower}jquery-parallax/scripts/jquery.scrollTo-1.4.2-min.js");
elgg_define_js('fuelux', array('src' => "{$bower}fuelux/dist/js/fuelux.min.js"));
if (elgg_get_context() != "admin") {
elgg_load_js('respond');
elgg_load_js("bootstrap");
elgg_load_js("jscolor");
elgg_load_js("elgg_clean");
elgg_load_js("bootstrap-select");
elgg_load_js("jasny");
elgg_load_js("agency");
elgg_load_js("parallax");
elgg_load_js("scrollto");
elgg_require_js("fuelux");
elgg_load_css("bootstrap");
elgg_load_css("open");
elgg_load_css("passion");
elgg_load_css("font-awesome");
elgg_load_css("bootstrap-select");
elgg_load_css("elgg_clean");
elgg_load_css("jasny");
elgg_load_css("fuelux");
elgg_load_css("agency");
}
// non-members do not get visible links to RSS feeds
if (!elgg_is_logged_in()) {
elgg_unregister_plugin_hook_handler('output:before', 'layout', 'elgg_views_add_rss_link');
}
elgg_register_action("elgg_clean/contact", elgg_get_plugins_path() . "elgg_clean/actions/contact.php", "public");
}
示例12: shortcodes_longtext_menu
function shortcodes_longtext_menu($hook, $type, $items, $vars)
{
$url = 'shortcodes';
$items[] = ElggMenuItem::factory(array('name' => 'shortcodes', 'href' => $url, 'text' => elgg_echo('shortcodes:link'), 'rel' => 'lightbox', 'link_class' => "elgg-longtext-control elgg-lightbox", 'priority' => 50));
elgg_load_js('lightbox');
elgg_load_css('lightbox');
return $items;
}
示例13: init
/**
* System init callback
* @return void
*/
public function init()
{
elgg_register_page_handler($this->router->getPageHandlerId(), array($this->router, 'handlePages'));
elgg_register_plugin_hook_handler('entity:url', 'object', array($this->hooks, 'urlHandler'));
elgg_register_entity_type('object', Post::SUBTYPE);
elgg_extend_view('css/elgg', 'css/framework/wall/stylesheet');
elgg_extend_view('js/initialize_elgg', 'js/framework/wall/config');
// AJAX view to load URL previews
elgg_register_ajax_view('output/wall/url');
if (\hypeJunction\Integration::isElggVersionBelow('1.9.0')) {
elgg_load_js('jquery.form');
elgg_extend_view('js/elgg', 'js/framework/wall/legacy/status');
// Display wall form
elgg_extend_view('page/layouts/content/filter', 'framework/wall/container', 100);
// Notifications
register_notification_object('object', Post::SUBTYPE, elgg_echo('wall:new:notification:generic'));
elgg_register_event_handler('publish', 'object', array($this->notifications, 'sendMessageLegacy'));
elgg_register_plugin_hook_handler('object:notifications', 'object', array($this->notifications, 'disableDefaultHandlerLegacy'));
elgg_register_plugin_hook_handler('notify:entity:message', 'object', array($this->notifications, 'formatMessageLegacy'));
} else {
// Display wall form
elgg_extend_view('page/layouts/elements/filter', 'framework/wall/container', 100);
// JS
elgg_extend_view('js/elgg', 'js/framework/wall/elgg.js');
// Notifications
elgg_register_event_handler('publish', 'object', array($this->notifications, 'sendCustomNotifications'));
elgg_register_notification_event('object', 'hjwall', array('publish'));
elgg_register_notification_event('object', 'thewire', array('publish'));
elgg_register_plugin_hook_handler('prepare', 'notification:publish:object:hjwall', array($this->notifications, 'formatMessage'));
elgg_register_plugin_hook_handler('prepare', 'notification:publish:object:thewire', array($this->notifications, 'formatMessage'));
elgg_register_plugin_hook_handler('likes:is_likable', 'object:hjwall', 'Elgg\\Values::getTrue');
}
$action_path = $this->plugin->getPath() . '/actions/';
elgg_register_action('wall/status', $action_path . 'wall/status.php');
elgg_register_action('wall/photo', $action_path . 'wall/status.php');
elgg_register_action('wall/file', $action_path . 'wall/status.php');
elgg_register_action('wall/url', $action_path . 'wall/status.php');
elgg_register_action('wall/content', $action_path . 'wall/status.php');
elgg_register_action('wall/delete', $action_path . 'wall/delete.php');
elgg_register_action('wall/remove_tag', $action_path . 'wall/remove_tag.php');
elgg_register_action('wall/geopositioning/update', $action_path . 'wall/geopositioning/update.php', 'public');
elgg_register_plugin_hook_handler('container_permissions_check', 'object', array($this->hooks, 'containerPermissionsCheck'));
elgg_register_plugin_hook_handler('register', 'menu:river', array($this->hooks, 'riverMenuSetup'));
elgg_register_plugin_hook_handler('register', 'menu:entity', array($this->hooks, 'entityMenuSetup'));
elgg_register_plugin_hook_handler('register', 'menu:owner_block', array($this->hooks, 'ownerBlockMenuSetup'));
elgg_register_plugin_hook_handler('register', 'menu:user_hover', array($this->hooks, 'userHoverMenuSetup'));
elgg_register_plugin_hook_handler('get_views', 'ecml', array($this->hooks, 'getECMLViews'));
elgg_register_plugin_hook_handler('view', 'object/thewire', array($this->hooks, 'hijackWire'));
elgg_register_plugin_hook_handler('view', 'river/object/thewire/create', array($this->hooks, 'hijackWireRiver'));
elgg_register_widget_type('wall', elgg_echo('wall'), elgg_echo('wall:widget:description'));
add_group_tool_option('wall', elgg_echo('wall:groups:enable'), false);
elgg_extend_view('groups/tool_latest', 'framework/wall/group_module');
// Export
$subtype = Post::SUBTYPE;
elgg_register_plugin_hook_handler('aliases', 'graph', array($this->hooks, 'getGraphAlias'));
elgg_register_plugin_hook_handler('graph:properties', "object:{$subtype}", array($this->hooks, 'getPostProperties'));
// @todo Move graph controller when interface is implemented in hypeApps
}
示例14: profile_manager_pagesetup
/**
* Function to add menu items to the pages
*
* @return unknown_type
*/
function profile_manager_pagesetup()
{
if (elgg_in_context("admin") && elgg_is_admin_logged_in()) {
elgg_load_js('lightbox');
elgg_load_css('lightbox');
if (elgg_is_active_plugin("groups")) {
elgg_register_admin_menu_item('configure', 'group_fields', 'appearance');
}
}
}
示例15: etherpad_page_handler
function etherpad_page_handler($page, $handler)
{
// elgg_load_library('elgg:pages');
if ($handler == 'pages') {
// add the jquery treeview files for navigation
elgg_load_js('jquery-treeview');
elgg_load_css('jquery-treeview');
}
if (!isset($page[0])) {
$page[0] = 'all';
}
elgg_push_breadcrumb(elgg_echo($handler), "{$handler}/all");
$base_dir = elgg_get_plugins_path() . "etherpad/pages/{$handler}";
$page_type = $page[0];
switch ($page_type) {
case 'owner':
include "{$base_dir}/owner.php";
break;
case 'friends':
include "{$base_dir}/friends.php";
break;
case 'view':
set_input('guid', $page[1]);
include "{$base_dir}/view.php";
break;
case 'add':
set_input('guid', $page[1]);
include "{$base_dir}/new.php";
break;
case 'edit':
set_input('guid', $page[1]);
include "{$base_dir}/edit.php";
break;
case 'group':
include "{$base_dir}/owner.php";
break;
case 'history':
set_input('guid', $page[1]);
include "{$base_dir}/history.php";
break;
case 'revision':
set_input('id', $page[1]);
include "{$base_dir}/revision.php";
break;
case 'all':
include "{$base_dir}/world.php";
break;
case "cross":
include "{$base_dir}/cross.php";
break;
default:
return false;
}
return true;
}