Merge branch '1.12RC' of https://github.com/redmatrix/hubzilla into 1.12RC
This commit is contained in:
commit
6bb5ea7a81
@ -39,9 +39,9 @@ class Embedphotos extends \Zotlabs\Web\Controller {
|
||||
json_return_and_die(array('errormsg' => 'Error retrieving link ' . $href, 'status' => false));
|
||||
}
|
||||
$resource_id = array_pop(explode("/", $href));
|
||||
$r = q("SELECT obj from item where resource_type = 'photo' and resource_id = '%s' limit 1",
|
||||
dbesc($resource_id)
|
||||
);
|
||||
$r = q("SELECT obj,body from item where resource_type = 'photo' and resource_id = '%s' limit 1",
|
||||
dbesc($resource_id)
|
||||
);
|
||||
if(!$r) {
|
||||
json_return_and_die(array('errormsg' => 'Error retrieving resource ' . $resource_id, 'status' => false));
|
||||
}
|
||||
@ -50,7 +50,9 @@ class Embedphotos extends \Zotlabs\Web\Controller {
|
||||
$photolink = $obj['body'];
|
||||
} elseif (x($obj,'bbcode')) {
|
||||
$photolink = $obj['bbcode'];
|
||||
} else {
|
||||
} elseif ($r[0]['body'] !== '') {
|
||||
$photolink = $r[0]['body'];
|
||||
} else {
|
||||
json_return_and_die(array('errormsg' => 'Error retrieving resource ' . $resource_id, 'status' => false));
|
||||
}
|
||||
json_return_and_die(array('status' => true, 'photolink' => $photolink));
|
||||
@ -83,7 +85,7 @@ function embedphotos_widget_album($args) {
|
||||
return '';
|
||||
|
||||
if($args['album'])
|
||||
$album = $args['album'];
|
||||
$album = (($args['album'] === '/') ? '' : $args['album'] );
|
||||
if($args['title'])
|
||||
$title = $args['title'];
|
||||
|
||||
|
@ -1,32 +1,38 @@
|
||||
<div id="profile-content-wrapper" class="generic-content-wrapper">
|
||||
<div class="section-title-wrapper">
|
||||
<div class="pull-right dropdown">
|
||||
{{if $editmenu.multi}}
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#" ><i class="fa fa-pencil"></i> {{$editmenu.edit.3}}</a>
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
{{foreach $editmenu.menu.entries as $e}}
|
||||
<li>
|
||||
<a href="profiles/{{$e.id}}"><img class="dropdown-menu-img-xs" src='{{$e.photo}}'>{{$e.profile_name}}<div class='clear'></div></a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
<li><a href="profile_photo" >{{$editmenu.menu.chg_photo}}</a></li>
|
||||
{{if $editmenu.menu.cr_new}}<li><a href="profiles/new" id="profile-listing-new-link">{{$editmenu.menu.cr_new}}</a></li>{{/if}}
|
||||
</ul>
|
||||
{{elseif $editmenu}}
|
||||
<a class="btn btn-primary btn-xs" href="{{$editmenu.edit.0}}" ><i class="fa fa-pencil"></i> {{$editmenu.edit.3}}</a>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="pull-right dropdown">
|
||||
<div class="pull-right">
|
||||
{{if $profile.like_count}}
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" id="profile-like">{{$profile.like_count}} {{$profile.like_button_label}}</button>
|
||||
{{if $profile.likers}}
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}"><img class="dropdown-menu-img-xs" src="{{$liker.photo}}" alt="{{$liker.name}}" /> {{$liker.name}}</a></li>{{/foreach}}</ul>
|
||||
{{/if}}
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" id="profile-like">{{$profile.like_count}} {{$profile.like_button_label}}</button>
|
||||
{{if $profile.likers}}
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="profile-like">{{foreach $profile.likers as $liker}}<li role="presentation"><a href="{{$liker.url}}"><img class="dropdown-menu-img-xs" src="{{$liker.photo}}" alt="{{$liker.name}}" /> {{$liker.name}}</a></li>{{/foreach}}</ul>
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $profile.canlike}}
|
||||
<button type="button" class="btn btn-success btn-xs" onclick="doprofilelike('profile/' + '{{$profile.profile_guid}}','like'); return false;" title="{{$profile.likethis}}" >
|
||||
<i class="fa fa-thumbs-o-up" title="{{$profile.likethis}}"></i>
|
||||
</button>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-success btn-xs" onclick="doprofilelike('profile/' + '{{$profile.profile_guid}}','like'); return false;" title="{{$profile.likethis}}" >
|
||||
<i class="fa fa-thumbs-o-up" title="{{$profile.likethis}}"></i>
|
||||
</button>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{if $editmenu.multi}}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary btn-xs dropdown-toggle" data-toggle="dropdown" href="#" ><i class="fa fa-pencil"></i> {{$editmenu.edit.3}}</a>
|
||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||
{{foreach $editmenu.menu.entries as $e}}
|
||||
<li>
|
||||
<a href="profiles/{{$e.id}}"><img class="dropdown-menu-img-xs" src='{{$e.photo}}'>{{$e.profile_name}}<div class='clear'></div></a>
|
||||
</li>
|
||||
{{/foreach}}
|
||||
<li><a href="profile_photo" >{{$editmenu.menu.chg_photo}}</a></li>
|
||||
{{if $editmenu.menu.cr_new}}<li><a href="profiles/new" id="profile-listing-new-link">{{$editmenu.menu.cr_new}}</a></li>{{/if}}
|
||||
</ul>
|
||||
</div>
|
||||
{{elseif $editmenu}}
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-primary btn-xs" href="{{$editmenu.edit.0}}" ><i class="fa fa-pencil"></i> {{$editmenu.edit.3}}</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
<h2>{{$title}}</h2>
|
||||
|
Reference in New Issue
Block a user