本文整理汇总了PHP中extend_view函数的典型用法代码示例。如果您正苦于以下问题:PHP extend_view函数的具体用法?PHP extend_view怎么用?PHP extend_view使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了extend_view函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: gmap_load_scripts
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');
}
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:7,代码来源:start.php
示例2: messages_init
/**
* 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');
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:40,代码来源:start.php
示例3: file_init
/**
* 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');
}
开发者ID:eokyere,项目名称:elgg,代码行数:34,代码来源:start.php
示例4: vazco_avatar_init
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');
}
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:25,代码来源:start.php
示例5: tinymce_init
/**
* 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');
}
开发者ID:eokyere,项目名称:elgg,代码行数:15,代码来源:start.php
示例6: thewire_init
/**
* 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');
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:39,代码来源:start.php
示例7: indexCustom_init
/**
* 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 <[email protected]>
* @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');
}
开发者ID:eokyere,项目名称:elgg,代码行数:16,代码来源:start.php
示例8: content_map_init
/**
* @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 [[email protected]]
* @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');
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:13,代码来源:start.php
示例9: blogextended_init
/**
* 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;
}
开发者ID:eokyere,项目名称:elgg,代码行数:32,代码来源:start.php
示例10: twitter_init
/**
* 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 <[email protected]>
* @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");
}
开发者ID:eokyere,项目名称:elgg,代码行数:17,代码来源:start.php
示例11: ckeditor_init
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');
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:7,代码来源:start.php
示例12: blog_init
/**
* 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');
}
开发者ID:eokyere,项目名称:elgg,代码行数:41,代码来源:start.php
示例13: bookmarks_init
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);
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:27,代码来源:start.php
示例14: vazco_topbar_init
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");
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:8,代码来源:start.php
示例15: categories_init
/**
* 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);
}
开发者ID:eokyere,项目名称:elgg,代码行数:12,代码来源:start.php
示例16: profile_counter_init
/**
* 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);
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:16,代码来源:start.php
示例17: autobox_init
/**
* 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');
}
开发者ID:pbelasco,项目名称:autobox-elgg,代码行数:17,代码来源:start.php
示例18: profile_init
/**
* 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');
}
开发者ID:eokyere,项目名称:elgg,代码行数:60,代码来源:start.php
示例19: flexprofile_pagesetup
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");
}
}
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:10,代码来源:start.php
示例20: embed_init
/**
* 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');
}
开发者ID:eokyere,项目名称:elgg,代码行数:14,代码来源:start.php
注:本文中的extend_view函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论