updated page plugin

pull/27/merge
friendica 2012-03-23 01:44:24 -07:00
parent 580bc49308
commit 2a193c4f09
3 changed files with 4 additions and 7 deletions

BIN
page.tgz

Binary file not shown.

View File

@ -1,3 +0,0 @@
Pages
Shows lists of community pages

View File

@ -1,7 +1,7 @@
<?php
/**
* Name: Page
* Description: Shows lists of community pages
* Description: Shows lists of community pages (improved performance over 'pages)
* Version: 1.0
* Author: Mike Macgirvin <mike@macgirvin.com>
* based on pages plugin by
@ -23,7 +23,7 @@ function page_getpage($uid) {
$pagelist = array();
$contacts = q("SELECT `id`, `url`, `name` FROM `contact`
$contacts = q("SELECT `id`, `url`, `name`, `micro`FROM `contact`
WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d",
intval($uid)
);
@ -32,7 +32,7 @@ function page_getpage($uid) {
// Look if the profile is a community page
foreach($contacts as $contact) {
$page[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"]);
$page[] = array("url"=>$contact["url"], "name"=>$contact["name"], "id"=>$contact["id"], "micro"=>$contact['micro']);
}
return($page);
}
@ -50,7 +50,7 @@ function page_page_end($a,&$b) {
$contacts = page_getpage($a->user['uid']);
foreach($contacts as $contact) {
$page .= '<li class="tool"><a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" class="label" target="external-link">'.
$page .= '<li style="list-style-type: none;" class="tool"><img height="16" width="16" src="' . $contact['micro'] .'" alt="' . $contact['url'] . '" /> <a href="'.$a->get_baseurl().'/redir/'.$contact["id"].'" class="label" target="external-link">'.
$contact["name"]."</a></li>";
}
$page .= "</ul></div></div>";