Browse Source

some inital work to have profile pics on manage page

pull/1984/head
rabuzarus 6 years ago
parent
commit
e0e6762ed8
  1. 11
      mod/manage.php
  2. 22
      view/templates/manage.tpl

11
mod/manage.php

@ -98,7 +98,16 @@ function manage_content(&$a) {
}
$identities = $a->identities;
foreach($identities as $key=>$id) {
//getting profile pics for delegates
foreach ($identities as $key=>$id) {
$thumb = q("SELECT `thumb` FROM `contact` WHERE `uid` = %d AND `name` = '%s' AND `nick` = '%s' AND (network = 'dfrn' OR self = 1)",
intval($a->user['uid']),
dbesc($id['username']),
dbesc($id['nickname'])
);
$identities[$key][thumb] = $thumb[0][thumb];
$identities[$key]['selected'] = (($id['nickname'] === $a->user['nickname']) ? ' selected="selected" ' : '');
}

22
view/templates/manage.tpl

@ -2,7 +2,7 @@
<h3>{{$title}}</h3>
<div id="identity-manage-desc">{{$desc}}</div>
<div id="identity-manage-choose">{{$choose}}</div>
<div id="identity-selector-wrapper">
{{*<div id="identity-selector-wrapper">
<form action="manage" method="post" >
<select name="identity" size="10" onchange="this.form.submit();" >
@ -13,6 +13,22 @@
</select>
<div id="identity-select-break"></div>
{{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
</div></form>
</form>
</div>*}}
<div id="identity-selector-wrapper">
<form action="manage" method="post" >
{{foreach $identities as $id}}
<button name="identity" value="{{$id.uid}}" onclick="this.form.submit();" class="id-selection-photo-link" title="{{$id.username}}"><img class="channel-photo" src="{{$id.thumb}}" alt="{{$id.username}}" /></button>
{{/foreach}}
{{*<!--<input id="identity-submit" type="submit" name="submit" value="{{$submit}}" />-->*}}
</form>
</div>
Loading…
Cancel
Save