Open main menu

Extension talk:InputBox

About this board

For the page history, see also here. / previous talk on this page

Wladek92 (talkcontribs)

Concerning the translation I observe that this page is very well conceived; messages are short and nicely segmented. Translation was fast, fluent, efficient and a real pleasure for me. Thanks all for you work.

Reply to "congratulations !"
Calebfergie (talkcontribs)

Hi there,

I'm a grad student making a game built on MediaWiki that uses InputBox. Thanks so much for it, I'm new to wiki software and it's exactly what the project needs - especially the 'create' type.

I was wondering if there was a way to make an InputBox that's 'fake'. What I mean is that it automatically navigates to another (existing) page, regardless of what is typed in the box.

I'm having trouble with inputs/forms in MediaWiki and was hoping there was a way to just use InputBox for this purpose.

I'm new to PHP so I'm not confident about modifying the existing extension - so if that's not possible, could you point me to another solution? All the field needs to do is behave like an input (with a button), but route to a page I can specify in the form.

Thanks again for the tool and in advance for any feedback.

Ciencia Al Poder (talkcontribs)

You can use JavaScript for that, which is more flexible.

You can use the type=commenttitle of inputbox to specify a page title, and then with JavaScript, remove the hidden input with name section.

Calebfergie (talkcontribs)

Thanks for getting back to me. This makes sense to me, could you clarify what you mean by "remove the hidden input with name section"?

I see a few hidden inputs within the commentttle form:

  1. <input type="hidden" value="edit" name="action">
  2. <input type="hidden" value="new" name="section">
  3. <input type="hidden" value="Priming Complete" name="title">

Do you mean remove #2?

To clarify, I want the user to go to the view version of the page, not the edit version/action. Is there something else I should change to do this as well?

Calebfergie (talkcontribs)


I was able to create the intended effect by adding the following JS:

$(function () {$("input[name=action]").remove();}());


RonnieV (talkcontribs)

Is there also a way to tell InputBox to not create a new section (== Section ==), but a subsection (=== Subsection ===)? Thanks in advance, ~~~~

Ciencia Al Poder (talkcontribs)

No, that's currently not possible

Reply to "Creating subsection"
RonnieV (talkcontribs)

I'd like to give a user an option by using an inputbox to start a new section on (the same) page. Using type=commenttitle, the input of the InputBox is available in the URL and will be used as the name for the section. I'm also using a prefill to offer the user a structure to enter (one) more thing. Is there an option to use the content of the Infobox in the prefill-page or in the resulting section?

If not, is it possible to combine two Inputboxes, so that the content of both is available to create a section with, one for the sectionname and one for the content? Thanks in advance, RonnieV (talk) 16:27, 25 February 2019 (UTC)

Reply to "Combining boxes or using input"

Mobile compatibility of preload

Summary by Ciencia Al Poder
Trizek (talkcontribs)

While editing a form that uses InputBox, I realized that the form I've created is not preloading anything on the default skin for mobile. The page briefly displays some code and is then replaced by a blank page.

I've tried to see if it was due to my form, but that's not the case.

Ciencia Al Poder (talkcontribs)
Reply to "Mobile compatibility of preload"

How to select single namespace to search in

Erutuon (talkcontribs)

In Category:Wiktionary-namespace discussion pages on the English Wiktionary, I want to have the inputbox search only in the Wiktionary (Project) namespace, to override user preferences (because I didn't have the Wiktionary namespace selected and saw no results!) and maybe save server resources.

Adding searchfilter=Wiktionary: ... doesn't work, because the filter is placed at the end of the search query (that is, if you enter blah in the box, you get the query blah Wiktionary: ...) and then the namespace filter doesn't work. Adding namespaces=Wiktionary works, but it adds whitespace (a <br> tag) between the textbox and the button; maybe the extension tries to create checkboxes and fails because there's only one namespace.

Any non-buggy way to choose one namespace to search in?

Quiddity (WMF) (talkcontribs)

I believe the prefix=Wiktionary: parameter will give the same result as the namespaces=Wiktionary parameter.

Erutuon (talkcontribs)

Oh yes, that works. Thanks!

Reply to "How to select single namespace to search in" (talkcontribs)

Is autocompletion possible in search type InputBox?

Quiddity (WMF) (talkcontribs)
Reply to "Autocomplete possible?"

%5B0%5D inserted into URL in stead of %5B%5D

Evolution and evolvability (talkcontribs)

There seems to be an issue with the preloadparams[] = parameter, where instead of including %5B%5D the text %5B0%5D is included, where the extra "0" prevevnts it from functioning.

see example:

Any ideas for fixing this?

Ciencia Al Poder (talkcontribs)
Reply to "%5B0%5D inserted into URL in stead of %5B%5D"

Customise Button and Text Field colour, drop-shadow, border, etc?

2 (talkcontribs)

Hi, is it possible to modify the button colours, borders etc? And maybe the search box also?

Domtron vox (talkcontribs)

Haven't tried this for the input box, but you can make custom changes to the mediawiki CSS via the MediaWiki:Common.css page. Giving it a quick look the CSS classes your interested in is "mw-ui-button", "mw-ui-input", "mw-ui-input-inline", and possibly "mw-inputbox-centered" for the whole form area. (I just pulled these from the browser via the JS dev tools)

A bit late, but maybe it is useful to you or someone else.

Reply to "Customise Button and Text Field colour, drop-shadow, border, etc?" (talkcontribs)

Is there a way to look for/create pages with suffixes, as in prefix? If not, I don't suppose it would be a viable implementation? It'd be hella useful in some case.

Reply to "Suffix search/creation?"
Return to "InputBox" page.