hi! :-)
i would like to group the object entity 'file' on categories
the files should grouped by categories within a group 'without categories'
is there a view that does this
or is there a view i can modify
or has somebody a codesnippet?
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov
ihayredinov - 0 likes
- manfred salomon@lisha
manfred salomon - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- manfred salomon@lisha
manfred salomon - 0 likes
- DhrupDeScoop@Dhrup2000
DhrupDeScoop - 0 likes
- manfred salomon@lisha
manfred salomon - 0 likes
- manfred salomon@lisha
manfred salomon - 0 likes
You must log in to post replies.hypeCategories is soon to be released :)
. smile .
earlier post re: fetching entities w/out instantiated metadata, i think this is same/similar as your reqmnts check it out => http://community.elgg.org/pg/forum/topic/825850/get-entities-from-lack-of-metadata/ and the code logic is mostly pretty straight forward, simple, dead-easy ;)
thank you friend :-)
yes^ the source from matt ist helpfull to see how to build the sql-query and get the entities
but the categories are in a plain string and you must reformat them and . . . . . and i thougt i could get the source easier . . . ;-))
is there nobody out there who grouped entities to categories?
must i invent the code new ?
no^ ;-))
i wait for ismayil . . . :-))
// fetch all system categories,
global $CONFIG;
$site=$CONFIG->site;
$site->categories=$categories;
$categories=$site->categories;
-- will give your array of all system categories;
then you can build your query based on that.
sounds easy :-)
i think first i take a breakfast (it's 7 am in cologne)
and then . . . http://www.youtube.com/watch?v=FlpOvaKawvc
o.k. the folowing code i use for selecting files that have categories ('is_recources' is a custom field for additional filter and 'file_sort' is a custom field for sorting)
but i did not figure out how to select files that have not a category
so i decided to make a workaround: i select all files where is_recources == true and filter the categories in a foreach function
thx dhrup-man :-)
$params = array(
'type' => 'object',
'subtype' => 'file',
'metadata_case_sensitive' => FALSE,
"metadata_name_value_pairs" => array(
array(
'name' => 'universal_categories',
'value' => '',
'operand' => '<>'
),
array(
'name' => "is_recources",
'value' => elgg_echo('frontpage_campaign:is_recources_label'),
'operand' => '='
),
),
'metadata_name_value_pairs_operator' => 'AND',
'order_by_metadata' => array('name' => 'file_sort', 'direction' => ASC)
);
$files_with_category = elgg_get_entities_from_metadata($params);