We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit c13d4852 authored by tobyink's avatar tobyink

Sketch of a page.

parent 59106be3
......@@ -52,7 +52,7 @@ class TagCloud {
$query .= " GROUP BY $field ORDER BY count DESC LIMIT $limit";
$res = $mdb2->query($query);
if (PEAR::isError($res)) {
echo("ERROR ((($query))) " . $res->getMessage());
echo("ERROR - " . $res->getMessage());
}
if (!$res->numRows()) {
return false;
......
......@@ -28,10 +28,30 @@ require_once('data/Server.php');
$group = new Group($_GET['group']);
if(isset($group->name)) {
header("Content-Type: text/plain");
print_r($group);
print_r($group->getUsers());
print_r($group->tagCloudData());
$smarty->assign("id", $user->id);
$smarty->assign('group', $user->name);
$smarty->assign('fullname', $user->fullname);
$smarty->assign('bio', $user->bio);
$smarty->assign('homepage', $user->homepage);
$smarty->assign('avatar', $user->getAvatar());
$aUserTagCloud = Group::tagCloudData();
if (!PEAR::isError ($aUserTagCloud)) {
$smarty->assign('group_tagcloud',$aUserTagCloud);
}
$smarty->assign('userlist', $group->getUsers());
$smarty->assign('extra_head_links', array(
array(
'rel' => 'meta',
'type' => 'application/rdf+xml' ,
'title' => 'FOAF',
'href' => $base_url.'/rdf.php?fmt=xml&page='.htmlentities($_SERVER['REQUEST_URI'])
)
));
$smarty->display('group.tpl');
} else {
$smarty->assign('error', 'Group not found');
$smarty->assign('details', 'Shall I call in a missing peoples report?');
......
{include file='header.tpl'}
<h2 property="dc:title">Group: {$name|escape:'html':'UTF-8'}</h2>
<div about="#usergroup" typeof="foaf:Group" property="foaf:name" content="{$name|escape:'html':'UTF-8'}">
<ul rel="foaf:member" class="userlist">
{foreach from=$userlist item=me}
<li>{include file='miniprofile.tpl'}</li>
{/foreach}
</ul>
</div>
<div class='cleaner'>&nbsp;</div>
{include file='footer.tpl'}
<?php
/* Just adding this temporarily to bootstrap groups. Gone soon. */
require_once('../database.php');
// $res = $mdb2->query("CREATE TABLE Groups (
// groupname VARCHAR(64) PRIMARY KEY,
// owner VARCHAR(64) REFERENCES Users(username),
// fullname VARCHAR(255),
// bio TEXT,
// homepage VARCHAR(255),
// created int NOT NULL,
// modified INTEGER,
// avatar_uri VARCHAR(255),
// grouptype INTEGER)");
$mdb2->query("INSERT INTO Groups VALUES ('dev', 'mattl', 'libre.fm Developers', 'Developers of gnukebox, nixtape and libre.fm', 'http://ideas.libre.fm/', 1240945188, 1240945188, NULL, 0);");
$mdb2->query("INSERT INTO Groups VALUES ('altrock', 'tobyink', 'alt.rock', 'Grunge, indie, Britpop, Americana and more!', 'http://en.wikipedia.org/wiki/Alternative_rock', 1240945288, 1240945288, NULL, 0);");
// $res = $mdb2->query("CREATE TABLE Group_Members (
// groupname VARCHAR(64) REFERENCES Groups(groupname),
// member VARCHAR(64) REFERENCES Users(username),
// joined int NOT NULL");
$mdb2->query("INSERT INTO Group_Members VALUES ('dev', 'mattl', 1240945188);");
$mdb2->query("INSERT INTO Group_Members VALUES ('dev', 'tobyink', 1240945189);");
$mdb2->query("INSERT INTO Group_Members VALUES ('dev', 'elleo', 1240945190);");
$mdb2->query("INSERT INTO Group_Members VALUES ('altrock', 'tobyink', 1240945288);");
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment