Example #1
0
function show_entities_list($title, $entities)
{
    $body = '';
    if ($entities) {
        foreach ($entities as $entity) {
            $body .= "<a href='" . $entity->getURL() . "'>" . $entity->name . "</a><br>";
        }
    } else {
        $body .= "aucun.<br>";
    }
    echo elgg_view_module('aside', $title, $body);
}
Example #2
0
        $forms .= elgg_view_form('faker/gen_likes');
    }
    if (elgg_is_active_plugin('countries')) {
        $forms .= elgg_view_form('faker/gen_location');
    }
}
$fakes = elgg_list_entities_from_metadata(array('metadata_names' => '__faker'));
$content = '<div id="faker-log">' . $fakes . '</div>';
$delete = elgg_view('output/url', array('text' => elgg_echo('faker:delete'), 'href' => 'action/faker/delete', 'confirm' => true, 'class' => 'elgg-button elgg-button-action'));
echo '<div class="clearfix">';
echo '<div class="elgg-col elgg-col-1of2">';
echo '<div class="pam">';
echo $forms;
echo '</div>';
echo '</div>';
echo '<div class="elgg-col elgg-col-1of2">';
echo '<div class="pam">';
echo elgg_view_module('aside', elgg_echo('faker:data'), $content, array('footer' => $delete));
echo '</div>';
echo '</div>';
echo '</div>';
?>
<style>
	#faker-log {
		min-height: 400px;
		overflow-y: scroll;
		padding: 10px;
		background: #f4f4f4;
		border: 1px solid #e8e8e8;
	}
</style>
Example #3
0
    }
    foreach ($ordered_relationships as $rel) {
        if ($rel == EVENT_MANAGER_RELATION_ATTENDING || $rel == EVENT_MANAGER_RELATION_ATTENDING_PENDING || $event->{$rel} || $rel == EVENT_MANAGER_RELATION_ATTENDING_WAITINGLIST && $event->canEdit() && $event->waiting_list_enabled) {
            if (array_key_exists($rel, $relationships)) {
                $members = $relationships[$rel];
                $rel_title = "";
                if ($event->canEdit()) {
                    $rel_title .= elgg_view("output/url", array("is_action" => true, "href" => "action/event_manager/attendees/export?guid=" . $event->getGUID() . "&rel=" . $rel, "title" => elgg_echo("event_manager:event:exportattendees"), "text" => elgg_view_icon("download"), "class" => "float-alt"));
                }
                $rel_title .= elgg_echo("event_manager:event:relationship:" . $rel . ":label") . " (" . count($members) . ")";
                $rel_content = "";
                foreach ($members as $member) {
                    $member_entity = get_entity($member);
                    $member_info = elgg_view_entity_icon($member_entity, "small", array("event" => $event));
                    if ($event->canEdit()) {
                        $rel = $member_entity->name;
                        if ($member_entity instanceof ElggUser) {
                            $rel .= " " . $member_entity->username;
                        } else {
                            $rel .= " " . $member_entity->email;
                        }
                        $member_info = "<span class='event-manager-event-view-attendee-info' rel='" . $rel . "'>" . $member_info . "</span>";
                    }
                    $rel_content .= $member_info;
                }
                $result .= elgg_view_module("info", $rel_title, $rel_content, array("class" => "event-manager-event-view-attendees"));
            }
        }
    }
    echo $result;
}
Example #4
0
<?php

if ($description = elgg_get_plugin_setting("contact_sidebar_description", "contact")) {
    echo elgg_view_module("aside", "", elgg_view("output/longtext", array("value" => $description)));
}
Example #5
0
File: ajax.php Project: elgg/elgg
<?php

/**
 * A view to load through ajax for the lightbox demo
 */
$ipsum = elgg_view('developers/ipsum');
$resize_button = elgg_view('input/button', ['id' => 'elgg-lightbox-test-resize', 'class' => 'elgg-button elgg-button-action', 'value' => 'Add extra content and resize']);
echo '<div class="mam" style="width: 400px;">';
echo elgg_view_module('aside', 'Lightbox Test', $ipsum, array('id' => 'elgg-lightbox-test', 'footer' => $resize_button));
echo '</div>';
Example #6
0
<?php

