Changing RSS Topic Title?

Creating and modifying plugins.
Post Reply
MntlyNSane
Regular
Posts: 8
Joined: Wed Mar 21, 2007 2:19 pm

Changing RSS Topic Title?

Post by MntlyNSane »

Is there anyway to make the RSS Feed Display the following as the title:

[%catagory%] %Title%

Thanks in advance!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Changing RSS Topic Title?

Post by garvinhicking »

Hi!

You can edit that into the feed*.tpl files of your template, yes.

However, note that most RSS readers have support to display the categories in a seperate column already, and that you would duplicate the title in that case.

Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MntlyNSane
Regular
Posts: 8
Joined: Wed Mar 21, 2007 2:19 pm

Re: Changing RSS Topic Title?

Post by MntlyNSane »

garvinhicking wrote: However, note that most RSS readers have support to display the categories in a seperate column already, and that you would duplicate the title in that case.
Garvin
I'm using the Google Reader, and I've checked all of my feeds and none display the category. In other feeds I subscribe to, I do see the [%cat%] layout (Fark for example) :?

Is there a different reader I can use to test?

Now forgive the n00b question, but I looked at my feed_2.0.tpl.php file in the templates_c directory, and can't make heads or tails of it. Where would I update this?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Changing RSS Topic Title?

Post by garvinhicking »

Hi!
I'm using the Google Reader, and I've checked all of my feeds and none display the category. In other feeds I subscribe to, I do see the [%cat%] layout (Fark for example) :?
Which URL is your feed, and which is the one of "Fark" (don't know what that is)? Maybe you'Ve subscribed to your RSS 0.91 feed instead of the 2.0 one...
Is there a different reader I can use to test?
I personally use the windows RSS Bandit client, which shows categories (also for my own s9y feed) as a column....
Now forgive the n00b question, but I looked at my feed_2.0.tpl.php file in the templates_c directory, and can't make heads or tails of it. Where would I update this?
No problem. First you need to look at the real file. :-D

It's in templates/nameofyourtemplate/feed_2.0.tpl - if your template does not have such a file, use the templates/default/feed_2.0.tpl file and copy it to your directory.

There you locate the <item> portion of the file. It's lin line 25 for me:

Code: Select all

<title>{$entry.feed_title}</title>
Now you can insert the category in the title by changing this to:

Code: Select all

<title>[{foreach from=$entry.categories item="cat"}{$cat.feed_category_name} {/foreach}] {$entry.feed_title}</title>
This would print each category name (if you assigned your entry to multiple categories) within the title of your feed. Save the file and you'Re done :)

Best regards
Garvin
[/code]
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
MntlyNSane
Regular
Posts: 8
Joined: Wed Mar 21, 2007 2:19 pm

Re: Changing RSS Topic Title?

Post by MntlyNSane »

garvinhicking wrote:Which URL is your feed, and which is the one of "Fark" (don't know what that is)? Maybe you'Ve subscribed to your RSS 0.91 feed instead of the 2.0 one...
I ended up subscribing to all my feeds to test it :lol:

Each had the same results
I personally use the windows RSS Bandit client, which shows categories (also for my own s9y feed) as a column....
Tried that, and the catagories do show up properly under Topics...hmmm
It's in templates/nameofyourtemplate/feed_2.0.tpl....etc
:lol:

Files did not exist, put them there and made the modifications, and it seems to work now. Thanks!

Overall the problem appears to be Google. Now it would be nice if the Google developers would fix the Reader to automatically display the catagory with :roll:

Thanks for all the help!
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Which URL is your feed, and which is the one of "Fark" (don't know what that is)? Maybe you'Ve subscribed to your RSS 0.91 feed instead of the 2.0 one...
OMG, you don't know about FARK? It's rude news. And image modification contests. Worth it just for the funny headlines.

Of course, it will suck up all your time. Garvin, you definitely should avoid it.
Judebert
---
Website | Wishlist | PayPal
Post Reply