Customize the RSS feed

I'd like to update the RSS feed to limit it to reporting that a new project has been created or an existing project has been updated.

possible?

You can have a look at the Feed controller and especially the recent_activities() function.

You should be able to filter the information from there.

I'm not saying that it will be easy but it should mostly be a matter of getting familiar with the correct models and classes.

Do not hesitate to ask if you have problems with that though.

Tim

So I went and got me a php book *dizzy but I can hardly make heads or tails of the feed controller and the resulting xml.

Seems all the info is there except the project_id should be part of the title or be the title.

Thanks for the point in the right direction Tim. Perhaps I would have made it further if I hadn't been pushing so hard to get our drupal based intranet up and running. Version 6 came out Feb. 13th.

My goal for the weekend is to modify the rss feed to look something more like this:

change Title = Project ID
add desc = what old title was (recent activity)

so...

PROJECT NAME
files uploaded or milestone closed
author - date/time

wish me luck, give advice and tips

unbelievable how difficult this turns out to be. Jumping around from file to file, creating logs, reading and writing from logs, defining and redefining variables. Wow my brain hurts. I gave it a go but just broke stuff. Course I probably made it way harder than it really is.

Can't believe it would be that hard to just change the current title to be the body and make the title be the job name.

Hi dood,

I'll try to find some time and look at it. If I figure it out, I'll post some more details to help you work your way through the code.
There might be a real problem that would need to be fixed, who knows?

I don't want you to stop here after the motivation you showed! ;-)

-

Tim

Tim that would be fantastic! It didn't look to me like it would be just a matter of adding a $getname someplace.

Even just getting the project name in the title would be huge!

One thing, it looked to me like the feed controller had a couple options

"List recent activities" and "list project activities"

My initial thought was changing the link...
www.address/index.php?c=feed&a=recent_activities&id=1&token=id goes here

from a=recent_activities to a=project_activities

but got nothing

when you got 20 or so (heck even 2) projects going and all you get is a "file uploaded" or "message added" title it doesn't tell me much.

*edit
just realized why it was so complicated. It's based on current user. Can't have an rss that just has everything, has to be user specific. Client just wants rss for his projects, which makes sense the no need for project name in that case. still wouldn't hurt tho especially if client has more than 1 current project.

ok I noticed why their were two types "recent_activities" and "project_activities"

Project activities is a feed for a particular project (good for clients)
Recent activities is a feed for all activites (wish project name was in the title)

dood, did you ever get this figured out? I found a way to add the project name to the feed title. Using Tim's suggestion, I looked at the Feed Controller. Through that I tracked down where the titles were being added or created by the populateFeedFromLog function.

I then added a call to the getProject function of the current $activity_log_entry within the for loop which return a project object. Using that, I was able to execute the getName function on the project object and then adjust the text of the first item in the Angie_Feed_Item function.

My code could probably be cleaned up, but it does what I need it to do on an internal office site. Plus I'm nowhere near to being an experienced php programmer.

Hi,

can you share the code? I would like to get the feed like this:
---
Project name/Title
text if available (for example comments etc.)
---

Plain title just feels so stupid, and you can't click the title and see what has happened because then you have to logon. On the other hand...how you manage the situation when you don't want to show everything to everyone :-(

regards
Markku

In order not to show everything to everyone, the code will need to contain permissions checks the same way they are used when displaying the messages page for example.

I suppose most of these checks (if not all) are already in there because the feed wouldn't show the title of something you can't see.

Tim