/*
 * 3 Column River Acitivity
 *
 * @package ElggRiverDash
 * Full Creadit goes to ELGG Core Team for creating a beautiful social networking script
 *
 * Modified by Satheesh PM, BARC, Mumbai, India..
 * http://satheesh.anushaktinagar.net
 *
 * @author ColdTrick IT Solutions
 * @copyright Coldtrick IT Solutions 2009
 * @link http://www.coldtrick.com/
 * @version 1.0
 *
 */
$msg_html = elgg_get_plugin_setting('html_msg', 'river_activity_3C');
$title = elgg_echo('river_activity_3C:html');
$box_view = elgg_get_plugin_setting('view_riverbox', 'river_activity_3C');
if ($msg_html) {
    $river_body = $msg_html;
} else {
    $river_body = elgg_echo('river_activity_3C:html-no');
}
echo elgg_view_module($box_view, $title, $river_body);
Example #7
0
// Upload module
$upload_title = elgg_echo('media:upload');
$upload_mod = '<div class="elgg-text-help">' . elgg_echo('media:upload:instructions') . '</div>';
$upload_mod .= elgg_view("input/file", ['name' => 'media', 'class' => 'media-upload-input']);
echo elgg_view_module('aside', $upload_title, $upload_mod, ['class' => 'media-upload-module']);
// Cropper module
$cropper_title = elgg_echo('media:crop:title');
$cropper_mod = elgg_format_element('p', ['class' => 'elgg-text-help'], elgg_echo('media:create:instructions'));
$img = '';
$sizes = elgg_media_get_thumb_sizes($entity, $type);
$ratio = $sizes['small']['square'] ? 1 : $sizes['small']['w'] / $sizes['small']['h'];
if (elgg_has_media($entity, $type)) {
    $x = $y = 0;
    $width = $height = $sizes['master']['w'];
    if ($entity->{"{$type}_x2"} > $entity->{"{$type}_x1"} && $entity->{"{$type}_y2"} > $entity->{"{$type}_y1"}) {
        $x = (int) $entity->{"{$type}_x1"};
        $y = (int) $entity->{"{$type}_y1"};
        $width = (int) $entity->{"{$type}_x2"} - (int) $entity->{"{$type}_x1"};
        $height = (int) $entity->{"{$type}_y2"} - (int) $entity->{"{$type}_y1"};
    }
    $img = elgg_view('output/img', ['src' => $entity->getIconURL(['type' => $type, 'size' => 'master']), 'alt' => elgg_echo('media'), 'data-x' => $x, 'data-y' => $y, 'data-width' => $width, 'data-height' => $height]);
}
$cropper_mod .= elgg_format_element('div', ['class' => 'media-cropper-preview'], $img);
foreach (['x1', 'y1', 'x2', 'y2'] as $coord) {
    $cropper_mod .= elgg_view('input/hidden', ['name' => $coord, 'value' => (int) $entity->{$coord}, "data-{$coord}" => true]);
}
$cropper_mod .= elgg_view('input/hidden', ['name' => 'type', 'value' => $type]);
echo elgg_view_module('aside', $cropper_title, $cropper_mod, ['class' => 'media-cropper-module hidden', 'data-ratio' => $ratio]);
$footer = elgg_view('input/submit', ['value' => elgg_echo('save'), 'disabled' => true, 'class' => 'elgg-state-disabled elgg-button-submit']);
$footer .= elgg_view('input/hidden', ['name' => 'guid', 'value' => $entity->guid]);
echo elgg_format_element('div', ['class' => 'elgg-foot'], $footer);
Example #8
0
<?php

/**
 * EXIF sidebar module
 */
$image = $vars["image"];
elgg_load_library("tidypics:exif");
$exif = tp_exif_formatted($image);
if ($exif) {
    $title = "EXIF";
    $body = "<table class='elgg-table elgg-table-alt'>";
    foreach ($exif as $key => $value) {
        $body .= "<tr>";
        $body .= "<td>" . elgg_view("output/text", array("value" => filter_tags($key))) . "</td>";
        $body .= "<td>" . elgg_view("output/text", array("value" => filter_tags($value))) . "</td>";
        $body .= "</tr>";
    }
    $body .= "</table>";
    echo elgg_view_module("aside", $title, $body);
}
Example #9
0
<?php

