| [ PHPXref.com ] | [ Generated: Sun Jul 20 16:35:25 2008 ] | [ bBlog 0.7.6 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 // function.getarchives.php 3 // 4 // Written by Reverend Jim <jim@revjim.net> 5 // 6 /* 7 ** bBlog Weblog http://www.bblog.com/ 8 ** Copyright (C) 2003 Eaden McKee <email@eadz.co.nz> 9 ** 10 ** This program is free software; you can redistribute it and/or modify 11 ** it under the terms of the GNU General Public License as published by 12 ** the Free Software Foundation; either version 2 of the License, or 13 ** (at your option) any later version. 14 ** 15 ** This program is distributed in the hope that it will be useful, 16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 ** GNU General Public License for more details. 19 ** 20 ** You should have received a copy of the GNU General Public License 21 ** along with this program; if not, write to the Free Software 22 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 function identify_function_getarchives () { 25 $help = ' 26 <p>the {getarchives} function is used to retrieve a list of archives. It takes the following parameters:<br /> 27 <br /> 28 assign: variable to assign data to<br /> 29 sectionid: to request archives only in a certain section<br /> 30 show: can be years, months, days, hours, minutes, or seconds. Determines how detailed the archive list should be<br /> 31 year: requests archives only from a certain year<br /> 32 month: requests archives only from a certain month<br /> 33 day: requests archives only from a certain day<br /> 34 hour: requests archives only from a certain hour<br /> 35 minute: requests archives only from a certain minute<br /> 36 second: requests archives only from a certain second<br /> 37 count: requests a count of the number of entries in each archive (takes longer to compute)<br />'; 38 39 return array ( 40 'name' =>'getarchives', 41 'type' =>'function', 42 'nicename' =>'GetArchives', 43 'description' =>'Retrieves a list of archives', 44 'authors' =>'Reverend Jim <jim@revjim.net>', 45 'licence' =>'GPL', 46 'help' => $help 47 ); 48 } 49 function smarty_function_getarchives($params, &$bBlog) { 50 $ar = array(); 51 $opt = $params; 52 53 unset($opt['assign']); 54 55 // If "assign" is not set... we'll establish a default. 56 if($params['assign'] == '') { 57 $params['assign'] = 'archives'; 58 } 59 60 $ar = $bBlog->get_archives($opt); 61 62 // No posts. 63 if(!is_array($ar)) { 64 return ''; 65 } 66 67 $bBlog->assign($params['assign'],$ar); 68 69 return ''; 70 71 } 72 73 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |