$options = array_merge($defaults, $options);
- $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid');
+ $singulars = array('type', 'subtype', 'owner_guid', 'container_guid', 'site_guid', 'tag_name');
$options = elgg_normalise_plural_options_array($options, $singulars);
-
$registered_tags = elgg_get_registered_tag_metadata_names();
if (!is_array($options['tag_names'])) {
function display_tagcloud($threshold = 1, $limit = 10, $metadata_name = "", $entity_type = "object",
$entity_subtype = "", $owner_guid = "", $site_guid = -1, $start_ts = "", $end_ts = "") {
- elgg_deprecated_notice('display_cloud() was deprecated by elgg_view_tagcloud()!', 1.8);
+ elgg_deprecated_notice('display_tagcloud() was deprecated by elgg_view_tagcloud()!', 1.8);
$tags = get_tags($threshold, $limit, $metadata_name, $entity_type,
$entity_subtype, $owner_guid, $site_guid, $start_ts, $end_ts);
* @return void
*/
function elgg_tagcloud_page_handler($page) {
- global $CONFIG;
-
switch ($page[0]) {
default:
$title = elgg_view_title(elgg_echo('tags:site_cloud'));
- $tags = display_tagcloud(0, 100, 'tags');
+ $options = array(
+ 'threshold' => 0,
+ 'limit' => 100,
+ 'tag_name' => 'tags',
+ );
+ $tags = elgg_view_tagcloud($options);
$content = $title . $tags;
$body = elgg_view_layout('one_column_with_sidebar', array('content' => $content));
// friends page lists all tags; mine lists owner's
$owner_guid = ($vars['page'] == 'friends') ? '' : $page_owner->getGUID();
- echo display_tagcloud(0, 50, 'tags', 'object', 'blog', $owner_guid);
+ $options = array(
+ 'type' => 'object',
+ 'subtype' => 'blog',
+ 'owner_guid' => $owner_guid,
+ 'threshold' => 0,
+ 'limit' => 50,
+ 'tag_name' => 'tags',
+ );
+ echo elgg_view_tagcloud($options);
} else {
- echo display_tagcloud(0, 50, 'tags', 'object', 'blog');
+ $options = array(
+ 'type' => 'object',
+ 'subtype' => 'blog',
+ 'threshold' => 0,
+ 'limit' => 50,
+ 'tag_name' => 'tags',
+ );
+ echo elgg_view_tagcloud($options);
}
}
elgg_register_tag_metadata_name('simpletype');
- $types = get_tags(0,10,'simpletype','object','file',$owner_guid);
+ $options = array(
+ 'type' => 'object',
+ 'subtype' => 'file',
+ 'owner_guid' => $owner_guid,
+ 'threshold' => 0,
+ 'limit' => 10,
+ 'tag_names' => array('simpletype')
+ );
+ $types = elgg_get_tags($options);
return elgg_view('file/typecloud',array('owner_guid' => $owner_guid, 'friend_guid' => $friendofguid, 'types' => $types));
}
require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
$title = elgg_view_title(elgg_echo('tagcloud:site:title'));
-$tags = display_tagcloud(0, 100, 'tags');
+
+$options = array(
+ 'threshold' => 0,
+ 'limit' => 100,
+ 'tag_name' => 'tags',
+);
+$tags = elgg_view_tagcloud($options);
$params = array(
'content' => $title . $tags,