echo elgg_view('code_review/navigation');
//fetch all
$functions = code_review::getPrivateFunctionsList();
$fixes = new \CodeReview\CodeFixer();
$title = elgg_echo('code_review:private_list:title');
$body = "<table class=\"elgg-table-alt\">";
$body .= "<tr>" . "<th><strong>" . elgg_echo('code_review:private_list:name') . "</strong></th>" . "<th><strong>" . elgg_echo('code_review:private_list:reason') . "</strong></th>" . "</tr>";
ksort($functions, SORT_STRING);
foreach ($functions as $name => $data) {
    $fileLine = elgg_echo('code_review:private_list:file_line', array($data['file'], $data['line']));
    $body .= "<tr><td><abbr title=\"{$fileLine}\">" . $data['name'] . "</abbr></td>" . "<td>" . elgg_echo('code_review:private_list:reason:' . $data['reason']) . "</td></tr>";
}
$body .= '</table>';
echo elgg_view_module('featured', $title, $body, array('class' => 'mbl'));
Example #10
0
// count members
$member_count = $group->getMembers(['count' => true]);
// count how manyu members are notified by email
$notification_options = ['type' => 'user', 'count' => true, 'relationship' => 'notifyemail', 'relationship_guid' => $group->getGUID(), 'inverse_relationship' => true];
$notification_count = elgg_get_entities_from_relationship($notification_options);
if (elgg_is_active_plugin('site_notifications')) {
    // maybe more members are being notified by site
    $notification_options['relationship'] = 'notifysite';
    $site_notification_count = elgg_get_entities_from_relationship($notification_options);
    if (!empty($site_notification_count)) {
        if ($site_notification_count > $notification_count) {
            $notification_count = $site_notification_count;
        }
    }
}
// start building content
$title = elgg_echo('group_tools:notifications:title');
$content = elgg_format_element('div', ['class' => 'mbm'], elgg_echo('group_tools:notifications:description', [$member_count, $notification_count]));
// enable notification for everyone
if ($member_count > $notification_count) {
    $content .= elgg_view('output/url', ['href' => "action/group_tools/notifications?toggle=enable&guid={$group->getGUID()}", 'text' => elgg_echo('group_tools:notifications:enable'), 'class' => 'elgg-button elgg-button-submit mrm', 'confirm' => true]);
}
// disable notification
if ($notification_count > 0) {
    $content .= elgg_view('output/url', ['href' => "action/group_tools/notifications?toggle=disable&guid={$group->getGUID()}", 'text' => elgg_echo('group_tools:notifications:disable'), 'class' => 'elgg-button elgg-button-submit', 'confirm' => true]);
}
// disclaimer about timing
$content .= elgg_format_element('div', ['class' => 'elgg-quiet mtm'], elgg_echo('group_tools:notifications:disclaimer'));
// echo content
echo elgg_view_module('info', $title, $content);
Example #11
0
<?php

