display_thing: it ain't much, but it's implemented.
This commit is contained in:
parent
22f614feba
commit
f36be066af
@ -281,7 +281,6 @@ function get_things($profile_hash,$uid) {
|
|||||||
intval(TERM_OBJ_THING)
|
intval(TERM_OBJ_THING)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
$things = $sorted_things = null;
|
$things = $sorted_things = null;
|
||||||
|
|
||||||
$profile_hashes = array();
|
$profile_hashes = array();
|
||||||
|
@ -180,10 +180,20 @@ function thing_init(&$a) {
|
|||||||
|
|
||||||
function thing_content(&$a) {
|
function thing_content(&$a) {
|
||||||
|
|
||||||
/* placeholders */
|
|
||||||
|
|
||||||
if(argc() > 1) {
|
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');
|
require_once('include/contact_selectors.php');
|
||||||
|
@ -1 +1 @@
|
|||||||
2013-12-28.540
|
2013-12-29.541
|
||||||
|
8
view/tpl/show_thing.tpl
Normal file
8
view/tpl/show_thing.tpl
Normal file
@ -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}}
|
||||||
|
|
Reference in New Issue
Block a user