当前位置: 首页>>代码示例>>PHP>>正文


PHP elgg_load_library函数代码示例

本文整理汇总了PHP中elgg_load_library函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_load_library函数的具体用法?PHP elgg_load_library怎么用?PHP elgg_load_library使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了elgg_load_library函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: roles_init

/**
 *
 * Initializes the Roles plugin
 */
function roles_init($event, $type, $object)
{
    elgg_register_library('roles', elgg_get_plugins_path() . 'roles/lib/roles.php');
    elgg_register_library('roles_config', elgg_get_plugins_path() . 'roles/lib/config.php');
    elgg_load_library('roles');
    elgg_load_library('roles_config');
    // Provides default roles by own handler. This should be extended by site specific handlers
    elgg_register_plugin_hook_handler('roles:config', 'role', 'roles_get_roles_config');
    // Catch all actions and page route requests
    elgg_register_plugin_hook_handler('action', 'all', 'roles_actions_permissions');
    elgg_register_plugin_hook_handler('route', 'all', 'roles_pages_permissions');
    // Due to dynamically created (or extended) menus, we need to catch all 'register' hooks _after_ other modules added/removed their menu items
    elgg_register_plugin_hook_handler('register', 'all', 'roles_menus_permissions', 9999);
    // Set up roles based hooks and event listener, after all plugin is initialized
    elgg_register_event_handler('ready', 'system', 'roles_hooks_permissions');
    elgg_register_event_handler('ready', 'system', 'roles_events_permissions');
    // Check for role configuration updates
    if (elgg_is_admin_logged_in()) {
        // @TODO think through if this should rather be a role-based permission
        run_function_once('roles_update_100_to_101');
        elgg_register_event_handler('ready', 'system', 'roles_check_update');
    }
    // Set up roles based view management
    elgg_register_event_handler('ready', 'system', 'roles_register_views');
}
开发者ID:socialweb,项目名称:PiGo,代码行数:29,代码来源:start.php

示例2: celebrations_init

function celebrations_init()
{
    elgg_register_library('celebrations_lib', elgg_get_plugins_path() . 'celebrations/lib/celebrations_lib.php');
    elgg_load_library('celebrations_lib');
    if (elgg_get_plugin_setting("ViewReminder", "celebrations") == 'yes') {
        elgg_register_event_handler('login:after', 'user', 'show_next_celebrations');
    }
    elgg_register_plugin_hook_handler('profile:fields', 'profile', 'celebrations_profile_fields_plugin_handler');
    if (elgg_is_logged_in()) {
        elgg_register_menu_item('site', array('name' => 'celebrations', 'text' => elgg_echo('celebrations:shorttitle'), 'href' => "celebrations/celebrations"));
    }
    // Extend system CSS
    elgg_extend_view('css/elgg', 'celebrations/css');
    // Register a page handler, so we can have nice URLs
    elgg_register_page_handler('celebrations', 'celebrations_page_handler');
    //add widgets
    elgg_register_widget_type('today_celebrations', elgg_echo("today_celebrations:title"), elgg_echo("today_celebrations:description"));
    elgg_register_widget_type('next_celebrations', elgg_echo("next_celebrations:title"), elgg_echo("next_celebrations:description"));
    //add index widgets for Widget Manager plugin
    elgg_register_widget_type('index_today_celebrations', elgg_echo('today_celebrations:title'), elgg_echo('today_celebrations:description'), array("index"));
    elgg_register_widget_type('index_next_celebrations', elgg_echo('next_celebrations:title'), elgg_echo('next_celebrations:description'), array("index"));
    elgg_register_plugin_hook_handler("entity:url", "object", "celebrations_widget_urls");
    elgg_register_action('celebrations/settings/save', elgg_get_plugins_path() . "celebrations/actions/celebrations/settings.php", 'admin');
    if (elgg_is_active_plugin('profile_manager')) {
        $profile_options = array("show_on_register" => "no", "mandatory" => "no", "user_editable" => "yes", "output_as_tags" => "no", "admin_only" => "no", "count_for_completeness" => "yes");
        profile_manager_add_custom_field_type("custom_profile_field_types", "day_anniversary", "day_anniversary", $profile_options);
        profile_manager_add_custom_field_type("custom_profile_field_types", "yearly", "day_anniversary", $profile_options);
    }
}
开发者ID:iionly,项目名称:celebrations,代码行数:29,代码来源:start.php

