Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By kimangroo on
Hey, I was wondering how to change the default RSS feed icon used in the syndicate block etc... I want to have a different colored icon for each theme.
I guess it will be with theme_feed_icon but I'm having trouble making it work.
Can anyone help?
Comments
And how can I change the contents of an RSS feed?!
While we're on the subject, how can I change what information is available in an RSS feed? For example if I wanted to remove authorship information from the RSS feed?
Interesting question
You could look into writing a small module which uses hook_nodeapi and picks up on the rss item operation? Not sure...
Thanks for the pointer
hook_nodeapi you say... I'll read up on it. It's about time I worked out how to write a module too.
hacking node.module for now
You're right
It is that function.
If you're using a PHPTemplate theme like Garland or Bluemarine, you can create a file called template.php in the theme's folder. In that, create a function with the same name as the theme function you want to override, but replace the 'theme' bit with the name of the theme OR 'phptemplate' (the render engine). For example...
Hope this helps :-)
It does... and it doesn't...!
Actually I realised that I explained myself badly.
Using that function I could point towards a custom feed icon for every theme that uses a seperate template file but I've got one main theme and then a bunch of sub themes with different css. I should have realised that that meant the only way then was to use css.
Thanks for the help anyway!
=-=
to get a different one for each theme,
change feed-icon in your style.css file for each theme, adding the "other" feed images to the misc folder.
so in red themes style .css locate feed-icon and point to the red rss feed icon
then the blue in its style.css so on so forth.
Thanks for the help!
I didn't think that you could do it in css.
After a bit of fiddling around, I put this in each theme style sheet and it seems to work nicely:
In each theme subfolder I've got an icons folder with a different feed.png in it.
Thanks for your help guys!