aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-29 00:51:27 -0800
committerfriendica <info@friendica.com>2013-12-29 00:51:27 -0800
commitf36be066af66e4e21913de3e8b4da0c7a05349b1 (patch)
tree1e6d0019d9ad71eef18f7d9780f15627aa0ccb3a
parent22f614feba8502a5fd040cc34dab2baa3087da3c (diff)
downloadvolse-hubzilla-f36be066af66e4e21913de3e8b4da0c7a05349b1.tar.gz
volse-hubzilla-f36be066af66e4e21913de3e8b4da0c7a05349b1.tar.bz2
volse-hubzilla-f36be066af66e4e21913de3e8b4da0c7a05349b1.zip
display_thing: it ain't much, but it's implemented.
-rw-r--r--include/taxonomy.php1
-rw-r--r--mod/thing.php16
-rw-r--r--version.inc2
-rw-r--r--view/tpl/show_thing.tpl8
4 files changed, 22 insertions, 5 deletions
diff --git a/include/taxonomy.php b/include/taxonomy.php
index 065f904fc..67263100f 100644
--- a/include/taxonomy.php
+++ b/include/taxonomy.php
@@ -281,7 +281,6 @@ function get_things($profile_hash,$uid) {
intval(TERM_OBJ_THING)
);
-
$things = $sorted_things = null;
$profile_hashes = array();
diff --git a/mod/thing.php b/mod/thing.php
index 955a6c173..3e2612c68 100644
--- a/mod/thing.php
+++ b/mod/thing.php
@@ -180,10 +180,20 @@ function thing_init(&$a) {
function thing_content(&$a) {
- /* placeholders */
-
if(argc() > 1) {
- return t('not yet implemented.');
+
+ $r = q("select * from obj left join term on obj_obj = term_hash where term_hash != '' and obj_type = %d and term_hash = '%s' limit 1",
+ intval(TERM_OBJ_THING),
+ dbesc(argv(1))
+ );
+
+ if($r) {
+ return replace_macros(get_markup_template('show_thing.tpl'), array( '$header' => t('Show Thing'), '$thing' => $r[0] ));
+ }
+ else {
+ notice( t('item not found.') . EOL);
+ return;
+ }
}
require_once('include/contact_selectors.php');
diff --git a/version.inc b/version.inc
index e4679339c..ad14d79b1 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-12-28.540
+2013-12-29.541
diff --git a/view/tpl/show_thing.tpl b/view/tpl/show_thing.tpl
new file mode 100644
index 000000000..d37c9bb1a
--- /dev/null
+++ b/view/tpl/show_thing.tpl
@@ -0,0 +1,8 @@
+<h2>{{$header}}</h2>
+{{if $thing}}
+<div class="thing-show">
+{{if $thing.imgurl}}<img src="{{$thing.imgurl}}" width="175" height="175" alt="{{$thing.term}}" />{{/if}}
+<a href="{{$thing.url}}" >{{$thing.term}}</a>
+</div>
+{{/if}}
+