示例3: groupuserpoints_init

function groupuserpoints_init()
{
    // Register library
    elgg_register_library('groupuserpoints_library', elgg_get_plugins_path() . 'elggx_groupuserpoints/lib/groupuserpoint.php');
    elgg_load_library('groupuserpoints_library');
    elgg_register_plugin_hook_handler('expirationdate:expire_entity', 'all', 'elggx_groupuserpoints_expire');
    elgg_extend_view('css/elgg', 'elggx_groupuserpoints/css');
    elgg_extend_view('icon/user/default', 'elggx_groupuserpoints/icon');
    //elgg_register_widget_type('topgrouppoints', elgg_echo('elggx_groupuserpoints:toppoints'), elgg_echo('elggx_groupuserpoints:widget:toppoints:info'));
    //elgg_register_widget_type('index_topgrouppoints', elgg_echo('elggx_groupuserpoints:toppoints'), elgg_echo('elggx_groupuserpoints:toppoints'), array('index'));
    // Hooks for awarding points
    //elgg_register_plugin_hook_handler('action', 'invitefriends/invite', 'elggx_groupuserpoints_invite');
    //elgg_register_plugin_hook_handler('action', 'groups/invite', 'elggx_groupuserpoints_invite');
    elgg_register_plugin_hook_handler('action', 'likes/add', 'elggx_groupuserpoints_like');
    elgg_register_plugin_hook_handler('action', 'poll/vote', 'elggx_groupuserpoints_vote');
    elgg_register_plugin_hook_handler('action', 'recommendations/new', 'elggx_groupuserpoints_recommendations');
    elgg_register_plugin_hook_handler('action', 'recommendations/approve', 'elggx_groupuserpoints_recommendations');
    elgg_register_event_handler('create', 'object', 'elggx_groupuserpoints_object');
    elgg_register_event_handler('delete', 'object', 'elggx_groupuserpoints_object');
    elgg_register_event_handler('delete', 'entity', 'elggx_groupuserpoints_object');
    elgg_register_event_handler('create', 'annotation', 'elggx_groupuserpoints_annotate_create');
    elgg_register_event_handler('create', 'group', 'elggx_groupuserpoints_group');
    elgg_register_event_handler('delete', 'group', 'elggx_groupuserpoints_group');
    elgg_register_admin_menu_item('administer', 'elggx_groupuserpoints', 'administer_utilities');
    // Register actions
    $base_dir = elgg_get_plugins_path() . 'elggx_groupuserpoints/actions';
    elgg_register_action("elggx_groupuserpoints/settings", "{$base_dir}/settings.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/delete", "{$base_dir}/delete.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/moderate", "{$base_dir}/moderate.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/add", "{$base_dir}/add.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/scaling", "{$base_dir}/scaling.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/reset", "{$base_dir}/reset.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/restore", "{$base_dir}/restore.php", 'admin');
    elgg_register_action("elggx_groupuserpoints/restore_all", "{$base_dir}/restore_all.php", 'admin');
}
开发者ID:vsheokeen,项目名称:Elgg-Plugins,代码行数:35,代码来源:start.php

示例4: fix_orientation

function fix_orientation($source, $name)
{
    $imginfo = getimagesize($source);
    $requiredMemory1 = ceil($imginfo[0] * $imginfo[1] * 5.35);
    $requiredMemory2 = ceil($imginfo[0] * $imginfo[1] * ($imginfo['bits'] / 8) * $imginfo['channels'] * 2.5);
    $requiredMemory = (int) max($requiredMemory1, $requiredMemory2);
    $mem_avail = elgg_get_ini_setting_in_bytes('memory_limit');
    $mem_used = memory_get_usage();
    $mem_avail = $mem_avail - $mem_used - 2097152;
    // 2 MB buffer
    if ($requiredMemory > $mem_avail) {
        // we don't have enough memory for any manipulation
        // @TODO - we should only throw an error if the image needs rotating...
        //register_error(elgg_echo('image_orientation:toolarge'));
        return false;
    }
    elgg_load_library('imagine');
    $name = uniqid() . $name;
    $tmp_location = elgg_get_config('dataroot') . 'image_orientation/' . $name;
    //@note - need to copy to a tmp_location as
    // imagine doesn't like images with no file extension
    copy($source, $tmp_location);
    try {
        $imagine = new Imagine();
        $imagine->setMetadataReader(new ExifMetadataReader());
        $autorotate = new Autorotate();
        $autorotate->apply($imagine->open($tmp_location))->save($tmp_location);
        copy($tmp_location, $source);
        unlink($tmp_location);
        return true;
    } catch (Imagine\Exception\Exception $exc) {
        // fail silently, we don't need to rotate it bad enough to kill the script
        return false;
    }
}
开发者ID:n8b,项目名称:VMN,代码行数:35,代码来源:start.php

