Geeklog
[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Procedural File: directory.php

Source Location: /public_html/directory.php



Page Details:



Includes:

require_once('lib-common.php') [line 35]
Geeklog common function library






THIS_SCRIPT [line 43]

THIS_SCRIPT = 'directory.php'

[ Top ]




DIR_canonicalLink [line 471]

string DIR_canonicalLink( string $topic, [int $year = 0], [int $month = 0])

Return a canonical link



Tags:

return:  <link rel="canonical"> tag


Parameters

string   $topic   current topic or 'all'
int   $year   current year
int   $month   current month
[ Top ]



DIR_displayAll [line 423]

string DIR_displayAll( string $topic, [boolean $list_current_month = false])

Display main view (list of years)

Displays an overview of all the years and months, starting with the first year for which a story has been posted. Can optionally display a list of the stories for the current month at the top of the page.




Tags:

return:  list of all the years in the db


Parameters

string   $topic   current topic
boolean   $list_current_month   true = list stories f. current month
[ Top ]



DIR_displayMonth [line 245]

string DIR_displayMonth( string $topic, int $year, int $month, [boolean $main = false])

Display month view



Tags:

return:  list of articles for the given month


Parameters

string   $topic   current topic
int   $year   year to display
int   $month   month to display
boolean   $main   true: display view on its own page
[ Top ]



DIR_displayYear [line 329]

string DIR_displayYear( string $topic, int $year, [boolean $main = false])

Display year view



Tags:

return:  list of months (+ number of stories) for given year


Parameters

string   $topic   current topic
int   $year   year to display
boolean   $main   true: display view on its own page
[ Top ]



DIR_lastDayOfMonth [line 68]

int DIR_lastDayOfMonth( int $month, int $year)

Helper function: Calculate last day of a given month



Tags:

return:  Number of days in that month
todo:  

Bug: Will fail from 2038 onwards ...

"The last day of any given month can be expressed as the "0" day of the next month", http://www.php.net/manual/en/function.mktime.php



Parameters

int   $month   Month
int   $year   Year
[ Top ]



DIR_monthLink [line 127]

string DIR_monthLink( string $topic, int $year, int $month, int $count)

Build link to a month's page



Tags:

return:  month name + count, as link or plain text


Parameters

string   $topic   current topic
int   $year   year to link to
int   $month   month to link to
int   $count   number of stories for that month (may be 0)
[ Top ]



DIR_navBar [line 154]

string DIR_navBar( string $topic, int $year, [int $month = 0])

Display navigation bar



Tags:

return:  navigation bar with prev, next, and "up" links


Parameters

string   $topic   current topic
int   $year   current year
int   $month   current month (or 0 for year view pages)
[ Top ]



DIR_topicList [line 90]

void DIR_topicList( [string $topic = 'all'], [int $year = 0], [int $month = 0], [boolean $standalone = false])

Display a topic selection drop-down menu



Parameters

string   $topic   current topic
int   $year   current year
int   $month   current month
boolean   $standalone   true: don't display form inline
[ Top ]



Documentation generated on Sat, 11 Feb 2012 02:07:30 -0500 by phpDocumentor 1.4.3