Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 07:48:52 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155551 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: websitebaker and RSS  (Read 524 times)
noname8

Offline Offline

Posts: 75


« on: August 18, 2011, 07:11:13 AM »

Is there some news modules or other modules that would support RSS publish?
Or can i get it via some extra service like feedburner etc? Mainly for news or calendar (mycalendar) content
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6977


WWW
« Reply #1 on: August 18, 2011, 08:31:05 AM »

The newsmodule has it's own RSS-feature ... see here: http://svn.websitebaker2.org/branches/2.8.x/wb/modules/news/rss.php

I don't know about the calendar module though. You might want to check out Chios Topics module, that might be the right choice ...

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #2 on: September 11, 2011, 05:08:49 PM »

Hi,

the rss.php of the News-module 3.5.5 seems not working correctly.
No date and time will displayed, only title and content_short.
Right?

index.php
Code:
<link rel="alternate" type="application/rss+xml" title="mytitle" href="http://www.mydomain.com/modules/news/rss.php?page_id=22" />

dbs
Logged

dbs
WebsiteBaker Org e.V.

Offline Offline

Posts: 3719


WWW
« Reply #3 on: September 13, 2011, 10:59:53 AM »

somewhere in the forum was a changed rss.php for displaying date and time in the feed for wb 2.8.1.
i have now changed the rss.php for wb 2.8.2 an it works.

this is the changed part:

original:
Code:
//Generating the news items
while($item = $result->fetchRow()){
$description = stripslashes($item["content_short"]);
// wb->preprocess() -- replace all [wblink123] with real, internal links
$wb->preprocess($description);
?>
<item>
<title><![CDATA[<?php echo stripslashes($item["title"]); ?>]]></title>
<description><![CDATA[<?php echo $description?>]]></description>
<link><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION?></link>
<pubDate><?PHP echo date("D, d M Y", $item["published_when"]); ?></pubDate>
<guid><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION?></guid>
</item>
<?php ?>

changed to:
Code:
//Generating the news items
while($item = $result->fetchRow($result)){
//$item_date = date("r",$item['published_when']);

if(date("h:i", $item['published_when']) == '12:00') {
//if 'published_when' is NOT changed manually (time = '12:00')
//generating new timestamp with date from published_when and time from posted_when
$newdateandtime = date("d F  Y", $item['published_when']).' '.date("h:i A", $item['posted_when']);
$newdateandtime = strtotime($newdateandtime);
$item_date = date("r",$newdateandtime);
} else {
//if 'published_when' is changed by hand
//just take it like it is
$item_date = date("r",$item['published_when']);
};

?>

<item>
<title><![CDATA[<?php echo stripslashes($item["title"]); ?>]]></title>
<pubDate><![CDATA[<?php echo $item_date?>]]></pubDate>
<description><![CDATA[<?php echo stripslashes($item["content_short"]); ?>]]></description>
<guid><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION?></guid>
<link><?php echo WB_URL.PAGES_DIRECTORY.$item["link"].PAGE_EXTENSION?></link>
</item>

<?php ?>

complete rss.php for news-module 3.5.5 attached.
Logged

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!