示例5: cas_auth_authenticate

function cas_auth_authenticate($credentials)
{
    elgg_load_library('elgg:cas_auth');
    $config = elgg_get_calling_plugin_entity('cas_auth');
    // Perform the authentication
    return authCAS($config, $credentials);
}
开发者ID:duanhv,项目名称:mdg-social,代码行数:7,代码来源:start.php

示例6: crud_page_handler

/**
 * CRUD page handler
 *
 * URLs take the form of
 *  List crud objects in group:   <crud_type>/owner/<guid>
 *  View crud object:             <crud_type>/view/<guid>
 *  Add crud object:              <crud_type>/add/<guid>
 *  Edit crud object:             <crud_type>/edit/<guid>
 *
 * @param array $page Array of url segments for routing
 * @return bool
 */
function crud_page_handler($page)
{
    elgg_load_library('elgg:crud');
    if (!isset($page[0])) {
        $page[0] = 'all';
    }
    $page_url = current_page_url();
    $site_url = elgg_get_site_url();
    $current_url = str_replace($site_url, "", $page_url);
    $crud_type = current(explode('/', $current_url));
    $crud_handler = crud_get_handler($crud_type);
    $crud_module = $crud_handler->module;
    elgg_push_breadcrumb(elgg_echo($crud_module), '');
    switch ($page[0]) {
        case 'owner':
        case 'group':
            crud_handle_list_page($crud_handler, $page[1]);
            break;
        case 'add':
            crud_handle_edit_page($crud_handler, 'add', $page[1]);
            break;
        case 'edit':
            crud_handle_edit_page($crud_handler, 'edit', $page[1]);
            break;
        case 'view':
            crud_handle_view_page($crud_handler, $page[1]);
            break;
        case 'edit_general':
            crud_handle_edit_page($crud_handler, 'edit_general', $page[1]);
            break;
        default:
            return false;
    }
    return true;
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:47,代码来源:start.php

示例7: twitter_api_init

function twitter_api_init()
{
    // require libraries
    $base = __DIR__;
    elgg_register_class('TwitterOAuth', "{$base}/vendors/twitteroauth/twitterOAuth.php");
    elgg_register_library('twitter_api', "{$base}/lib/twitter_api.php");
    elgg_load_library('twitter_api');
    // extend site views
    //elgg_extend_view('metatags', 'twitter_api/metatags');
    elgg_extend_view('elgg.css', 'twitter_api/css');
    elgg_extend_view('admin.css', 'twitter_api/css');
    elgg_extend_view('elgg.js', 'twitter_api/js');
    // sign on with twitter
    if (twitter_api_allow_sign_on_with_twitter()) {
        elgg_extend_view('login/extend', 'twitter_api/login');
    }
    // register page handler
    elgg_register_page_handler('twitter_api', 'twitter_api_pagehandler');
    // register Walled Garden public pages
    elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'twitter_api_public_pages');
    // push wire post messages to twitter
    if (elgg_get_plugin_setting('wire_posts', 'twitter_api') == 'yes') {
        elgg_register_plugin_hook_handler('status', 'user', 'twitter_api_tweet');
    }
}
开发者ID:elgg,项目名称:elgg,代码行数:25,代码来源:start.php

示例8: facebook_api_init

