本文整理汇总了PHP中isadminloggedin函数的典型用法代码示例。如果您正苦于以下问题:PHP isadminloggedin函数的具体用法?PHP isadminloggedin怎么用?PHP isadminloggedin使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了isadminloggedin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: collaboration_pagesetup
function collaboration_pagesetup()
{
global $CONFIG;
if (get_context() == 'admin' && isadminloggedin()) {
add_submenu_item('Manage external sites', $CONFIG->wwwroot . 'pg/collaboration/admin');
}
}
示例2: 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');
}
}
示例3: categories_pagesetup
/**
* Set up menu items
*
*/
function categories_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('categories:settings'), $CONFIG->wwwroot . 'mod/categories/settings.php');
}
}
示例4: ckeditor_pagesetup
function ckeditor_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('ckeditor:admin_title'), $CONFIG->wwwroot . 'mod/CKEditor/admin.php');
}
}
示例5: dreamfish_admin_pagesetup
function dreamfish_admin_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('dreamfish_admin:admin_title'), $CONFIG->wwwroot . 'mod/dreamfish_admin/admintasks.php');
}
}
示例6: theme_editable_pagesetup
/**
* Set up menu items
*/
function theme_editable_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('theme_editable:settings'), $CONFIG->wwwroot . 'mod/theme_editable/settings.php');
}
}
示例7: diagnostics_pagesetup
/**
* Adding the diagnostics to the admin menu
*
*/
function diagnostics_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/');
}
}
示例8: reportedcontent_pagesetup
/**
* Adding the reported content to the admin menu
*
*/
function reportedcontent_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('reportedcontent'), $CONFIG->wwwroot . 'pg/reportedcontent/');
}
}
示例9: blog_get_page_content_read
/**
* Returns HTML for a blog post.
*
* @param int $guid of a blog entity.
* @return string html
*/
function blog_get_page_content_read($owner_guid = NULL, $guid = NULL)
{
$content = elgg_view('page_elements/content_header', array('context' => $context, 'type' => 'blog'));
if ($guid) {
$blog = get_entity($guid);
if (!elgg_instanceof($blog, 'object', 'blog') && $blog->status == 'final') {
$content .= elgg_echo('blog:error:post_not_found');
} else {
elgg_push_breadcrumb($blog->title, $blog->getURL());
$content .= elgg_view_entity($blog, TRUE);
}
} else {
$options = array('type' => 'object', 'subtype' => 'blog', 'full_view' => FALSE, 'order_by_metadata' => array('name' => 'publish_date', 'direction' => 'DESC', 'as' => 'int'));
if ($owner_guid) {
$options['owner_guid'] = $owner_guid;
}
// show all posts for admin or users looking at their own blogs
// show only published posts for other users.
if (!(isadminloggedin() || isloggedin() && $owner_guid == get_loggedin_userid())) {
$options['metadata_name_value_pairs'] = array(array('name' => 'status', 'value' => 'published'), array('name' => 'publish_date', 'operand' => '<', 'value' => time()));
}
$content .= elgg_list_entities_from_metadata($options);
}
return array('content' => $content);
}
示例10: removewidget_pagesetup
function removewidget_pagesetup()
{
global $CONFIG;
if (get_context() == 'admin' && isadminloggedin()) {
add_submenu_item(elgg_echo('remove_widgets'), $CONFIG->wwwroot . 'pg/removewidget/');
}
}
示例11: logbrowser_pagesetup
/**
* Adding the log browser to the admin menu
*
*/
function logbrowser_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('logbrowser'), $CONFIG->wwwroot . 'pg/logbrowser/');
}
}
示例12: vazco_topbar_submenus
function vazco_topbar_submenus()
{
global $CONFIG;
if (isadminloggedin() && get_context() == 'admin' || get_context() == 'vazco_topbar') {
add_submenu_item(elgg_echo('vazco_topbar:menu:short'), $CONFIG->wwwroot . 'mod/vazco_topbar/edit.php');
}
}
示例13: sw_admin_pagesetup
function sw_admin_pagesetup()
{
if (get_context() == 'admin' && isadminloggedin()) {
global $CONFIG;
add_submenu_item(elgg_echo('sw:title'), $CONFIG->wwwroot . 'pg/sticky_widgets/admin/edit.php', "s");
// This will allow editing of default settings of sticky widgets
// add_submenu_item(elgg_echo('sw:title:defaults'), $CONFIG->wwwroot . 'pg/sticky_widgets/admin/defaults.php',"s");
}
}
示例14: plugin_installer_pagesetup
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);
}
}
}
示例15: action
/**
* Loads an action script, if it exists, then forwards elsewhere
*
* @param string $action The requested action
* @param string $forwarder Optionally, the location to forward to
*/
function action($action, $forwarder = "")
{
global $CONFIG;
$query = parse_url($_SERVER['REQUEST_URI']);
if (isset($query['query'])) {
$query = $query['query'];
$query = rawurldecode($query);
$query = explode('&', $query);
if (sizeof($query) > 0) {
foreach ($query as $queryelement) {
$vals = explode('=', $queryelement, 2);
if (sizeof($vals) > 1) {
set_input(trim($vals[0]), trim($vals[1]));
}
}
}
}
$forwarder = str_replace($CONFIG->url, "", $forwarder);
$forwarder = str_replace("http://", "", $forwarder);
$forwarder = str_replace("@", "", $forwarder);
if (substr($forwarder, 0, 1) == "/") {
$forwarder = substr($forwarder, 1);
}
if (isset($CONFIG->actions[$action])) {
if (isadminloggedin() || !$CONFIG->actions[$action]['admin']) {
if ($CONFIG->actions[$action]['public'] || $_SESSION['id'] != -1) {
// Trigger action event TODO: This is only called before the primary action is called. We need to rethink actions for 1.5
$event_result = true;
$event_result = trigger_plugin_hook('action', $action, null, $event_result);
// Include action
if ($event_result) {
/** Refs #749: We now warn if action token is missing. Later this will be replaced with action_gatekeeper() as detailed in #750 */
if (!validate_action_token(false)) {
// Display a temporary warning message - in future versions this will be a hard fail via an action gatekeeper.
$message = "WARNING: Action {$action} was called without an action token. It is stongly recommended that you consider doing this. Plugin authors should use 'input/form' or pass is_action=true to 'output/confirmlink' or 'output/url'.";
//if ((!isset($CONFIG->disable_action_token_warning)) || (!$CONFIG->disable_action_token_warning))
// register_error($message);
error_log($message);
}
if (include $CONFIG->actions[$action]['file']) {
} else {
register_error(sprintf(elgg_echo('actionundefined'), $action));
}
}
} else {
register_error(elgg_echo('actionloggedout'));
}
}
} else {
register_error(sprintf(elgg_echo('actionundefined'), $action));
}
forward($CONFIG->url . $forwarder);
}