Moderator: Spunkmeyer
Since I have been slightly involved in the other threads you mention I just want to give my view on the subject.Dale Ray wrote:I am starting this discussion to get feedback from users about what they would like in an updated RSS feed creation system. I did not say addon in the previous sentence because I am not convinced (yet) that an addon is needed. I feel that you can create an RSS feed with the use of styles and templates.
You make it sound like this is a shortcomming of the Static Profile, when it in fact the hole purpose of that particular profile type is to place one newsitem in one file. Then instead of using viewnews.cgi to present an individual newsitem the static files is used to ease the burden on the webserver when there is many visitors. This is why the addon was named Maginot Line to begin with (I think anyway). However, this is offtopic in this thread so please lets drop it...shanemckiness wrote:Parahead reccomends a maginot sliced profile rather than a regular static profile because static profiles cannot include more than one newitem at a time.
And I can't understand how you have come to this conclusion, since a template/style approach together with a standard profile would solve this. I get the feeling that you haven't got your head arround everything in regards to templates/styles and the use of certain profiles. And I truly don't mean anything bad with it, it just sounds like you make things so complicated?shanemckiness wrote:I found that a regular coranto profile would not be a good choice because you need to create a file with header information and footer infromation that cannot repeat, with ITEMS in between.
I also believe an addon would be best for the very same reason, you are kind of living proof of that thesis...shanemckiness wrote:I believe an addon would be best due the complications of setting this up, even though it's really a very simple thing..
<?xml version="1.0" ?>
<?xml-stylesheet type="text/css" href="rss.css" ?>
<rss version="2.0">
<channel>
<title>Test RSS Feed</title>
<link>http://www.corantodemo.org</link>
<description>Test of an RSS feed generated by Coranto.</description>
<language>en-us</language>
<Field: Content>
</channel>
</rss>
<item>
<title><Field: Subject></title>
<link>http://t3/coranto/viewnews.cgi?id=<Field: newsid></link>
<description><WordSnip Field: Text></description>
<pubDate><Field: Date></pubDate>
</item>
<Field: Abbrev_Weekday>, <Field: TwoDigitDay> <Field: Abbrev_Month_Name> <Field: Year> <Field: TwoDigitHour>:<Field: Minute>:<Field: Second> CST
<category><Field: Category></category
* {
display: block;
}
:root {
margin: 50px;
}
channel > title {
font-size: x-large;
text-align: center;
color: red;
}
item {
margin: 25px 0 20px 0;
}
item > title {
font-size: medium;
margin-bottom: 20px;
}
item > link {
font-size: small;
margin-top: 6px;
margin-bottom: 6px;
}
item > description {
font-size: small;
}
item > pubDate {
font-size: small;
}
language {
display: none;
}
I think you have proven the concept of using a template/style to create a simple RSS Feed to shane now at least.Dale Ray wrote:Enough thinking out loud for now, comments welcome.
Parahead wrote:I think you have proven the concept of using a template/style to create a simple RSS Feed to shane now at least.Dale Ray wrote:Enough thinking out loud for now, comments welcome.
It also sounds like we have pretty much the same view on how to solve this for little more complex feeds, I say go ahead and do some coding...
leeerickson2050 wrote:
You must set the HTML User File Name for the profile to end with the extension .xml.
Ahhhh Man!!! This makes me want to put the BETA on my main site.....
draines wrote:This thread has helped me set up a RSS 2.0 compliant feed from my site (almost). However, the publication dates are not fully RFC-822 date-time formatted.
I am using Coranto 1.24 and have modified the styles and templates in this thread to create my own stream. However, I cannot get two features of the time to be correct:
1) <Field: Weekday> gives me a full weekday name. The spec. calls for a three character weekday format.
2) <Field: Month_Name> gives me a full month name. The spec. calls for a three character month format.
Darrel
<PerlCode>
$pubDate = substr ($Weekday,0,3).", " . $TwoDigitDay . " " . substr ($Month_Name,0,3) ." " . $Year ." " . $TwoDigitHour . ":" . $Minute . ":" . $Second . " CST";
</PerlCode>
<Field: pubDate>
</p>
Dale Ray wrote:Try this:
sub getPubDate {
return substr($Weekday,0,3).", ".$TwoDigitDay." ".$Abbrev_Month_Name." ".$TwoDigitYear." ".$TwoDigitHour.":".$Minute." ".$Time_Zone;
}
Dale Ray wrote:Let us know how it works.
Dale Ray wrote:Are you using the Post-Build File Renamer addon?
$pubDate = makePubDate();
sub makePubDate {
@Abbrev_Week_Days = ('Sun','Mon','Tue','Wed','Thu','Fri','Sat');
@Abbrev_Months = ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
@Week_Days = ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday');
@Months = ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
($Second,$Minute,$Hour,$Month_Day, $Month,$Year,$Week_Day,$IsDST) = (gmtime(time()))[0,1,2,3,4,5,6,8];
$Month_Number = $ActualMonth = $Month + 1;
$Year += 1900;
$TwoDigitYear = substr($Year,2,2);
$TwoDigitDay = sprintf('%.2d', $Month_Day);
$TwoDigitMonth = sprintf('%.2d', $Month_Number);
$Minute = sprintf('%.2d', $Minute);
$Second = sprintf('%.2d', $Second);
$TwoDigitHour = sprintf('%.2d', $Hour);
$Month_Name = $Months[$Month];
$Abbrev_Month_Name = $Abbrev_Months[$Month];
$Day = $Month_Day;
$Weekday = $Week_Days[$Week_Day];
$Abbrev_Weekday = $Abbrev_Week_Days[$Week_Day];
return $Abbrev_Weekday.", ".$TwoDigitDay." ".$Abbrev_Month_Name." ".$TwoDigitYear." ".$TwoDigitHour.":".$Minute." GMT";
}
Dale Ray wrote:... This isn't as easy in 1.24 because you can not set an extension for each profile and because of the missing date fields to create a date compliant with the standard....
Return to Addon Development and Requests
Users browsing this forum: No registered users and 2 guests