lib('api')); include($app->lib('tags')); $page['h1'] = strtoupper($app->name); $page['class'] = $app->name; if ($cid > 1) { $category = category($cid); if ($preferred = preferred($cid)) $subtitle = $preferred; else $subtitle = $category; } else $subtitle = $app->title; $page['title'] = $app->name . ': ' . $subtitle; if ($dmoz->alt) $page['title'] .= ' [' . $dmoz->alt . ']'; if ($cid > 1 and $meta_desc = meta_desc($cid)) $page['description'] = $meta_desc; else $page['description'] = $app->name . meta_desc(1); $words = 50; $page['keywords'] = implode(',', array_keys(top_tags($words, true))); $page['CID'] = ($cid > 1) ? $cid : 35; include('preamble.php'); include('vanilla.php'); include('body.php'); include('abbr.php'); doctype(); head(array( 'resource', 'hreview', 'lists', 'cloud', 'code', ), array('YellowFade')); body(); navs(); content(); $class = 'point'; $head->app = heading(2, 'app-title', strtoupper($app->name) . ': ' . $category, $app->title . ': ' . color($category, 'dred'), $class); $head->res = heading(3, 'resources', $category . ' Resources', 'Resources', $class); $head->sub = heading(3, 'subcats', 'Sub Categories of ' . $category, 'Sub Categories', $class); $head->rel = heading(3, 'related', 'Categories Related to ' . $category, 'Related Categories', $class); if ($cid == 1) { // root include($app->lib('intro')); include($app->lib('tree')); } else { include($app->lib('indices')); $level = level($cid); $crumbs = cat_crumbs($cid); print_l($head->app); if ($intro = intro($cid)) include($intro); if ($up = cat_updated($cid)) { // override file timestamp functionality $updated['local'] = $up->local; $updated['iso8601'] = $up->iso; } else { // the inverse $up->local = $updated['local']; $up->iso = $updated['iso']; } $cat_up = color($up->local, 'point dred', $up->iso); print_l('

Updated: ' . $cat_up . ' [' . $cid . ']

'); print_l('
' . $crumbs . '
'); if ($level) { // sub-categories print_l($head->sub); print_l(''); } print visit(); // dropdown category navigation // resource/hreviews if ($resource = cat_resources($cid)) { print_l(TOC($cid)); print_l($head->res); print_l(''); } else { if (is_leaf($cid)) { $message = '

'; // or not rather $class = 'dred attn'; if ($app->error) { $message .= strong('Error', $class) . ': '; $message .= $app->error; } else { $message .= strong('Note', $class) . ': '; $message .= 'No resources for this category yet, stay tuned!'; } print_l($message .= '

'); } } // related categories if ($related = related($cid)) { print_l($head->rel); foreach ($related as $id) { $crumbs = cat_crumbs($id, true); print_l('
' . $crumbs . '
'); } } if ($cloud) { print_l(heading(3, 'tag_cloud', 'Tag Cloud for ' . $category, 'Matching Tags', 'point')); print_l(tag_cloud($cloud)); } // indexes print_l(heading(3, 'index', null, 'Indexes' , 'point')); print_l('
'); foreach ($app->indexes as $i) print_l($app->crumb[$i]); print_l('
'); // external search include($app->lib('engines')); $search_for = 'Search elsewhere for '; $Category = ($preferred) ? title_case($preferred) : $category; print_l(heading(4, 'search-for', $search_for . $ent['ldquo'] . $Category . $ent['rdquo'], 'Search for ' . em($Category, 'dred') . ' on:', 'point' )); print_l(eng_search($cid, $category, $tag, $preferred)); print_l(ref_search($tag, $preferred)); print_l(tag_search($cid, $tag, $preferred)); print_l(img_search()); } // feeds $OPML = image('fav/drx/logo/drxOPML.gif', null, null, 'rss'); $OPML = anchor('/drx/drx.opml', $OPML, 'Download the OPML for the entire directory', null, null, null, 'text/xml'); if ($category) { $RSS = image('fav/drx/logo/drxRSS.gif', null, null, 'rss'); $rss = str_replace($app->URI, '/drx/rss', $path); $title = 'Subscribe to the RSS feed for ' . $category; $feeds = anchor($rss, $RSS, $title, null, null, null, media_type('rss')); $feeds .= "\n" . ' ' . $OPML; /* $cacheURI = 'http://my.rsscache.com/' . $laz['domain'] . $rss; $RSS = image('fav/drx/logo/rsscache.gif', null, null, 'rss'); $title = 'Access the RSS feed for ' . $category . ' via RSScache'; $feeds .= "\n" . ' ' . anchor($cacheURI, $RSS, $title); */ } else $feeds = $OPML; include($app->lib('search')); $form = form(); print <<<_B $form $feeds $dmoz->button $google _B; updated(); footer(); // app/drx ?>