Forums | Mahara Community
Support
/
Output latest Views / Forum posts
03 November 2009, 6:37
Hi there,
I was just wondering if its somehow easy possible to simply add a snippet or whatever to outpust, e.g., the last five forum posts or latest published views on the start page of mahara.
This should enable the users to actually see what's (and also, that something is) going on within the mahara community and add some dynamic content instead of a boring static start page!
Thanks a lot,
Simon
04 November 2009, 16:26
It's something we've been thinking of doing for a while and it's pretty simple to do -- similar code displays the last 5 forum posts on the group -> about page, for example.
We should probably just do it, but we've been holding off because we've got a grand plan to turn all those main content pages into Views that the site admin can edit just like personal views, and we want to write blocks to display recent forum posts, recently published views, etc.
05 November 2009, 3:06
Thanks for your answer.
I think that would really be a helpful feature. So does that mean that my plans are currently not possible? Are there any hacks that I can use instead in the meanwhile?
Thanks
05 November 2009, 22:20
Basically I think it's a good idea, and a few people have asked for it. So I've committed a very basic version to the master branch -- the patch is here. You could install that patch or at least it'll give you a good idea of what's involved.
To activate it you just need to go into config.php and add "$cfg->homepageviewlist = 5;" or however many views you want to list -- I haven't done an admin configuration setting for it.
We'll definitely remove this code when we get around to doing the site content pages as views and writing a latest views block -- but I couldn't see that happening in the near future so I wanted to do a quicker and dirtier version...
06 November 2009, 4:34
Worked like a charm!
Thanks a lot. Do you have anything similar for the latest forum posts / group activities too? =)
09 November 2009, 22:25
Hi Simon,
I think I'd prefer to wait till we do it properly with views and blocks!
But if you look at that patch, and the code on the Group->About page that shows the last 5 forum posts, you shouldn't find it too hard to knock up something similar for forum posts on the home page.
Richard.