Last modified: 2011-04-14 15:13:26 UTC
I have been working on several wikis lately, and I have come across a case where I want to transclude a random page (either from mainspace, all namespaces, or a specific namespace). This shouldn't be too hard to do, with some minor changes to the parser. I would have no clue how to implement it however.
"Related pages" refers to what?
I'm not sure it's a great idea to encourage people to include "random" content into another page, and it wouldn't have the anticipated effect of injecting random content on each view, due to the parser cache.
Sane behavior for 'random' stuff like this is kind of tricky to handle correctly.
If we had something time-based with expiration (and re-cache and refresh links on next change), it might be fairly sensible though.
By related pages, I mean the subpages etc. Basically, all the special pages that generate random content.
It would have to have a cronjob or something similair to expire the cache every X units of Y, perhaps the page table could be changed to have a "expiry" value, to make it auto purge? Not sure how this would be set though, probably a sysop function, however implementing the expiring shouldn't be too hard.