$user = elgg_extract("entity", $vars, elgg_get_page_owner_entity());
if (empty($user) || !elgg_instanceof($user, "user")) {
    return;
}
echo elgg_view_module("info", "", elgg_echo("tag_tools:notifications:description"));
$NOTIFICATION_HANDLERS = _elgg_services()->notifications->getMethodsAsDeprecatedGlobal();
$tags = tag_tools_get_user_following_tags($user->getGUID());
if (empty($tags)) {
    echo elgg_view('output/longtext', array('value' => elgg_echo("tag_tools:notifications:empty")));
    return;
}
elgg_require_js("tag_tools/notifications");
echo "<table class='elgg-table-alt'>";
// header with notification methods and delete
echo "<thead>";
echo "<tr><th>&nbsp;</th>";
foreach ($NOTIFICATION_HANDLERS as $method => $foo) {
    echo "<th class='center'>" . elgg_echo('notification:method:' . $method) . "</th>";
}
echo "<th class='center'>" . elgg_echo("delete") . "</th>";
echo "</tr>";
echo "</thead>";
echo "<tbody>";
// all tags
foreach ($tags as $tag) {
    $encoded_tag = htmlspecialchars($tag, ENT_QUOTES, "UTF-8", false);
    echo "<tr>";
    echo "<td>";
    echo $encoded_tag;
Example #12
0
File: import.php Project: n8b/VMN
<?php

elgg_require_js('framework/inbox/admin');
$title = elgg_echo('inbox:admin:import');
$body = '<p class="mam">' . elgg_echo('inbox:admin:import_stats', array($vars['count'])) . '</p>';
$body .= elgg_view('output/url', array('id' => 'inbox-admin-import', 'text' => elgg_echo('inbox:admin:import_start'), 'class' => 'elgg-button elgg-button-action float mam', 'rel' => elgg_echo('inbox:admin:import_warning'), 'data-count' => $vars['count']));
$body .= '<div id="import-progress" class="mam"></div>';
echo elgg_view_module('widget', $title, $body);
Example #13
0
if ($blogs = elgg_get_entities($blog_options)) {
    if ($vars['email']) {
        $title = "<h2 class='email'>" . elgg_echo("blog:blogs") . "</h2>";
        $title .= "<h5 class='email'>To view all site blogs visit " . elgg_get_site_url() . "blog/all?filter=newest </h5>";
        $latest_blogs = "<div class='email-section'>";
        foreach ($blogs as $blog) {
            $latest_blogs .= "<div class='blog'>";
            $latest_blogs .= "<h4 class='email'>" . $blog->title . "</h4>";
            $latest_blogs .= "<p>" . elgg_get_excerpt($blog->description) . "</p>";
            $latest_blogs .= "</div>";
        }
        $latest_blogs .= "</div>";
        echo $title . $latest_blogs;
    } else {
        $title = elgg_echo("blog:blogs");
        $title .= "<h5>To view all site blogs visit " . elgg_get_site_url() . "blog/all?filter=newest </h5>";
        $latest_blogs = "";
        foreach ($blogs as $blog) {
            $latest_blogs .= "<div class='digest-blog'>";
            if ($blog->icontime) {
                $latest_blogs .= "<img src='" . $blog->getIconURL("medium") . "' />";
            }
            $latest_blogs .= "<span>";
            $latest_blogs .= "<h4>" . $blog->title . "</h4>";
            $latest_blogs .= elgg_get_excerpt($blog->description);
            $latest_blogs .= "</span>";
            $latest_blogs .= "</div>";
        }
        echo elgg_view_module("digest", $title, $latest_blogs);
    }
}
Example #14
0
<?php

/**
 * List all suggested groups
 */
elgg_push_context('zhg_contact');
$options = array("count" => elgg_extract("count", $vars), "limit" => false, "full_view" => false, "pagination" => false);
$list = elgg_view_entity_list($vars["entities"], $options);
elgg_pop_context('zhg_contact');
$result .= "<div id='zhaohu_manager_member_listing'>";
if (!empty($list)) {
    $result .= $list;
} else {
    $result .= elgg_echo('zhaohu_manager:list:noresults');
}
$result .= "</div>";
echo elgg_view_module("main", "", $result);
Example #15
0
    $revisions[] = $auto_save_annotations[0];
}
$saved_revisions = $blog->getAnnotations(['annotation_name' => 'blog_revision', 'reverse_order_by' => true, 'limit' => false]);
$revisions = array_merge($revisions, $saved_revisions);
if (empty($revisions)) {
    return;
}
$load_base_url = "blog/edit/{$blog->getGUID()}";
// show the "published revision"
$published_item = '';
if ($blog->status == 'published') {
    $load = elgg_view('output/url', ['href' => $load_base_url, 'text' => elgg_echo('status:published'), 'is_trusted' => true]);
    $time = elgg_format_element('span', ['class' => 'elgg-subtext'], elgg_view_friendly_time($blog->time_created));
    $published_item = elgg_format_element('li', [], "{$load}: {$time}");
}
$n = count($revisions);
$revisions_list = '';
foreach ($revisions as $revision) {
    $time = elgg_format_element('span', ['class' => 'elgg-subtext'], elgg_view_friendly_time($revision->time_created));
    if ($revision->name == 'blog_auto_save') {
        $revision_lang = elgg_echo('blog:auto_saved_revision');
    } else {
        $revision_lang = elgg_echo('blog:revision') . " {$n}";
    }
    $load = elgg_view('output/url', array('href' => "{$load_base_url}/{$revision->id}", 'text' => $revision_lang, 'is_trusted' => true));
    $revisions_list .= elgg_format_element('li', ['class' => 'auto-saved'], "{$load}: {$time}");
    $n--;
}
$body = elgg_format_element('ul', ['class' => 'blog-revisions'], $published_item . $revisions_list);
echo elgg_view_module('aside', elgg_echo('blog:revisions'), $body);
Example #16
0
    if (!empty($files)) {
        foreach ($files as $file) {
            $file_link = elgg_view("output/url", array("href" => "events/event/file/" . $event->getGUID() . "/" . $file->file, "text" => elgg_view_icon("download", "mrs") . $file->title));
            $event_details .= "<li>" . $file_link . "</li>";
        }
    }
    if ($event->canEdit()) {
        $add_link = elgg_view("output/url", array("href" => "events/event/upload/" . $event->getGUID(), "text" => elgg_view_icon("round-plus", "mrs") . elgg_echo("event_manager:event:uploadfiles")));
        $event_details .= "<li>" . $add_link . "</li>";
    }
    $event_details .= "</ul>";
    $event_details .= "</td></tr>";
}
$event_details .= "</table>";
$body = elgg_view_module("main", "", $event_details);
$body .= elgg_view_module("main", "", elgg_view("event_manager/event/actions", $vars));
if ($event->show_attendees || $event->canEdit()) {
    $body .= elgg_view("event_manager/event/attendees", $vars);
}
if ($event->with_program) {
    $body .= elgg_view("event_manager/program/view", $vars);
}
if ($event->comments_on) {
    $body .= elgg_view_comments($event);
}
$entity_menu = elgg_view_menu("entity", array("entity" => $event, "sort_by" => "priority", "class" => "elgg-menu-hz", "handler" => "event"));
$params = array('entity' => $event, 'title' => false, 'metadata' => $entity_menu, 'subtitle' => $subtitle);
$params = $params + $vars;
$summary = elgg_view('object/elements/summary', $params);
echo elgg_view('object/elements/full', array('summary' => $summary, 'body' => $body));
if ($event->hide_owner_block) {
Example #17
0
<?php

/**
 * Friends module
 *
 */
$user = elgg_get_logged_in_user_entity();
$count = $user->getFriends(array('count' => TRUE));
$num = (int) elgg_get_plugin_setting('num_friends', 'river_addon');
$options = array('type' => 'user', 'limit' => $num, 'offset' => 0, 'relationship' => 'friend', 'relationship_guid' => elgg_get_logged_in_user_guid(), 'inverse_relationship' => false, 'full_view' => false, 'pagination' => false, 'list_type' => 'gallery', 'no_results' => elgg_echo('friends:none'), 'order_by' => 'rand()');
$content = elgg_list_entities_from_relationship($options);
$content .= '<p style="text-align:right; margin:15px 3px;"><a href="' . elgg_get_site_url() . 'friends/' . elgg_get_logged_in_user_entity()->username . '"><b>' . elgg_echo('View All') . '</b></a></p>';
$title = elgg_echo('<div style="color:grey;font-size:0.8em;border-bottom:1px solid lightgrey;">Your Friends (' . $count . ')</div>');
echo elgg_view_module('feature', $title, $content, array('class' => 'elgg-module-friends'));
Example #18
0
/**
 * Navigation menu for a user's or a group's projects
 *
 * @uses $vars['project'] Page object if manually setting selected item
 */
$selected_project = elgg_extract('project', $vars, false);
if ($selected_project) {
    $url = $selected_project->getURL();
}
$title = elgg_echo('projects:navigation');
projects_register_navigation_tree(elgg_get_page_owner_entity());
$content = elgg_view_menu('projects_nav', array('class' => 'projects-nav'));
if (!$content) {
    $content = '<p>' . elgg_echo('projects:none') . '</p>';
}
echo elgg_view_module('aside', $title, $content);
//@todo JS 1.8: no
?>
<script type="text/javascript">
$(document).ready(function() {
	$(".projects-nav").treeview({
		persist: "location",
		collapsed: true,
		unique: true
	});

<?php 
if ($selected_project) {
    // if on a history project, we need to manually select the correct menu item
    // code taken from the jquery.treeview library
    ?>
Example #19
0
<?php

echo elgg_view_module('main', null, elgg_echo('menu_builder:appearance:menu_items:disabled'));
Example #20
0
<?php

elgg_require_js('menu_builder/manage_menu_items');
$menus = menu_builder_get_managed_menus();
$selected = get_input('menu_name');
if (!empty($selected) && !menu_builder_is_managed_menu($selected)) {
    $selected = null;
}
$tabs = [];
if (!empty($menus)) {
    $menu_list = '';
    foreach ($menus as $menu) {
        if (empty($selected)) {
            $selected = $menu;
        }
        $class = 'hidden';
        if ($menu === $selected) {
            $class = '';
        }
        $menu_list .= elgg_view('menu_builder/admin/edit_menu', ['menu' => $menu, 'class' => $class, 'rel' => $menu]);
        $tabs[] = ['text' => elgg_echo('menu:' . elgg_get_friendly_title($menu) . ':header:default'), 'selected' => $menu === $selected, 'rel' => $menu, 'href' => 'javascript:void(0)'];
    }
} else {
    $menu_list = elgg_echo('notfound');
}
$tabs[] = ['text' => ' <strong>+</strong> ' . elgg_echo('menu_builder:admin:menu:add'), 'id' => 'menu-builder-add-menu', 'href' => 'javascript:void(0)'];
$menu_list = elgg_view('navigation/tabs', ['tabs' => $tabs, 'class' => 'menu-builder-admin-tabs']) . $menu_list;
echo elgg_view_module('inline', elgg_echo('menu_builder:admin:menu:list'), $menu_list);
Example #21
0
</h3>
		</div>
		<div class="elgg-body">
			<input type="file" name="ios_push_certificate" /> <?php 
    echo $ios_push_certificate_status;
    ?>
			
		</div>
	</div>
	
	<?php 
} else {
    $html = elgg_view('input/text', array('name' => 'params[swordfish_api_shared_key]', 'value' => $swordfish_api_shared_key));
    echo elgg_view_module("inline", elgg_echo('pleio_api:settings:swordfish_api_shared_key'), $html);
    $html = elgg_view('input/text', array('name' => 'params[license_key]', 'value' => $license_key));
    echo elgg_view_module("inline", elgg_echo('pleio_api:settings:license_key'), $html);
}
?>
	
	<div class="elgg-module elgg-module-inline">
		<div class="elgg-head">
			<h3><?php 
echo elgg_echo("pleio_api:settings:mobile_logo");
?>
</h3>
		</div>
		<div class="elgg-body">
			<input type="file" name="mobile_logo" />	
			<br />
			<img src="/<?php 
echo $logo_url;
Example #22
0
<?php

$guid = (int) get_input('guid');
$entity = get_entity($guid);
if (empty($entity) || !elgg_instanceof($entity, 'object', Wizard::SUBTYPE)) {
    register_error(elgg_echo('wizard:action:error:entity'));
    forward(REFERER);
}
$title = elgg_echo('wizard:edit:title', array($entity->title));
$form = elgg_view_form('wizard/edit', array('action' => 'action/wizard/edit'), array('entity' => $entity));
echo elgg_view_module('inline', $title, $form);
<?php

$title = elgg_echo('upload_users:instructions');
$body = elgg_echo('upload_users:download_sample_help');
$body .= elgg_view('output/url', array('text' => elgg_echo('upload_users:download_sample'), 'href' => 'upload_users/sample?limit=50&offset=0', 'class' => 'elgg-button elgg-button-action mam'));
$body .= elgg_echo('upload_users:upload_help');
$body .= <<<__HTML
<div class="mam">
\t<pre class="pam code">
username,email,name,films,creator
BugsBunny,bugsbunny@looneytunes.com,Bugs Bunny,"“Rabbit Fire”, “Rabbit Seasoning”, “Duck! Rabbit! Duck!”",Chuck Jones
WileCoyote,wilecoyote@looneytunes.com,Wile E. Coyote,"“Fast and Furry-ous”, “Beep, Beep”","Chuck Jones, Michael Maltese"
\t</pre>
\t<pre class="pam code">
"username";"email";"name";"films";"creator"
"BugsBunny";"*****@*****.**";"Bugs Bunny";"“Rabbit Fire”, “Rabbit Seasoning”, “Duck! Rabbit! Duck!”";"Chuck Jones"
"WileCoyote";"*****@*****.**";"Wile E. Coyote";"“Fast and Furry-ous”, “Beep, Beep”";"Chuck Jones, Michael Maltese"
\t</pre>
</div>
__HTML;
$body = '<div class="elgg-border-plain mam pam">' . $body . '</div>';
echo elgg_view_module('aside', $title, $body, array('class' => 'mam'));
Example #24
0
<?php

/**
 * Configure a welcome message to send to a new member when he/she joins the group
 */
$group = elgg_extract("entity", $vars);
if (!empty($group) && $group instanceof ElggGroup && $group->canEdit()) {
    $title = elgg_echo("group_tools:welcome_message:title");
    $form_body = "<div>" . elgg_echo("group_tools:welcome_message:description") . "</div>";
    $form_body .= elgg_view("input/longtext", array("name" => "welcome_message", "value" => $group->getPrivateSetting("group_tools:welcome_message")));
    $form_body .= "<div class='elgg-subtext'>";
    $form_body .= elgg_view("output/longtext", array("value" => elgg_echo("group_tools:welcome_message:explain", array(elgg_get_logged_in_user_entity()->name, $group->name, $group->getURL()))));
    $form_body .= "</div>";
    $form_body .= "<div class='elgg-footer'>";
    $form_body .= elgg_view("input/hidden", array("name" => "group_guid", "value" => $group->getGUID()));
    $form_body .= elgg_view("input/submit", array("value" => elgg_echo("save")));
    $content = elgg_view("input/form", array("action" => "action/group_tools/welcome_message", "body" => $form_body));
    echo elgg_view_module("info", $title, $content);
}
<?php

/**
 * Search for content in this group
 *
 * @uses vars['entity'] ElggGroup
 */
$entity = elgg_extract('entity', $vars, elgg_get_page_owner_entity());
if (!elgg_group_gatekeeper(false, $entity->guid)) {
    return;
}
$identifier = is_callable('group_subtypes_get_identifier') ? group_subtypes_get_identifier($entity) : 'groups';
$url = elgg_get_site_url() . 'search';
$body = elgg_view_form('groups/search', array('action' => $url, 'method' => 'get', 'disable_security' => true), $vars);
echo elgg_view_module('aside', elgg_echo("{$identifier}:search_in_group"), $body);
Example #26
0
<?php

/**
 * Filters for search
 * 
 * @uses $vars Passes it to 'plugins/search/form' view
 */
$serialized_settings = elgg_get_plugin_setting('search-settings', 'community_plugins');
$settings = unserialize($serialized_settings);
if (!is_array($settings)) {
    $settings = array();
}
$vars['settings'] = $settings;
echo elgg_view_module('aside', elgg_echo('plugins:filters:title'), elgg_view('plugins/search/form', $vars), array('class' => 'plugin-search'));
Example #27
0
                $tabtitles .= "<a href='javascript:void(0);' rel='day_" . $day->getGUID() . "'>" . $day_title . "</a>";
                $tabtitles .= "</li>";
                $tabcontent .= elgg_view("event_manager/program/elements/day", array("entity" => $day, "selected" => $selected, "member" => $vars["member"]));
            }
        }
        // make program
        $program = '<div id="event_manager_event_view_program">';
        $program .= '<ul class="elgg-tabs elgg-htabs">';
        $program .= $tabtitles;
        if ($event->canEdit() && !elgg_in_context('programmailview')) {
            $program .= '<li><a href="javascript:void(0);" rel="' . $event->getGUID() . '" class="event_manager_program_day_add">' . elgg_echo("event_manager:program:day:add") . "</a></li>";
        }
        $program .= '</ul>';
        $program .= '</div>';
        $program .= $tabcontent;
        echo elgg_view_module("info", elgg_echo('event_manager:event:program'), $program);
        ?>
				<script type='text/javascript'>
					$(document).ready(function(){
						$("#event_manager_event_view_program a").live("click", function(){
							$(".event_manager_program_day").hide();
							$("#event_manager_event_view_program li").removeClass("elgg-state-selected");
							var selected = $(this).attr("rel");
							$(this).parent().addClass("elgg-state-selected");
							$("#" + selected).show();
						});
					});
				</script>
			<?php 
    }
}
Example #28
0
File: preview.php Project: n8b/VMN
<?php

