Esempio n. 1
0
<?php

elgg_load_library('elgg:event_calendar');
if (event_calendar_is_upgrade_available()) {
    echo '<div class="elgg-admin-notices mbl">';
    echo '<p>';
    echo elgg_view('output/url', array('text' => elgg_echo('event_calendar:upgrade'), 'href' => 'action/event_calendar/upgrade', 'is_action' => true));
    echo '</p>';
    echo '</div>';
}
$yn_options = array(' ' . elgg_echo('event_calendar:settings:yes') => 'yes', ' ' . elgg_echo('event_calendar:settings:no') => 'no');
$time_format_options = array(' ' . elgg_echo('event_calendar:time_format:12hour') => '12', ' ' . elgg_echo('event_calendar:time_format:24hour') => '24');
$membership_options = array(' ' . elgg_echo('event_calendar:personal_manage:open') => 'open', ' ' . elgg_echo('event_calendar:personal_manage:closed') => 'closed', ' ' . elgg_echo('event_calendar:personal_manage:private') => 'private', ' ' . elgg_echo('event_calendar:personal_manage:by_event') => 'by_event');
$access_options = array(ACCESS_PRIVATE => elgg_echo("PRIVATE"), ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"), ACCESS_PUBLIC => elgg_echo("PUBLIC"));
$listing_options = array(' ' . elgg_echo('event_calendar:settings:paged') => 'paged', ' ' . elgg_echo('event_calendar:settings:agenda') => 'agenda', ' ' . elgg_echo('event_calendar:settings:month') => 'month', ' ' . elgg_echo('event_calendar:settings:full') => 'full');
$body = '';
$event_calendar_hide_access = elgg_get_plugin_setting('hide_access', 'event_calendar');
if (!$event_calendar_hide_access) {
    $event_calendar_hide_access = 'no';
}
$body .= "<div class='mbs'>";
$body .= "<label>" . elgg_echo('event_calendar:settings:hide_access:title') . "</label>";
$body .= '<br>';
$body .= elgg_view('input/radio', array('name' => 'params[hide_access]', 'value' => $event_calendar_hide_access, 'options' => $yn_options));
$body .= '</div>';
$event_calendar_default_access = elgg_get_plugin_setting('default_access', 'event_calendar');
if (!$event_calendar_default_access) {
    $event_calendar_default_access = ACCESS_LOGGED_IN;
}
$body .= "<div class='mbl'>";
$body .= "<label>" . elgg_echo('event_calendar:settings:default_access:title') . "</label>";
Esempio n. 2
0
function event_calendar_check_pending_upgrades()
{
    elgg_load_library('elgg:event_calendar');
    elgg_delete_admin_notice('event_calendar_admin_notice_pending_upgrades');
    if (event_calendar_is_upgrade_available()) {
        $message = elgg_echo('event_calendar:admin_notice_pending_upgrades', array(elgg_normalize_url('admin/plugin_settings/event_calendar')));
        elgg_add_admin_notice('event_calendar_admin_notice_pending_upgrades', $message);
    }
}