===== display_blog ===== **Version:** VSNS 4 \\ **Class:** ''[[..vsns]]'' \\ **Depends on:** ''[[delete_article|delete_article()]]'', ''[[escape|escape()]]'', ''[[..:article]]'', ''[[..:mysql]]'', ''[[..:page]]'' display_blog - Displays a number of articles based on arguments ==== Description ==== ''string display_blog ( [string $mode [, string $headline [, int $id]]] )'' Displays articles depending on the selected mode. The default mode, single, will display one article based on the ID passed to the function. ==== Parameters ==== * ''//mode//'' - Controls which types of articles are displayed. Valid values: ''archive'', ''categories'', ''important'', ''index'', ''single'', ''tags''. ''Single'' is the default. * ''//headline//'' - If set to the default, ''full'', shows the entire article. Otherwise shows the just the article heading. * ''//id//'' - The ID of the article to display (if ''//mode//'' is set to ''single'') ==== Examples ==== // Outputs all articles from August 2007 $_GET['year'] = 2007; $_GET['month'] = 08; vsns::$page = new page; $output = vsns::display_blog ('archive'); vsns::$page->output ($output); // Outputs all "important" articles, heading only. This function also checks if an important article is expired and deletes or unpins it as configuration settings allow. vsns::$page = new page; $output = vsns::display_blog ('important', 'headline'); vsns::$page->output ($output); // Outputs the article #42 vsns::$page = new page; $output = vsns::display_blog ('single', 'full', 42); vsns::$page->output ($output); ==== Notes ==== There are no user-contributed notes for this function.