function facebook_api_init()
{
    global $CONFIG;
    $base = elgg_get_plugins_path() . 'facebook_api';
    elgg_register_library('facebook', "{$base}/vendors/facebookoauth/src/facebook.php");
    elgg_register_library('facebook_api', "{$base}/lib/facebook_api.php");
    elgg_load_library('facebook_api');
    elgg_extend_view('css/elgg', 'facebook_api/css');
    // sign on with facebook
    if (facebook_api_allow_sign_on_with_facebook()) {
        elgg_extend_view('login/extend', 'facebook_api/login');
    }
    // register page handler
    elgg_register_page_handler('facebook_api', 'facebook_api_pagehandler');
    // allow plugin authors to hook into this service
    elgg_register_plugin_hook_handler('post', 'facebook_service', 'facebookservice_post');
    elgg_register_plugin_hook_handler('viewnote', 'facebook_service', 'facebookservice_viewnote');
    elgg_register_plugin_hook_handler('postnote', 'facebook_service', 'facebookservice_postnote');
    elgg_register_plugin_hook_handler('viewwall', 'facebook_service', 'facebookservice_viewwall');
    elgg_register_plugin_hook_handler('viewstatus', 'facebook_service', 'facebookservice_viewstatus');
    elgg_register_plugin_hook_handler('viewfeed', 'facebook_service', 'facebookservice_viewfeed');
    elgg_register_plugin_hook_handler('viewfeedgraph', 'facebook_service', 'facebookservice_viewfeedgraph');
    elgg_register_plugin_hook_handler('viewcomment', 'facebook_service', 'facebookservice_viewcomment');
    elgg_register_plugin_hook_handler('viewusername', 'facebook_service', 'facebookservice_viewusername');
    elgg_register_plugin_hook_handler('viewlike', 'facebook_service', 'facebookservice_viewlike');
    elgg_register_plugin_hook_handler('postcomment', 'facebook_service', 'facebookservice_postcomment');
    elgg_register_plugin_hook_handler('postlike', 'facebook_service', 'facebookservice_postlike');
    elgg_register_plugin_hook_handler('friendrequest', 'facebook_service', 'facebookservice_friendrequest');
}
开发者ID:lweddewer,项目名称:facebook_api,代码行数:29,代码来源:start.php

示例9: simplesaml_init

/**
 * Called on the 'init' 'system' event
 *
 * @return void
 */
function simplesaml_init()
{
    // load libraries
    elgg_load_library("simplesamlphp");
    require_once dirname(__FILE__) . "/lib/events.php";
    require_once dirname(__FILE__) . "/lib/functions.php";
    require_once dirname(__FILE__) . "/lib/hooks.php";
    require_once dirname(__FILE__) . "/lib/page_handlers.php";
    // check for force authentication
    elgg_extend_view("page/default", "simplesaml/force_authentication", 200);
    elgg_extend_view("page/walled_garden", "simplesaml/force_authentication", 200);
    elgg_register_library("pgregg.ipcheck", dirname(__FILE__) . "/vendors/pgregg/ip_check.php");
    // extend CSS/JS
    elgg_extend_view("js/admin", "js/simplesaml/admin");
    // allow login
    elgg_extend_view("forms/login", "simplesaml/login");
    // register page_handler for nice URL's
    elgg_register_page_handler("saml", "simplesaml_page_handler");
    // register widgets
    elgg_register_widget_type("simplesaml", elgg_echo("login"), elgg_echo("simplesaml:widget:description"), "index", true);
    // register events
    elgg_register_event_handler("login", "user", "simplesaml_login_event_handler");
    // register plugin hooks
    elgg_register_plugin_hook_handler("public_pages", "walled_garden", "simplesaml_walled_garden_hook");
    elgg_register_plugin_hook_handler("widget_url", "widget_manager", "simplesaml_widget_url_hook");
    elgg_register_plugin_hook_handler("setting", "plugin", "simplesaml_plugin_setting_save_hook");
    elgg_register_plugin_hook_handler("action", "logout", "simplesaml_logout_action_hook");
    // register actions
    elgg_register_action("simplesaml/register", dirname(__FILE__) . "/actions/register.php", "public");
    elgg_register_action("simplesaml/unlink", dirname(__FILE__) . "/actions/unlink.php");
}
开发者ID:pleio,项目名称:simplesaml,代码行数:36,代码来源:start.php

示例10: blog_page_handler

