]> git.mxchange.org Git - friendica.git/commitdiff
some inital work to have profile pics on manage page
authorrabuzarus <>
Sun, 25 Oct 2015 13:00:08 +0000 (14:00 +0100)
committerrabuzarus <>
Sun, 25 Oct 2015 13:00:08 +0000 (14:00 +0100)
mod/manage.php
view/templates/manage.tpl

index 5513ebe08d70b1c48475bb4d643833d1f9d085bf..236a3fb0541c7a9357951290ce03ecb146e73e82 100644 (file)
@@ -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" ' : '');
        }
 
index 80477bc40b3aa956bf0d9d5ea68da3ff089857a0..d82ddb6d73a8f8219ed9884d0325b69f746e1fd2 100644 (file)
@@ -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();" >
 
        </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>
+       
+       
\ No newline at end of file