Extension talk:InputBox

Jump to navigation Jump to search

About this board

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

Is autocompletion possible in search type InputBox?

Quiddity (WMF) (talkcontribs) (talkcontribs)

Use Case: Build a google-like start page

Reply to "Autocomplete possible?"
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.

inline=true doesn't work

Summary by Ciencia Al Poder
2A00:801:70:3:A155:52C6:C8A3:BD40 (talkcontribs)

No matter what I do the "inline=true" doesn't seem to have any effect. It always renders a linebreak regardless. It also seems strange that "labeltext=" isn't allowed on the "create" type...

What I want is an actual labeltext item, that is centered vertically with the input form and button, precisely as it appears in the example for "inline=true".

Ciencia Al Poder (talkcontribs)

Looks like it's a bug. The inline=true only seems to work when the inputbox appears inside a table cell. Otherwise the inputbox is always presented on its own line: test.

Reply to "inline=true doesn't work"
Ahmad252 (talkcontribs)

Hello. Is there any way to create an inputbox with afterfix parameter? For example, I enter "Sandbox" and it guides me to a subpage like "Sandbox/Subpage". Thanks.

Reply to "Afterfix?"
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"

%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: wikiversity.org/wiki/WikiJournal_Preprints

Any ideas for fixing this?

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