diff options
author | friendica <info@friendica.com> | 2013-12-29 00:51:27 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-12-29 00:51:27 -0800 |
commit | f36be066af66e4e21913de3e8b4da0c7a05349b1 (patch) | |
tree | 1e6d0019d9ad71eef18f7d9780f15627aa0ccb3a /mod | |
parent | 22f614feba8502a5fd040cc34dab2baa3087da3c (diff) | |
download | volse-hubzilla-f36be066af66e4e21913de3e8b4da0c7a05349b1.tar.gz volse-hubzilla-f36be066af66e4e21913de3e8b4da0c7a05349b1.tar.bz2 volse-hubzilla-f36be066af66e4e21913de3e8b4da0c7a05349b1.zip |
display_thing: it ain't much, but it's implemented.
Diffstat (limited to 'mod')
-rw-r--r-- | mod/thing.php | 16 |
1 files changed, 13 insertions, 3 deletions
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'); |