<?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
$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)
);
// 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);
}
$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>";