Aquarionics

/home/a/aquarion/sites/www.aquarionics.com/epistula/chapters/article.inc.php

All my code (That is, anything not in the "Others" list on the right) is BSD licenced.

You can also view this page as text/plain or colour-coded source


<?PHP
/*******************************************************************************
    Chapter - Article
********************************************************************************

    "Page" clone, Display the item of this type, or a list of recent items

    $Id: article.inc.php,v 1.2 2004/08/17 19:59:35 aquarion Exp $

    $log$

*******************************************************************************/

#array_shift($wanted);
$file = implode("/",$wanted);

$page->title = "Articles";

$types = array("article");
$display = "single";
$limit = 10;


$localnav = array(
    array("link" => "/article/", "name" => "All by Category"),
    array("link" => "/article/recent", "name" => "Last 10"),
    array("link" => "/archive/article/", "name" => "By Date")
);

$page->localnav = $page->subheading("More Articles:").$page->menu($localnav);
$page->localnav .= $page->ulink("/meta/article.rss2", $page->image("/assets/images/buttons/rss2.gif", "[RSS Icon]"), "Aquarionics ".$page->chapter." RSS Feed")."<br>";
$page->localnav .= $page->ulink("/meta/article.esf", $page->image("/assets/images/buttons/esf.gif", "[ESF Icon]"), "Aquarionics ".$page->chapter." ESF Feed")."<br>";
$page->localnav .= $page->ulink("/meta/journal.cdf", $page->image("/assets/images/buttons/cdf.gif", "[CDF Icon]"), "Aquarionics ".$page->chapter." CDF Channel");
switch ($wanted[1]){
    case "id":
        if (!is_numeric($wanted[2])){
            $page->status = 404;
        } else {
            $return = showItem($page,"article.id = ".$wanted[2],"article",$display);
                    if ($return){
                $page->content .= $return[1];
                $page->localnav .= $page->subheading($_EP['nameforQV']).getQV($page,$return[0],"article");
                    } else {
                            $found = false;
                    }
                $page->pagenav .= pageShowAds($page->date);
        }
        break;    

    case "name":
        $return = showItem($page,"title = \"".ep_decode(urldecode($wanted[2]))."\"","article",$display);
        #echo ep_decode(urldecode($wanted[2]));
        if ($return[0]){
            $page->content .= $return[1];
            $page->localnav .= $page->subheading($_EP['nameforQV']).getQV($page,$return[0],"article");
            //$page->localnav .= pageShowAds($page->date,"4546649417");
            $page->localnav .= pageShowAds($page->date,"4546649417", "article-".$return[0]);
        } else {
            $page->status = 404;
        }
    
    break;

    case "recent":
        $page->title = "Last 10 Articles";
        $page->content .= buildIndex($types,$display,$limit);
        break;

    case "":
        $page->title = "All Articles by Category";
        $page->content .= $page->item(byCat("article"));
        break;

    default:
        $page->status = 404;
}
#$page->content .= $page->item($c);


?>



Using a heavily customised version of Tom's PHPCode2ValidXHTML Thing

Nicholas 'Aquarion' Avenell is a web developer in London, you can find out more about him or how to get in touch.

There are more Articles, Projects, Journal Entries, Photographs and things that defy description here, too.

If you're looking for something specific, there are Calendar & Category -based lists of everything.

And if you want to follow stuff that appears here, try a Syndication Feed, or the generic Feed of everything.


Aquarion's last Twitter was: [updating]
Twitter last updated


© 2000 to 2008 inclusive Nicholas Avenell
All comments are the property of their creators, published with permission
(Unless otherwise indicated, the opinions and sentiments expressed on this site are those of the author and not of any organisation of which he is an affiliate, including his employer. Caveat Lector, E&OE. sigh)
0.675 seconds, 1 queries, 2.63Mb on Fri, 08 Aug 2008 18:38:12 +0000, Not cached
Generated by Epistula Version 2.0.3