Last modified: 2011-04-14 15:11:18 UTC
Sometimes it's handy to know, if there's any log record for such page. The idea is based on already existing {{#ifexist:}} parser function. The idea: {{#ifexistlog:Foo|true|false}} - if any kind of log (move, delete, protect...) for page Foo exist than true else false. The enhancement: It would be great to be able to differ the log type. I don't know the limitations for syntax so these are some ideas: * {{#ifexistlog:Foo|#delete|true|false}} - if delete log for page Foo exist than true else false. The log type param is optional, therefore # to recognize if it's log type or true/false param. * {{#ifexistlog:Foo|delete|true|false}} - if delete log for page Foo exist than true else false. The log type param is necessary, therefore some keyword needed for undiffered logs - "all" or "any"? * {{#ifexistlog:Foo|true|false|move}} - if delete log for page Foo exist than true else false. The log type param is optional. * {{#ifexistprotectlog:Foo|true|false}} - set of named parser functions for certain log, plus the unnamed (see top) for any kind of log. * Any other? The greater enhancement: Allow to differ via user as well. Can have the general syntax eg: {{#ifexistlog:<pagename>|<logtype>|<user>|true|false}} where logtype = any/all for undiffered log. So eg: {{#ifexistlog:Foo|all|||false}} would output false if no log for Foo page otherwise nothing.
That wanders off into the realm of being a little bit too expensive to fit in with the other parser functions, and I seriously doubt the usage would be anything like advertised. I'm not saying it's not possible, but I dispute that it would be worth it for more than a couple of cases.
Well, the main purpose, why I requested that, is to put it on MediaWiki:Noarticletext, so people who came via external link can see on the first sight if the link was incorrect, or if anything with this page happened in past. Now they have to check the log everytime even if it's empty. Another places are MediaWiki:Newarticletext and MediaWiki:Nogomatch. All three of them together are one of the most used MediaWiki messages I guess. It's always better to say: This page was never created... or This page was moved, check the log... than Check the log for possibility it's not empty and something happened to this page... It shows directly some additional info about the searched page or page intended to be created. Other uses are minor, but useful as well: * block log for users who've been blocked (eg. on rfa) - no need for people to check everybody regardless if the log is empty or not, just those, who've really been blocked (besides it's more polite to never blocked users to not show the "list of blocks" link) * page log on vfd - no need to check empty logs; it's always necessary to know what was happening to the page, but sometimes nothing happened * and couple others based on same principle. Basically it's intended to save worthless checking of empty logs, which is * annoying users * creating traffic * creating worthless server load to generate the log page
I'm still concerned that this requires a SELECT to be done on the database for each invocation, and I'm inclined to stab it now for that reason.