I have a question for the experts on this list.
I have an otherwise rather static page (front page) on which I have a link that is defined as: [[{{CURRENTMONTHNAME}} {{CURRENTDAY}} {{CURRENTYEAR}}]]
I have noticed that this link only gets updated when I actually modify the page. Is there another way to get the page to update (at the start of each day, so special calls like adding a '?refresh_now' to the URL are ok).
On 8/17/05, Hans Voss hans.voss@gmail.com wrote:
I have a question for the experts on this list.
I have an otherwise rather static page (front page) on which I have a link that is defined as: [[{{CURRENTMONTHNAME}} {{CURRENTDAY}} {{CURRENTYEAR}}]]
..
I wonder if you can make a [[Template:now]] with that content, and then call that template from your page.. I think templates might act differently than regular pages.
On 17/08/05, Sy sy1234@gmail.com wrote:
I have an otherwise rather static page (front page) on which I have a link that is defined as: [[{{CURRENTMONTHNAME}} {{CURRENTDAY}} {{CURRENTYEAR}}]]
I wonder if you can make a [[Template:now]] with that content, and then call that template from your page.. I think templates might act differently than regular pages.
No, they still get cached; it's just that when they *do* get editted, they automatically purge the caches of pages including them, as well as their own.
On 8/17/05, Rowan Collins rowan.collins@gmail.com wrote:
On 17/08/05, Sy sy1234@gmail.com wrote:
I wonder if you can make a [[Template:now]] with that content, and then call that template from your page.. I think templates might act differently than regular pages.
No, they still get cached; it's just that when they *do* get editted, they automatically purge the caches of pages including them, as well as their own.
?action=purge is really cool.
I guess this means that I could badge pages with a template and purge that template as a way of "bulk-purging" multiple pages. Wicked.
I'm confused as to how to actually use the "?action=purge"? How do I use it in a intra-wiki link. For example, I tried the following:
[PracticePage?action=purge|PracticePage]
But it thinks I want to create a new page called PracticePage?action=purge, which was to be expected.
I think possibly I could solve my problem with templates but I'm not sure I follow what it's telling me to do: http://meta.wikimedia.org/wiki/Help:URL#Use_in_templates
I seem to only be able to make the purge option work for external links (or fully qualified links)? If I use a fully qualified url then MW marks it as an external link (even though it's not really) and since I tweaked the Links.php to always open external links in a new page this doesn't work the way that I would like it to.
Would it be possible to tweak MW to parse out the parameters after the '?' to so the the page is created correctly and then loaded correctly when called or would that cause a lot of heartburn, or do would you suggest to use a Template?
My current hack is to have a cron job running that updates the rows within the 'page' table for pages that I don't want cached with the current timestamp to fool MW into thinking the page has been touched.
Thanks!
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Sy Sent: Wednesday, August 17, 2005 8:57 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Date variables in MW do not refresh automagically
On 8/17/05, Rowan Collins rowan.collins@gmail.com wrote:
On 17/08/05, Sy sy1234@gmail.com wrote:
I wonder if you can make a [[Template:now]] with that content, and then call that template from your page.. I think templates might act differently than regular pages.
No, they still get cached; it's just that when they *do* get editted, they automatically purge the caches of pages including them, as well as their own.
?action=purge is really cool.
I guess this means that I could badge pages with a template and purge that template as a way of "bulk-purging" multiple pages. Wicked. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
Try this:
[{{SERVER}}{{localurl:{{NAMESPACE}}:{{PAGENAME}}|action=purge}} purge]
When you edit a page, you'll see the &action=edit... it works just like that. This means you could have a script also visit that URL to purge the page.
e.g.: http://jrandomhacker.info/mw/index.php?title=Sandbox&action=purge
(As an aside, I feel this functionality is abusable and should be for administrator's only.)
Sy,
On 8/17/05, Mark Johnson crvmp3@hotmail.com wrote:
I'm confused as to how to actually use the "?action=purge"? How do I use it in a intra-wiki link. For example, I tried the following:
[PracticePage?action=purge|PracticePage]
But it thinks I want to create a new page called PracticePage?action=purge, which was to be expected.
I think possibly I could solve my problem with templates but I'm not sure I follow what it's telling me to do: http://meta.wikimedia.org/wiki/Help:URL#Use_in_templates
I seem to only be able to make the purge option work for external links (or fully qualified links)? If I use a fully qualified url then MW marks it as an external link (even though it's not really) and since I tweaked the Links.php to always open external links in a new page this doesn't work the way that I would like it to.
Would it be possible to tweak MW to parse out the parameters after the '?' to so the the page is created correctly and then loaded correctly when called or would that cause a lot of heartburn, or do would you suggest to use a Template?
My current hack is to have a cron job running that updates the rows within the 'page' table for pages that I don't want cached with the current timestamp to fool MW into thinking the page has been touched.
Thanks!
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Sy Sent: Wednesday, August 17, 2005 8:57 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Date variables in MW do not refresh automagically
On 8/17/05, Rowan Collins rowan.collins@gmail.com wrote:
On 17/08/05, Sy sy1234@gmail.com wrote:
I wonder if you can make a [[Template:now]] with that content, and then call that template from your page.. I think templates might act differently than regular pages.
No, they still get cached; it's just that when they *do* get editted, they automatically purge the caches of pages including them, as well as their own.
?action=purge is really cool.
I guess this means that I could badge pages with a template and purge that template as a way of "bulk-purging" multiple pages. Wicked. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On 8/17/05, Mark Johnson crvmp3@hotmail.com wrote:
I'm confused as to how to actually use the "?action=purge"? How do I use it in a intra-wiki link. For example, I tried the following:
[PracticePage?action=purge|PracticePage]
But it thinks I want to create a new page called PracticePage?action=purge, which was to be expected.
Use an "external" link to your site's index.php of MediaWiki, followed by ?title=PracticePage&action=purge.
If you want to purge a bunch of pages periodically, create an empty template, include it in all pages you want purged periodically, and activate it with something like wget -O /dev/null http://www.yoursite.com/index.php/Template:Foo?action=purge Hope this helps.
-- Josh
I think possibly I could solve my problem with templates but I'm not sure I follow what it's telling me to do: http://meta.wikimedia.org/wiki/Help:URL#Use_in_templates
I seem to only be able to make the purge option work for external links (or fully qualified links)? If I use a fully qualified url then MW marks it as an external link (even though it's not really) and since I tweaked the Links.php to always open external links in a new page this doesn't work the way that I would like it to.
Would it be possible to tweak MW to parse out the parameters after the '?' to so the the page is created correctly and then loaded correctly when called or would that cause a lot of heartburn, or do would you suggest to use a Template?
My current hack is to have a cron job running that updates the rows within the 'page' table for pages that I don't want cached with the current timestamp to fool MW into thinking the page has been touched.
Thanks!
-----Original Message----- From: mediawiki-l-bounces@Wikimedia.org [mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Sy Sent: Wednesday, August 17, 2005 8:57 AM To: MediaWiki announcements and site admin list Subject: Re: [Mediawiki-l] Date variables in MW do not refresh automagically
On 8/17/05, Rowan Collins rowan.collins@gmail.com wrote:
On 17/08/05, Sy sy1234@gmail.com wrote:
I wonder if you can make a [[Template:now]] with that content, and then call that template from your page.. I think templates might act differently than regular pages.
No, they still get cached; it's just that when they *do* get editted, they automatically purge the caches of pages including them, as well as their own.
?action=purge is really cool.
I guess this means that I could badge pages with a template and purge that template as a way of "bulk-purging" multiple pages. Wicked. _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
On 17/08/05, Mark Johnson crvmp3@hotmail.com wrote:
I seem to only be able to make the purge option work for external links (or fully qualified links)? If I use a fully qualified url then MW marks it as an external link (even though it's not really) and since I tweaked the Links.php to always open external links in a new page this doesn't work the way that I would like it to.
As one of those in the "open in new window is evil" camp, I'm tempted to say that serves you right ;) OTOH, perhaps you could add a distinction to your hack to only mark "really really external links" to open a new window, using some regex to spot when they were actually on your own server or somesuch.
Would it be possible to tweak MW to parse out the parameters after the '?' to so the the page is created correctly and then loaded correctly when called or would that cause a lot of heartburn, or do would you suggest to use a Template?
Rather than tweaking the way links work, wouldn't it make more sense to tweak the way caching works in the first place? I mean, if you insist on wanting pages that are never cached, the obvious hack is to never cache them.
You could, for instance, use a hack somewhat related to those at http://meta.wikimedia.org/wiki/MediaWiki_extensions_FAQ to disable the cache whenever a certain token was encountered (either the existing variables, or some new MagicWord of your own invention; in the latter case, it could actually *be* an extension, with no output).
My current hack is to have a cron job running that updates the rows within the 'page' table for pages that I don't want cached with the current timestamp to fool MW into thinking the page has been touched.
OTOH, that seems about as sensible, in its way.
On 17/08/05, Hans Voss hans.voss@gmail.com wrote:
I have noticed that this link only gets updated when I actually modify the page. Is there another way to get the page to update (at the start of each day, so special calls like adding a '?refresh_now' to the URL are ok).
You want "?action=purge", which purges MediaWiki's cache of the page and forces it to re-render it.
Thanks, that works. I thought I remembered something like ?cache=refresh or somesuch, so there was no way I was ever going to find that in the MW help on the internet.
On 8/17/05, Rowan Collins rowan.collins@gmail.com wrote:
On 17/08/05, Hans Voss hans.voss@gmail.com wrote:
I have noticed that this link only gets updated when I actually modify the page. Is there another way to get the page to update (at the start of each day, so special calls like adding a '?refresh_now' to the URL are ok).
You want "?action=purge", which purges MediaWiki's cache of the page and forces it to re-render it.
-- Rowan Collins BSc [IMSoP] _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org