more "thing" work
This commit is contained in:
parent
ec38f1d5db
commit
2979a2ee5a
@ -91,19 +91,33 @@ function advanced_profile(&$a) {
|
||||
|
||||
if($r) {
|
||||
$things = array();
|
||||
|
||||
// Use the system obj_verbs array as a sort key, since we don't really
|
||||
// want an alphabetic sort. To change the order, use a plugin to
|
||||
// alter the obj_verbs() array or alter it in code. Unknown verbs come
|
||||
// after the known ones - in no particular order.
|
||||
|
||||
$v = obj_verbs();
|
||||
foreach($v as $k => $foo)
|
||||
$things[$k] = null;
|
||||
foreach($r as $rr) {
|
||||
if(! $things[$rr['obj_verb']])
|
||||
$things[$rr['obj_verb']] = array();
|
||||
$things[$rr['obj_verb']][] = array('term' => $rr['term'],'url' => $rr['url'],'img' => $rr['imgurl']);
|
||||
}
|
||||
$sorted_things = array();
|
||||
if($things)
|
||||
foreach($things as $k => $v)
|
||||
if(is_array($things[$k]))
|
||||
$sorted_things[$k] = $v;
|
||||
}
|
||||
|
||||
logger('mod_profile: things: ' . print_r($things,true), LOGGER_DATA);
|
||||
logger('mod_profile: things: ' . print_r($sorted_things,true), LOGGER_DATA);
|
||||
|
||||
return replace_macros($tpl, array(
|
||||
'$title' => t('Profile'),
|
||||
'$profile' => $profile,
|
||||
'$things' => $things
|
||||
'$things' => $sorted_things
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
2013-07-03.363
|
||||
2013-07-04.364
|
||||
|
@ -3881,3 +3881,13 @@ width: 200px;
|
||||
.tag10 {
|
||||
font-size : 2.8em !important;
|
||||
}
|
||||
|
||||
.profile-thing-list {
|
||||
list-style-type: none;
|
||||
}
|
||||
/*
|
||||
.profile-thing-list li {
|
||||
float: left;
|
||||
margin-right: 25px;
|
||||
}
|
||||
*/
|
@ -180,6 +180,7 @@
|
||||
</li>
|
||||
{{/foreach}}
|
||||
</ul>
|
||||
<div class="clear"></div>
|
||||
{{/foreach}}
|
||||
{{/if}}
|
||||
|
||||
|
Reference in New Issue
Block a user