mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-22 03:43:40 +00:00
show more/fewer for page addon
This commit is contained in:
parent
28c5e4615e
commit
e536b2593c
4 changed files with 12 additions and 0 deletions
BIN
page.tgz
BIN
page.tgz
Binary file not shown.
|
@ -48,12 +48,24 @@ function page_page_end($a,&$b) {
|
|||
<h3>'.t("Forums").'</h3></div>
|
||||
<div id="sidebar-page-list"><ul>';
|
||||
|
||||
|
||||
$contacts = page_getpage($a->user['uid']);
|
||||
|
||||
$total_shown = 0;
|
||||
$more = false;
|
||||
|
||||
foreach($contacts as $contact) {
|
||||
$page .= '<li style="list-style-type: none;" class="tool"><img height="20" width="20" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" title="' . $contact['url'] . '" class="label" target="external-link">'.
|
||||
$contact["name"]."</a></li>";
|
||||
$total_shown ++;
|
||||
if($total_shown == 6) {
|
||||
$more = true;
|
||||
$page .= '</ul><div id="hide-comments-page-widget" class="fakelink" onclick="showHideComments(\'page-widget\');" >' . t('show more')
|
||||
. '</div><div id="collapsed-comments-page-widget" style="display: none;" ><ul>';
|
||||
}
|
||||
}
|
||||
if($more)
|
||||
$page .= '</div>';
|
||||
$page .= "</ul></div></div>";
|
||||
if (sizeof($contacts) > 0)
|
||||
$a->page['aside'] = $page . $a->page['aside'];
|
||||
|
|
BIN
statusnet.tgz
BIN
statusnet.tgz
Binary file not shown.
BIN
twitter.tgz
BIN
twitter.tgz
Binary file not shown.
Loading…
Reference in a new issue