Jump to content

Extension talk:InputBox/Archive 2

About this board

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


Default width extends out of screen on mobile

2
RoyZuo (talkcontribs)
R1F4T (talkcontribs)

Width parameter is not working in mobile specialy on other wikis I see.

Reply to "Default width extends out of screen on mobile"

Preloading caused weird category name

1
Summary by Kghbln
Kghbln (talkcontribs)

Did someone come across this one?

<inputbox>
type=create
prefix=Extra:
preload=Template:PreloadWithCategory
buttonlabel=Create new page
useve=true
</inputbox>

Template:PreloadWithCategory

[[Category:ExtraPage]]

This adds category "Index.php?title=Category:ExtraPage" instead of just "ExtraPage". In other words, it prepends "Index.php?title=Category:" to the intended category name.

I am unsure if this is caused by the default URL schema (https://example.org/index.php?title=PageName, or VisualEditor, or a combination of both. We are talking about MW 1.42 here.

Reply to "Preloading caused weird category name"

How to make it use MediaSearch instead of SpecialSearch?

2
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?

Prototyperspective (talkcontribs)

Seems like it can't yet be done:

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

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?"
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"
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?"