%%folder-view-anonymous-rdf%%
$Date: 2003/03/07 20:40:53 $

%%preprocess%%
// special self-reference
if ($this->name!="/") $this->myname= "$this->name/";
else $this->myname= $this->name;
$this->rdfLocation= "http://$site->name$_SERVER[SCRIPT_NAME]".$this->myname."index.rdf";

// don't use ssl for rss generation
if ($session->request->connection!="http") {
	header("Location: $this->rdfLocation");
	exit;
	}

// get baseUrl
$this->getBaseUrl();
$this->title= htmlentities($this->title);
$this->description= htmlentities($this->description);

// image handling
// take site image if there's not a folder image
if (!$this->imageid && $site->imageid) $this->imageid= $site->imageid;

// process image for inclusion in rdf
if ($this->imageid!="0") {
	$this->icon= new Image;
	$query= "SELECT obj.* FROM image AS obj WHERE obj.id='$this->imageid' $session->statuswhere $session->publicwhere ";
	$this->icon->selectObject($query);
	if ($this->icon->name!="") {
		$this->icon->getBaseUrl();
		$this->rdfimageTag= "<image rdf:resource=\"http://$site->name".$this->icon->uri."\" />";
		$this->imageTag= "<image>
	<title>".$this->title."</title>
	<url>http://$site->name".$this->icon->uri."</url>
	<link>$this->baseUrl</link>
	</image>";
		}
	}

// FOLDER SORT ORDER
$this->documentOrderBy= "ORDER BY obj.created DESC LIMIT 15";


%%header%%

%%css%%

%%template%%
<channel rdf:about="$this->rdfLocation">
	<title>$this->title at $site->name</title>
	<link>$this->baseUrl</link>
	<description>
	$this->description
	</description>
	$this->rdfimageTag
	<items>
		<rdf:Seq>
			{index:document;rdfSeq;$this->documentOrderBy}
		</rdf:Seq>
	</items>
	<textinput rdf:resource="$this->baseUrl/document-.html?method=listall" />
</channel>
$this->imageTag
{index:document;rss;$this->documentOrderBy}
<textinput rdf:about="$this->baseUrl/document-.html">
	<title>Search $this->title</title>
	<description>Enter a keyword to search for:</description>
	<name>keyword</name>
	<link>$this->baseUrl/document-.html</link>
</textinput>

%%listrow%%

%%nullobject%%

%%footer%%

%%postprocess%%

%%end of context%%
