function openid_server_delete_entities($type = "", $subtype = "", $owner_guid = 0) { $entities = get_entities($type, $subtype, $owner_guid, "time_created desc", 0); foreach ($entities as $entity) { openid_server_delete_entity($entity); } return true; }
function form_set_group_profile_categories($group_profile_categories) { $form_config = get_entities('object', 'form:config'); if (!$form_config) { $form_config = new ElggObject(); $form_config->subtype = 'form:config'; $form_config->owner_guid = $_SESSION['user']->getGUID(); $form_config->access_id = ACCESS_PUBLIC; } else { $form_config = $form_config[0]; } $form_config->group_profile_categories = $group_profile_categories; $form_config->save(); }
<?php /** * Elgg thewire view page * * @package ElggTheWire * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider <*****@*****.**> * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ * */ //grab the current site message $site_message = get_entities("object", "sitemessage", 0, "", 1); foreach ($site_message as $mes) { $message = $mes->description; $dateStamp = friendly_time($mes->time_created); $delete = elgg_view("output/confirmlink", array('href' => $vars['url'] . "action/riverdashboard/delete?message=" . $mes->guid, 'text' => elgg_echo('delete'), 'confirm' => elgg_echo('deleteconfirm'))); } ?> <div class="sidebarBox"> <?php //if there is a site message if ($site_message) { ?> <?php echo "<h3>" . elgg_echo("sitemessages:announcements") . "</h3>"; echo "<p><small>" . elgg_echo("sitemessages:posted") . ": " . $dateStamp;
/** * Set the last-checked value for this context to npw. * * @param unknown_type $guid * @param unknown_type $context * @return unknown */ function setSWTimestampForUser($guid, $context) { $timestamps = get_entities("object", "sw_timestamp", $guid); $timestamp = ""; if (!empty($timestamps)) { foreach ($timestamps as $t) { if ($t->description == $context) { $timestamp = $t; break; } } } if (empty($timestamp)) { $timestamp = new ElggObject(); $timestamp->owner_guid = $guid; $timestamp->container_guid = $guid; $timestamp->subtype = 'sw_timestamp'; $timestamp->access_id = 2; $timestamp->title = "SW Timestamp"; $timestamp->description = $context; } $ctx = get_context(); set_context('add_sticky_widgets'); $timestamp->save(); set_context($ctx); // $timestamp->description = time(); return $timestamp->time_updated; }
/** * Counts the number of objects owned by a user's friends * * @param int $user_guid The GUID of the user to get the friends of * @param string $subtype Optionally, the subtype of objects * @return int The number of objects */ function count_user_friends_objects($user_guid, $subtype = "") { if ($friends = get_user_friends($user_guid, $subtype, 999999, 0)) { $friendguids = array(); foreach ($friends as $friend) { $friendguids[] = $friend->getGUID(); } return get_entities('object', $subtype, $friendguids, "time_created desc", $limit, $offset, true, 0, $friendguids); } return 0; }
if (!empty($object)) { $object->metadata_name = $name; if (!empty($label)) { $object->metadata_label = $label; } else { unset($object->metadata_label); } // add relationship remove_entity_relationships($object->guid, CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_CATEGORY_RELATIONSHIP); if (!empty($profile_types) && is_array($profile_types)) { foreach ($profile_types as $type) { add_entity_relationship($type, CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_CATEGORY_RELATIONSHIP, $object->guid); } } // add correct order $count = get_entities("object", CUSTOM_PROFILE_FIELDS_CATEGORY_SUBTYPE, null, null, null, null, true); if ($add) { $object->order = $count; } if ($object->save()) { system_message(elgg_echo("profile_manager:action:category:add:succes")); } else { register_error(elgg_echo("profile_manager:action:category:add:error:save")); } } else { register_error(elgg_echo("profile_manager:action:category:add:error:object")); } } else { register_error(elgg_echo("profile_manager:action:category:add:error:name")); } forward($_SERVER["HTTP_REFERER"]);
<?php require_once dirname(dirname(dirname(dirname(__FILE__)))) . "/thickboxlibraries.php"; //set owner to site admin. $owner = VAZCO_AVATAR_ADMIN; $limit = 100; $avatars = get_entities("object", "avatar", $owner, "", $limit, 0, false); ?> <div class="contentWrapper"> <div id="profile_picture_croppingtool"> <label><?php echo elgg_echo('vazco_avatar:select:description'); ?> </label> <br/> <?php echo elgg_echo('vazco_avatar:select:clicktochose'); ?> <div id="tidypics_album_widget_container"> <div class="avatar_container"> <?php $counter = -1; echo '<div class="avatar_wrapper">'; foreach ($avatars as $avatar) { $counter++; if ($counter == 5) { echo '</div><div class="avatar_wrapper">'; $counter = 0; } echo '<div class="avatar_box">'; echo '<div class="avatar_icon_container"><a class="thickbox" href="' . $vars['url'] . 'mod/vazco_avatar/avatar.php?file_guid=' . $avatar->guid . '&size=large"><img class="avatar_icon" src="' . $vars['url'] . 'mod/vazco_avatar/avatar.php?file_guid=' . $avatar->guid . '" border="0" class="tidypics_album_cover" alt="avatar' . $avatar->guid . '"/></a></div>';
<?php // This page can only be run from within the Elgg framework if (!is_callable('elgg_view')) { exit; } // Get the name of the form field we need to inject into $internalname = get_input('internalname'); if (!isloggedin()) { exit; } global $SESSION; $offset = (int) get_input('offset', 0); $simpletype = get_input('simpletype'); $entity_types = array('object' => array('file')); if (empty($simpletype)) { $count = get_entities('object', 'file', $SESSION['user']->guid, '', null, null, true); $entities = get_entities('object', 'file', $SESSION['user']->guid, '', 6, $offset); } else { $count = get_entities_from_metadata('simpletype', $simpletype, 'object', 'file', $SESSION['user']->guid, 6, $offset, '', 0, true); $entities = get_entities_from_metadata('simpletype', $simpletype, 'object', 'file', $SESSION['user']->guid, 6, $offset, '', 0, false); } $types = get_tags(0, 10, 'simpletype', 'object', 'file', $SESSION['user']->guid); // Echo the embed view echo elgg_view('embed/media', array('entities' => $entities, 'internalname' => $internalname, 'offset' => $offset, 'count' => $count, 'simpletype' => $simpletype, 'limit' => 6, 'simpletypes' => $types));
<?php /** * Profile Manager * * Group Fields list view * * @package profile_manager * @author ColdTrick IT Solutions * @copyright Coldtrick IT Solutions 2009 * @link http://www.coldtrick.com/ */ $count = get_entities("object", CUSTOM_PROFILE_FIELDS_GROUP_SUBTYPE, 0, "", null, null, true); $fields = get_entities("object", CUSTOM_PROFILE_FIELDS_GROUP_SUBTYPE, 0, "", $count, 0); $ordered = array(); if ($count > 0) { foreach ($fields as $field) { $ordered[$field->order] = $field; } ksort($ordered); } $list = elgg_view_entity_list($ordered, $count, 0, $count, false, false, false); ?> <div id="custom_fields_ordering" class="custom_fields_ordering_group"> <?php echo $list; ?> </div>
* * @package Elgg videotizer, by iZAP Web Solutions. * @license GNU Public License version 3 * @Contact iZAP Team "<*****@*****.**>" * @Founder Tarun Jangra "<*****@*****.**>" * @link http://www.izap.in/ * */ global $CONFIG; $page_owner = page_owner_entity(); if ($vars['entity']->izap_videos_enable != 'no') { echo '<div id="izap_widget_layout">'; echo '<h2>' . elgg_echo('izap_videos:groupvideos') . '</h2>'; $options['type'] = 'object'; $options['subtype'] = 'izap_videos'; $options['container_guid'] = $page_owner->guid; if (is_old_elgg()) { $videos = get_entities('object', 'izap_videos', $page_owner->guid); } else { $videos = elgg_get_entities($options); } if ($videos) { echo '<div class="group_video_wrap">'; echo elgg_view('izap_videos/videos_bunch', array('videos' => $videos, 'title_length' => 30, 'wrap' => FALSE)); echo '<div class="view_all"><a href="' . $CONFIG->wwwroot . 'pg/videos/list/' . $page_owner->username . '">' . elgg_echo('izap_videos:view_all') . '</a></div>'; echo '</div>'; } else { echo '<div class="forum_latest">' . elgg_echo('izap_videos:notfound') . '</div>'; } echo '<div class="clearfloat"></div></div>'; }
/** * Shorthand function for finding the plugin settings. * * @param string $plugin_name Optional plugin name, if not specified then it is detected from where you * are calling from. */ function find_plugin_settings($plugin_name = "") { $plugins = get_entities('object', 'plugin'); $plugin_name = sanitise_string($plugin_name); if (!$plugin_name) { $plugin_name = get_plugin_name(); } if ($plugins) { foreach ($plugins as $plugin) { if (strcmp($plugin->title, $plugin_name) == 0) { return $plugin; } } } return false; }
<?php /** * Profile Manager * * Profile Types list view * * @package profile_manager * @author ColdTrick IT Solutions * @copyright Coldtrick IT Solutions 2009 * @link http://www.coldtrick.com/ */ $profile_types_count = get_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE, null, null, null, null, true); if ($profile_types_count > 0) { $list = list_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE, null, $profile_types_count, false, false, false); } else { $list = elgg_echo("profile_manager:profile_types:list:no_types"); } ?> <div class="contentWrapper"> <h3 class="settings"><span class='custom_fields_more_info' id='more_info_profile_type_list'></span><?php echo elgg_echo("profile_manager:profile_types:list:title"); ?> </h3> <div id="custom_fields_profile_types_list_custom"> <?php echo $list; ?> </div> </div>
/** * Returns a viewable list of entities based on the registered types * * @see elgg_view_entity_list * * @param string $type The type of entity (eg "user", "object" etc) * @param string $subtype The arbitrary subtype of the entity * @param int $owner_guid The GUID of the owning user * @param int $limit The number of entities to display per page (default: 10) * @param true|false $fullview Whether or not to display the full view (default: true) * @param true|false $viewtypetoggle Whether or not to allow gallery view * @return string A viewable list of entities */ function list_registered_entities($owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = false, $allowedtypes = true) { $typearray = array(); if ($object_types = get_registered_entity_types()) { foreach ($object_types as $object_type => $subtype_array) { if (is_array($subtype_array) && sizeof($subtype_array) && (in_array($object_type, $allowedtypes) || $allowedtypes === true)) { foreach ($subtype_array as $object_subtype) { $typearray[$object_type][] = $object_subtype; } } } } $offset = (int) get_input('offset'); $count = get_entities('', $typearray, $owner_guid, "", $limit, $offset, true); $entities = get_entities('', $typearray, $owner_guid, "", $limit, $offset); return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle); }
if ($fieldtype == CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE || $fieldtype == CUSTOM_PROFILE_FIELDS_GROUP_SUBTYPE) { $headers = ""; foreach ($fields as $field) { if (!empty($headers)) { $headers .= $fielddelimiter . " "; } $headers .= $field; } echo $headers . PHP_EOL; if ($fieldtype == CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE) { $type = "user"; } else { $type = "group"; } $entities_count = get_entities($type, "", null, null, null, null, true); $entities = get_entities($type, "", null, null, $entities_count); foreach ($entities as $entity) { $row = ""; foreach ($fields as $field) { if (!empty($row)) { $row .= $fielddelimiter . " "; } $field_data = $entity->{$field}; if (is_array($field_data)) { $field_data = implode(",", $field_data); } $row .= utf8_decode($field_data); } echo $row . PHP_EOL; } }
* * Action to import from default * * @package profile_manager * @author ColdTrick IT Solutions * @copyright Coldtrick IT Solutions 2009 * @link http://www.coldtrick.com/ */ global $CONFIG; action_gatekeeper(); admin_gatekeeper(); $type = get_input("type", "profile"); if ($type == "profile" || $type == "group") { $added = 0; $defaults = array(); $max_fields = get_entities("object", "custom_" . $type . "_field", $CONFIG->site_guid, null, null, null, true) + 1; if ($type == "profile") { // Profile defaults $defaults = array('description' => 'longtext', 'briefdescription' => 'text', 'location' => 'tags', 'interests' => 'tags', 'skills' => 'tags', 'contactemail' => 'email', 'phone' => 'text', 'mobile' => 'text', 'website' => 'url'); } elseif ($type == "group") { // Group defaults $defaults = array('description' => 'longtext', 'briefdescription' => 'text', 'interests' => 'tags', 'website' => 'url'); } foreach ($defaults as $metadata_name => $metadata_type) { $count = get_entities_from_metadata("metadata_name", $metadata_name, "object", "custom_" . $type . "_field", $CONFIG->site_guid, "", null, null, null, true); if ($count == 0) { $field = new ElggObject(); $field->owner_guid = $CONFIG->site_guid; $field->container_guid = $CONFIG->site_guid; $field->access_id = ACCESS_PUBLIC; $field->subtype = "custom_" . $type . "_field";
function defaultwidgets_reset_access($event, $object_type, $object) { global $defaultwidget_access; // turn on permissions override $defaultwidget_access = true; // the widgets are disabled, so turn on the ability to see disabled entities $access_status = access_get_show_hidden_status(); access_show_hidden_entities(true); $widgets = get_entities('object', 'widget', $object->getGUID()); if ($widgets) { foreach ($widgets as $widget) { $widget->access_id = get_default_access(); $widget->save(); } } access_show_hidden_entities($access_status); // turn off permissions override $defaultwidget_access = false; return true; }
<?php /** * iZAP izap_videos * * @package Elgg videotizer, by iZAP Web Solutions. * @license GNU Public License version 3 * @Contact iZAP Team "<*****@*****.**>" * @Founder Tarun Jangra "<*****@*****.**>" * @link http://www.izap.in/ * */ global $CONFIG; $video = $vars['video']; $videos = $video->getRelatedVideos(); if ($videos) { echo elgg_view_title(elgg_echo('izap_videos:related_videos')); echo elgg_view('izap_videos/videos_bunch', array('videos' => $videos)); } $options['type'] = 'object'; $options['subtype'] = 'izap_videos'; $options['limit'] = 10; if (is_old_elgg()) { $videos = get_entities($options['type'], $options['subtype'], 0, '', $options['subtype']); } else { $videos = elgg_get_entities($options); } if ($videos) { echo elgg_view_title(elgg_echo('izap_videos:latest')); echo elgg_view('izap_videos/videos_bunch', array('videos' => $videos)); }
add_submenu_item(elgg_echo('pages:all'), $CONFIG->wwwroot . "mod/pages/world.php", 'pageslinksgeneral'); } if ($owner instanceof ElggEntity && can_write_to_container(0, $owner->guid)) { add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . page_owner(), 'pagesactions'); if ($owner instanceof ElggUser) { add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/", 'pagesactions'); } } if (is_callable('group_gatekeeper')) { group_gatekeeper(); } $limit = get_input("limit", 10); $offset = get_input("offset", 0); if ($owner instanceof ElggGroup) { $title = sprintf(elgg_echo("pages:group"), $owner->name); } else { $title = sprintf(elgg_echo("pages:user"), $owner->name); } // Get objects $context = get_context(); set_context('search'); $objects = list_entities("object", "page_top", page_owner(), $limit, false); set_context($context); //get the owners latest welcome message $welcome_message = get_entities("object", "pages_welcome", $owner->guid, '', 1); $body = elgg_view_title($title); $body .= elgg_view("pages/welcome", array('entity' => $welcome_message)); $body .= $objects; $body = elgg_view_layout('two_column_left_sidebar', '', $body); // Finally draw the page page_draw($title, $body);
<?php /** * Elgg vazco_mainpage plugin * * @author Michal Zacher [michal.zacher@gmail.com] */ //get the newest members who have an avatar $profs = get_entities($type = "user", $subtype = "", $owner_guid = 0, $order_by = "", $limit = 0, $offset = 0, $count = false, $site_guid = 0, $container_guid = null, $timelower = 0, $timeupper = 0); ?> <?php $res_count = 0; $total_count = 0; $query1 = "SELECT guid FROM {$CONFIG->dbprefix}_content_item_discrimination WHERE is_content_item = \"1\""; $result1 = mysql_query($query1); while ($row = mysql_fetch_array($result1, MYSQL_ASSOC)) { $nikolas1 = $row['guid']; if (get_entity($nikolas1)) { $res_count++; } } $query3 = "SELECT distinct e.* from elggentities e join elggusers_entity u on e.guid = u.guid JOIN (SELECT subm1.*, s1.string FROM elggmetadata subm1 JOIN elggmetastrings s1 ON subm1.value_id = s1.id) AS m1 ON e.guid = m1.entity_guid where ((m1.name_id='925' AND m1.string like '%.%')) and ( (1 = 1) and e.enabled='yes') and ( (1 = 1) and m1.enabled='yes') order by e.time_created desc limit 0,100000000"; $result3 = mysql_query($query3); while ($row = mysql_fetch_array($result3, MYSQL_ASSOC)) { $repc1++; } $query4 = "SELECT elgg_content_item_discrimination.guid FROM elgg_content_item_discrimination INNER JOIN elggentity_relationships ON elgg_content_item_discrimination.guid=elggentity_relationships.guid_two"; $result4 = mysql_query($query4); while ($row = mysql_fetch_array($result4, MYSQL_ASSOC)) {
* @author Milan Magudia & Curverider * @copyright HedgeHogs.net & Curverider Ltd * **/ // set some defaults $owner = page_owner_entity(); $context = $vars['context']; $area1widgets = false; $area2widgets = false; $area3widgets = false; // get available widget types set_context($context); $widgettypes = get_widget_types(); set_context('admin'); // get the entities for the module $entities = get_entities("object", "moddefaultwidgets", 0, "", 9999); // check if the entity exists if (isset($entities[0])) { // get the widgets for the context $entity = $entities[0]; $current_widgets = $entity->{$context}; list($left, $middle, $right) = split('%%', $current_widgets); // split columns into seperate widgets $area1widgets = split('::', $left); $area2widgets = split('::', $middle); $area3widgets = split('::', $right); // clear out variables if no widgets are available if ($area1widgets[0] == "") { $area1widgets = false; } if ($area2widgets[0] == "") {
* * @package profile_manager * @author ColdTrick IT Solutions * @copyright Coldtrick IT Solutions 2009 * @link http://www.coldtrick.com/ */ $formbody = "<table class='custom_fields_add_form_table'>\n"; $formbody .= "<tr>\n"; $formbody .= "<td class='custom_fields_add_form_table_left'>\n"; $formbody .= elgg_echo('profile_manager:admin:metadata_name') . ":"; $formbody .= elgg_view('input/text', array('internalname' => 'metadata_name')); $formbody .= "</td>\n"; $formbody .= "<td rowspan='2' class='custom_fields_add_form_table_right'>\n"; $type_count = get_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE, null, null, null, null, true); if ($type_count > 0) { $types = get_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE, null, null, $type_count); $options = array(); foreach ($types as $type) { $title = $type->getTitle(); $options[$title] = $type->guid; } $formbody .= elgg_view("input/checkboxes", array("internalname" => "profile_types", "options" => $options)); } else { $formbody .= " "; } $formbody .= "</td>\n"; $formbody .= "</tr>\n"; $formbody .= "<tr>\n"; $formbody .= "<td>\n"; $formbody .= elgg_echo('profile_manager:admin:metadata_label') . "*:"; $formbody .= elgg_view('input/text', array('internalname' => 'metadata_label'));
<?php /** * Profile Manager * * Category list view * * @package profile_manager * @author ColdTrick IT Solutions * @copyright Coldtrick IT Solutions 2009 * @link http://www.coldtrick.com/ */ $categories_count = get_entities("object", CUSTOM_PROFILE_FIELDS_CATEGORY_SUBTYPE, null, null, null, null, true); if ($categories_count > 0) { $categories = get_entities("object", CUSTOM_PROFILE_FIELDS_CATEGORY_SUBTYPE, null, null, $categories_count); $ordered = array(); foreach ($categories as $cat) { $ordered[$cat->order] = $cat; } ksort($ordered); $list = elgg_view_entity_list($ordered, $categories_count, 0, $categories_count, false, false, false); } else { $list = elgg_echo("profile_manager:categories:list:no_categories"); } ?> <div class="contentWrapper"> <h3 class="settings"><span class='custom_fields_more_info' id='more_info_category_list'></span><?php echo elgg_echo("profile_manager:categories:list:title"); ?> </h3> <div id="custom_profile_field_category_0" class="custom_fields_category"><a href="javascript:void(0);" onclick="filterCustomFields(0)"><?php
<?php /** * Elgg edit frontpage * * @package ElggExpages * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider Ltd <*****@*****.**> * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ * */ //action $action = "expages/addfront"; //grab the required entity $page_contents = get_entities("object", "front", 0, "", 1); if ($page_contents) { foreach ($page_contents as $pc) { $description_right = $pc->description; $description_left = $pc->title; $guid = $pc->guid; } } else { $tags = ""; $description = ""; } // set the required form variables $input_area_left = elgg_view('input/longtext', array('internalname' => 'front_left', 'value' => $description_left)); $input_area_right = elgg_view('input/longtext', array('internalname' => 'front_right', 'value' => $description_right)); $submit_input = elgg_view('input/submit', array('internalname' => 'submit', 'value' => elgg_echo('save'))); $hidden_guid = elgg_view('input/hidden', array('internalname' => 'front_guid', 'value' => $guid));
<?php /** * Elgg groups items view. * This is the messageboard, members, pages and latest forums posts. Each plugin will extend the views * * @package ElggGroups * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 * @author Curverider * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ //right column if ($forae = get_entities('object', '', $vars['entity']->guid)) { //if ($forae = get_entities_from_annotations("object", "groupforumtopic", "group_topic_post", "", 0, $vars['entity']->guid, 20, 0, "desc", false)) { foreach ($forae as $forum) { echo elgg_view_entity($forum); } }
?> </div></div> <div id="main"><?php if ($GLOBALS["enable_notifications"] == true) { include "notification_system.inc.php"; } ?> <?php $p = isset($_GET["p"]) ? $_GET["p"] : "add"; switch ($p) { case "mod": case "add": $blog = new Blog(); $data = array("head" => "", "subh" => "", "body" => ""); $meta = array("allow_comments" => 1, "tags" => "", "published" => 1, "author" => $_SESSION["admin_user"]); $root = get_entities("zombie_roots", $_SESSION["id"], array("groups")); $root = explode(", ", $root["groups"]); $meta["groups"] = array("all"); if (isset($_GET["id"]) && isset($_GET["p"]) && $_GET["p"] == "mod") { $data = $blog->get($_GET["id"], array("head", "subh", "body")); $meta = $blog->get_sub("meta", $_GET["id"], array("allow_comments", "tags", "author", "groups", "published")); $groups = explode(", ", $meta["groups"]); } ?> <form method="post" id="article_form" action="engine.php?action=<?php echo $p == "add" ? "add_article" : "mod_article"; if (isset($_GET["id"])) { echo "&id=" . $_GET["id"]; } ?> " enctype="plain/text">
?> " style="color: white;"><b><?php echo $displayVideo->title; ?> </b></a> </div> <?php } // video listing starts here on $num = $vars['entity']->num_display ? $vars['entity']->num_display : 4; // lets get the user videos if (is_callable('elgg_get_entities')) { $options = array('type' => 'object', 'subtype' => 'izap_videos', 'owner_guid' => $vars['entity']->owner_guid, 'limit' => $num); $videos = elgg_get_entities($options); } else { $videos = get_entities('object', 'izap_videos', $vars['entity']->owner_guid, "", $num); } if ($videos) { foreach ($videos as $video) { if ($video->getGUID() != $id) { ?> <div class="izap_shares_widget_wrapper"> <div class="izap_shares_widget_icon"> <a href="javascript: izap_vid('<?php echo $vars['url']; ?> ',<?php echo $vars['entity']->getGUID(); ?> ,<?php echo $video->getGUID();
$('a.share_more_info').click(function () { $(this.parentNode).children("[class=share_desc]").slideToggle("fast"); return false; }); }); /* end document ready function */ </script> <?php //get the num of shares the user want to display $num = $vars['entity']->num_display; //if no number has been set, default to 4 if (!$num) { $num = 4; } //grab the users tasked items $shares = get_entities('object', 'tasks', 0, "", $num, 0, false); if ($shares) { foreach ($shares as $s) { //get the owner $owner = $s->getOwnerEntity(); //get the time $friendlytime = friendly_time($s->time_created); //get the user icon $icon = elgg_view("profile/icon", array('entity' => $owner, 'size' => 'tiny')); //get the task title $info = "<p class=\"shares_title\"><a href=\"{$s->getURL()}\">{$s->title}</a></p>"; //get the user details $info .= "<p class=\"shares_timestamp\"><small><a href=\"{$owner->getURL()}\">{$owner->name}</a> {$friendlytime}</small></p>"; //get the task description if ($s->description) { $info .= "<a href=\"javascript:void(0);\" class=\"share_more_info\">" . elgg_echo('tasks:more') . "</a><br /><div class=\"share_desc\"><p>{$s->description}</p></div>";
<?php /** * New wire post view for the activity stream */ $owner = $vars['entity']->guid; $url_to_wire = $vars['url'] . "pg/thewire/" . $vars['entity']->username; //grab the users latest from the wire $latest_wire = get_entities("object", "thewire", $owner, "", 1, 0, false, 0, null); if ($latest_wire) { foreach ($latest_wire as $lw) { $content = $lw->description; $time = "<span> (" . friendly_time($lw->time_created) . ")</span>"; } } if ($latest_wire) { echo "<div class=\"profile_status\">"; echo $content; if ($owner == $_SESSION['user']->guid) { echo " <a class=\"status_update\" href=\"{$url_to_wire}\">update</a>"; } echo $time; echo "</div>"; }
<?php if (is_plugin_enabled('tidypics')) { $limit = get_plugin_setting('tidypics_num_items', 'vazco_mainpage'); if (!isset($limit) || !$limit) { $limit = 10; } $images = get_entities('object', 'image', 0, 0, $limit, false, false); ?> <div class="index_box"> <h2><?php echo elgg_echo("custom:tidypics"); ?> </h2> <div class="search_listing"> <?php if (isset($images)) { $counter = -1; echo '<div class="frontpage_tidypics_box_narrow">'; foreach ($images as $image) { $counter += 1; if ($counter == 2) { $counter = 0; echo "</div>"; echo '<div class="frontpage_tidypics_box_narrow">'; } echo "<div class=\"tidypics_index\">"; echo elgg_view("vazco_mainpage/tidypics/icon", array('mimetype' => $image->mimetype, 'thumbnail' => $image->thumbnail, 'file_guid' => $image->guid, 'link' => $image->getUrl(), 'size' => 'small')); echo "</div>"; //tidypics_index
* iZAP izap_videos * * @package Elgg videotizer, by iZAP Web Solutions. * @license GNU Public License version 3 * @Contact iZAP Team "<*****@*****.**>" * @Founder Tarun Jangra "<*****@*****.**>" * @link http://www.izap.in/ * */ global $SESSION; global $CONFIG; $search = get_input('search', FALSE); $internalname = get_input('internalname'); $offset = (int) get_input('offset', 0); $limit = (int) 30; if (!$search) { $count = get_entities('object', 'izap_videos', 0, '', null, null, true); $entities = get_entities('object', 'izap_videos', 0, '', $limit, $offset); $baseUrl = $CONFIG->wwwroot . 'pg/videos/embed/' . $_SESSION['username'] . '/?internalname=' . $internalname; } else { $count = get_entities_from_metadata('tags', $search, 'object', 'izap_videos', 0, '', '', '', '', TRUE); $entities = get_entities_from_metadata('tags', $search, 'object', 'izap_videos', 0, $limit, $offset); $baseUrl = $CONFIG->wwwroot . 'pg/videos/embed/' . $_SESSION['username'] . '/?internalname=' . $internalname . '&search=' . $search; } $videos .= elgg_view('izap_videos/embedvideos', array('entities' => $entities, 'internalname' => $internalname, 'offset' => $offset, 'count' => $count, 'limit' => $limit, 'baseUrl' => $baseUrl)); ?> <div id="videoIcons"> <?php echo $videos; ?> </div>