本文整理汇总了PHP中get_entities_from_metadata函数的典型用法代码示例。如果您正苦于以下问题:PHP get_entities_from_metadata函数的具体用法?PHP get_entities_from_metadata怎么用?PHP get_entities_from_metadata使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_entities_from_metadata函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: testElggGetEntitiesFromMetadata
public function testElggGetEntitiesFromMetadata()
{
global $CONFIG, $METASTRINGS_CACHE, $METASTRINGS_DEADNAME_CACHE;
$METASTRINGS_CACHE = $METASTRINGS_DEADNAME_CACHE = array();
$this->object->title = 'Meta Unit Test';
$this->object->save();
$this->create_metastring('metaUnitTest');
$this->create_metastring('tested');
// create_metadata returns id of metadata on success
$this->assertTrue(create_metadata($this->object->guid, 'metaUnitTest', 'tested'));
// check value with improper case
$options = array('metadata_names' => 'metaUnitTest', 'metadata_values' => 'Tested', 'limit' => 10, 'metadata_case_sensitive' => TRUE);
$this->assertFalse(elgg_get_entities_from_metadata($options));
// compare forced case with ignored case
$options = array('metadata_names' => 'metaUnitTest', 'metadata_values' => 'tested', 'limit' => 10, 'metadata_case_sensitive' => TRUE);
$case_true = elgg_get_entities_from_metadata($options);
$this->assertIsA($case_true, 'array');
$options = array('metadata_names' => 'metaUnitTest', 'metadata_values' => 'Tested', 'limit' => 10, 'metadata_case_sensitive' => FALSE);
$case_false = elgg_get_entities_from_metadata($options);
$this->assertIsA($case_false, 'array');
$this->assertIdentical($case_true, $case_false);
// check deprecated get_entities_from_metadata() function
$deprecated = get_entities_from_metadata('metaUnitTest', 'tested', '', '', 0, 10, 0, '', 0, FALSE, TRUE);
$this->assertIdentical($deprecated, $case_true);
// check entity list
//$this->dump(list_entities_from_metadata('metaUnitTest', 'Tested', '', '', 0, 10, TRUE, TRUE, TRUE, FALSE));
// clean up
$this->delete_metastrings();
$this->object->delete();
}
开发者ID:redvabel,项目名称:Vabelgg,代码行数:30,代码来源:metadata.php
示例2: pages_draw_child
function pages_draw_child($childentity, $path)
{
$child = "\n\t\t{\n";
$child .= "\t\t\t\"text\": \"<a href=\\\"{$childentity->getURL()}\\\">" . addslashes($childentity->title) . "</a>\"\n";
$extras = "";
$haschild = get_entities_from_metadata('parent_guid', $childentity->guid, '', '', 0, 9999);
if ($haschild) {
if (in_array($childentity->guid, $path)) {
$extras .= "\t\t\t,\"expanded\": true";
$extras .= "\t\t\t,\"children\": [\n";
$childstring = "";
foreach ($haschild as $subchild) {
$childstringtemp = pages_draw_child($subchild, $path);
if (!empty($childstringtemp)) {
if (!empty($childstring)) {
$childstring .= ", ";
}
$childstring .= $childstringtemp;
}
}
$extras .= $childstring . "\n\t\t\t]\n";
} else {
$extras .= ",\t\t\t\"id\": \"{$childentity->getGUID()}\",\n\t\t\t\"hasChildren\": true\n";
}
}
$child .= $extras . "\t\t}";
return $child;
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:28,代码来源:sidebarthis.php
示例3: get_entities_from_metadata
$lc++;
} */
}
}
}
?>
</div> </div> </div> </div>
<div class="clearfloat"></div>
</div>
</td>
<td id="RightPane" valign="top" width="22%" style="padding:20px 20px 10px 20px;height:100%;">
<!-- RightPane -->
<?php
$profs = get_entities_from_metadata('issimpleuser', 'yes', 'user', '', '', 5);
?>
<div class="index_box2">
<h2><?php
echo "Latest Users";
?>
</h2>
<div class="contentWrapper">
<?php
echo "<b><font color=\"gray\">There are currently " . $user_count . " registered users</font></b>";
?>
</div>
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:new_index.php
示例4: elgg_echo
* http://radagast.biz
*
* Displays existing search definitions
*
*/
$edit_msg = elgg_echo('form:edit');
$delete_msg = elgg_echo('form:delete');
$delete_confirm_msg = elgg_echo('form:search_definition_delete_confirm');
$search_page = elgg_echo('form:search_page_link');
$img_template = '<img border="0" width="16" height="16" alt="%s" title="%s" src="' . $CONFIG->wwwroot . 'mod/form/images/%s" />';
$edit_img = sprintf($img_template, $edit_msg, $edit_msg, "16-em-pencil.png");
$delete_img = sprintf($img_template, $delete_msg, $delete_msg, "16-em-cross.png");
$sd_template = <<<END
<a href="{$CONFIG->wwwroot}mod/form/manage_search_definition.php?sid=%s">{$edit_img}</a> |
<a onclick="return confirm('{$delete_confirm_msg}')" href="{$CONFIG->wwwroot}action/form/manage_search_definition?form_action=delete&sid=%s">{$delete_img}</a> |
<a href="{$CONFIG->wwwroot}mod/form/search.php?sid=%s">{$search_page}</a> %s (%s)
<br />
END;
$body = '<div class="contentWrapper">';
$form_id = get_input('form_id', 0);
$sds = get_entities_from_metadata('form_id', $form_id, 'object', 'form:search_definition');
if ($sds) {
foreach ($sds as $sd) {
$ident = $sd->getGUID();
$body .= sprintf($sd_template, $ident, $ident, $ident, $sd->title, $sd->internalname);
}
} else {
$body .= '<p>' . elgg_echo('form:no_search_definitions') . '</p>';
}
$body .= '</div>';
print $body;
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:list_search_definitions.php
示例5: get_input
<?php
$page = get_input('page');
if ($page = get_entity($page)) {
if ($page->canEdit()) {
// Bring all child elements forward
$parent = $page->parent_guid;
if ($children = get_entities_from_metadata('parent_guid', $page->getGUID())) {
foreach ($children as $child) {
$child->parent_guid = $parent;
}
}
if ($page->delete()) {
system_message(elgg_echo('pages:delete:success'));
if ($parent) {
if ($parent = get_entity($parent)) {
forward($parent->getURL());
exit;
}
}
forward('pg/pages/owned/' . $_SESSION['user']->username);
exit;
}
}
}
register_error(elgg_echo('pages:delete:failure'));
forward($_SERVER['HTTP_REFERER']);
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:27,代码来源:delete.php
示例6: form_get_profile_config
function form_get_profile_config($category, $type = 'group')
{
if ($category) {
$profile_config = get_entities_from_metadata('category', $category, 'object', 'form:profile_config');
if ($profile_config) {
return $profile_config[0];
} else {
$profile_config = new ElggObject();
$profile_config->subtype = 'form:profile_config';
$profile_config->owner_guid = 0;
$profile_config->access_id = ACCESS_PUBLIC;
$profile_config->category = $category;
if ($profile_config->save()) {
return $profile_config;
}
}
}
return null;
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:19,代码来源:profile.php
示例7: elgg_view_title
// admin_gatekeeper();
// set the title
$title = "CREATE AND DISPLAY CSV";
// start building the main column of the page
$area2 = elgg_view_title($title);
// Add the form to this section
global $CONFIG;
/*
$area2 .="<div class=\"filerepo_download\"><p><a href=\"";
$area2 .=$vars['url'];
$area2 .=$ourFileName;
$area2 .="\">";
$area2 .=elgg_echo("file:download");
$area2 .="</a></p></div>";
*/
$members = get_entities_from_metadata('issimpleuser', 'no', 'user', '', '', 10000);
set_time_limit(360000);
$stats_single = "GUID|SESAME|CREATOR|AFFILIATION|TITLE|RESOURCE LANGUAGE|METADATA LANGUAGE|DATE|CITATION|EDUCATIONAL DESCRIPTION|TECHNICAL DESCRIPTION|EDUCATIONAL CONTEXT|EDUCATIONAL INSTRUCTIONS|EDUCATIONAL OBJECTIVES|ASSESSMENT METHODS|EDUCATIONAL PREREQUISITES\r\n";
$stats_ident = "GUID|COUNT|Description1|Description2|Description3|Description4|Description5|Description6|Description7|Description8|Description9|Description10 \r\n";
$stats_rights = "GUID|IPR1|IPR2 \r\n";
$stats_qual = "GUID|COUNT|VALUE1|VALUE2|VALUE3 \r\n";
$stats_auth = "GUID|COUNT|NAME1|AFFIL1|FOAF1|NAME2|AFFIL2|FOAF2|NAME3|AFFIL3|FOAF3|NAME4|AFFIL4|FOAF4|NAME5|AFFIL5|FOAF5 \r\n ";
$stats_media = "GUID|COUNT|VALUE1|VALUE2|VALUE3|VALUE4|VALUE5|VALUE6|VALUE7|VALUE8|VALUE9|VALUE10 \r\n";
$stats_outc = "GUID|COUNT|VALUE1|VALUE2|VALUE3|VALUE4|VALUE5|VALUE6|VALUE7|VALUE8|VALUE9|VALUE10 \r\n";
$stats_res = "GUID|COUNT|VALUE1|VALUE2|VALUE3|VALUE4|VALUE5|VALUE6|VALUE7|VALUE8|VALUE9|VALUE10 \r\n";
$stats_edulev = "GUID|COUNT|VALUE1|VALUE2|VALUE3|VALUE4|VALUE5|VALUE6|VALUE7|VALUE8|VALUE9|VALUE10 \r\n";
$stats_compan = "GUID|COUNT|VALUE1|VALUE2|VALUE3|VALUE4|VALUE5|VALUE6|VALUE7|VALUE8|VALUE9|VALUE10 \r\n";
$stats_key = "GUID|COUNT|VALUE1|ONTOLOGY1|VALUE2|ONTOLOGY2|VALUE3|ONTOLOGY3|VALUE4|ONTOLOGY4|VALUE5|ONTOLOGY5|VALUE6|ONTOLOGY6|VALUE7|ONTOLOGY7|VALUE8|ONTOLOGY8|VALUE9|ONTOLOGY9|VALUE10|ONTOLOGY10|VALUE11|ONTOLOGY11|VALUE12|ONTOLOGY12 \r\n";
$stats_disc = "GUID|COUNT|VALUE1|ONTOLOGY1|VALUE2|ONTOLOGY2|VALUE3|ONTOLOGY3|VALUE4|ONTOLOGY4|VALUE5|ONTOLOGY5|VALUE6|ONTOLOGY6|VALUE7|ONTOLOGY7|VALUE8|ONTOLOGY8|VALUE9|ONTOLOGY9|VALUE10|ONTOLOGY10 \r\n";
$stats_spec = "GUID|COUNT|VALUE1|ONTOLOGY1|VALUE2|ONTOLOGY2|VALUE3|ONTOLOGY3|VALUE4|ONTOLOGY4|VALUE5|ONTOLOGY5|VALUE6|ONTOLOGY6|VALUE7|ONTOLOGY7|VALUE8|ONTOLOGY8|VALUE9|ONTOLOGY9|VALUE10|ONTOLOGY10 \r\n";
$stats_par = "GUID|COUNT|PARENT1|PARENT2|PARENT3|PARENT4|PARENT5|PARENT6|PARENT7|PARENT8|PARENT9|PARENT10 \r\n";
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:stats_rep.php
示例8: action_gatekeeper
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";
$field->save();
$field->metadata_name = $metadata_name;
$field->metadata_type = $metadata_type;
if ($type == "profile") {
$field->show_on_register = "no";
$field->mandatory = "no";
$field->user_editable = "yes";
}
$field->order = $max_fields;
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:importFromDefault.php
示例9: action_gatekeeper
* @package profile_manager
* @author ColdTrick IT Solutions
* @copyright Coldtrick IT Solutions 2009
* @link http://www.coldtrick.com/
*/
action_gatekeeper();
admin_gatekeeper();
$guid = get_input("guid");
if (!empty($guid)) {
$entity = get_entity($guid);
if ($entity->getSubtype() == CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE) {
if ($entity->delete()) {
$meta_name = "custom_profile_type";
// remove corresponding profile type metadata from userobjects
$entities_count = get_entities_from_metadata($meta_name, $guid, "user", "", null, null, null, null, null, true);
$entities = get_entities_from_metadata($meta_name, $guid, "user", "", null, $entities_count);
foreach ($entities as $entity) {
// unset currently deleted profile type for user
unset($entity->{$meta_name});
}
system_message(elgg_echo("profile_manager:action:profile_types:delete:succes"));
} else {
register_error(elgg_echo("profile_manager:action:profile_types:delete:error:delete"));
}
} else {
register_error(elgg_echo("profile_manager:action:profile_types:delete:error:type"));
}
} else {
register_error(elgg_echo("profile_manager:action:profile_types:delete:error:guid"));
}
forward($_SERVER["HTTP_REFERER"]);
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:delete.php
示例10: array
} else {
if ($form_view == 'mine') {
$user_guid = $user->getGUID();
} else {
if ($form_view == 'friends') {
// handles up to 5000 friends
$friends = $user->getFriends("", 5000);
$user_guid = array();
if ($friends) {
foreach ($friends as $friend) {
$user_guid[] = $friend->getGUID();
}
}
} else {
if ($form_view == 'all') {
$user_guid = 0;
}
}
}
if (!is_array($user_guid) || count($user_guid) > 0) {
$count = get_entities_from_metadata('form_id', $form_id, 'object', 'form_data', $user_guid, $limit, $offset, "", 0, true);
$entities = get_entities_from_metadata('form_id', $form_id, 'object', 'form_data', $user_guid, $limit, $offset, "", 0, false);
}
}
if ($entities) {
echo '<div class="form_listing">';
echo form_view_entity_list($entities, $form, $count, $offset, $limit, false, true);
echo '</div>';
} else {
echo elgg_echo('form:no_search_results');
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:my_forms.php
示例11: siteaccess_users
function siteaccess_users($meta_name, $meta_value, $limit = 10, $offset = 0)
{
if (isset($meta_name) && isset($meta_value)) {
$entities = get_entities_from_metadata($meta_name, $meta_value, 'user', '', 0, $limit, $offset, '', 0);
}
return $entities;
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:7,代码来源:start.php
示例12: list_entities_from_metadata
/**
* Return a list of entities suitable for display based on the given search criteria.
*
* @see elgg_view_entity_list
*
* @param mixed $meta_name Metadata name to search on
* @param mixed $meta_value The value to match, optionally
* @param string $entity_type The type of entity to look for, eg 'site' or 'object'
* @param string $entity_subtype The subtype of the entity
* @param int $limit Number of entities to display per page
* @param true|false $fullview Whether or not to display the full view (default: true)
* @param true|false $viewtypetoggle Whether or not to allow users to toggle to the gallery view. Default: true
* @param true|false $pagination Display pagination? Default: true
*
* @return string A list of entities suitable for display
*/
function list_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $fullview = true, $viewtypetoggle = true, $pagination = true)
{
$offset = (int) get_input('offset');
$limit = (int) $limit;
$count = get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", 0, true);
$entities = get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, "", 0, false);
return elgg_view_entity_list($entities, $count, $offset, $limit, $fullview, $viewtypetoggle, $pagination);
}
开发者ID:eokyere,项目名称:elgg,代码行数:24,代码来源:metadata.php
示例13: action_gatekeeper
*/
global $CONFIG;
action_gatekeeper();
admin_gatekeeper();
$n = 0;
$skipped = 0;
$max_fields = get_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE, $CONFIG->site_guid, null, null, null, true) + 1;
while ($translation = get_plugin_setting("admin_defined_profile_{$n}", 'profile')) {
$metadata_name = "admin_defined_profile_{$n}";
$metadata_label = $translation;
$type = get_plugin_setting("admin_defined_profile_type_{$n}", 'profile');
if (empty($type)) {
$type = 'text';
}
$metadata_type = $type;
$count = get_entities_from_metadata("metadata_name", $metadata_name, "object", CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE, $CONFIG->site_guid, "", null, null, null, true);
if ($count == 0) {
$field = new ProfileManagerCustomProfileField();
$field->save();
$field->metadata_name = $metadata_name;
$field->metadata_label = $metadata_label;
$field->metadata_type = $metadata_type;
$field->show_on_register = "no";
$field->mandatory = "no";
$field->order = $max_fields;
$field->save();
$max_fields++;
} else {
$skipped++;
}
$n++;
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:importFromCustom.php
示例14: header
* Beechat
*
* @package beechat
* @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
* @author Beechannels <[email protected]>
* @copyright Beechannels 2007-2010
* @link http://beechannels.com/
*/
header('Content-type: application/json');
gatekeeper();
error_log("beechat:get_statuses");
$usernames = get_input('beechat_roster_items_usernames');
if (!empty($usernames)) {
$iconSize = 'small';
$rosterItemsUsernames = explode(',', $usernames);
$userFriendsEntities = $_SESSION['user']->getFriends('', 1000000000, 0);
$res = array();
foreach ($rosterItemsUsernames as $value) {
foreach ($userFriendsEntities as $friend) {
if (strtolower($friend->username) == strtolower($value)) {
$status = get_entities_from_metadata("state", "current", "object", "status", $friend->get('guid'));
$res[$value] = $status != false ? $status[0]->description : '';
break;
}
}
}
echo json_encode($res);
} else {
echo json_encode(null);
}
exit;
开发者ID:beechannels,项目名称:beechat,代码行数:31,代码来源:get_statuses.php
示例15: get_entities
/**
* Profile Manager
*
* Admin stats view
*
* @package profile_manager
* @author ColdTrick IT Solutions
* @copyright Coldtrick IT Solutions 2009
* @link http://www.coldtrick.com/
*/
$total_users = get_entities("user", "", null, null, null, null, true);
$profile_types_count = get_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE, null, null, null, null, true);
$profile_entities = get_entities("object", CUSTOM_PROFILE_FIELDS_PROFILE_TYPE_SUBTYPE, null, null, $profile_types_count);
$profile_listing = "";
foreach ($profile_entities as $profile_type) {
$count = get_entities_from_metadata("custom_profile_type", $profile_type->guid, "user", "", null, null, null, null, null, true);
$profile_listing .= "<b>" . $profile_type->metadata_name . "</b>: " . $count . "<br />";
}
?>
<div class='contentWrapper'>
<h3 class='settings'><?php
echo elgg_echo("profile_manager:admin_stats:title");
?>
</h3>
<?php
echo elgg_echo("profile_manager:admin_stats:total");
?>
: <?php
echo $total_users;
?>
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:admin_stats.php
示例16: westorElggMan_get_entities_from_metadata
function westorElggMan_get_entities_from_metadata($meta_name, $meta_value = "", $entity_type = "", $entity_subtype = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "", $site_guid = 0, $count = FALSE, $case_sensitive = TRUE)
{
if (function_exists("elgg_get_entities_from_metadata")) {
$options = array();
$options['metadata_names'] = $meta_name;
if ($meta_value) {
$options['metadata_values'] = $meta_value;
}
if ($entity_type) {
$options['types'] = $entity_type;
}
if ($entity_subtype) {
$options['subtypes'] = $entity_subtype;
}
if ($owner_guid) {
if (is_array($owner_guid)) {
$options['owner_guids'] = $owner_guid;
} else {
$options['owner_guid'] = $owner_guid;
}
}
if ($limit) {
$options['limit'] = $limit;
}
if ($offset) {
$options['offset'] = $offset;
}
if ($order_by) {
$options['order_by'];
}
if ($site_guid) {
$options['site_guid'];
}
if ($count) {
$options['count'] = $count;
}
// need to be able to pass false
$options['metadata_case_sensitive'] = $case_sensitive;
return elgg_get_entities_from_metadata($options);
return elgg_get_entities_from_metadata(array('metadata_name' => $meta_name, 'metadata_value' => $meta_value, 'types' => $entity_type, 'subtypes' => $entity_subtype, 'limit' => $limit, 'owner_guid' => $owner_guid));
} else {
return get_entities_from_metadata($meta_name, $meta_value, $entity_type, $entity_subtype, $owner_guid, $limit, $offset, $order_by, $site_guid, $count, $case_sensitive);
}
}
开发者ID:rijojoy,项目名称:MyIceBerg,代码行数:44,代码来源:start.php
示例17: get_input
* iZAP izap_videos
*
* @package Elgg videotizer, by iZAP Web Solutions.
* @license GNU Public License version 3
* @Contact iZAP Team "<[email protected]>"
* @Founder Tarun Jangra "<[email protected]>"
* @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>
开发者ID:rimpy,项目名称:izap_videos,代码行数:31,代码来源:embed.php
示例18: switch
switch ($filter) {
case "newest":
$objects = list_entities('group', "dgroup", 0, $limit, false);
break;
case "pop":
$objects = list_entities_by_relationship_count('member', 'false', 'group', 'dgroup');
break;
case "active":
$objects = list_entities_from_annotations("object", "dgroupforumtopic", "dgroup_topic_post", "", 40, 0, 0, false, true);
break;
case 'default':
$objects = list_entities('group', "dgroup", 0, $limit, false);
break;
}
}
//get a dgroup count
$dgroup_count = get_entities("group", "dgroup", 0, "", 10, 0, true, 0, null);
//DISABLE find dgroups Sx: Search by tag needs to be reconstituted or removed from the left side of the people and project lists
//$area1 = elgg_view("dgroups/find");
//menu options
$area1 .= elgg_view("dgroups/side_menu");
//featured dgroups
$featured_dgroups = get_entities_from_metadata("featured_group", "yes", "group", "dgroup", 0, 10, false, false, false);
$area1 .= elgg_view("dgroups/featured", array("featured" => $featured_dgroups));
set_context($context);
$title = sprintf(elgg_echo("dgroups:all"), page_owner_entity()->name);
$area2 = elgg_view_title($title);
$area2 .= elgg_view('dgroups/contentwrapper', array('body' => elgg_view("dgroups/dgroup_sort_menu", array("count" => $dgroup_count, "filter" => $filter)) . $objects));
$body = elgg_view_layout('sidebar_boxes', $area1, $area2);
// Finally draw the page
page_draw($title, $body);
开发者ID:eokyere,项目名称:elgg,代码行数:31,代码来源:all.php
示例19: foreach
<?php
// Upgrade to solve login issue
if ($users = get_entities_from_metadata('validated_email', '', 'user', '', 0, 9999)) {
foreach ($users as $user) {
set_user_validation_status($user->guid, true, 'email');
}
}
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:8,代码来源:2008101303.php
示例20: elgg_echo
$simple_search_criteria .= $title . "<br />";
if ($search_type == "meta_data_between_search_criteria") {
$simple_search_criteria .= elgg_echo("profile_manager:members:searchform:date:from") . " ";
$simple_search_criteria .= elgg_view("input/" . $metadata_type, array("internalname" => $search_type . "[" . $metadata_name . "][FROM]"));
$simple_search_criteria .= " " . elgg_echo("profile_manager:members:searchform:date:to") . " ";
$simple_search_criteria .= elgg_view("input/" . $metadata_type, array("internalname" => $search_type . "[" . $metadata_name . "][TO]"));
} else {
$simple_search_criteria .= elgg_view("input/" . $metadata_type, array("internalname" => $search_type . "[" . $metadata_name . "]", "options" => $options));
}
$simple_search_criteria .= "</td></tr>";
}
}
$advanced_search_criteria = "";
$advanced_search_fields_count = get_entities_from_metadata("advanced_search", "yes", "object", CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE, $CONFIG->site_guid, "", null, null, null, true);
if ($advanced_search_fields_count > 0) {
$advanced_search_fields = get_entities_from_metadata("advanced_search", "yes", "object", CUSTOM_PROFILE_FIELDS_PROFILE_SUBTYPE, $CONFIG->site_guid, $advanced_search_fields_count);
foreach ($advanced_search_fields as $field) {
if ($field->admin_only != "yes" || isadminloggedin()) {
$ordered_advanced_search_fields[$field->order] = $field;
}
}
ksort($ordered_advanced_search_fields);
foreach ($ordered_advanced_search_fields as $field) {
$metadata_name = $field->metadata_name;
$metadata_type = $field->metadata_type;
if ($metadata_type == "longtext" || $metadata_type == "plaintext") {
$metadata_type = "text";
}
// make title
$title = $field->getTitle();
// get options
开发者ID:portokallidis,项目名称:Metamorphosis-Meducator,代码行数:31,代码来源:form.php
注:本文中的get_entities_from_metadata函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论