Example #1
0
<?php

/**
 * Elgg Celebrations Plugin
 *
 * @package Celebrations
 * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
 * @author Fernando Graells
 * @copyright Fernando Graells 2009
 * @link
 *
 * for Elgg 1.8 and newer by iionly
 * @copyright iionly 2012
 * iionly@gmx.de
 */
?>

<p>
<?php 
echo elgg_echo('celebrations:filterby') . ": ";
$user_guid = elgg_get_logged_in_user_guid();
echo elgg_view('input/select', array('name' => 'params[todayfilterid]', 'options_values' => filterlist($user_guid), 'value' => $vars['entity']->filterid));
?>
</p>
Example #2
0
<?php

gatekeeper();
elgg_require_js("celebrations/celebrations");
elgg_set_context("celebrations");
elgg_push_breadcrumb(elgg_echo('celebrations:shorttitle'), 'celebrations/celebrations/' . date("n") . '/0/');
$filterid = elgg_extract('filterid', $vars, 0);
$month = elgg_extract('month', $vars, date("n"));
elgg_push_breadcrumb(elgg_echo("celebrations:month:{$month}"));
$user_guid = elgg_get_logged_in_user_guid();
$divbox = '<div class="elgg-module elgg-module-aside"><div class="elgg-head"><h3>' . elgg_echo('celebrations:filterby') . '</h3></div>';
$title = elgg_echo('celebrations:title') . ' ' . elgg_echo('next_celebrations:in_title') . ' ' . elgg_echo("celebrations:month:{$month}");
// Format page
$area2 = elgg_view('celebrations/list_celebrations', array('filterid' => $filterid, 'month' => $month));
$area3 = elgg_view('celebrations/sidebar', array('filterid' => $filterid, 'month' => $month));
$area3 .= $divbox . elgg_view('input/select', array('name' => 'input_filterid', 'id' => 'input_filterid', 'options_values' => filterlist($user_guid), 'value' => $filterid, 'data-month' => $month)) . '</div>';
$body = elgg_view_layout('content', array('content' => $area2, 'filter' => '', 'title' => $title, 'sidebar' => $area3));
// Draw it
echo elgg_view_page(elgg_echo('celebrations:title'), $body);