Extension talk:InputBox

About this board

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


Tule-hog (talkcontribs)

Is there a way to increase the padding between the input field and the rest of the content (buttons and cat checkboxes)?

Ciencia Al Poder (talkcontribs)
Reply to "Search bar padding"

Faulty image: missing end </inputbox>?

2
CalRis25 (talkcontribs)

On page Extension:InputBox the image Simple Input Form.png|Simple_Input_Form.png in the box MediaWiki extensions manual seems to be faulty, because it shows <inputbox>...<inputbox> instead of <inputbox>...</inputbox>, or am I wrong? ~~~~

The wub (talkcontribs)

Well spotted. I've uploaded a corrected version using the first example from Extension:InputBox

Reply to "Faulty image: missing end </inputbox>?"

Multiple namespaces: not searching drafts

3
Mathglot (talkcontribs)

This is a report of a possible bug, or perhaps I am misunderstanding something.

I have an input box intended to search article space and draft space simultaneously for a title. Please see the Inputbox at en:Help:Your first article#Search for an existing article, and type 'French historiography' in the input box. (Note before you search, that en:Draft:French historiography exists.) Hit Search.

With both checkboxes checked, there are 9,000+ results.

I didn't see the Draft after 'nexting' through a few result pages, and assumed that maybe drafts are deprioritized, and maybe I would have to 'next' through hundreds of result pages to get to it. Instead, I unchecked the mainspace draft, leaving only Drafts checked, and clicked Search again.

This time, I got zero results, but note that the Search box field is empty! The namespace boxes are marked correctly; that is, only the checkbox next to Draft is checked.

Staying on the search results page, if you now type in 'French historiography' into the input box and hit Search, it finds the Draft as the #1 result.

Somewhere, there appears to be a disconnect in the Inputbox and properly populating the search term field when searching the Draft namespace. Thanks, Mathglot (talk) 23:25, 15 September 2024 (UTC)

P.S. please ping; I can't find a subscribe link.
Ciencia Al Poder (talkcontribs)

I can't reproduce the "but note that the Search box field is empty". When I uncheck Main but leave Draft checked, the search box of the results page is populated and the first result has the matching article.

What skin are you using? Mobile or Desktop?

(about subscribe link, you should get subscribed automatically since you created the post, and it's the star icon next to the title of the thread)

Mathglot (talkcontribs)

Desktop, but now I can't reproduce it either. Can close this; if it turns up again, I'll reopen. `Mathglot (talk) 04:47, 17 September 2024 (UTC)

Use input in preloadparams[] possible?

2
Andre601 (talkcontribs)

Is it possible to use the provided input value as a preloadparams[] value to pre-fill the template with it?

PerfektesChaos (talkcontribs)

@Andre601: Yes it is.

  • You might need to embed this into {{#tag:inputbox}} for expanding a template value within <inputbox> content.
  • w:de:Template:Neuer Abschnitt/URL is trying such things you asked for a URL.
Reply to "Use input in preloadparams[] possible?"

How to make it use MediaSearch instead of SpecialSearch?

1
Prototyperspective (talkcontribs)

I'd like to make it use MediaSearch instead of SpecialSearch at Template:Search inside category on Wikimedia Commons (a search box for category pages to search through media of the category). How could this be done?

Reply to "How to make it use MediaSearch instead of SpecialSearch?"

inline=true doesn't work

3
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.

FrozenPlum (talkcontribs)

I just ran across this. As a workaround, I added an ID to the parameters to target, then in my CSS hid the break element:

#myID br {
     display:none;
}

Such a small thing to fix, but I see the phab ticket (and this thread) is pretty old. I'm quite surprised there's no class implementation yet, it's the first thing I looked for. Class goes hand in hand with ID, so now we've templated different types of inputboxes to wrap them in divs that accepts a class. ¯\_(ツ)_/¯

Reply to "inline=true doesn't work"

using inline= for types other than search2?

1
NowInHD (talkcontribs)

Hey, how come the parameter inline= is limited to search2? Is there any way I could use it with the create type?

Reply to "using inline= for types other than search2?"

Autocomplete possible?

5
95.174.66.61 (talkcontribs)

Is autocompletion possible in search type InputBox?

Quiddity (WMF) (talkcontribs)
165.225.73.45 (talkcontribs)

Use Case: Build a google-like start page

Krabina (talkcontribs)
Lostraven (talkcontribs)

Interestingly, we have autocomplete working in our InputBoxes. However, the problem we're encountering is even when we tell InputBox to limit the search to a specific namespace, the autocomplete does not also limit its suggestions to that specific namespace. I found an old inactive extension that advertises "autocomplete is provided on predefined namespace," which is exactly what I'm looking for, but the extension is soooo old. I'll comment on that phabricator request too.

Reply to "Autocomplete possible?"

How to deselect "Main" namespace in search

3
School4schools (talkcontribs)

From your documentation, I see that "Main" is "checked by default." How can I uncheck it, or search for ONLY a different namespace, such as File ?

I have tried these and it still returns results from (Main)

<code>prefix=File:</code>

<code>namespace=File</code>

Thanks for help!

The wub (talkcontribs)

Even with only one namespace, you still need the parameter to be plural e.g.

<inputbox>
type=search
namespaces=File
</inputbox>
School4schools (talkcontribs)

Thanks for taking the time to fix my silly mistake.

Reply to "How to deselect "Main" namespace in search"

Is it possible to add a minimum or maximum length?

1
QuickQuokka (talkcontribs)

Hello!

I recently came across w:Wikipedia:Wikipedia Signpost/Templates/Crossword cell, which uses this feature of MediaWiki, but you can enter more than one character per cell.

I think that it would be useful if we could add a minimum or maximum length to the text. Would this be possible to implement?

Reply to "Is it possible to add a minimum or maximum length?"
Return to "InputBox" page.