Sorry, but I'm very new to Tikiwiki and may not conform to regular documentation standards...please correct me as neceesary.
<?php
//this script may only be included - so its better to die if called directly.
if $_SERVER%22SCRIPT_NAME%22,basename(FILE !== false) {
header("location: index.php");
exit;
}
/* inserts the content of an rss feed into a module */
function smarty_function_rss($params, &$smarty)
{
global $tikilib;
global $dbTiki;
global $rsslib;
include_once('lib/rss/rsslib.php');
extract($params);
// Param = zone
if$id {
$smarty->trigger_error("assign: missing id parameter");
return;
}
if$max {
$max = 99;
}
if$desc {
$desc = 0;
}
// skip="x,y" will not print Xth and Yth items
// useful to avoid default first items
if (!empty($skip) && preg_match('/^\d+(,\d+)*$/', $skip)) {
$skipped_items = explode(',', $skip);
$skip = array();
foreach ($skipped_items as $i) {
$skip$i = 1;
}
} else {
$skip = array();
}
$data = $rsslib->get_rss_module_content($id);
$items = $rsslib->parse_rss_data($data, $id);
if ($items0%22isTitle%22=="y") {
print '<a target="_blank" href="'.$items0%22link%22.'" class="linkmenu">'.$items0%22title%22.'</a>';
$items = array_slice ($items, 1);
}
for($i=0;$i<count($items) && $i<$max;$i++) {
if (!$skip$i+1) {
if($desc) {
if ($items$i%22pubDate%22 <> '') print(' <span class="rssdate">('.$items$i%22pubDate%22.')</span>');
print('</li>'); }
else {
if ($items$i%22pubDate%22 <> '') print(' <span class="rssdate">('.$items$i%22pubDate%22.')</span>');
print('</li>'); }
}
}
}
/* vim: set expandtab: */
?>
To help developers solve the bug, we kindly request that you demonstrate your bug on a show2.tiki.org instance. To start, simply select a version and click on "Create show2.tiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show2.tiki.org.
To help developers solve the bug, we kindly request that you demonstrate your bug on a show.tikiwiki.org instance. To start, simply select a version and click on "Create show.tikiwiki.org instance". Once the instance is ready (in a minute or two), as indicated in the status window below, you can then access that instance, login (the initial admin username/password is "admin") and configure the Tiki to demonstrate your bug. Priority will be given to bugs that have been demonstrated on show.tikiwiki.org.
filename | created | hits | comment | version | filetype | ||
---|---|---|---|---|---|---|---|
No attachments for this item |