Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-17 00:06:40

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Adding costume tags to the RSS feed

Hi,

I would like to include these tags as child under <channel> in the RSS news feed generated by Textpattern:

<language>no</language>
<ttl>15</ttl><skipHours>21</skipHours><skipHours>22</skipHours><skipHours>23</skipHours>
<skipHours>0</skipHours><skipHours>1</skipHours><skipHours>2</skipHours><skipHours>3</skipHours>

(the feed is written in Norwegian, user agents should fetch every fifteenth minutes, and user agents should skip updates between 21:00 and 3:59 GMT)

I have tried modifying on rss.php but with no luck. Please advise on how I can include the above code in my RSS feed.

Last edited by Aleksandersen (2007-04-17 00:17:38)

Offline

#2 2007-04-17 00:08:09

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Adding costume tags to the RSS feed

I have tried modifying on rss.php but with no luck.

What did you already try doing?

Offline

#3 2007-04-17 00:19:58

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Re: Adding costume tags to the RSS feed

Well; nothing actually. I could not figure out where to put the code…

Offline

#4 2007-04-17 00:27:20

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Adding costume tags to the RSS feed

FYI: that kind of info is important. :)

After line 35, add this:

$out[] = tag('no', 'language');

$out[] = tag('15', 'ttl');

$out[] = tag(
	tag('21', 'hour').
	tag('22', 'hour').
	tag('23', 'hour').
	tag('0', 'hour').
	tag('1', 'hour').
	tag('2', 'hour').
	tag('3', 'hour')
, 'skipHours');

Offline

#5 2007-04-17 00:59:33

Aleksandersen
Member
From: Lillehammer, Norway
Registered: 2007-04-12
Posts: 77

Re: Adding costume tags to the RSS feed

:D Thanks! That did the trick!

Offline

Board footer

Powered by FluxBB