mrthetooth wrote:
> I'm still having trouble with this issue. Perhaps I'm missing something, but
> this seems to be a simpler version of how Wikimedia Commons' Template:potd
> works (http://commons.wikimedia.org/wiki/Template:Potd).
>
> If anyone is familiar with the workings of the Picture of the Day on
> Wikimedia Commons, then perhaps they can answer my original two questions.
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of mrthetooth
> Sent: Wednesday, October 06, 2010 5:57 PM
> To: MediaWiki announcements and site admin list
> Subject: [Mediawiki-l] Auto Updating Issue
>
> So I'm trying to make an "Image of the Day" template, but I'm having trouble
> with the image changing automatically each day.
>
> I created a page (for example, Screenshot) with a subpage for every day (for
> example, Screenshot/October 6, Screenshot/October 7, Screenshot/October 8).
> On each of these subpages I display one image. The template transcludes a
> subpage depending on the day. Here is essentially the code:
>
> {{#ifexist: Screenshot/{{#time: F j}} | {{: Screenshot /{{#time: F j}}}} |
> {{: Screenshot /default}} }}
>
> This works well sometimes. Some days the image that the template displays
> changes on its own when the date changes. Other days I have to manually
> click "edit" and then "Save page" in order to refresh the image.
>
> I essentially have two questions:
>
> 1. Why does this template work inconsistently; i.e., some days images
> changes on its own, and some days not?
>
> 2. How can I make the image always change on its own?
For greater efficiency, pages are cached. You can force to render the
latest version by purging the page (just add ?action=purge to the url),
that's a bit faster than a null edit.
The fact that it sometimes work and sometimes not may depend on the
exact time the page being viewed was cached.
You may try {{#time: F}} {{CURRENTDAY}} in case it performs better.
_______________________________________________
MediaWiki-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l