| [ 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.getrss.php 3 // Modified inc/init.php 4 // Libraries 5 6 $library_dir = dirname(__FILE__).'/rss/'; 7 require_once ($library_dir.'rss.php'); 8 9 function identify_function_getrss() { 10 $help = ' 11 <p> 12 <i>function </i><b>Get Recent Posts</b><br> 13 </p> 14 <p><b><i>example: </b></i>{getrss} - select random RSS Feed<br> 15 <p><b><i>example: </b></i>{getrss id=1} - select defined RSS Feed 16 <p><b><i>example: </b></i>{getrss id=1 limit=10} - Only show 10 items 17 </p>'; 18 19 return array ( 20 'name' =>'getrss', 21 'type' =>'function', 22 'nicename' =>'Get RSS 0.1.2 alpha', 23 'description' =>'Parse RSS to HTML', 24 'authors' =>'Martin Konicek <martin.konicek@atlas.cz>', 25 'licence' =>'GPL', 26 'help' => $help 27 ); 28 } 29 30 function smarty_function_getrss($params, &$bBlog) { 31 $outputcharset='UTF8'; 32 if(isset($params['id'])) { 33 $rssrow = $bBlog->get_row("select * from ".T_RSS." where url<>'' and id='".$params['id']."'"); 34 } else { // get random one 35 $rssrow = $bBlog->get_row("select * from ".T_RSS." where url<>'' order by rand(".time().") limit 0,1"); 36 37 } 38 39 if (!isset ($params['limit'])) 40 $params['limit'] = 20; 41 42 return get_rss($rssrow->url,$rssrow->input_charset,$outputcharset,$params['limit']); 43 44 } 45 46 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |