Last modified: 2008-07-19 06:40:28 UTC
Someone recently came to me to ask if there was any way to see if a requests page could be transcluded only if there were new requests on it. After working with #ifeq:, we couldn't get it to work, however a #sizeof: function that returns the size of the page in bytes should work well for this application, and could likely be used for other uses as well. This value is already reported in the page history, and I'd think would be easy enough to access with such a function. What I'm envisioning here (however it works, it works, of course) is something like this: {{#sizeof:Example}} where the size of [[Example]] would be returned in the number of bytes (404, in this case, according to the English Wikipedia's page history). Other functions such as #ifeq: could then use this value to make different things happen. Would something like this be possible, and could it be implemented if so?
The {{PAGESIZE:xyz}} magic word is what you're looking for; see <http://www.mediawiki.org/wiki/Help:Magic_words#Statistics>. For example, it's used for the percentages on [[m:Board_elections/2008/Translation#List]].