diff options
author | redmatrix <git@macgirvin.com> | 2016-06-17 21:44:08 -0700 |
---|---|---|
committer | redmatrix <git@macgirvin.com> | 2016-06-17 21:44:08 -0700 |
commit | 2e7606f5697cc5e362cb2b1af134316766985689 (patch) | |
tree | d057f4f64eea928788e7295d2af679b4fd65874d | |
parent | c81f6b9f6f1ab7f7dc61e5343e52d4ccedbff5a1 (diff) | |
download | volse-hubzilla-2e7606f5697cc5e362cb2b1af134316766985689.tar.gz volse-hubzilla-2e7606f5697cc5e362cb2b1af134316766985689.tar.bz2 volse-hubzilla-2e7606f5697cc5e362cb2b1af134316766985689.zip |
the text link to a thing will take you to the local thing page, both as a link for editing and as a destination in case there is no thing photo. If there's a photo, the photo link will take you to the thing URL.
-rw-r--r-- | include/channel.php | 1 | ||||
-rw-r--r-- | include/taxonomy.php | 2 | ||||
-rwxr-xr-x | view/tpl/profile_advanced.tpl | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/include/channel.php b/include/channel.php index 92c274105..90dfb2bf6 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1224,6 +1224,7 @@ function advanced_profile(&$a) { $things = get_things(App::$profile['profile_guid'],App::$profile['profile_uid']); + // logger('mod_profile: things: ' . print_r($things,true), LOGGER_DATA); return replace_macros($tpl, array( diff --git a/include/taxonomy.php b/include/taxonomy.php index 177215fe8..067bd3246 100644 --- a/include/taxonomy.php +++ b/include/taxonomy.php @@ -400,7 +400,7 @@ function get_things($profile_hash,$uid) { if(! $things[$rr['obj_verb']]) $things[$rr['obj_verb']] = array(); - $things[$rr['obj_verb']][] = array('term' => $rr['obj_term'],'url' => $rr['obj_url'],'img' => $rr['obj_imgurl'], 'profile' => $rr['profile_name'],'term_hash' => $rr['obj_obj'], 'likes' => $l,'like_count' => count($l),'like_label' => tt('Like','Likes',count($l),'noun')); + $things[$rr['obj_verb']][] = array('term' => $rr['obj_term'],'url' => $rr['obj_url'],'img' => $rr['obj_imgurl'], 'editurl' => z_root() . '/thing/' . $rr['obj_obj'], 'profile' => $rr['profile_name'],'term_hash' => $rr['obj_obj'], 'likes' => $l,'like_count' => count($l),'like_label' => tt('Like','Likes',count($l),'noun')); } $sorted_things = array(); if($things) { diff --git a/view/tpl/profile_advanced.tpl b/view/tpl/profile_advanced.tpl index a4c98b1d0..d0c9621f9 100755 --- a/view/tpl/profile_advanced.tpl +++ b/view/tpl/profile_advanced.tpl @@ -282,7 +282,7 @@ <ul class="profile-thing-list"> {{foreach $items as $item}} <li>{{if $item.img}}<a href="{{$item.url}}" ><img src="{{$item.img}}" class="profile-thing-img" width="100" height="100" alt="{{$item.term}}" /></a>{{/if}} - <a href="{{$item.url}}" >{{$item.term}}</a> + <a href="{{$item.editurl}}" >{{$item.term}}</a> {{if $profile.canlike}}<br /> <button type="button" class="btn btn-default btn-sm" onclick="doprofilelike('thing/' + '{{$item.term_hash}}','like'); return false;" title="{{$likethis}}" > <i class="fa fa-thumbs-o-up" title="{{$likethis}}"></i> |