]> git.mxchange.org Git - friendica-addons.git/commitdiff
show more/fewer for page addon
authorfriendica <info@friendica.com>
Thu, 3 May 2012 03:33:45 +0000 (20:33 -0700)
committerfriendica <info@friendica.com>
Thu, 3 May 2012 03:33:45 +0000 (20:33 -0700)
page.tgz
page/page.php
statusnet.tgz
twitter.tgz

index 6c01f0f3b7db2fe060528c834b3d425f2af3249f..c94f01b214e1c3285c36513420649539f2517c4f 100644 (file)
Binary files a/page.tgz and b/page.tgz differ
index 54d3d97c649b29a7fffe69fbc8e59daf93a0d441..129af41249f05a5a4cb03fc8d580524dfcec9f29 100755 (executable)
@@ -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'];
index b772d736ddffe8f5d01ace298b153befdb7e0a01..ce00f8e7658aa285e78a9549d50c09d413ea73c2 100755 (executable)
Binary files a/statusnet.tgz and b/statusnet.tgz differ
index 8430114ea14613896ddfa989f7f352c7a8c19ce7..666cf801a3fec8ba88d9da0e480891ff2ea132ce 100755 (executable)
Binary files a/twitter.tgz and b/twitter.tgz differ