I have an established open-source software project, and I’ve been fortunate enough to get donations from users. My website uses Drupal (6.19) and I’d like to add a block that shows a list of recent donations, e.g.:
Thank you for supporting OpenSTV
John Smith $5 12/20/2010
Mary Kay $20 12/5/2010
Ingwe Malmstein $50 11/27/2010
I’ve never done any custom work in Drupal, but my idea to do this was to:
- Create a custom content type called Donation that has only a title (did this already)
- Create a new Donation entry for each donation (did this too)
- Create a block that shows the 5 most recent donations
- Have the block appear in the sidebar (know how to do this)
I don’t know how to write the php code for 3. Is there a simple example of doing something like this that I could copy from? Or is there entirely different way of doing this that would work better?
I’ve never written any php code so the simpler the better. Any help would be greatly appreciated.
Use the Views module. Here is a quote about it (from its project page):