Example #1
0
$category = get_input('category', null);
$site = elgg_get_site_entity();
$user = elgg_get_logged_in_user_entity();
elgg_push_context('news');
elgg_set_page_owner_guid($site->guid);
if ($site->canWriteToContainer(0, 'object', 'news')) {
    elgg_register_title_button();
}
$options = array('type' => 'object', 'subtype' => 'news', 'full_view' => false, 'display_as_list' => false);
$topic = get_input('topic');
if (!$topic) {
    $topic = "mine";
}
if ($topic == "mine") {
    $interests = rijkshuisstijl_get_interests($user);
    if ($interests) {
        $options['container_guids'] = $interests;
    }
} else {
    $topic = (int) $topic;
    if ($topic) {
        $options['container_guid'] = $topic;
    }
}
$category = get_input('category', null);
if ($category) {
    $tags = get_metastring_id("tags");
    $juris = get_metastring_id("juris");
    if ($tags && $juris) {
        $options['joins'] = "LEFT JOIN elgg_metadata md ON e.guid = md.entity_guid AND md.name_id = {$tags} AND md.value_id = {$juris}";
Example #2
0
    forward();
}
$username = elgg_extract("username", $vars);
$notifications = array(true, false);
$targetUser = get_user_by_username($username);
if (!$targetUser) {
    register_error(elgg_echo("profile:notfound"));
    forward();
}
if (isset($targetUser->notifications)) {
    for ($i = 0; $i < max(count($targetUser->notifications), count($notifications)); $i++) {
        $notifications[$i] = $targetUser->notifications[$i] != "0";
    }
}
$groups = rijkshuisstijl_get_featured_groups();
$interests = rijkshuisstijl_get_interests($targetUser);
$notificationSettings = get_user_notification_settings($targetUser->guid);
/* will recode to use entitiesfromrelationship later
  $interests = $user->getEntitiesFromRelationship(array(
    'type' => 'group',
    'relationship' => 'interests'
  ));*/
?>

<script type="text/javascript">
  var gUsername = '******';
  var gUserGuid = '<?php 
echo $targetUser->guid;