aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Lib/Activity.php14
-rw-r--r--Zotlabs/Module/Thing.php10
-rw-r--r--view/tpl/show_thing.tpl12
3 files changed, 18 insertions, 18 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index fb92e6398..0275c87ac 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -207,23 +207,19 @@ class Activity {
$channel = channelx_by_n($r[0]['obj_channel']);
- $content = '[zrl=' . $channel['xchan_url'] . ']' . $channel['channel_name'] . '[/zrl] ';
- $content .= $r[0]['obj_verb'] . ' ';
- $content .= '[zrl=' . $r[0]['obj_url'] . ']' . $r[0]['obj_term'] . '[/zrl]';
-
$x = [
'type' => 'Page',
'id' => z_root() . '/thing/' . $r[0]['obj_obj'],
- 'name' => $r[0]['obj_term'],
- 'content' => bbcode($content),
+ 'name' => $channel['channel_name'] . ' ' . $r[0]['obj_verb'] . ' ' . $r[0]['obj_term'],
+ 'content' => $r[0]['obj_url'],
'url' => $r[0]['obj_url']
];
- if ($r[0]['obj_image']) {
+ if ($r[0]['obj_imgurl']) {
+ $x['content'] = '<a href="' . $r[0]['obj_url'] . '"><img src="' . $r[0]['obj_imgurl'] . '" alt="' . $r[0]['obj_term'] . '"></a>';
$x['icon'] = [
'type' => 'Image',
- 'url' => $r[0]['obj_image']
-
+ 'url' => $r[0]['obj_imgurl']
];
}
diff --git a/Zotlabs/Module/Thing.php b/Zotlabs/Module/Thing.php
index d51310b3a..8a1591442 100644
--- a/Zotlabs/Module/Thing.php
+++ b/Zotlabs/Module/Thing.php
@@ -5,6 +5,7 @@
namespace Zotlabs\Module;
+use App;
use Zotlabs\Lib\Libsync;
use Zotlabs\Lib\Activity;
use Zotlabs\Lib\ActivityStreams;
@@ -218,10 +219,11 @@ class Thing extends \Zotlabs\Web\Controller {
$ulink = '[zrl=' . $channel['xchan_url'] . ']' . $channel['channel_name'] . '[/zrl]';
$plink = '[zrl=' . $url . ']' . $name . '[/zrl]';
- $arr['body'] = sprintf($bodyverb, $ulink, $translated_verb, $plink);
+ $arr['title'] = $channel['channel_name'] . ' ' . $translated_verb . ' ' . $name;
+ $arr['body'] = $url;
if($local_photo)
- $arr['body'] .= "\n\n" . '[zmg]' . $local_photo . '[/zmg]';
+ $arr['body'] = '[zrl=' . $url . '][zmg=' . $local_photo . ']' . $name . '[/zmg][/zrl]';
$arr['verb'] = 'Create';
$arr['obj_type'] = 'Page';
@@ -275,12 +277,12 @@ class Thing extends \Zotlabs\Web\Controller {
dbesc(argv(1))
);
- if($r) {
+ if ($r) {
$channel = channelx_by_n($r[0]['obj_channel']);
profile_load($channel['channel_address']);
return replace_macros(get_markup_template('show_thing.tpl'), array(
- '$header' => $channel['xchan_name'] . ' ' . $r[0]['obj_verb'],
+ '$header' => $channel['xchan_name'] . ' ' . $r[0]['obj_verb'] . ' ' . $r[0]['obj_term'],
'$edit' => t('Edit'),
'$delete' => t('Delete'),
'$canedit' => ((local_channel() && local_channel() == $r[0]['obj_channel']) ? true : false),
diff --git a/view/tpl/show_thing.tpl b/view/tpl/show_thing.tpl
index d738c9fc9..7aee4e8b2 100644
--- a/view/tpl/show_thing.tpl
+++ b/view/tpl/show_thing.tpl
@@ -1,16 +1,18 @@
<h2>{{$header}}</h2>
{{if $thing}}
<div class="thing-show">
-{{if $thing.obj_imgurl}}<a href="{{$thing.obj_url}}" ><img src="{{$thing.obj_imgurl}}" width="175" height="175" alt="{{$thing.obj_term}}" /></a>{{/if}}
-<a href="{{$thing.obj_url}}" >{{$thing.obj_term}}</a>
+ {{if $thing.obj_imgurl}}
+ <a href="{{$thing.obj_url}}" ><img src="{{$thing.obj_imgurl}}" style="max-width: 100%;" alt="{{$thing.obj_term}}" /></a>
+ {{else}}
+ <a href="{{$thing.obj_url}}" >{{$thing.obj_url}}</a>
+ {{/if}}
</div>
{{if $canedit}}
<div class="thing-edit-links">
-<a href="thing/edit/{{$thing.obj_obj}}" title="{{$edit}}" class="btn btn-outline-secondary" ><i class="fa fa-pencil thing-edit-icon"></i></a>
-<a href="thing/drop/{{$thing.obj_obj}}" onclick="return confirmDelete();" title="{{$delete}}" class="btn btn-outline-secondary" ><i class="fa fa-trash-o drop-icons"></i></a>
+ <a href="thing/edit/{{$thing.obj_obj}}" title="{{$edit}}" class="btn btn-outline-secondary" ><i class="fa fa-pencil thing-edit-icon"></i></a>
+ <a href="thing/drop/{{$thing.obj_obj}}" onclick="return confirmDelete();" title="{{$delete}}" class="btn btn-outline-secondary" ><i class="fa fa-trash-o drop-icons"></i></a>
</div>
<div class="thing-edit-links-end"></div>
{{/if}}
-
{{/if}}