sugest.php: themeable as whole page
This commit is contained in:
parent
ddaacc1e53
commit
9176e739a4
4 changed files with 82 additions and 63 deletions
|
@ -65,11 +65,6 @@ function suggest_content(&$a) {
|
||||||
$a->page['aside'] .= findpeople_widget();
|
$a->page['aside'] .= findpeople_widget();
|
||||||
|
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template("section_title.tpl"),array(
|
|
||||||
'$title' => t('Friend Suggestions')
|
|
||||||
));
|
|
||||||
|
|
||||||
|
|
||||||
$r = suggestion_query(local_user());
|
$r = suggestion_query(local_user());
|
||||||
|
|
||||||
if(! count($r)) {
|
if(! count($r)) {
|
||||||
|
@ -77,25 +72,31 @@ function suggest_content(&$a) {
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
||||||
$tpl = get_markup_template('suggest_friends.tpl');
|
|
||||||
|
|
||||||
foreach($r as $rr) {
|
foreach($r as $rr) {
|
||||||
|
|
||||||
$connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
|
$connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
|
||||||
|
|
||||||
$o .= replace_macros($tpl,array(
|
$entry = array(
|
||||||
'$url' => zrl($rr['url']),
|
'url' => zrl($rr['url']),
|
||||||
'$name' => $rr['name'],
|
'url_clean' => $rr['url'],
|
||||||
'$photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
|
'name' => $rr['name'],
|
||||||
'$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
|
'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
|
||||||
'$ignid' => $rr['id'],
|
'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
|
||||||
'$conntxt' => t('Connect'),
|
'ignid' => $rr['id'],
|
||||||
'$connlnk' => $connlnk,
|
'conntxt' => t('Connect'),
|
||||||
'$ignore' => t('Ignore/Hide')
|
'connlnk' => $connlnk,
|
||||||
));
|
'ignore' => t('Ignore/Hide')
|
||||||
|
);
|
||||||
|
$entries[] = $entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= cleardiv();
|
$tpl = get_markup_template('suggest_friends.tpl');
|
||||||
|
|
||||||
|
$o .= replace_macros($tpl,array(
|
||||||
|
'$title' => t('Friend Suggestions'),
|
||||||
|
'$entries' => $entries,
|
||||||
|
));
|
||||||
|
|
||||||
// $o .= paginate($a);
|
// $o .= paginate($a);
|
||||||
return $o;
|
return $o;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
|
|
||||||
<div class="profile-match-wrapper">
|
{{include file="section_title.tpl"}}
|
||||||
<a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a>
|
|
||||||
<div class="profile-match-photo">
|
{{foreach $entries as $entry}}
|
||||||
<a href="{{$url}}">
|
<div class="profile-match-wrapper">
|
||||||
<img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" />
|
<a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide profile-match-ignore" onmouseout="imgdull(this);" onmouseover="imgbright(this);" onclick="return confirmDelete();" ></a>
|
||||||
</a>
|
<div class="profile-match-photo">
|
||||||
|
<a href="{{$entry.url}}">
|
||||||
|
<img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url_clean}}]" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-match-break"></div>
|
||||||
|
<div class="profile-match-name">
|
||||||
|
<a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-match-end"></div>
|
||||||
|
{{if $entry.connlnk}}
|
||||||
|
<div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
|
||||||
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-match-break"></div>
|
{{/foreach}}
|
||||||
<div class="profile-match-name">
|
|
||||||
<a href="{{$url}}" title="{{$name}}">{{$name}}</a>
|
<div class="clear"></div>
|
||||||
</div>
|
|
||||||
<div class="profile-match-end"></div>
|
|
||||||
{{if $connlnk}}
|
|
||||||
<div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
|
|
||||||
<div class="profile-match-wrapper">
|
{{include file="section_title.tpl"}}
|
||||||
<div class="profile-match-photo">
|
|
||||||
<a href="{{$url}}">
|
{{foreach $entries as $entry}}
|
||||||
<img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" onError="this.src='../../../images/person-48.jpg';" />
|
<div class="profile-match-wrapper">
|
||||||
</a>
|
<div class="profile-match-photo">
|
||||||
|
<a href="{{$entry.url}}">
|
||||||
|
<img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url_clean}}]" onError="this.src='../../../images/person-48.jpg';" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-match-break"></div>
|
||||||
|
<div class="profile-match-name">
|
||||||
|
<a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-match-end"></div>
|
||||||
|
{{if $entry.connlnk}}
|
||||||
|
<div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
|
||||||
|
{{/if}}
|
||||||
|
<a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-match-break"></div>
|
{{/foreach}}
|
||||||
<div class="profile-match-name">
|
|
||||||
<a href="{{$url}}" title="{{$name}}">{{$name}}</a>
|
<div class="clear"></div>
|
||||||
</div>
|
|
||||||
<div class="profile-match-end"></div>
|
|
||||||
{{if $connlnk}}
|
|
||||||
<div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
|
|
||||||
{{/if}}
|
|
||||||
<a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -1,17 +1,23 @@
|
||||||
|
|
||||||
<div class="profile-match-wrapper">
|
{{include file="section_title.tpl"}}
|
||||||
<div class="profile-match-photo">
|
|
||||||
<a href="{{$url}}">
|
{{foreach $entries as $entry}}
|
||||||
<img src="{{$photo}}" alt="{{$name}}" width="80" height="80" title="{{$name}} [{{$url}}]" onError="this.src='../../../images/person-48.jpg';" />
|
<div class="profile-match-wrapper">
|
||||||
</a>
|
<div class="profile-match-photo">
|
||||||
|
<a href="{{$entry.url}}">
|
||||||
|
<img src="{{$entry.photo}}" alt="{{$entry.name}}" width="80" height="80" title="{{$entry.name}} [{{$entry.url_clean}}]" onError="this.src='../../../images/person-48.jpg';" />
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-match-break"></div>
|
||||||
|
<div class="profile-match-name">
|
||||||
|
<a href="{{$entry.url}}" title="{{$entry.name}}">{{$entry.name}}</a>
|
||||||
|
</div>
|
||||||
|
<div class="profile-match-end"></div>
|
||||||
|
{{if $entry.connlnk}}
|
||||||
|
<div class="profile-match-connect"><a href="{{$entry.connlnk}}" title="{{$entry.conntxt}}">{{$entry.conntxt}}</a></div>
|
||||||
|
{{/if}}
|
||||||
|
<a href="{{$entry.ignlnk}}" title="{{$entry.ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="profile-match-break"></div>
|
{{/foreach}}
|
||||||
<div class="profile-match-name">
|
|
||||||
<a href="{{$url}}" title="{{$name}}">{{$name}}</a>
|
<div class="clear"></div>
|
||||||
</div>
|
|
||||||
<div class="profile-match-end"></div>
|
|
||||||
{{if $connlnk}}
|
|
||||||
<div class="profile-match-connect"><a href="{{$connlnk}}" title="{{$conntxt}}">{{$conntxt}}</a></div>
|
|
||||||
{{/if}}
|
|
||||||
<a href="{{$ignlnk}}" title="{{$ignore}}" class="icon drophide profile-match-ignore" {{*onmouseout="imgdull(this);" onmouseover="imgbright(this);" *}}onclick="return confirmDelete();" ></a>
|
|
||||||
</div>
|
|
||||||
|
|
Loading…
Reference in a new issue