$title = elgg_echo("preview");
$body = elgg_view("output/iframe", array("scroll" => "auto", "id" => "profile-manager-user-summary-preview", "src" => "profile_manager/user_summary_control"));
echo elgg_view_module("inline", $title, $body);
Example #29
0
/**
 * Dispaly summary of different video versions
 */
$headers = array(elgg_echo('video:format'), elgg_echo('video:size'), elgg_echo('video:resolution'), elgg_echo('video:bitrate'), elgg_echo('video:location'), elgg_echo('video:status'), '');
$rows = array();
$total_size = 0;
foreach ($video->getSources() as $source) {
    $delete_link = elgg_view('output/confirmlink', array('href' => "action/video/delete_format?guid={$source->getGUID()}", 'text' => elgg_echo('delete')));
    $file = $source->getFilenameOnFilestore();
    if (file_exists($file)) {
        $filesize = filesize($file);
    } else {
        $filesize = "-";
    }
    $total_size += $filesize;
    $status = elgg_echo('ok');
    if (!file_exists($file) || $filesize == 0 || $source->conversion_done == false) {
        $status = elgg_echo('video:pending');
        $status = "<span style=\"color: red;\">{$status}</span>";
    }
    $row = array($source->format, $filesize, $source->resolution, $source->bitrate, $file, $status, $delete_link);
    $rows[] = $row;
}
// Add a row that displays total size of all versions
$rows[] = array('', "<b>{$total_size}</b>", '', '', '', '', '');
$table = elgg_view('output/table', array('headers' => $headers, 'rows' => $rows, 'table_class' => 'elgg-table-alt'));
echo elgg_view_module('inline', elgg_echo('video:formats'), $table);
echo elgg_view('output/url', array('href' => $video->getURL(), 'text' => elgg_echo('video:view'), 'class' => 'elgg-button elgg-button-action'));
echo elgg_view('output/url', array('href' => "admin/video/convert?guid={$guid}", 'text' => elgg_echo('video:reconvert'), 'class' => 'elgg-button elgg-button-action'));
echo elgg_view('output/confirmlink', array('href' => "action/video/delete?guid={$guid}", 'text' => elgg_echo('delete'), 'class' => 'elgg-button elgg-button-action'));
echo elgg_view('output/confirmlink', array('href' => "action/video/reset?guid={$guid}", 'text' => elgg_echo('reset'), 'class' => 'elgg-button elgg-button-action'));
Example #30
0
    */
    if ($vars['add_link'] == 'discuss') {
        //Nick - if the user wants a dicsussion we change the add discussion
        $discuss_start = elgg_view('groups/profile/discuss_start', array('user' => $user_guid, 'group' => $group));
        $content = $discuss_start . $vars['content'];
    } else {
        //gather info from $vars['add_link'] to use in our button
        $buttonHREF = explode('"', $vars['add_link']);
        //seperate text from system genereated link
        $throwaway = explode('>', $vars['add_link']);
        $buttonText = explode('<', $throwaway[1]);
        //create button from gathered variables
        $addButton = elgg_view('output/url', array('text' => $buttonText[0], 'class' => 'btn btn-primary mrgn-bttm-sm', 'style' => 'color:white', 'href' => $buttonHREF[1]));
        $content = '<div class="text-right">' . $addButton . '</div>' . $vars['content'];
    }
}
//remove group from title to create an id for module
$id = explode(' ', $vars['title']);
if (get_current_language() == 'en') {
    if ($id[1] == 'calender') {
        $id[1] = 'events';
    }
    $modID = $id[1];
} else {
    $modID = strtolower($id[0]);
}
if ($vars['title'] == 'Most recent albums' || $vars['title'] == 'Most recent images') {
    $modID = $id[2];
}
echo elgg_view_module('GPmod', '', $content, array('class' => 'tab-pane fade-in', 'id' => $modID, 'footer' => $footer));