Last modified: 2014-11-17 09:21:20 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T8640, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 6640 - Prefix option for inputbox
Prefix option for inputbox
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
InputBox (Other open bugs)
unspecified
All All
: Normal normal with 7 votes (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-07-12 02:08 UTC by Katie
Modified: 2014-11-17 09:21 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Add parameter prefix to Inputbox.php (851 bytes, patch)
2006-08-20 12:12 UTC, Carl Duisberg
Details
Add GET parameter prefix to Mediawiki (436 bytes, patch)
2006-08-20 12:18 UTC, Carl Duisberg
Details

Description Katie 2006-07-12 02:08:42 UTC
There are two issues we've run into with inputbox (in using it for the en.wp mediation cabal):
1. There's no prefix option usable on the English Wikipedia. Code for this exists (http://meta.wikimedia.org/wiki/User:Algorithm/
actionCreate), but is not implemented.
2. The default option doesn't support {{CURRENTYEAR}} {{CURRENTMONTH}} {{CURRENTDAY2}}, and I assume there are others which 
don't parse as well. (The prefix option would need this capability as well.)
Comment 1 Brion Vibber 2006-07-12 05:40:17 UTC
I don't understand what this means. Can you clarify? Please 
include examples if possible.
Comment 2 Rob Church 2006-07-12 11:10:34 UTC
It's a feature request; she wants us to add a couple of things.

1. Prefix => An option which allows the value to be prepended to quietly
2. Magic words => Better parser support within the "default" option (right now
we have hard-coded, hackish support for one word, as far as I know)

I was asked to implement these a little while ago, but I point blank refuse to
add more to that code until it is rewritten.
Comment 3 Carl Duisberg 2006-08-20 12:12:55 UTC
Created attachment 2257 [details]
Add parameter prefix to Inputbox.php

This patch allows to specify parameter prefix to be specified in an inputbox.
It is passed as GET parameter of the createbox.

It is only a partial solution. Next thing to solve is make mediawiki to
understand this GET parameter.
Comment 4 Carl Duisberg 2006-08-20 12:18:41 UTC
Created attachment 2258 [details]
Add GET parameter prefix  to Mediawiki

The content of GET parameter prefix will be prepended to the title.

Example:
/index.php?title=Page&prexix=MyTest
will be interpreted as
/index.php?title=MyTestPage
Comment 5 Jamie Hari 2007-06-05 21:34:06 UTC
It looks like the CreateBox extension, which was based off Inputbox might already contain some of the code necessary. I think Inputbox is more widespread, however.

http://www.mediawiki.org/wiki/Extension:CreateBox

I think this feature request would be pretty handy as well.


@Rob, you are always awesome at making decent-code into great-code, would you consider rewriting this code to also include the two features Katie and I are requesting?

Also, would you prefer a new bug be opened for the re-write of the extension; once that is completed, this can then be implemented?
Comment 6 Jamie Hari 2007-12-08 07:08:37 UTC
Could someone please review Carl's attached patches?
Assuming they are up to snuff, could we implement them?

If not, as was mentioned before, I believe Algorithm has also implemented a (different) solution.
Worth reviewing, I figure...
Comment 7 Jamie Hari 2007-12-08 07:14:23 UTC
Separated issue #2 into Bug 12236.
(Issue #1 has patches attached for a proposed fix)
Comment 8 Siebrand Mazeland 2008-08-13 19:51:22 UTC
+patch
Comment 9 Mike.lifeguard 2008-10-25 19:56:37 UTC
(In reply to comment #2)
> I was asked to implement these a little while ago, but I point blank refuse to
> add more to that code until it is rewritten.

Does this still apply?
Comment 10 Angela 2009-02-21 04:56:02 UTC
example of prefix not working: http://en.wikipedia.org/w/index.php?title=User:Angela/Sandbox&oldid=272207059

It does on Wikia and is a very useful feature.
Comment 11 Angela 2010-03-17 23:27:57 UTC
I'd say this no longer applies and that createbox should be installed instead.
Comment 12 Chad H. 2010-03-17 23:40:06 UTC
Adding prefix options to things in InputBox other than the search form wouldn't be hard if someone's willing to write up a patch (the code's a lot nicer since it was refactored a year-ish ago), the one above is entirely too outdated. It already looks for a 'prefix' option anyway (used by the search type), so it would be trivial to repurpose it for type=create.

CreateBox lacks a lot of the versatility in InputBox, so I'd like to see this fixed :)
Comment 13 Happy-melon 2010-03-18 17:34:55 UTC
The implementation proposed is not at all sensible; it will horribly break prefix searching as well as being hackish.  A proper implementation will not touch core code.  

Wikia's interface works in two stages: first it makes a call to index.php?action=create&title=Bar&prefix=Foo/&... which is 301-redirected to index.php?action=create&title=Foo/Bar&... somewhere within the handler for action=create.  That is the best way of implementing this functionality without hacking at the core.
Comment 14 Happy-melon 2010-03-18 19:13:00 UTC
Fixed in r63922.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links