updated page plugin
This commit is contained in:
parent
580bc49308
commit
2a193c4f09
|
@ -1,3 +0,0 @@
|
||||||
Pages
|
|
||||||
|
|
||||||
Shows lists of community pages
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Name: Page
|
* Name: Page
|
||||||
* Description: Shows lists of community pages
|
* Description: Shows lists of community pages (improved performance over 'pages)
|
||||||
* Version: 1.0
|
* Version: 1.0
|
||||||
* Author: Mike Macgirvin <mike@macgirvin.com>
|
* Author: Mike Macgirvin <mike@macgirvin.com>
|
||||||
* based on pages plugin by
|
* based on pages plugin by
|
||||||
|
@ -23,7 +23,7 @@ function page_getpage($uid) {
|
||||||
|
|
||||||
$pagelist = array();
|
$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",
|
WHERE `network`= 'dfrn' AND `forum` = 1 AND `uid` = %d",
|
||||||
intval($uid)
|
intval($uid)
|
||||||
);
|
);
|
||||||
|
@ -32,7 +32,7 @@ function page_getpage($uid) {
|
||||||
|
|
||||||
// Look if the profile is a community page
|
// Look if the profile is a community page
|
||||||
foreach($contacts as $contact) {
|
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);
|
return($page);
|
||||||
}
|
}
|
||||||
|
@ -50,7 +50,7 @@ function page_page_end($a,&$b) {
|
||||||
$contacts = page_getpage($a->user['uid']);
|
$contacts = page_getpage($a->user['uid']);
|
||||||
|
|
||||||
foreach($contacts as $contact) {
|
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>";
|
$contact["name"]."</a></li>";
|
||||||
}
|
}
|
||||||
$page .= "</ul></div></div>";
|
$page .= "</ul></div></div>";
|
||||||
|
|
Loading…
Reference in a new issue