Source for file displayfeed.php
Documentation is available at displayfeed.php
* Zikula Application Framework
* @copyright (c) 2002, Zikula Development Team
* @link http://www.zikula.org
* @version $Id: displayfeed.php 24342 2008-06-06 12:03:14Z markwest $
* @license GNU/GPL - http://www.gnu.org/copyleft/gpl.html
* @package Zikula_Value_Addons
* get information on block
return array('text_type' => 'displayfeed',
'text_type_long' => 'Show News Feed',
'allow_multiple' => true,
'admin_tableless' => true);
// Get variables from content block
if (empty($vars['feedid'])) {
if (empty($vars['displayimage'])) {
$vars['displayimage'] = 0;
$item = pnModAPIFunc('Feeds', 'user', 'get',array('fid' => $vars['feedid']));
// Check if the block is cached
if ($pnRender->is_cached('feeds_block_displayfeed.htm',$vars['feedid'])) {
$blockinfo['content'] = $pnRender->fetch('feeds_block_displayfeed.htm',$vars['feedid']);
$fullfeed = pnModAPIFunc('Feeds', 'user', 'getfeed', array('fid' => $vars['feedid']));
// Assign the module vars
// Assign the item and feed
$pnRender->assign($item);
$pnRender->assign('feed', $fullfeed);
$pnRender->assign($vars);
// Populate block info and pass to theme
$blockinfo['content'] = $pnRender->fetch('feeds_block_displayfeed.htm',$vars['feedid']);
if (empty($vars['feedid'])) {
if (empty($vars['displayimage'])) {
$vars['displayimage'] = 0;
if (empty($vars['numitems'])) {
// The API function is called. The arguments to the function are passed in
// as their own arguments array
// create an array for feednames and id's for the template
foreach($items as $item) {
$allfeeds[$item['fid']] = $item['name'];
$pnRender->assign('allfeeds', $allfeeds);
$pnRender->assign($vars);
return $pnRender->fetch('feeds_block_displayfeed_modify.htm');
|