/**
 * Dispatches blog pages.
 * URLs take the form of
 *  All blogs:       blog/all
 *  User's blogs:    blog/owner/<username>
 *  Friends' blog:   blog/friends/<username>
 *  User's archives: blog/archives/<username>/<time_start>/<time_stop>
 *  Blog post:       blog/view/<guid>/<title>
 *  New post:        blog/add/<guid>
 *  Edit post:       blog/edit/<guid>/<revision>
 *  Preview post:    blog/preview/<guid>
 *  Group blog:      blog/group/<guid>/all
 *
 * Title is ignored
 *
 * @todo no archives for all blogs or friends
 *
 * @param array $page
 * @return bool
 */
function blog_page_handler($page)
{
    elgg_load_library('elgg:blog');
    // @todo remove the forwarder in 1.9
    // forward to correct URL for blog pages pre-1.7.5
    blog_url_forwarder($page);
    // push all blogs breadcrumb
    elgg_push_breadcrumb(elgg_echo('blog:blogs'), "blog/all");
    if (!isset($page[0])) {
        $page[0] = 'all';
    }
    $page_type = $page[0];
    switch ($page_type) {
        case 'owner':
            $user = get_user_by_username($page[1]);
            $params = blog_get_page_content_list($user->guid);
            break;
        case 'friends':
            $user = get_user_by_username($page[1]);
            $params = blog_get_page_content_friends($user->guid);
            break;
        case 'archive':
            $user = get_user_by_username($page[1]);
            $params = blog_get_page_content_archive($user->guid, $page[2], $page[3]);
            break;
        case 'view':
        case 'read':
            // Elgg 1.7 compatibility
            $params = blog_get_page_content_read($page[1]);
            break;
        case 'add':
            gatekeeper();
            $params = blog_get_page_content_edit($page_type, $page[1]);
            break;
        case 'edit':
            gatekeeper();
            $params = blog_get_page_content_edit($page_type, $page[1], $page[2]);
            break;
        case 'group':
            if ($page[2] == 'all') {
                $params = blog_get_page_content_list($page[1]);
            } else {
                $params = blog_get_page_content_archive($page[1], $page[3], $page[4]);
            }
            break;
        case 'all':
            $params = blog_get_page_content_list();
            break;
        default:
            return false;
    }
    if (isset($params['sidebar'])) {
        $params['sidebar'] .= elgg_view('blog/sidebar', array('page' => $page_type));
    } else {
        $params['sidebar'] = elgg_view('blog/sidebar', array('page' => $page_type));
    }
    $body = elgg_view_layout('content', $params);
    echo elgg_view_page($params['title'], $body);
    return true;
}
开发者ID:nhunaro,项目名称:Elgg,代码行数:80,代码来源:start.php

示例11: 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');
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:33,代码来源:start.php

示例12: hj_framework_init

function hj_framework_init()
{
    $path_libraries = elgg_get_root_path() . 'mod/hypeFramework/lib/';
    elgg_register_library('framework:base', $path_libraries . 'base.php');
    elgg_load_library('framework:base');
    hj_framework_check_release('hypeFramework', HYPEFRAMEWORK_RELEASE);
    // Classes
    elgg_register_classes(elgg_get_root_path() . 'mod/hypeFramework/classes/');
    // Libraries
    $libraries = array('forms', 'page_handlers', 'actions', 'assets', 'views', 'ajax', 'menus', 'files', 'lists', 'hierarchies', 'location', 'knowledge', 'deprecated');
    foreach ($libraries as $lib) {
        $path = "{$path_libraries}{$lib}.php";
        if (file_exists($path)) {
            elgg_register_library("framework:library:{$lib}", $path);
            elgg_load_library("framework:library:{$lib}");
        }
    }
    // Vendor Libraries
    // DomPDF library is not included by default
    // Download and unzip to vendors/dompdf
    $dompdf = elgg_get_root_path() . 'mod/hypeFramework/vendors/dompdf/dompdf_config.inc.php';
    if (file_exists($dompdf)) {
        elgg_register_library('framework:dompdf', $dompdf);
    }
}
开发者ID:amcfarlane1251,项目名称:ongarde,代码行数:25,代码来源:start.php

示例13: staticsites_init

