syndicating events
- You cannot open a new topic into this forum
- Guests cannot post into this forum
msg# 1.1.1.1.1.1.1
My code works perfectly.
Perhaps no event exists in the day.
Before you claim me, get the XML via wget or the other fetching commands.
Votes:0
Average:0.00
msg# 1.1.1.1.1.1
i appreciate your help here, but the code you posted above does not work at all. it lists nothing. so, therefore i can't troubleshoot it myself in order to change it.
Votes:0
Average:0.00
msg# 1.1.1.1.1
almost the same.
copy some codes from pical_coming_schedule.php.
As I'm very busy, I can't help you any more.
There are enough informations.
Try youself !
Votes:0
Average:0.00
msg# 1.1.1.1
ok, i was able to fix the style issue by copying the rss.css file from rssfit into this folder and adding this line
<?xml-stylesheet href=\"rss.css\" type=\"text/css\"?>
it seems to be executing, but i can't get it to actually list Today's Events. it just displays the top info and stops (no events).
also, can this code be edited to pull upcoming events, a week out list, etc.
thanks in advance.
Votes:0
Average:0.00
msg# 1.1.1
can you translate what the foreign language lines say?
i'm testing this out right now. so far all i get is
"This XML file does not appear to have any style information associated with it. The document tree is shown below.
-
<html>
<body/>
</html>"
Votes:0
Average:0.00
msg# 1.1
hi joeblow.
It's quite easy to make RSS feeds.
eg) RSS of today's events
create piCal/todays_rss2.php
<?php
include '../../mainfile.php';
if (function_exists('mb_http_output')) {
mb_http_output('pass');
}
header ('Content-Type:text/xml; charset=utf-8');
// for "Duplicatable"
$mydirname = basename( dirname( __FILE__ ) ) ;
if( ! preg_match( '/^(\D+)(\d*)$/' , $mydirname , $regs ) ) echo ( "invalid dirname: " . htmlspecialchars( $mydirname ) ) ;
$mydirnumber = $regs[2] === '' ? '' : intval( $regs[2] ) ;
// 各種パスの設定
$mod_path = XOOPS_ROOT_PATH."/modules/$mydirname" ;
$mod_url = XOOPS_URL."/modules/$mydirname" ;
// piCalクラスの定義
require_once( "$mod_path/class/piCal.php" ) ;
require_once( "$mod_path/class/piCal_xoops.php" ) ;
// オブジェクトの生成
$cal = new piCal_xoops( date( 'Y-n-j' ) , $xoopsConfig['language'] , true ) ;
$cal->use_server_TZ = true ;
// cid による影響を受けないようにする
$cal->now_cid = 0 ;
// 各プロパティの設定
$cal->conn = $xoopsDB->conn ; // 本来はprivateメンバなので将来的にはダメ
include( "$mod_path/include/read_configs.php" ) ;
$cal->base_url = $mod_url ;
$cal->images_url = "$mod_url/images/$skin_folder" ;
$cal->images_path = "$mod_path/images/$skin_folder" ;
$block =& $cal->get_blockarray_date_event( "$mod_url/index.php" ) ;
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>
<rss version=\"2.0\">
<channel>
<title>Today's event on ".xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))."</title>
<link>$mod_url/</link>
<description>".xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))."</description>
<lastbuild>".formatTimestamp(time(),'rss')."</lastbuild>
<webmaster>".$xoopsConfig['adminmail']."</webmaster>
<editor>".$xoopsConfig['adminmail']."</editor>
<category>Calendar</category>
<generator>piCal for XOOPS</generator>
<language>"._LANGCODE."</language>\n" ;
foreach( $block['events'] as $event ) {
echo "
<item>
<title>{$event['start_desc']} ".xoops_utf8_encode($event['summary'])."</title>
<link>$mod_url/?event_id={$event['id']}</link>
<description>".xoops_utf8_encode($event['description'])."</description>
</item>\n" ;
}
echo "
</channel>
</rss>\n" ;
?>
Votes:0
Average:0.00
msg# 1
i really need a way to generate a rss feed for pical. one for "todays events" and another to display a list of one week out. can anyone offer any advice on this?
Votes:0
Average:0.00