[Mediawiki-l] {{CURRENTMONTHNAME}} minus one

Hans Voss hans.voss at gmail.com
Thu Mar 16 10:02:23 UTC 2006


You mean this is 'build in' into the calendar template?
And here I was, hacking up your code to generate something similar
(display "next week").
Darn.

On 3/16/06, Christof Damian <christof at damian.net> wrote:
> You could also use my calendar extension:
> http://meta.wikimedia.org/wiki/User:Cdamian/calendar
>
> It allows to include pages based on dates. For example:
>
> == Last Month ==
> <calendar>
> view=today
> date="-1 month"
> format="Calendar/%n.%Y"
> </calendar>
>
> == On this day ==
> <calendar>
> view=today
> date="-1 month"
> format="Calendar/%j.%n"
> </calendar>
>
> It doesn't fit for every case, but have a look at the examples to see
> what is possible.
>
> christof
>
>
> On Wed, 15 Mar 2006, Rick DeNatale wrote:
> > On 3/15/06, Joshua Yeidel <yeidel at wsu.edu> wrote:
> > > I just found a way to compute the correct string in PHP.  I don't know how
> > > to make it available as a "magic word".  I looked at the "meta" site and the
> > > code, but I didn't find an easy solution.
> > >
> > > It is possible that a solution could come from the world of templates -- I'm
> > > not an expert, but it seems doable.  For example, you could have an array
> > > that is indexed by {{CURRENTMONTH}} which gives the previous month's name.
> >
> > I do something similar on my wiki to provide an on-this-date feature
> > on the home page.  I've got a family of history templates with a
> > master which has 366 template subpages for each day of the year.
> >
> > Adapting what I do to get a last month template would look something like this:
> >
> > 1st make a template called say LastMonth
> > Template:LastMonth
> > {{LastMonth/{{CURRENTMONTHNAME}}}}
> >
> > Then make 12 templates
> >
> > Template:LastMonth/January
> > December
> >
> > Template:LastMonth/February
> > January
> >
> > ...
> >
> > Template:LastMonth/December
> > November
> >
> > voila!
> >
> >
>
> --
> Christof Damian
> christof at damian.net
> _______________________________________________
> MediaWiki-l mailing list
> MediaWiki-l at Wikimedia.org
> http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
>


--
----
Met vriendelijke groeten / With kind regards
Hans Voss
---------------------------------------
skype: hans.voss
google talk enabled
I am looking for people to invite to Gmail. I have 100 invitations left.



More information about the MediaWiki-l mailing list