function staticsites_init()
{
    // Register backbone
    elgg_register_library('elgg:backbone', elgg_get_plugins_path() . 'staticsites/lib/backbone/backbone.php');
    elgg_load_library('elgg:backbone');
    elgg_register_library('elgg:staticsites', elgg_get_plugins_path() . 'staticsites/lib/staticsites.php');
    elgg_load_library('elgg:staticsites');
    // Include plugin vendors
    require elgg_get_plugins_path() . 'staticsites/vendor/autoload.php';
    // Static sites CSS
    elgg_extend_view('css/elgg', 'css/staticsites/css');
    // Register underscore with requirejs (and elgg)
    elgg_define_js('underscore', array('src' => 'mod/staticsites/vendors/underscore-min.js', 'location' => 'footer', 'exports' => '_'));
    // Register backbone with requirejs (and elgg)
    elgg_define_js('backbone', array('src' => 'mod/staticsites/vendors/backbone-min.js', 'location' => 'footer', 'deps' => array('jquery'), 'exports' => 'Backbone'));
    // Alloy Editor
    elgg_define_js('alloyEditor', array('src' => 'mod/staticsites/vendors/alloy-editor/alloy-editor-all-min.js', 'location' => 'footer', 'exports' => 'AlloyEditor'));
    // Alloy Editor CSS
    elgg_register_css('alloyeditor', 'mod/staticsites/vendors/alloy-editor/assets/alloy-editor-ocean-min.css');
    elgg_load_css('alloyeditor');
    // Set up group admin tools menu
    elgg_register_plugin_hook_handler('register', 'menu:groups:admin', 'staticsites_groups_admin_menu_setup');
    // Register main page handler
    elgg_register_page_handler('staticsites', 'staticsites_page_handler');
    // Actions
    $action_base = elgg_get_plugins_path() . "staticsites/actions/staticsites";
    elgg_register_action('staticsites/save_page', "{$action_base}/save_page.php");
    elgg_register_action('staticsites/delete_page', "{$action_base}/delete_page.php");
    // Whitelist template dir for ajax loads
    backbone_whitelist_templates(elgg_get_plugins_path() . 'staticsites/views/default/staticsites/templates/');
}
开发者ID:THINKGlobalSchool,项目名称:staticsites,代码行数:31,代码来源:start.php

示例14: gnusocial_api_init

function gnusocial_api_init()
{
    // require libraries
    $base = elgg_get_plugins_path() . 'gnusocial_api';
    elgg_register_class('GNUSocialOAuth', "{$base}/vendors/gnusocialoauth/gnusocialOAuth.php");
    elgg_register_library('gnusocial_api', "{$base}/lib/gnusocial_api.php");
    elgg_load_library('gnusocial_api');
    // extend site views
    //elgg_extend_view('metatags', 'gnusocial_api/metatags');
    elgg_extend_view('css/elgg', 'gnusocial_api/css');
    elgg_extend_view('css/admin', 'gnusocial_api/css');
    elgg_extend_view('js/elgg', 'gnusocial_api/js');
    // sign on with gnusocial
    if (gnusocial_api_allow_sign_on_with_gnusocial()) {
        elgg_extend_view('login/extend', 'gnusocial_api/login');
    }
    // register page handler
    elgg_register_page_handler('gnusocial_api', 'gnusocial_api_pagehandler');
    // backward compatibility
    elgg_register_page_handler('gnusocialservice', 'gnusocial_api_pagehandler_deprecated');
    // register Walled Garden public pages
    elgg_register_plugin_hook_handler('public_pages', 'walled_garden', 'gnusocial_api_public_pages');
    // push wire post messages to gnusocial
    if (elgg_get_plugin_setting('wire_posts', 'gnusocial_api') == 'yes') {
        elgg_register_plugin_hook_handler('status', 'user', 'gnusocial_api_tweet');
    }
    $actions = dirname(__FILE__) . '/actions/gnusocial_api';
    elgg_register_action('gnusocial_api/interstitial_settings', "{$actions}/interstitial_settings.php", 'logged_in');
}
开发者ID:lorea,项目名称:Hydra-dev,代码行数:29,代码来源:start.php

示例15: upgrades

function upgrades()
{
    if (elgg_is_admin_logged_in()) {
        elgg_load_library(PLUGIN_ID . ':upgrades');
        run_function_once(__NAMESPACE__ . '\\upgrade_20150321');
    }
}
开发者ID:n8b,项目名称:VMN,代码行数:7,代码来源:start.php


注:本文中的elgg_load_library函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。