本文整理汇总了PHP中elgg_load_css函数的典型用法代码示例。如果您正苦于以下问题:PHP elgg_load_css函数的具体用法?PHP elgg_load_css怎么用?PHP elgg_load_css使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了elgg_load_css函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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/');
}
示例2: expages_page_handler
/**
* External pages page handler
*
* @param array $page URL segements
* @param string $handler Handler identifier
* @return bool
*/
function expages_page_handler($page, $handler)
{
if ($handler == 'expages') {
expages_url_forwarder($page[1]);
}
$type = strtolower($handler);
$title = elgg_echo("expages:{$type}");
$header = elgg_view_title($title);
$object = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
if ($object) {
$content .= elgg_view('output/longtext', array('value' => $object[0]->description));
} else {
$content .= elgg_echo("expages:notset");
}
$content = elgg_view('expages/wrapper', array('content' => $content));
if (elgg_is_logged_in() || !elgg_get_config('walled_garden')) {
$body = elgg_view_layout('one_column', array('title' => $title, 'content' => $content));
echo elgg_view_page($title, $body);
} else {
elgg_load_css('elgg.walled_garden');
$body = elgg_view_layout('walled_garden', array('content' => $header . $content));
echo elgg_view_page($title, $body, 'walled_garden');
}
return true;
}
示例3: expages_page_handler
/**
* External pages page handler
*
* @param array $page URL segements
* @param string $handler Handler identifier
* @return bool
*/
function expages_page_handler($page, $handler)
{
if ($handler == 'expages') {
expages_url_forwarder($page[1]);
}
$type = strtolower($handler);
$title = elgg_echo("expages:{$type}");
$header = elgg_view_title($title);
$object = elgg_get_entities(array('type' => 'object', 'subtype' => $type, 'limit' => 1));
if ($object) {
$content .= elgg_view('output/longtext', array('value' => $object[0]->description));
} else {
$content .= elgg_echo("expages:notset");
}
$content = elgg_view('expages/wrapper', array('content' => $content));
if (elgg_is_admin_logged_in()) {
elgg_register_menu_item('title', array('name' => 'edit', 'text' => elgg_echo('edit'), 'href' => "admin/appearance/expages?type={$type}", 'link_class' => 'elgg-button elgg-button-action'));
}
if (elgg_is_logged_in() || !elgg_get_config('walled_garden')) {
$body = elgg_view_layout('one_column', array('title' => $title, 'content' => $content));
echo elgg_view_page($title, $body);
} else {
elgg_load_css('elgg.walled_garden');
$body = elgg_view_layout('walled_garden', array('content' => $header . $content));
echo elgg_view_page($title, $body, 'walled_garden');
}
return true;
}
示例4: twitter_bootswatch_init
function twitter_bootswatch_init()
{
$bootswatch_style = elgg_get_plugin_setting('bootswatch_style', 'twitter_bootswatch');
switch ($bootswatch_style) {
case 'amelia':
case 'cerulean':
case 'cosmo':
case 'cyborg':
case 'flatty':
case 'journal':
case 'readable':
case 'simplex':
case 'slate':
case 'spacelab':
case 'spruce':
case 'superhero':
case 'united':
break;
default:
$bootswatch_style = 'cyborg';
}
// Unextend the default bootstrap override css
elgg_unextend_view('css/elgg', 'twitter_bootstrap/css');
// Extend system CSS with our own styles
elgg_extend_view('css/elgg', 'twitter_bootswatch/css');
// united bootstrap
$bootstrap_css = 'mod/twitter_bootswatch/vendors/bootstrap-' . $bootswatch_style . '.min.css';
elgg_register_css('twitter_bootswatch_css', $bootstrap_css, 5);
//unload default bootstrap css and load new one
elgg_unregister_css('bootstrap_css');
if (get_context() != 'admin') {
elgg_load_css('twitter_bootswatch_css');
}
}
示例5: 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");
}
示例6: 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');
}
示例7: 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');
}
示例8: tour_init
/**
* Initialize the plugin.
*/
function tour_init()
{
$js_lib = elgg_get_plugin_setting('js_library', 'tour');
if ($js_lib == 'joyride') {
elgg_register_css('joyride', '/mod/tour/vendors/joyride/joyride-2.1.css');
elgg_load_css('joyride');
elgg_define_js('joyride', array('src' => '/mod/tour/vendors/joyride/jquery.joyride-2.1.js', 'exports' => 'joyride'));
} else {
elgg_register_css('hopscotch', '/mod/tour/vendors/hopscotch/css/hopscotch.min.css');
elgg_load_css('hopscotch');
elgg_define_js('hopscotch', array('src' => '/mod/tour/vendors/hopscotch/hopscotch.min.js', 'exports' => 'hopscotch'));
}
elgg_require_js('elgg/tour/display');
//elgg_require_js('elgg/tour/edit');
elgg_register_ajax_view('ajax/tour_stop/save');
elgg_extend_view('page/elements/footer', 'tour/outline');
elgg_extend_view('css/elgg', 'css/tour');
elgg_extend_view('css/admin', 'css/tour_admin');
elgg_register_action('tour_page/save', __DIR__ . '/actions/tour_page/save.php', 'admin');
elgg_register_action('tour_page/reorder', __DIR__ . '/actions/tour_page/reorder.php', 'admin');
elgg_register_action('tour_page/delete', __DIR__ . '/actions/tour_page/delete.php', 'admin');
elgg_register_action('tour_stop/save', __DIR__ . '/actions/tour_stop/save.php', 'admin');
elgg_register_action('tour_stop/delete', __DIR__ . '/actions/tour_stop/delete.php', 'admin');
elgg_register_page_handler('tour', 'tour_page_handler');
elgg_register_page_handler('tour_stop', 'tour_page_handler');
// For convenience
elgg_register_admin_menu_item('administer', 'tour', 'administer_utilities');
elgg_register_menu_item('topbar', array('name' => 'tour', 'href' => '', 'text' => elgg_echo('tour:start'), 'id' => 'tour-start', 'section' => 'alt', 'data-library' => $js_lib));
elgg_register_plugin_hook_handler('register', 'menu:entity', array('Tour\\Page\\EntityMenu', 'setUp'));
elgg_register_plugin_hook_handler('register', 'menu:entity', array('Tour\\Stop\\EntityMenu', 'setUp'));
elgg_register_viewtype('json');
}
示例9: 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');
}
示例10: 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");
}
}
示例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: fontawesome_init
/**
* Gets called when the Elgg system initializes
*
* @return void
*/
function fontawesome_init()
{
// add CSS / JS
elgg_extend_view("css/elements/forms", "css/fontawesome/forms");
elgg_extend_view("css/admin", "css/fontawesome/admin");
// register css
elgg_register_css("fontawesome", "mod/fontawesome/vendor/fortawesome/font-awesome/css/font-awesome.min.css");
elgg_load_css("fontawesome");
}
示例14: 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;
}
示例15: embed_longtext_menu
/**
* Add the embed menu item to the long text menu
*
* @param string $hook
* @param string $type
* @param array $items
* @param array $vars
* @return array
*/
function embed_longtext_menu($hook, $type, $items, $vars)
{
if (elgg_get_context() == 'embed') {
return $items;
}
$items[] = ElggMenuItem::factory(array('name' => 'embed', 'href' => "embed", 'text' => elgg_echo('embed:media'), 'rel' => 'lightbox', 'link_class' => "elgg-longtext-control elgg-lightbox embed-control embed-control-{$vars['id']}", 'priority' => 10));
elgg_load_js('lightbox');
elgg_load_css('lightbox');
elgg_load_js('elgg.embed');
return $items;
}