John Beckett | 13 May 01:40
Picon

Re: Change TipNew to make "Created" a link

Benjamin Fritz wrote:
>> http://vim.wikia.com/wiki/VimTip1549
>>
>> Have a look at how 1549 appears, and test clicking the
>> "Created" field at the top,  just under "Tip 1549". Any
>> thoughts on whether I should change TipNew so all the new
>> tips appear like this?
>
> I like it! But, shouldn't it jump to the discussion of the
> tip, and not just the page it was discussed on?
>
> Also, what is the current functionality of the "subpage"
> argument...it doesn't seem to create a link or anything.

This arose from efforts to improve my scripts to automate wiki maintenance. One
script inserts the TipProposed template for proposed new tips. I put the subpage
argument in that to allow the template to say "All discussion should take place on
the proposed new tips page...", with a link to the discussion. This can be seen on
the following proposed new tip:
http://vim.wikia.com/wiki/Create_new_subroutines

In the past, I have manually converted TipProposed to TipNew for accepted tips. I
managed to write a clever script for the recent conversion. I was planning to just
delete the subpage argument as redundant in TipNew, but then I realised it might be
useful.

I could make it jump to the correct place on the discussion page, but I'm not sure
that the effort and accompanying wikitext ugliness would be worthwhile. The issue is
that you could have one of the following alternatives:

1.  |subpage=/200804#{{PAGENAME}}
(I would probably have TipNew insert the #{{PAGENAME}} - I think that would work.)

2.  |subpage=/200804#The actual name of the tip when it was created

(2) may give a problem for editors because the TipNew template would be more ugly
and fragile, particularly now that we put categories there. Some punctuation might
upset the template? However, the text need never change.

(1) gives a maintenance issue in that if the tip is renamed, then the anchor would
no longer work unless you went to the discussion page and edited the three
occurrences of the title.

OTOH I just tried (1) ('Show preview' - I didn't save it) and I rather like it, on
the understanding that we need not bother to edit the discussion page if the tip is
renamed. So, after wandering around in a couple of circles, I think I might try
putting the PAGENAME stuff in TipNew.

John

Gmane